#include <bdlar_simpletyperef.h>
◆ SimpleTypeRef() [1/2]
template<class t_TYPE >
| bdlar::SimpleTypeRef::SimpleTypeRef |
( |
t_TYPE & |
object, |
|
|
typename bsl::enable_if< IsSimple< t_TYPE >::value >::type * |
= 0 |
|
) |
| |
|
inlineexplicit |
Create a SimpleTypeRef object that type erases the supplied "simple" object.
◆ SimpleTypeRef() [2/2]
| bdlar::SimpleTypeRef::SimpleTypeRef |
( |
void * |
objectAddress, |
|
|
const SimpleTypeVtable * |
vtable |
|
) |
| |
|
inline |
Create a SimpleTypeRef object.
- Precondition
- The behaviour is undefined unless
objectAddress and vtable point to the valid objects.
◆ access() [1/2]
template<class t_ACCESSOR >
| int bdlar::SimpleTypeRef::access |
( |
t_ACCESSOR & |
accessor | ) |
const |
|
inline |
Invoke the specified accessor on the value held by this object. The supplied accessor must be an object callable with a value of any simple type as if it had the following signature:
int accessor(const VALUE& value);
Return the value from the invocation of accessor.
◆ access() [2/2]
template<class t_ACCESSOR , class t_INFO >
| int bdlar::SimpleTypeRef::access |
( |
t_ACCESSOR & |
accessor, |
|
|
const t_INFO & |
info |
|
) |
| const |
|
inline |
Invoke the specified accessor on the value held by this object supplying accessor with the specified info object. The supplied accessor must be an object callable with a value of any simple type as if it had the following signature:
int accessor(const VALUE& value, const t_INFO& info);
Return the value from the invocation of accessor.
◆ accessWithCategory()
template<class t_ACCESSOR >
| int bdlar::SimpleTypeRef::accessWithCategory |
( |
t_ACCESSOR & |
accessor | ) |
const |
|
inline |
Invoke the specified accessor on the value held by this object supplying accessor with an object of bdlat_TypeCategory::Simple type for any type except bsl::vector<char>. The latter is supplied with an object of bdlat_TypeCategory::Array type. The supplied accessor must be an object callable with a value of any simple type as if it had the following signature:
Definition bslstl_vector.h:1120
Definition bdlat_typecategory.h:1037
Definition bdlat_typecategory.h:1043
Return the value from the invocation of accessor.
◆ manipulate() [1/2]
template<class t_MANIPULATOR >
| int bdlar::SimpleTypeRef::manipulate |
( |
t_MANIPULATOR & |
manipulator | ) |
const |
Invoke the specified manipulator on the value held by this object. The supplied manipulator must be an object callable with a value of any simple type as if it had the following signature:
int manipulator(VALUE *value);
Return the value from the invocation of manipulator.
◆ manipulate() [2/2]
template<class t_MANIPULATOR , class t_INFO >
| int bdlar::SimpleTypeRef::manipulate |
( |
t_MANIPULATOR & |
manipulator, |
|
|
const t_INFO & |
info |
|
) |
| const |
Invoke the specified manipulator on the value held by this object supplying manipulator with the specified info object. The supplied manipulator must be an object callable with a value of any simple type as if it had the following signature:
int manipulator(VALUE *value, const t_INFO& info);
Return the value from the invocation of manipulator.
◆ manipulateWithCategory()
template<class t_MANIPULATOR >
| int bdlar::SimpleTypeRef::manipulateWithCategory |
( |
t_MANIPULATOR & |
manipulator | ) |
const |
|
inline |
Invoke the specified manipulator on the value held by this object supplying manipulator with an object of bdlat_TypeCategory::Simple type for any type except bsl::vector<char>. The latter is supplied with an object of bdlat_TypeCategory::Array type. The supplied manipulator must be an object callable with a value of any simple type as if it had the following signature:
Return the value from the invocation of manipulator.
◆ objectAddress()
| void * bdlar::SimpleTypeRef::objectAddress |
( |
| ) |
const |
|
inline |
Return a pointer to the wrapped object.
◆ reset()
| void bdlar::SimpleTypeRef::reset |
( |
| ) |
const |
|
inline |
Reset the referred object to the default value.
◆ typeId()
Return the type ID corresponding to the simple type held by this object.
◆ vtable()
Return a pointer to the vtable.
The documentation for this class was generated from the following file: