BDE 4.14.0 Production release
|
#include <bsltf_stdalloctesttype.h>
Public Types | |
typedef ALLOC | allocator_type |
Public Member Functions | |
StdAllocTestType (const ALLOC &stdAllocator=ALLOC()) | |
StdAllocTestType (int value, const ALLOC &stdAllocator=ALLOC()) | |
StdAllocTestType (const StdAllocTestType &original) | |
StdAllocTestType (const StdAllocTestType &original, const ALLOC &stdAllocator) | |
~StdAllocTestType () | |
Destroy this object. | |
StdAllocTestType & | operator= (const StdAllocTestType &rhs) |
void | setData (int value) |
Set the data attribute of this object to the specified value . | |
int | data () const |
Return the value of the data attribute of this object. | |
const ALLOC & | allocator () const |
Return the allocator used by this object to supply memory. | |
This unconstrained (value-semantic) attribute class uses a standard allocator of (template parameter) type ALLOC
to allocate memory. This class does NOT define the type trait bslma::UsesBslmaAllocator
, but the trait will be true
if ALLOC
is convertible from bslma::Allocator *
(e.g., if it is an instantiation of bsl::allocator
). This class is primarily provided to facilitate testing of templates by defining a simple type representative of user-defined types using a standard allocator. See the Attributes section for information on the class attributes.
typedef ALLOC bsltf::StdAllocTestType< ALLOC >::allocator_type |
|
inlineexplicit |
Create a StdAllocTestType
object having the (default) attribute values:
Optionally specify a stdAllocator
used to supply memory. If an allocator is not supplied, a default-constructed object of the template parameter type ALLOC
is used.
|
inlineexplicit |
Create a StdAllocTestType
object having the specified data
attribute value. Optionally specify a stdAllocator
used to supply memory. If basicAllocator
is not supplied, a default constructed object of (template parameter) type ALLOC
is used.
|
inline |
|
inline |
Create a StdAllocTestType
object having the same value as the specified original
object. Optionally specify a stdAllocator
used to supply memory. If basicAllocator
is not supplied, a default constructed object of (template parameter) type ALLOC
is used.
|
inline |
|
inline |
|
inline |
|
inline |
Assign to this object the value of the specified rhs
object, and return a reference providing modifiable access to this object.
|
inline |