CoreDX DDS Modern C++ API
Public Member Functions | Related Functions | List of all members
dds::core::xtypes::DynamicType Class Reference

Base class for all dynamic types. More...

Inheritance diagram for dds::core::xtypes::DynamicType:
Inheritance graph
[legend]
Collaboration diagram for dds::core::xtypes::DynamicType:
Collaboration graph
[legend]

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...
 
Referenceoperator= (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.
 

Detailed Description

Base class for all dynamic types.

Constructor & Destructor Documentation

◆ DynamicType() [1/4]

dds::core::xtypes::DynamicType::DynamicType ( const std::string &  name,
TypeKind  kind 
)

Constructor.

Assigns 'name' and 'kind'.

◆ DynamicType() [2/4]

dds::core::xtypes::DynamicType::DynamicType ( const std::string &  name,
TypeKind  kind,
const Annotation annotation 
)

Constructor.

Assigns 'name' and 'kind', with an annotation.

Not Yet Supported:
The annotations are not applied

◆ DynamicType() [3/4]

dds::core::xtypes::DynamicType::DynamicType ( const std::string &  name,
TypeKind  kind,
const std::vector< Annotation > &  annotations 
)

Constructor.

Assigns 'name' and 'kind', with multiple annotations.

Not Yet Supported:
The annotations are not applied

◆ DynamicType() [4/4]

template<typename FWI >
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.

Not Yet Supported:
The annotations are not applied

Member Function Documentation

◆ accept()

virtual void dds::core::xtypes::DynamicType::accept ( DynamicTypeVisitor v) const
virtual

© 2009-2020 Twin Oaks Computing, Inc
Castle Rock, CO 80104
All rights reserved.