Public Types | Public Member Functions | Public Attributes | List of all members
variant_topic_tools::MessageVariant::ValueImplT< T > Class Template Reference

Message variant value (templated implementation) More...

#include <MessageVariant.h>

Inheritance diagram for variant_topic_tools::MessageVariant::ValueImplT< T >:
Inheritance graph
[legend]

Public Types

typedef type_traits::MessageType< T >::ValueType ValueType
 Definition of the value type. More...
 

Public Member Functions

 BOOST_STATIC_ASSERT (type_traits::IsMessage< T >::value)
 
ValuePtr clone () const
 Clone this variant value (implementation) More...
 
Serializer createSerializer (const DataType &type) const
 Create a serializer for this variant (implementation) More...
 
Variant getMember (int index) const
 Retrieve a member of the variant collection by index (implementation) More...
 
Variant getMember (const std::string &name) const
 Retrieve a member of the variant collection by name (implementation) More...
 
const std::string & getMemberName (int index) const
 Retrieve the name of the message member with the specified index (implementation) More...
 
size_t getNumMembers () const
 Retrieve the number of members of the variant collection (implementation) More...
 
ValueTypegetValue ()
 Retrieve the variant's value (implementation of the non-const version) More...
 
const ValueTypegetValue () const
 Retrieve the variant's value (implementation of the const version) More...
 
bool hasMember (const std::string &name) const
 True, if the variant collection contains the member with the specified name (implementation) More...
 
void set (const Pointer< ValueType > &value)
 Set the variant's value pointer (implementation) More...
 
void setMember (int index, const Variant &member)
 Set a member of the variant collection by index (implementation) More...
 
void setMember (const std::string &name, const Variant &member)
 Set a member of the variant collection by name (implementation) More...
 
 ValueImplT (const MessageFieldCollection< MessageVariable > &members=MessageFieldCollection< MessageVariable >(), const Pointer< ValueType > &message=Pointer< ValueType >())
 Default constructor. More...
 
 ValueImplT (const ValueImplT< T > &src)
 Copy constructor. More...
 
virtual ~ValueImplT ()
 Destructor. More...
 
- Public Member Functions inherited from variant_topic_tools::Variant::ValueT< type_traits::MessageType< T >::ValueType >
const std::type_info & getTypeInfo () const
 Retrieve the variant's value type information (re-implementation) More...
 
virtual void set (const Pointer< type_traits::MessageType< T >::ValueType > &value)=0
 Set the variant's value pointer (abstract declaration) More...
 
void setValue (const type_traits::MessageType< T >::ValueType &value)
 Set the variant's value (overloaded version taking a variant value) More...
 
 ValueT ()
 Default constructor. More...
 
virtual ~ValueT ()
 Destructor. More...
 
- Public Member Functions inherited from variant_topic_tools::Variant::Value
 Value ()
 Default constructor. More...
 
- Public Member Functions inherited from variant_topic_tools::MessageVariant::Value
void setValue (const Variant::Value &value)
 Set the variant's value (implementation) More...
 
 Value ()
 Default constructor. More...
 
void writeMember (std::ostream &stream, int index) const
 Write the variant collection member with the specified index to a stream (implementation) More...
 
virtual ~Value ()
 Destructor. More...
 
- Public Member Functions inherited from variant_topic_tools::CollectionVariant::Value
Variant getMember (const std::string &name, size_t pos) const
 Recursively retrieve a member of the collection by name. More...
 
bool hasMember (const std::string &name, size_t pos) const
 True, if the collection or any of its members contains the member with the specified name. More...
 
bool isEqual (const Variant::Value &value) const
 True, if this variant value equals another variant value (implementation) More...
 
void read (std::istream &stream)
 Read the variant from a stream (implementation) More...
 
void setMember (const std::string &name, const Variant &member, size_t pos)
 Recursively set a member of the collection by name. More...
 
 Value ()
 Default constructor. More...
 
void write (std::ostream &stream) const
 Write this variant value to a stream (implementation) More...
 

Public Attributes

MessageFieldCollection< MessageVariablemembers
 The message members. More...
 
Pointer< ValueTypemessage
 The strong-typed message. More...
 

Detailed Description

template<typename T>
class variant_topic_tools::MessageVariant::ValueImplT< T >

Message variant value (templated implementation)

Definition at line 155 of file MessageVariant.h.

Member Typedef Documentation

Definition of the value type.

Definition at line 163 of file MessageVariant.h.

Constructor & Destructor Documentation

Default constructor.

template<typename T>
variant_topic_tools::MessageVariant::ValueImplT< T >::ValueImplT ( const ValueImplT< T > &  src)

Copy constructor.

template<typename T>
virtual variant_topic_tools::MessageVariant::ValueImplT< T >::~ValueImplT ( )
virtual

Destructor.

Member Function Documentation

template<typename T>
variant_topic_tools::MessageVariant::ValueImplT< T >::BOOST_STATIC_ASSERT ( type_traits::IsMessage< T >::value  )
template<typename T>
ValuePtr variant_topic_tools::MessageVariant::ValueImplT< T >::clone ( ) const
virtual

Clone this variant value (implementation)

Implements variant_topic_tools::Variant::Value.

template<typename T>
Serializer variant_topic_tools::MessageVariant::ValueImplT< T >::createSerializer ( const DataType type) const
virtual

Create a serializer for this variant (implementation)

Implements variant_topic_tools::Variant::Value.

template<typename T>
Variant variant_topic_tools::MessageVariant::ValueImplT< T >::getMember ( int  index) const
virtual

Retrieve a member of the variant collection by index (implementation)

Implements variant_topic_tools::CollectionVariant::Value.

template<typename T>
Variant variant_topic_tools::MessageVariant::ValueImplT< T >::getMember ( const std::string &  name) const
virtual

Retrieve a member of the variant collection by name (implementation)

Implements variant_topic_tools::CollectionVariant::Value.

template<typename T>
const std::string& variant_topic_tools::MessageVariant::ValueImplT< T >::getMemberName ( int  index) const
virtual

Retrieve the name of the message member with the specified index (implementation)

Implements variant_topic_tools::MessageVariant::Value.

template<typename T>
size_t variant_topic_tools::MessageVariant::ValueImplT< T >::getNumMembers ( ) const
virtual

Retrieve the number of members of the variant collection (implementation)

Implements variant_topic_tools::CollectionVariant::Value.

template<typename T>
ValueType& variant_topic_tools::MessageVariant::ValueImplT< T >::getValue ( )
virtual

Retrieve the variant's value (implementation of the non-const version)

Implements variant_topic_tools::Variant::ValueT< type_traits::MessageType< T >::ValueType >.

template<typename T>
const ValueType& variant_topic_tools::MessageVariant::ValueImplT< T >::getValue ( ) const
virtual

Retrieve the variant's value (implementation of the const version)

Implements variant_topic_tools::Variant::ValueT< type_traits::MessageType< T >::ValueType >.

template<typename T>
bool variant_topic_tools::MessageVariant::ValueImplT< T >::hasMember ( const std::string &  name) const
virtual

True, if the variant collection contains the member with the specified name (implementation)

Implements variant_topic_tools::CollectionVariant::Value.

template<typename T>
void variant_topic_tools::MessageVariant::ValueImplT< T >::set ( const Pointer< ValueType > &  value)

Set the variant's value pointer (implementation)

template<typename T>
void variant_topic_tools::MessageVariant::ValueImplT< T >::setMember ( int  index,
const Variant member 
)
virtual

Set a member of the variant collection by index (implementation)

Implements variant_topic_tools::CollectionVariant::Value.

template<typename T>
void variant_topic_tools::MessageVariant::ValueImplT< T >::setMember ( const std::string &  name,
const Variant member 
)
virtual

Set a member of the variant collection by name (implementation)

Implements variant_topic_tools::CollectionVariant::Value.

Member Data Documentation

The message members.

Definition at line 238 of file MessageVariant.h.

template<typename T>
Pointer<ValueType> variant_topic_tools::MessageVariant::ValueImplT< T >::message
mutable

The strong-typed message.

Definition at line 242 of file MessageVariant.h.


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


variant_topic_tools
Author(s): Ralf Kaestner
autogenerated on Sat Jan 9 2021 03:56:50