CXXR (C++ R)
|
Class template to augment a type with 'not available'. More...
#include <NAAugment.hpp>
Public Member Functions | |
NAAugment () | |
Default constructor. | |
template<typename U > | |
NAAugment (const U &value) | |
Construct from compatible value. | |
template<typename U > | |
NAAugment< T > & | operator= (const U &value) |
Assignment from compatible value. | |
operator T & () | |
operator const T & () const | |
bool | isNA () const |
Is the value 'not available'? | |
template<class Archive > | |
void | serialize (Archive &ar, const unsigned int file_version) |
boost::serialization function. | |
T & | value () |
Data value. | |
const T & | value () const |
Data value (const variant). |
Static Public Member Functions | |
static const NAAugment< T > & | NA () |
Exemplar object representing 'not available'. |
Class template to augment a type with 'not available'.
This class template is used to combine a value of type T with an indication of whether or not the actual value is 'not available' (NA).
T | an arbitrary data type, intended to serve as an element type in R data vectors. (Presumably this type will not already have the capability of representing 'not available' status, e.g. by a specially designated value within its range.) |
|
inline |
Default constructor.
The constructed object will be flagged as NA.
For this constructor to be used, T must have a default constructor (possibly trivial).
|
inlineexplicit |
Construct from compatible value.
U | a type assignable to T. |
value | The value to be given to the constructed object. |
|
inline |
Is the value 'not available'?
|
inlinestatic |
Exemplar object representing 'not available'.
|
inline |
Assignment from compatible value.
U | a type assignable to T. |
value | The value to be given to the constructed object. |
void CXXR::NAAugment< T >::serialize | ( | Archive & | ar, |
const unsigned int | file_version | ||
) |
boost::serialization function.
Archive | archive class compatible with boost::serialization. Serialization or deserialization will be performed according to whether this is an output or an input archive. |
ar | The archive to be read/written. |
file_version | Ignored. |
|
inline |
Data value.
|
inline |
Data value (const variant).