Classes | Public Member Functions | Protected Member Functions | Static Protected Member Functions | Friends
variant_topic_tools::ArrayVariant Class Reference

Array variant type. More...

#include <ArrayVariant.h>

Inheritance diagram for variant_topic_tools::ArrayVariant:
Inheritance graph
[legend]

List of all members.

Classes

class  Value
 Array variant value (abstract base) More...
class  ValueImplT
 Array variant value (templated implementation) More...
class  ValueImplV
 Array variant value (variant-typed implementation) More...

Public Member Functions

void addMember (const Variant &member)
 Add a member to the array.
 ArrayVariant ()
 Default constructor.
 ArrayVariant (const ArrayVariant &src)
 Copy constructor.
 ArrayVariant (const Variant &src)
 Copy constructor (overloaded version taking a variant)
void clear ()
 Clear the array.
ArrayVariantoperator+= (const Variant &member)
 Operator for adding a member to the array.
void resize (size_t numMembers)
 Resize the array.
 ~ArrayVariant ()
 Destructor.

Protected Member Functions

 ArrayVariant (const DataType &type, const DataType &memberType, size_t numMembers)
 Constructor (overloaded version taking an array data type and a size)

Static Protected Member Functions

template<typename T >
static void add (typename type_traits::ArrayType< T >::ValueType &array, const typename type_traits::ArrayType< T >::MemberType &member, typename boost::enable_if< typename type_traits::ArrayType< T >::IsDynamic >::type *=0)
 Add a member to an array (overloaded version taking a dynamic array)
template<typename T >
static void add (typename type_traits::ArrayType< T >::ValueType &array, const typename type_traits::ArrayType< T >::MemberType &member, typename boost::disable_if< typename type_traits::ArrayType< T >::IsDynamic >::type *=0)
 Add a member to an array (overloaded version taking a non-dynamic array)
template<typename T >
static void clear (typename type_traits::ArrayType< T >::ValueType &array, typename boost::enable_if< typename type_traits::ArrayType< T >::IsDynamic >::type *=0)
 Clear an array (overloaded version taking a dynamic array)
template<typename T >
static void clear (typename type_traits::ArrayType< T >::ValueType &array, typename boost::disable_if< typename type_traits::ArrayType< T >::IsDynamic >::type *=0)
 Clear an array (overloaded version taking a non-dynamic array)
template<typename T >
static ArrayVariant create (const DataType &type, const DataType &memberType)
 Create an array variant.
template<typename T >
static void initialize (typename type_traits::ArrayType< T >::ValueType &array, typename boost::enable_if< typename type_traits::ArrayType< T >::IsDynamic >::type *=0)
 Initialize an array (overloaded version taking a dynamic array)
template<typename T >
static void initialize (typename type_traits::ArrayType< T >::ValueType &array, typename boost::disable_if< typename type_traits::ArrayType< T >::IsDynamic >::type *=0)
 Initialize an array (overloaded version taking a non-dynamic array)
template<typename T >
static void resize (typename type_traits::ArrayType< T >::ValueType &array, size_t numMembers, typename boost::enable_if< typename type_traits::ArrayType< T >::IsDynamic >::type *=0)
 Resize an array (overloaded version taking a dynamic array)
template<typename T >
static void resize (typename type_traits::ArrayType< T >::ValueType &array, size_t numMembers, typename boost::disable_if< typename type_traits::ArrayType< T >::IsDynamic >::type *=0)
 Resize an array (overloaded version taking a non-dynamic array)

Friends

class ArrayDataType
class Variant

Detailed Description

Array variant type.

Definition at line 34 of file ArrayVariant.h.


Constructor & Destructor Documentation

Default constructor.

Definition at line 30 of file ArrayVariant.cpp.

Copy constructor.

Definition at line 40 of file ArrayVariant.cpp.

Copy constructor (overloaded version taking a variant)

Definition at line 44 of file ArrayVariant.cpp.

Destructor.

Definition at line 50 of file ArrayVariant.cpp.

variant_topic_tools::ArrayVariant::ArrayVariant ( const DataType type,
const DataType memberType,
size_t  numMembers 
) [protected]

Constructor (overloaded version taking an array data type and a size)

Definition at line 33 of file ArrayVariant.cpp.


Member Function Documentation

template<typename T >
static void variant_topic_tools::ArrayVariant::add ( typename type_traits::ArrayType< T >::ValueType &  array,
const typename type_traits::ArrayType< T >::MemberType &  member,
typename boost::enable_if< typename type_traits::ArrayType< T >::IsDynamic >::type = 0 
) [static, protected]

Add a member to an array (overloaded version taking a dynamic array)

template<typename T >
static void variant_topic_tools::ArrayVariant::add ( typename type_traits::ArrayType< T >::ValueType &  array,
const typename type_traits::ArrayType< T >::MemberType &  member,
typename boost::disable_if< typename type_traits::ArrayType< T >::IsDynamic >::type = 0 
) [static, protected]

Add a member to an array (overloaded version taking a non-dynamic array)

Add a member to the array.

Note:
An attempt to adding a member to a non-dynamic array will result in an exception being thrown. Further, the data type of the variant member to be added must match the member type of this array.

Definition at line 154 of file ArrayVariant.cpp.

Clear the array.

Note:
An attempt to clearing a non-dynamic array will result in an exception being thrown.

Reimplemented from variant_topic_tools::Variant.

Definition at line 172 of file ArrayVariant.cpp.

template<typename T >
static void variant_topic_tools::ArrayVariant::clear ( typename type_traits::ArrayType< T >::ValueType &  array,
typename boost::enable_if< typename type_traits::ArrayType< T >::IsDynamic >::type = 0 
) [static, protected]

Clear an array (overloaded version taking a dynamic array)

template<typename T >
static void variant_topic_tools::ArrayVariant::clear ( typename type_traits::ArrayType< T >::ValueType &  array,
typename boost::disable_if< typename type_traits::ArrayType< T >::IsDynamic >::type = 0 
) [static, protected]

Clear an array (overloaded version taking a non-dynamic array)

template<typename T >
static ArrayVariant variant_topic_tools::ArrayVariant::create ( const DataType type,
const DataType memberType 
) [static, protected]

Create an array variant.

template<typename T >
static void variant_topic_tools::ArrayVariant::initialize ( typename type_traits::ArrayType< T >::ValueType &  array,
typename boost::enable_if< typename type_traits::ArrayType< T >::IsDynamic >::type = 0 
) [static, protected]

Initialize an array (overloaded version taking a dynamic array)

template<typename T >
static void variant_topic_tools::ArrayVariant::initialize ( typename type_traits::ArrayType< T >::ValueType &  array,
typename boost::disable_if< typename type_traits::ArrayType< T >::IsDynamic >::type = 0 
) [static, protected]

Initialize an array (overloaded version taking a non-dynamic array)

ArrayVariant & variant_topic_tools::ArrayVariant::operator+= ( const Variant member)

Operator for adding a member to the array.

Definition at line 245 of file ArrayVariant.cpp.

void variant_topic_tools::ArrayVariant::resize ( size_t  numMembers)

Resize the array.

Note:
An attempt to resizing a non-dynamic array will result in an exception being thrown.

Definition at line 165 of file ArrayVariant.cpp.

template<typename T >
static void variant_topic_tools::ArrayVariant::resize ( typename type_traits::ArrayType< T >::ValueType &  array,
size_t  numMembers,
typename boost::enable_if< typename type_traits::ArrayType< T >::IsDynamic >::type = 0 
) [static, protected]

Resize an array (overloaded version taking a dynamic array)

template<typename T >
static void variant_topic_tools::ArrayVariant::resize ( typename type_traits::ArrayType< T >::ValueType &  array,
size_t  numMembers,
typename boost::disable_if< typename type_traits::ArrayType< T >::IsDynamic >::type = 0 
) [static, protected]

Resize an array (overloaded version taking a non-dynamic array)


Friends And Related Function Documentation

friend class ArrayDataType [friend]

Definition at line 36 of file ArrayVariant.h.

friend class Variant [friend]

Reimplemented from variant_topic_tools::CollectionVariant.

Definition at line 37 of file ArrayVariant.h.


The documentation for this class was generated from the following files:


variant_topic_tools
Author(s): Ralf Kaestner
autogenerated on Fri Aug 5 2016 06:06:27