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

This class represents a dynamic type member. More...

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

Public Member Functions

 MemberType (const std::string &name, const dds::core::xtypes::DynamicType &type)
 Construct a MemberType with the provided name and type.
 
const std::string name () const
 Access the name of the MemberType.
 
const dds::core::xtypes::DynamicTypetype () const
 Access the type of the MemberType.
 
bool key () const
 Access the 'key' flag. More...
 
MemberType< DELEGATE > & key (bool v)
 Set the 'key' flag.
 
bool optional () const
 Access the 'optional' flag.
 
MemberType< DELEGATE > & optional (bool v)
 Set the 'optional' flag.
 
bool must_understand () const
 Access the 'must_understand' flag.
 
MemberType< DELEGATE > & must_understand (bool v)
 Set the 'must_understand' flag.
 
int32_t id () const
 Access the member 'id' value.
 
MemberType< DELEGATE > & id (int32_t v)
 Set the member 'id' value.
 
MemberType add_annotation (const Annotation &annotation)
 
MemberType remove_annotation (const Annotation &annotation)
 
- 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 isOptional (const MemberType< T > &m)
 Test if the MemberType is optional.
 
template<typename T >
bool isShared (const MemberType< T > &m)
 Test if the MemberType is shared (pointer). More...
 
template<typename T >
bool isKey (const MemberType< T > &m)
 Test if the MemberType is key.
 
template<typename T >
bool isMustUnderstand (const MemberType< T > &m)
 Test if the MemberType is a 'must-understand' member.
 
template<typename T >
bool hasId (const MemberType< T > &m)
 Test if the MemberType has a member ID assigned. More...
 
template<typename T >
int32_t getId (const MemberType< T > &m)
 Access the member ID of the MemberType.
 

Detailed Description

This class represents a dynamic type member.

Member Function Documentation

◆ add_annotation()

MemberType dds::core::xtypes::MemberType::add_annotation ( const Annotation annotation)
Not Yet Supported:
Use the methods key(), optional(), must_understand() and id() instead of applying annotations

◆ key()

bool dds::core::xtypes::MemberType::key ( ) const

Access the 'key' flag.

Will return true if the MemberType is marked as 'key'

◆ remove_annotation()

MemberType dds::core::xtypes::MemberType::remove_annotation ( const Annotation annotation)
Not Yet Supported:
Use the methods key(), optional(), must_understand() and id() instead of applying annotations

Friends And Related Function Documentation

◆ hasId()

template<typename T >
bool hasId ( const MemberType< T > &  m)
related

Test if the MemberType has a member ID assigned.

Not Yet Supported:

◆ isShared()

template<typename T >
bool isShared ( const MemberType< T > &  m)
related

Test if the MemberType is shared (pointer).

This is irrelevant for DynamicTypes.


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