Data type registry. More...
#include <DataTypeRegistry.h>
Classes | |
class | Impl |
Data type implementation. More... | |
Public Member Functions | |
ArrayDataType | addArrayDataType (const DataType &memberType, size_t numMembers=0) |
Add an array data type to the data type registry (variant-typed version) | |
template<typename T > | |
ArrayDataType | addArrayDataType () |
Add an array data type to the data type registry (strong-typed version templated on the array type) | |
template<typename T , size_t N> | |
ArrayDataType | addArrayDataType () |
Add an array data type to the data type registry (strong-typed version templated on the array member type and the number of members) | |
template<typename T > | |
BuiltinDataType | addBuiltinDataType (const std::string &identifier) |
Add a built-in data type to the data type registry. | |
void | addDataType (const DataType &dataType) |
Add a data type to the data type registry. | |
template<typename T > | |
void | addDataType () |
Add a data type to the data type registry (templated version) | |
MessageDataType | addMessageDataType (const std::string &identifier, const MessageFieldCollection< MessageConstant > &constantMembers=MessageFieldCollection< MessageConstant >(), const MessageFieldCollection< MessageVariable > &variableMembers=MessageFieldCollection< MessageVariable >()) |
Add a message data type to the data type registry (variant-typed version taking an identifier, a collection of constant message members, and a collection of variable message members) | |
MessageDataType | addMessageDataType (const std::string &identifier, const std::string &definition) |
Add a message data type to the data type registry (variant-typed version taking an identifier and a definition) | |
template<typename T > | |
MessageDataType | addMessageDataType () |
Add a message data type to the data type registry (strong-typed version templated on the message type) | |
void | clear () |
Clear the data type registry. | |
DataTypeRegistry () | |
Default constructor. | |
DataType | getDataType (const std::string &identifier) |
Retrieve a data type from the registry by identifier (non-const version) | |
DataType | getDataType (const std::string &identifier) const |
Retrieve a data type from the registry by identifier (const version) | |
DataType | getDataType (const std::type_info &typeInfo) const |
Retrieve a data type from the registry by type information. | |
template<typename T > | |
DataType | getDataType () |
Retrieve a data type from the registry by type information (templated non-const version) | |
template<typename T > | |
DataType | getDataType () const |
Retrieve a data type from the registry by type information (templated const version) | |
DataType | operator[] (const std::string &identifier) |
Operator for retrieving a data type from the registry by identifier (non-const version) | |
DataType | operator[] (const std::string &identifier) const |
Operator for retrieving a data type from the registry by identifier (const version) | |
DataType | operator[] (const std::type_info &typeInfo) const |
Operator for retrieving a data type from the registry by type information. | |
void | removeDataType (const DataType &dataType) |
Remove a data type from the data type registry. | |
void | write (std::ostream &stream) const |
Write the data type registry to a stream. | |
~DataTypeRegistry () | |
Destructor. | |
Protected Types | |
typedef boost::shared_ptr< Impl > | ImplPtr |
Declaration of the data type registry implementation pointer type. | |
typedef boost::weak_ptr< Impl > | ImplWPtr |
Declaration of the data type registry implementation weak pointer type. | |
Static Protected Member Functions | |
template<typename T > | |
static BuiltinDataType | createDataType (typename boost::enable_if< type_traits::IsBuiltin< T > >::type *=0) |
Create a data type (overloaded version creating an invalid built-in data type) | |
template<typename T > | |
static ArrayDataType | createDataType (typename boost::enable_if< type_traits::IsArray< T > >::type *=0) |
Create a data type (overloaded version creating an array data type) | |
template<typename T > | |
static MessageDataType | createDataType (typename boost::enable_if< type_traits::IsMessage< T > >::type *=0) |
Create a data type (overloaded version creating a message data type) | |
Static Protected Attributes | |
static ImplPtr | impl |
The data type registry's implementation. | |
Friends | |
class | DataType |
Data type registry.
Definition at line 39 of file DataTypeRegistry.h.
typedef boost::shared_ptr<Impl> variant_topic_tools::DataTypeRegistry::ImplPtr [protected] |
Declaration of the data type registry implementation pointer type.
Definition at line 196 of file DataTypeRegistry.h.
typedef boost::weak_ptr<Impl> variant_topic_tools::DataTypeRegistry::ImplWPtr [protected] |
Declaration of the data type registry implementation weak pointer type.
Definition at line 201 of file DataTypeRegistry.h.
Default constructor.
Definition at line 35 of file DataTypeRegistry.cpp.
Destructor.
Definition at line 58 of file DataTypeRegistry.cpp.
ArrayDataType variant_topic_tools::DataTypeRegistry::addArrayDataType | ( | const DataType & | memberType, |
size_t | numMembers = 0 |
||
) |
Add an array data type to the data type registry (variant-typed version)
Definition at line 117 of file DataTypeRegistry.cpp.
ArrayDataType variant_topic_tools::DataTypeRegistry::addArrayDataType | ( | ) |
Add an array data type to the data type registry (strong-typed version templated on the array type)
ArrayDataType variant_topic_tools::DataTypeRegistry::addArrayDataType | ( | ) |
Add an array data type to the data type registry (strong-typed version templated on the array member type and the number of members)
BuiltinDataType variant_topic_tools::DataTypeRegistry::addBuiltinDataType | ( | const std::string & | identifier | ) |
Add a built-in data type to the data type registry.
void variant_topic_tools::DataTypeRegistry::addDataType | ( | const DataType & | dataType | ) |
Add a data type to the data type registry.
Definition at line 143 of file DataTypeRegistry.cpp.
void variant_topic_tools::DataTypeRegistry::addDataType | ( | ) |
Add a data type to the data type registry (templated version)
MessageDataType variant_topic_tools::DataTypeRegistry::addMessageDataType | ( | const std::string & | identifier, |
const MessageFieldCollection< MessageConstant > & | constantMembers = MessageFieldCollection<MessageConstant>() , |
||
const MessageFieldCollection< MessageVariable > & | variableMembers = MessageFieldCollection<MessageVariable>() |
||
) |
Add a message data type to the data type registry (variant-typed version taking an identifier, a collection of constant message members, and a collection of variable message members)
Definition at line 125 of file DataTypeRegistry.cpp.
MessageDataType variant_topic_tools::DataTypeRegistry::addMessageDataType | ( | const std::string & | identifier, |
const std::string & | definition | ||
) |
Add a message data type to the data type registry (variant-typed version taking an identifier and a definition)
Definition at line 135 of file DataTypeRegistry.cpp.
MessageDataType variant_topic_tools::DataTypeRegistry::addMessageDataType | ( | ) |
Add a message data type to the data type registry (strong-typed version templated on the message type)
Clear the data type registry.
Definition at line 196 of file DataTypeRegistry.cpp.
static BuiltinDataType variant_topic_tools::DataTypeRegistry::createDataType | ( | typename boost::enable_if< type_traits::IsBuiltin< T > >::type * | = 0 | ) | [static, protected] |
Create a data type (overloaded version creating an invalid built-in data type)
static ArrayDataType variant_topic_tools::DataTypeRegistry::createDataType | ( | typename boost::enable_if< type_traits::IsArray< T > >::type * | = 0 | ) | [static, protected] |
Create a data type (overloaded version creating an array data type)
static MessageDataType variant_topic_tools::DataTypeRegistry::createDataType | ( | typename boost::enable_if< type_traits::IsMessage< T > >::type * | = 0 | ) | [static, protected] |
Create a data type (overloaded version creating a message data type)
DataType variant_topic_tools::DataTypeRegistry::getDataType | ( | const std::string & | identifier | ) |
Retrieve a data type from the registry by identifier (non-const version)
Definition at line 71 of file DataTypeRegistry.cpp.
DataType variant_topic_tools::DataTypeRegistry::getDataType | ( | const std::string & | identifier | ) | const |
Retrieve a data type from the registry by identifier (const version)
Definition at line 93 of file DataTypeRegistry.cpp.
DataType variant_topic_tools::DataTypeRegistry::getDataType | ( | const std::type_info & | typeInfo | ) | const |
Retrieve a data type from the registry by type information.
Definition at line 103 of file DataTypeRegistry.cpp.
DataType variant_topic_tools::DataTypeRegistry::getDataType | ( | ) |
Retrieve a data type from the registry by type information (templated non-const version)
DataType variant_topic_tools::DataTypeRegistry::getDataType | ( | ) | const |
Retrieve a data type from the registry by type information (templated const version)
DataType variant_topic_tools::DataTypeRegistry::operator[] | ( | const std::string & | identifier | ) |
Operator for retrieving a data type from the registry by identifier (non-const version)
Definition at line 215 of file DataTypeRegistry.cpp.
DataType variant_topic_tools::DataTypeRegistry::operator[] | ( | const std::string & | identifier | ) | const |
Operator for retrieving a data type from the registry by identifier (const version)
Definition at line 219 of file DataTypeRegistry.cpp.
DataType variant_topic_tools::DataTypeRegistry::operator[] | ( | const std::type_info & | typeInfo | ) | const |
Operator for retrieving a data type from the registry by type information.
Definition at line 223 of file DataTypeRegistry.cpp.
void variant_topic_tools::DataTypeRegistry::removeDataType | ( | const DataType & | dataType | ) |
Remove a data type from the data type registry.
Definition at line 169 of file DataTypeRegistry.cpp.
void variant_topic_tools::DataTypeRegistry::write | ( | std::ostream & | stream | ) | const |
Write the data type registry to a stream.
Definition at line 201 of file DataTypeRegistry.cpp.
friend class DataType [friend] |
Definition at line 40 of file DataTypeRegistry.h.
DataTypeRegistry::ImplPtr variant_topic_tools::DataTypeRegistry::impl [static, protected] |
The data type registry's implementation.
Definition at line 205 of file DataTypeRegistry.h.