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

#include <bsltf_copymovestate.h>

Public Types

enum  Enum {
  e_ORIGINAL = 0x00 , e_COPIED_INTO = 0x01 , e_COPIED_CONST_INTO = 0x02 | e_COPIED_INTO , e_COPIED_NONCONST_INTO = 0x04 | e_COPIED_INTO ,
  e_MOVED_INTO = 0x08 , e_MOVED_FROM = 0x10 , e_UNKNOWN = 0x20 , e_MAX_ENUM = e_UNKNOWN
}
 

Static Public Member Functions

template<class TYPE >
static Enum get (const TYPE &obj)
 
template<class TYPE >
static bool isCopiedConstInto (const TYPE &v)
 
template<class TYPE >
static bool isCopiedInto (const TYPE &v)
 
template<class TYPE >
static bool isCopiedNonconstInto (const TYPE &v)
 
template<class TYPE >
static bool isMovedFrom (const TYPE &v)
 
template<class TYPE >
static bool isMovedInto (const TYPE &v)
 
template<class TYPE >
static bool isOriginal (const TYPE &v)
 
template<class TYPE >
static bool isUnknown (const TYPE &v)
 
static bool isValid (Enum val)
 
template<class TYPE >
static void set (TYPE *obj_p, Enum state)
 
static const char * toAscii (CopyMoveState::Enum value)
 

Member Enumeration Documentation

◆ Enum

Enumerator
e_ORIGINAL 
e_COPIED_INTO 
e_COPIED_CONST_INTO 
e_COPIED_NONCONST_INTO 
e_MOVED_INTO 
e_MOVED_FROM 
e_UNKNOWN 
e_MAX_ENUM 

Member Function Documentation

◆ get()

template<class TYPE >
CopyMoveState::Enum bsltf::CopyMoveState::get ( const TYPE &  obj)
inlinestatic

For the specified obj return copyMoveState(obj). Note that getCopyMoveState is an ADL customization point; if not customized for a specific TYPE, a default implementation returning e_UNKNOWN is invoked.

◆ isCopiedConstInto()

template<class TYPE >
bool bsltf::CopyMoveState::isCopiedConstInto ( const TYPE &  v)
inlinestatic

Return true if, for the specified v, CopyMoveState::get(v) includes the e_COPIED_CONST_INTO bits but not e_UNKNOWN.

◆ isCopiedInto()

template<class TYPE >
bool bsltf::CopyMoveState::isCopiedInto ( const TYPE &  v)
inlinestatic

Return true if, for the specified v, CopyMoveState::get(v) includes the e_COPIED_INTO bit but not e_UNKNOWN; otherwise return false.

◆ isCopiedNonconstInto()

template<class TYPE >
bool bsltf::CopyMoveState::isCopiedNonconstInto ( const TYPE &  v)
inlinestatic

Return true if, for the specified v, CopyMoveState::get(v) includes the e_COPIED_NONCONST_INTO bits but not e_UNKNOWN.

◆ isMovedFrom()

template<class TYPE >
bool bsltf::CopyMoveState::isMovedFrom ( const TYPE &  v)
inlinestatic

Return true if, for the specified v, CopyMoveState::get(v) includes the e_MOVED_FROM bit but not e_UNKNOWN; otherwise return false.

◆ isMovedInto()

template<class TYPE >
bool bsltf::CopyMoveState::isMovedInto ( const TYPE &  v)
inlinestatic

Return true if, for the specified v, CopyMoveState::get(v) includes the e_MOVED_INTO bit but not e_UNKNOWN; otherwise return false.

◆ isOriginal()

template<class TYPE >
bool bsltf::CopyMoveState::isOriginal ( const TYPE &  v)
inlinestatic

Return true if, for the specified v, CopyMoveState::get(v) does not include any of the e_COPIED_INTO, e_MOVED_INTO, or e_UNKNOWN bits; otherwise return 'false. Note that this function's return value is unaffected by the e_MOVED_FROM bit.

◆ isUnknown()

template<class TYPE >
bool bsltf::CopyMoveState::isUnknown ( const TYPE &  v)
inlinestatic

Return true if, for the specified v, CopyMoveState::get(v) includes the e_UNKNOWN bit; otherwise return 'false.

◆ isValid()

bool bsltf::CopyMoveState::isValid ( Enum  val)
inlinestatic

Return true if the specified val is a valid value of Enum; otherwise false. A valid value is any of the enumerators or the bitwise OR of any of the enumerators except e_UNKNOWN with e_MOVED_FROM.

◆ set()

template<class TYPE >
void bsltf::CopyMoveState::set ( TYPE *  obj_p,
Enum  state 
)
inlinestatic

For the specified obj_p address and specified state, invoke setCopyMoveState(obj_p, state). Note that setCopyMoveState is an ADL customization point; if not customized for a specific TYPE, a no-op default implementation is invoked.

◆ toAscii()

static const char * bsltf::CopyMoveState::toAscii ( CopyMoveState::Enum  value)
static

Return the non-modifiable string representation corresponding to the specified enumeration value, if it exists, and a unique (error) string otherwise. The string representation of value matches its corresponding enumerator name with the "e_" prefix elided. For example:

@ e_COPIED_INTO
Definition bsltf_copymovestate.h:226
static const char * toAscii(CopyMoveState::Enum value)

will print the following on standard output:

COPIED_INTO

Any of the *_INTO enums can be bitwise ORed with e_MOVED_FROM, in which case the resulting string will be a comma-separated list of two names, e.g., "COPIED_CONST_INTO, MOVED_FROM". Note that specifying a value that does not match any valid combination of enumerators will result in a string representation that is distinct from any of those corresponding to the enumerators, but is otherwise unspecified.


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