11 #ifndef RTI_DDS_FLAT_FLATSAMPLEIMPL_HPP_ 12 #define RTI_DDS_FLAT_FLATSAMPLEIMPL_HPP_ 22 #include "rti/flat/FlatSample.hpp" 24 namespace rti {
namespace flat {
28 template <
typename OffsetType>
29 Sample<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();
46 template <
typename OffsetType>
47 Sample<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();
66 template <
typename OffsetType>
69 return detail::create_data_impl<OffsetType>(
70 typename OffsetType::offset_kind());
75 #endif // RTI_DDS_FLAT_FLATSAMPLEIMPL_HPP_ The generic definition of FlatData topic-types.
Definition: FlatSample.hpp:148
Definition: AggregationBuilders.hpp:17
static Sample< OffsetType > * create_data()
Creates an unmanaged FlatData Sample.
Definition: FlatSampleImpl.hpp:67