BDE 4.14.0 Production release
Loading...
Searching...
No Matches
bsltf::TemplateTestFacility Struct Reference

#include <bsltf_templatetestfacility.h>

Public Types

typedef TemplateTestFacility_StubClassObjectPtr
 
typedef void(* FunctionPtr) ()
 This typedef is an alias for a pointer to a function pointer.
 
typedef int(TemplateTestFacility_StubClass::* MethodPtr) ()
 

Public Member Functions

template<class TYPE >
MoveState::Enum getMovedFromState (const TYPE &object)
 
template<class TYPE >
MoveState::Enum getMovedIntoState (const TYPE &object)
 

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.

Member Typedef Documentation

◆ FunctionPtr

typedef void(* bsltf::TemplateTestFacility::FunctionPtr) ()

◆ MethodPtr

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.

◆ ObjectPtr

Member Function Documentation

◆ create()

template<class TYPE >
TYPE bsltf::TemplateTestFacility::create ( int  identifier)
inlinestatic

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.

◆ emplace() [1/20]

template<class ALLOCATOR >
void bsltf::TemplateTestFacility::emplace ( AllocEmplacableTestType address,
int  identifier,
ALLOCATOR *  allocator 
)
inlinestatic

◆ emplace() [2/20]

template<class ALLOCATOR >
void bsltf::TemplateTestFacility::emplace ( AllocEmplacableTestType address,
int  identifier,
ALLOCATOR  allocator 
)
inlinestatic

◆ emplace() [3/20]

template<class ALLOCATOR >
void bsltf::TemplateTestFacility::emplace ( char *  address,
int  identifier,
ALLOCATOR *  allocator 
)
inlinestatic

◆ emplace() [4/20]

template<class ALLOCATOR >
void bsltf::TemplateTestFacility::emplace ( char *  address,
int  identifier,
ALLOCATOR  allocator 
)
inlinestatic

◆ emplace() [5/20]

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

◆ emplace() [6/20]

template<class ALLOCATOR >
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.

◆ emplace() [7/20]

template<class ALLOCATOR >
void bsltf::TemplateTestFacility::emplace ( EmplacableTestType address,
int  identifier,
ALLOCATOR *  allocator 
)
inlinestatic

◆ emplace() [8/20]

template<class ALLOCATOR >
void bsltf::TemplateTestFacility::emplace ( EmplacableTestType address,
int  identifier,
ALLOCATOR  allocator 
)
inlinestatic

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.

◆ emplace() [9/20]

template<class ALLOCATOR >
void bsltf::TemplateTestFacility::emplace ( EnumeratedTestType::Enum address,
int  identifier,
ALLOCATOR *  allocator 
)
inlinestatic

◆ emplace() [10/20]

template<class ALLOCATOR >
void bsltf::TemplateTestFacility::emplace ( EnumeratedTestType::Enum address,
int  identifier,
ALLOCATOR  allocator 
)
inlinestatic

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.

◆ emplace() [11/20]

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

◆ emplace() [12/20]

template<class ALLOCATOR >
void bsltf::TemplateTestFacility::emplace ( TemplateTestFacility::MethodPtr address,
int  identifier,
ALLOCATOR  allocator 
)
inlinestatic

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.

◆ emplace() [13/20]

template<class ALLOCATOR >
void bsltf::TemplateTestFacility::emplace ( signed char *  address,
int  identifier,
ALLOCATOR *  allocator 
)
inlinestatic

◆ emplace() [14/20]

template<class ALLOCATOR >
void bsltf::TemplateTestFacility::emplace ( signed char *  address,
int  identifier,
ALLOCATOR  allocator 
)
inlinestatic

◆ emplace() [15/20]

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

◆ emplace() [16/20]

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

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.

◆ emplace() [17/20]

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

◆ emplace() [18/20]

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

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.

◆ emplace() [19/20]

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

◆ emplace() [20/20]

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

◆ getIdentifier() [1/4]

int bsltf::TemplateTestFacility::getIdentifier ( const char *const &  object)
inlinestatic

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.

◆ getIdentifier() [2/4]

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

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.

◆ getIdentifier() [3/4]

template<class TYPE >
int bsltf::TemplateTestFacility::getIdentifier ( const TYPE &  object)
inlinestatic

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.

◆ getIdentifier() [4/4]

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

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.

◆ getMovedFromState() [1/2]

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

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

◆ getMovedFromState() [2/2]

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

◆ getMovedIntoState() [1/2]

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

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

◆ getMovedIntoState() [2/2]

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

◆ setMovedIntoState()

template<class TYPE >
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: