lean cpp library
A lean C++ library providing efficient utility classes for high-performance C++ applications.
|
Opaque value class that stores values of the type wrapped by OpaqueTypeWrapperBase, providing access to these values via the type wrapped by OpaqueTypeWrapper, provided OpaqueTypeWrapper is both fully defined and derived from OpaqueTypeWrapperBase. More...
#include <opaque_val.h>
Public Types | |
typedef OpaqueTypeWrapperBase::type | opaque_type |
Opaque type of the value concealed by this wrapper. | |
typedef complete_type_or_base < OpaqueTypeWrapper, OpaqueTypeWrapperBase > ::type::type | actual_type |
Actual type of the value concealed by this wrapper, if fully defined. | |
typedef maybe_dereference_once < actual_type >::value_type | dereferenced_type |
Dereferenced type of the value concealed by this wrapper. | |
typedef conditional_type < maybe_dereference_once < actual_type >::dereferenced, dereferenced_type &, dereferenced_type >::type | dereferenced_return_type |
Dereferenced return type of the value concealed by this wrapper. | |
Public Member Functions | |
opaque_val (const actual_type &value=actual_type()) | |
Constructs an opaque value object from the given (or default) value. | |
opaque_val & | operator= (const actual_type &value) |
Replaces the stored value with the given new value. | |
actual_type | get (void) const |
Gets the value concealed by this opaque wrapper. | |
dereferenced_return_type | operator* () const |
Gets the value concealed by this opaque wrapper. | |
actual_type | operator-> () const |
Gets the value concealed by this opaque wrapper. | |
operator actual_type () const | |
Gets the value concealed by this opaque wrapper. | |
Static Public Attributes | |
static const bool | is_opaque = !complete_type_or_base<OpaqueTypeWrapper, OpaqueTypeWrapperBase>::is_complete |
True if this wrapper currently is in an opaque state, false otherwise. |
Opaque value class that stores values of the type wrapped by OpaqueTypeWrapperBase, providing access to these values via the type wrapped by OpaqueTypeWrapper, provided OpaqueTypeWrapper is both fully defined and derived from OpaqueTypeWrapperBase.