Quick Links:

bal | bbl | bdl | bsl

Public Types | Static Public Member Functions

bsltf::TemplateTestFacility Struct Reference

#include <bsltf_templatetestfacility.h>

List of all members.

Public Types

typedef
TemplateTestFacility_StubClass
ObjectPtr
typedef void(* FunctionPtr )()
typedef int(TemplateTestFacility_StubClass::* MethodPtr )()

Static Public Member Functions

template<class TYPE >
static TYPE create (int identifier)
template<class TYPE , class ALLOCATOR >
static void emplace (TYPE *address, int identifier, ALLOCATOR allocator)
template<class TYPE , class ALLOCATOR >
static void emplace (TYPE *address, int identifier, ALLOCATOR *allocator)
template<class TYPE , class ALLOCATOR >
static void emplace (TYPE **address, int identifier, ALLOCATOR allocator)
template<class TYPE , class ALLOCATOR >
static void emplace (TYPE **address, int identifier, ALLOCATOR *allocator)
template<class ALLOCATOR >
static void emplace (const char **address, int identifier, ALLOCATOR allocator)
template<class ALLOCATOR >
static void emplace (const char **address, int identifier, ALLOCATOR *allocator)
template<class ALLOCATOR >
static void emplace (char *address, int identifier, ALLOCATOR allocator)
template<class ALLOCATOR >
static void emplace (char *address, int identifier, ALLOCATOR *allocator)
template<class ALLOCATOR >
static void emplace (signed char *address, int identifier, ALLOCATOR allocator)
template<class ALLOCATOR >
static void emplace (signed char *address, int identifier, ALLOCATOR *allocator)
template<class ALLOCATOR >
static void emplace (unsigned char *address, int identifier, ALLOCATOR allocator)
template<class ALLOCATOR >
static void emplace (unsigned char *address, int identifier, ALLOCATOR *allocator)
template<class ALLOCATOR >
static void emplace (EmplacableTestType *address, int identifier, ALLOCATOR allocator)
template<class ALLOCATOR >
static void emplace (EmplacableTestType *address, int identifier, ALLOCATOR *allocator)
template<class ALLOCATOR >
static void emplace (AllocEmplacableTestType *address, int identifier, ALLOCATOR allocator)
template<class ALLOCATOR >
static void emplace (AllocEmplacableTestType *address, int identifier, ALLOCATOR *allocator)
template<class ALLOCATOR >
static void emplace (EnumeratedTestType::Enum *address, int identifier, ALLOCATOR allocator)
template<class ALLOCATOR >
static void emplace (EnumeratedTestType::Enum *address, int identifier, ALLOCATOR *allocator)
template<class ALLOCATOR >
static void emplace (MethodPtr *address, int identifier, ALLOCATOR allocator)
template<class ALLOCATOR >
static void emplace (MethodPtr *address, int identifier, ALLOCATOR *allocator)
template<class TYPE >
static int getIdentifier (const TYPE &object)
template<class TYPE >
static int getIdentifier (TYPE *const &object)
static int getIdentifier (const char *const &object)
template<class ALLOC >
static int getIdentifier (const StdAllocTestType< ALLOC > &object)
template<class TYPE >
static bsltf::MoveState::Enum getMovedFromState (const TYPE &object)
template<class TYPE >
static bsltf::MoveState::Enum getMovedIntoState (const TYPE &object)
template<class TYPE >
static void setMovedIntoState (TYPE *object, bsltf::MoveState::Enum value)

Detailed Description

This struct provides a namespace that contains three aliases for types intended to be used as template parameters for testing templates. The namespace also contain two class method templates, create and getIdentifier, that respectively provides a consistent interface to (1) create a specified object of a parameterized type from an integer identifier and (2) get the identifier value of a specified object. The identifier value returned from the getIdentifier method is undefined unless the specified object was originally created with the create class method template.

See Component bsltf_templatetestfacility


Member Typedef Documentation

This typedef is an alias for a pointer to a function pointer.

typedef int(TemplateTestFacility_StubClass::* bsltf::TemplateTestFacility::MethodPtr)()

This typedef is an alias for a pointer to a method of TemplateTestFacility_StubClass taking no arguments and returning an int.


Member Function Documentation

template<class TYPE >
static TYPE bsltf::TemplateTestFacility::create ( int  identifier  )  [static]

Return a new object of the parameterized TYPE whose state is unique for the specified identifier. The behavior is undefined unless 0 <= value < 128 and TYPE is contained in the macro BSLTF_TEMPLATETESTFACILITY_TEST_TYPES_ALL.

template<class TYPE , class ALLOCATOR >
static void bsltf::TemplateTestFacility::emplace ( TYPE *  address,
int  identifier,
ALLOCATOR  allocator 
) [static]
template<class TYPE , class ALLOCATOR >
static void bsltf::TemplateTestFacility::emplace ( TYPE *  address,
int  identifier,
ALLOCATOR *  allocator 
) [static]

Create an object of the parameterized TYPE at the specified address whose state is unique for the specified identifier. The behavior is undefined unless 0 <= identifier < 128 and TYPE is contained in the macro BSLTF_TEMPLATETESTFACILITY_TEST_TYPES_ALL.

template<class TYPE , class ALLOCATOR >
static void bsltf::TemplateTestFacility::emplace ( TYPE **  address,
int  identifier,
ALLOCATOR  allocator 
) [static]
template<class TYPE , class ALLOCATOR >
static void bsltf::TemplateTestFacility::emplace ( TYPE **  address,
int  identifier,
ALLOCATOR *  allocator 
) [static]

Create a pointer to the parameterized TYPE at the specified address whose value is unique for the specified identifier. The behavior is undefined unless 0 <= identifier < 128. Note that no object is created at the address of the returned pointer, nor is it guaranteed to be a valid address for an object (or function). Also note that the same address may be returned for different allocators, and is guaranteed to be unique only with respect to the identifier value.

template<class ALLOCATOR >
static void bsltf::TemplateTestFacility::emplace ( const char **  address,
int  identifier,
ALLOCATOR  allocator 
) [static]
template<class ALLOCATOR >
static void bsltf::TemplateTestFacility::emplace ( const char **  address,
int  identifier,
ALLOCATOR *  allocator 
) [static]

Create at the specified address a pointer to a null-terminated string that will parse as having the same value as the specified identifier. The specified allocator is not used. The behavior is undefined unless 0 <= identifier < 128.

template<class ALLOCATOR >
static void bsltf::TemplateTestFacility::emplace ( char *  address,
int  identifier,
ALLOCATOR  allocator 
) [static]
template<class ALLOCATOR >
static void bsltf::TemplateTestFacility::emplace ( char *  address,
int  identifier,
ALLOCATOR *  allocator 
) [static]
template<class ALLOCATOR >
static void bsltf::TemplateTestFacility::emplace ( signed char *  address,
int  identifier,
ALLOCATOR  allocator 
) [static]
template<class ALLOCATOR >
static void bsltf::TemplateTestFacility::emplace ( signed char *  address,
int  identifier,
ALLOCATOR *  allocator 
) [static]
template<class ALLOCATOR >
static void bsltf::TemplateTestFacility::emplace ( unsigned char *  address,
int  identifier,
ALLOCATOR  allocator 
) [static]
template<class ALLOCATOR >
static void bsltf::TemplateTestFacility::emplace ( unsigned char *  address,
int  identifier,
ALLOCATOR *  allocator 
) [static]
template<class ALLOCATOR >
static void bsltf::TemplateTestFacility::emplace ( EmplacableTestType address,
int  identifier,
ALLOCATOR  allocator 
) [static]

< Set the character object at the specified address to the value of the specified identifier. The specified allocator is not used. The behavior is undefined unless 0 <= identifier < 128. Note that these overloads are needed only to avoid narrowing conversion warnings that will occur in lower-level utilities when using this test facility.

template<class ALLOCATOR >
static void bsltf::TemplateTestFacility::emplace ( EmplacableTestType address,
int  identifier,
ALLOCATOR *  allocator 
) [static]
template<class ALLOCATOR >
static void bsltf::TemplateTestFacility::emplace ( AllocEmplacableTestType address,
int  identifier,
ALLOCATOR  allocator 
) [static]
template<class ALLOCATOR >
static void bsltf::TemplateTestFacility::emplace ( AllocEmplacableTestType address,
int  identifier,
ALLOCATOR *  allocator 
) [static]
template<class ALLOCATOR >
static void bsltf::TemplateTestFacility::emplace ( EnumeratedTestType::Enum address,
int  identifier,
ALLOCATOR  allocator 
) [static]
template<class ALLOCATOR >
static void bsltf::TemplateTestFacility::emplace ( EnumeratedTestType::Enum address,
int  identifier,
ALLOCATOR *  allocator 
) [static]

Set the enumeration at the specified address to the value of the specified identifier. The specified allocator is not used. The behavior is undefined unless 0 <= identifier < 128.

template<class ALLOCATOR >
static void bsltf::TemplateTestFacility::emplace ( MethodPtr address,
int  identifier,
ALLOCATOR  allocator 
) [static]
template<class ALLOCATOR >
static void bsltf::TemplateTestFacility::emplace ( MethodPtr address,
int  identifier,
ALLOCATOR *  allocator 
) [static]

Set the pointer-to-method at the specified address to the value of the specified identifier. The specified allocator is not used. The behavior is undefined unless 0 <= identifier < 128.

template<class TYPE >
static int bsltf::TemplateTestFacility::getIdentifier ( const TYPE &  object  )  [static]

Return the integer identifier that uniquely identifies the specified object. The behavior is undefined unless object could be created from the TemplateTestFacility::create class method template.

template<class TYPE >
static int bsltf::TemplateTestFacility::getIdentifier ( TYPE *const &  object  )  [static]

Return the integer identifier that uniquely identifies the specified object. The behavior is undefined unless object was created by a call to the TemplateTestFacility::create class method template, or is a copy of such an object.

static int bsltf::TemplateTestFacility::getIdentifier ( const char *const &  object  )  [static]

Return the integer identifier that uniquely identifies the specified object. The behavior is undefined unless object could be created from the TemplateTestFacility::create class method template.

template<class ALLOC >
static int bsltf::TemplateTestFacility::getIdentifier ( const StdAllocTestType< ALLOC > &  object  )  [static]

Return the integer identifier that uniquely identifies the specified object. The behavior is undefined unless object could be created from the TemplateTestFacility::create class method template.

template<class TYPE >
static bsltf::MoveState::Enum bsltf::TemplateTestFacility::getMovedFromState ( const TYPE &  object  )  [static]

Return the moved-from state of the specified object, or 'e_UNKNOWN if (template parameter) TYPE does not support such a query.

template<class TYPE >
static bsltf::MoveState::Enum bsltf::TemplateTestFacility::getMovedIntoState ( const TYPE &  object  )  [static]

Return the moved-into state of the specified object, or 'e_UNKNOWN if (template parameter) TYPE does not support such a query.

template<class TYPE >
static void bsltf::TemplateTestFacility::setMovedIntoState ( TYPE *  object,
bsltf::MoveState::Enum  value 
) [static]

Set the moved-into state of the specified 'object to the specified value if (template parameter) TYPE does supports move states.


The documentation for this struct was generated from the following file: