11#ifndef RTI_DDS_FLAT_FLATSAMPLEIMPL_HPP_
12#define RTI_DDS_FLAT_FLATSAMPLEIMPL_HPP_
22#include "rti/flat/FlatSample.hpp"
24namespace rti {
namespace flat {
28template <
typename OffsetType>
29Sample<OffsetType>* create_data_impl(fixed_size_type_tag_t)
31 unsigned char *buffer = RTIXCdrFlatData_createSampleFinal(
32 OffsetType::serialized_size(0),
33 rti::xcdr::type_programs<Sample<OffsetType> >::get());
36 #ifndef RTI_FLAT_DATA_NO_EXCEPTIONS
37 throw std::bad_alloc();
46template <
typename OffsetType>
47Sample<OffsetType>* create_data_impl(variable_size_type_tag_t)
49 unsigned char *buffer = RTIXCdrFlatData_createSampleMutable(
50 rti::xcdr::type_programs<Sample<OffsetType> >::get());
53 #ifndef RTI_FLAT_DATA_NO_EXCEPTIONS
54 throw std::bad_alloc();
66template <
typename OffsetType>
69 return detail::create_data_impl<OffsetType>(
70 typename OffsetType::offset_kind());
The generic definition of FlatData topic-types.
Definition: FlatSample.hpp:148
static Sample< OffsetType > * create_data()
Creates an unmanaged FlatData Sample.
Definition: FlatSampleImpl.hpp:67
The RTI namespace.
Definition: AggregationBuilders.hpp:17