RTI Connext Modern C++ API  Version 6.0.1
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
flat_type_traits< T > Struct Template Reference

Given a Sample, an Offset or a Builder, it allows obtaining the other types. More...

#include <FlatTypeTraits.hpp>

Detailed Description

template<typename T>
struct flat_type_traits< T >

Given a Sample, an Offset or a Builder, it allows obtaining the other types.

Template Parameters
TOne of the following:

Given T, this type provides the following typedefs:

  • flat_type_traits<T>::offset, T's related offset type (undefined if T itself is an Offset)
  • flat_type_traits<T>::builder, T's related builder type (undefined if T itself is a Builder, or the topic-type is not mutable)
  • flat_type_traits<T>::flat_type, T's related Sample type (undefined if T itself is a Sample type)
  • flat_type_traits<T>::plain_type, T's equivalent definition as a plain (non-FlatData) type.

For example, for T = MyFlatMutable, flat_type_traits is defined as follows:

template <>
struct flat_type_traits<MyFlatMutable> {
typedef MyFlatMutablePlainHelper plain_type;
typedef MyFlatMutableOffset offset;
typedef MyFlatMutableBuilder builder;
};

Or if T = MyFlatMutableOffset:

template <>
struct flat_type_traits<MyFlatMutableOffset> {
typedef MyFlatMutable flat_type;
typedef MyFlatMutablePlainHelper plain_type;
typedef MyFlatMutableBuilder builder;
};
See Also
rti::flat::plain_cast()

RTI Connext Modern C++ API Version 6.0.1 Copyright © Sat Nov 23 2019 Real-Time Innovations, Inc