CoreDX DDS Modern C++ API
|
Base class for all dynamic types. More...
Public Member Functions | |
DynamicType (const std::string &name, TypeKind kind) | |
Constructor. More... | |
DynamicType (const std::string &name, TypeKind kind, const Annotation &annotation) | |
Constructor. More... | |
DynamicType (const std::string &name, TypeKind kind, const std::vector< Annotation > &annotations) | |
Constructor. More... | |
template<typename FWI > | |
DynamicType (const std::string &name, TypeKind kind, const FWI &annotation_begin, const FWI &annotation_end) | |
Constructor. More... | |
TypeKind | kind () const |
Get the type kind. | |
const std::string & | name () const |
Get the type name. | |
const std::vector< Annotation > & | annotations () const |
Access the applied annotations. | |
bool | operator== (const DynamicType< DELEGATE > &that) const |
Test for equality with another DynamicType. | |
virtual void | accept (DynamicTypeVisitor &v) const |
Accept a DynamicTypeVisitor. More... | |
Public Member Functions inherited from dds::core::Reference< DELEGATE > | |
Reference (dds::core::null_type &) | |
Creates a "null" reference. | |
Reference (const Reference &ref) | |
Creates a reference from another. More... | |
template<typename D > | |
Reference (const Reference< D > &ref) | |
Enables safe assignment from other reference types. More... | |
Reference (DELEGATE_T *p) | |
The following two constructors create a dds Reference from a vendor specific delegate. More... | |
~Reference () | |
Destroys a reference. | |
template<typename R > | |
bool | operator== (const R &ref) const |
Compares two reference objects and returns true if they are equal. More... | |
template<typename R > | |
bool | operator!= (const R &ref) const |
Compares two reference objects and returns true if they are not-equal. More... | |
Reference & | operator= (const null_type) |
Special assignment operators that takes care of assigning null to this reference. More... | |
bool | is_nil () const |
Returns true if this reference object is nil, meaning pointing to null. | |
bool | operator== (const null_type) const |
Special operator== used to check if this reference object equals the null reference. More... | |
bool | operator!= (const null_type nil) const |
Special operator!= used to check if this reference object does not equals the null reference. More... | |
const DELEGATE_REF_T & | delegate () const |
Returns a reference to the underlying delegate. More... | |
DELEGATE_REF_T & | delegate () |
Returns a reference to the underlying delegate. More... | |
DELEGATE * | operator-> () |
The operator->() is provided to be able to directly invoke methods on the delegate. More... | |
const DELEGATE * | operator-> () const |
The operator->() is provided to be able to directly invoke methods on the delegate. More... | |
Related Functions | |
(Note that these are not member functions.) | |
template<typename T > | |
bool | isPrimitiveType (const DynamicType< T > &t) |
Test if the DynamicType is a primitive type. | |
template<typename T > | |
bool | isConstructedType (const DynamicType< T > &t) |
Test if the DynamicType is a constructed type. | |
template<typename T > | |
bool | isCollectionType (const DynamicType< T > &t) |
Test if the DynamicType is a collection type. | |
template<typename T > | |
bool | isAggregationType (const DynamicType< T > &t) |
Test if the DynamicType is an Aggregation type. | |
template<typename T > | |
bool | isNamedType (const DynamicType< T > &t) |
Test if the DynamicType is a Named type. | |
Base class for all dynamic types.
dds::core::xtypes::DynamicType::DynamicType | ( | const std::string & | name, |
TypeKind | kind | ||
) |
Constructor.
Assigns 'name' and 'kind'.
dds::core::xtypes::DynamicType::DynamicType | ( | const std::string & | name, |
TypeKind | kind, | ||
const Annotation & | annotation | ||
) |
Constructor.
Assigns 'name' and 'kind', with an annotation.
dds::core::xtypes::DynamicType::DynamicType | ( | const std::string & | name, |
TypeKind | kind, | ||
const std::vector< Annotation > & | annotations | ||
) |
Constructor.
Assigns 'name' and 'kind', with multiple annotations.
dds::core::xtypes::DynamicType::DynamicType | ( | const std::string & | name, |
TypeKind | kind, | ||
const FWI & | annotation_begin, | ||
const FWI & | annotation_end | ||
) |
Constructor.
Assigns 'name' and 'kind', with multiple annotations.
|
virtual |
Accept a DynamicTypeVisitor.
Useful for traversing the type hierarchy.
Reimplemented in dds::core::xtypes::WStringType, dds::core::xtypes::StringType, dds::core::xtypes::SequenceType, dds::core::xtypes::ArrayType, and dds::core::xtypes::MapType.