15#ifndef FASTDDS_DDS_XTYPES_DYNAMIC_TYPES__DYNAMICDATA_HPP
16#define FASTDDS_DDS_XTYPES_DYNAMIC_TYPES__DYNAMICDATA_HPP
21#include <fastdds/dds/core/ReturnCode.hpp>
22#include <fastdds/dds/xtypes/dynamic_types/DynamicType.hpp>
23#include <fastdds/dds/xtypes/dynamic_types/Types.hpp>
24#include <fastdds/fastdds_dll.hpp>
25#include <fastdds/rtps/common/Types.hpp>
31class DynamicData :
public std::enable_shared_from_this<DynamicData>
63 FASTDDS_EXPORTED_API
virtual bool equals(
431 long double value) = 0;
552 const std::string& value) = 0;
577 const std::wstring& value) = 0;
Definition DynamicData.hpp:32
virtual FASTDDS_EXPORTED_API ReturnCode_t get_int16_values(Int16Seq &value, MemberId id)=0
Retrieves a sequence of int16 values associated to an identifier.
virtual FASTDDS_EXPORTED_API ReturnCode_t get_int64_values(Int64Seq &value, MemberId id)=0
Retrieves a sequence of int64 values associated to an identifier.
virtual FASTDDS_EXPORTED_API ReturnCode_t set_uint32_value(MemberId id, uint32_t value)=0
Sets an uint32 value associated to an identifier.
virtual FASTDDS_EXPORTED_API ReturnCode_t set_char16_value(MemberId id, wchar_t value)=0
Sets an char16 value associated to an identifier.
virtual FASTDDS_EXPORTED_API ReturnCode_t get_string_values(StringSeq &value, MemberId id)=0
Retrieves a sequence of string values associated to an identifier.
virtual FASTDDS_EXPORTED_API ReturnCode_t get_uint64_value(uint64_t &value, MemberId id)=0
Retrieves an uint64 value associated to an identifier.
virtual FASTDDS_EXPORTED_API ReturnCode_t get_complex_value(traits< DynamicData >::ref_type &value, MemberId id)=0
Retrieves a complex value associated to an identifier.
virtual FASTDDS_EXPORTED_API traits< DynamicData >::ref_type clone()=0
Creates and returns a new data sample with the same contents as this one.
typename traits< DynamicData >::ref_type _ref_type
Definition DynamicData.hpp:35
virtual FASTDDS_EXPORTED_API ReturnCode_t set_float32_values(MemberId id, const Float32Seq &value)=0
Sets a sequence of float32 values associated to an identifier.
virtual FASTDDS_EXPORTED_API ReturnCode_t set_uint64_value(MemberId id, uint64_t value)=0
Sets an uint64 value associated to an identifier.
virtual FASTDDS_EXPORTED_API ReturnCode_t set_string_values(MemberId id, const StringSeq &value)=0
Sets a sequence of string values associated to an identifier.
virtual FASTDDS_EXPORTED_API ReturnCode_t get_int32_values(Int32Seq &value, MemberId id)=0
Retrieves a sequence of int32 values associated to an identifier.
virtual FASTDDS_EXPORTED_API ReturnCode_t get_int8_value(int8_t &value, MemberId id)=0
Retrieves an int8 value associated to an identifier.
virtual FASTDDS_EXPORTED_API ReturnCode_t get_uint32_value(uint32_t &value, MemberId id)=0
Retrieves an uint32 value associated to an identifier.
virtual FASTDDS_EXPORTED_API ReturnCode_t get_char8_values(CharSeq &value, MemberId id)=0
Retrieves a sequence of char8 values associated to an identifier.
virtual FASTDDS_EXPORTED_API ReturnCode_t clear_nonkey_values()=0
Clear all members not associated to the key.
virtual FASTDDS_EXPORTED_API ReturnCode_t set_float128_value(MemberId id, long double value)=0
Sets an float128 value associated to an identifier.
virtual FASTDDS_EXPORTED_API ReturnCode_t set_boolean_value(MemberId id, bool value)=0
Sets an bool value associated to an identifier.
virtual FASTDDS_EXPORTED_API ReturnCode_t set_boolean_values(MemberId id, const BooleanSeq &value)=0
Sets a sequence of bool values associated to an identifier.
virtual FASTDDS_EXPORTED_API ReturnCode_t get_char16_value(wchar_t &value, MemberId id)=0
Retrieves an char16 value associated to an identifier.
virtual FASTDDS_EXPORTED_API ReturnCode_t get_descriptor(traits< MemberDescriptor >::ref_type &value, MemberId id)=0
Retrieves the MemberDescriptor associated to a member.
virtual FASTDDS_EXPORTED_API ReturnCode_t set_uint64_values(MemberId id, const UInt64Seq &value)=0
Sets a sequence of uint64 values associated to an identifier.
virtual FASTDDS_EXPORTED_API ReturnCode_t get_boolean_values(BooleanSeq &value, MemberId id)=0
Retrieves a sequence of bool values associated to an identifier.
virtual FASTDDS_EXPORTED_API ReturnCode_t get_float32_values(Float32Seq &value, MemberId id)=0
Retrieves a sequence of float32 values associated to an identifier.
virtual FASTDDS_EXPORTED_API ReturnCode_t get_wstring_values(WstringSeq &value, MemberId id)=0
Retrieves a sequence of wstring values associated to an identifier.
virtual FASTDDS_EXPORTED_API ReturnCode_t get_byte_value(eprosima::fastdds::rtps::octet &value, MemberId id)=0
Retrieves an byte value associated to an identifier.
virtual FASTDDS_EXPORTED_API ReturnCode_t get_boolean_value(bool &value, MemberId id)=0
Retrieves an bool value associated to an identifier.
virtual FASTDDS_EXPORTED_API uint32_t get_item_count()=0
Provides the item count of the data and depends on the type of object:
virtual FASTDDS_EXPORTED_API ReturnCode_t set_uint16_value(MemberId id, uint16_t value)=0
Sets an uint16 value associated to an identifier.
virtual FASTDDS_EXPORTED_API ReturnCode_t get_float64_value(double &value, MemberId id)=0
Retrieves an float64 value associated to an identifier.
virtual FASTDDS_EXPORTED_API ReturnCode_t set_uint8_value(MemberId id, uint8_t value)=0
Sets an uint8 value associated to an identifier.
virtual FASTDDS_EXPORTED_API ReturnCode_t get_int16_value(int16_t &value, MemberId id)=0
Retrieves an int16 value associated to an identifier.
virtual FASTDDS_EXPORTED_API ReturnCode_t set_wstring_value(MemberId id, const std::wstring &value)=0
Sets an wstring value associated to an identifier.
virtual FASTDDS_EXPORTED_API ReturnCode_t set_int16_value(MemberId id, int16_t value)=0
Sets an int16 value associated to an identifier.
virtual FASTDDS_EXPORTED_API ReturnCode_t get_char8_value(char &value, MemberId id)=0
Retrieves an char8 value associated to an identifier.
virtual FASTDDS_EXPORTED_API ReturnCode_t get_float128_values(Float128Seq &value, MemberId id)=0
Retrieves a sequence of float128 values associated to an identifier.
virtual FASTDDS_EXPORTED_API ReturnCode_t get_uint8_values(UInt8Seq &value, MemberId id)=0
Retrieves a sequence of uint8 values associated to an identifier.
virtual FASTDDS_EXPORTED_API ReturnCode_t set_int16_values(MemberId id, const Int16Seq &value)=0
Sets a sequence of int16 values associated to an identifier.
virtual FASTDDS_EXPORTED_API ReturnCode_t get_char16_values(WcharSeq &value, MemberId id)=0
Retrieves a sequence of char16 values associated to an identifier.
virtual FASTDDS_EXPORTED_API ReturnCode_t set_float128_values(MemberId id, const Float128Seq &value)=0
Sets a sequence of float128 values associated to an identifier.
virtual FASTDDS_EXPORTED_API ReturnCode_t get_string_value(std::string &value, MemberId id)=0
Retrieves an string value associated to an identifier.
virtual FASTDDS_EXPORTED_API ReturnCode_t set_int8_value(MemberId id, int8_t value)=0
Sets an int8 value associated to an identifier.
virtual FASTDDS_EXPORTED_API ReturnCode_t set_int64_values(MemberId id, const Int64Seq &value)=0
Sets a sequence of int64 values associated to an identifier.
virtual FASTDDS_EXPORTED_API ReturnCode_t get_int8_values(Int8Seq &value, MemberId id)=0
Retrieves a sequence of int8 values associated to an identifier.
virtual FASTDDS_EXPORTED_API ReturnCode_t clear_value(MemberId id)=0
Clear a member.
virtual FASTDDS_EXPORTED_API ReturnCode_t set_uint32_values(MemberId id, const UInt32Seq &value)=0
Sets a sequence of uint32 values associated to an identifier.
virtual FASTDDS_EXPORTED_API ReturnCode_t set_float64_values(MemberId id, const Float64Seq &value)=0
Sets a sequence of float64 values associated to an identifier.
virtual FASTDDS_EXPORTED_API ReturnCode_t get_float128_value(long double &value, MemberId id)=0
Retrieves an float128 value associated to an identifier.
virtual FASTDDS_EXPORTED_API bool equals(traits< DynamicData >::ref_type other)=0
Compares two DynamicData, equality requires:
virtual FASTDDS_EXPORTED_API ReturnCode_t set_int64_value(MemberId id, int64_t value)=0
Sets an int64 value associated to an identifier.
virtual FASTDDS_EXPORTED_API ReturnCode_t get_float64_values(Float64Seq &value, MemberId id)=0
Retrieves a sequence of float64 values associated to an identifier.
virtual FASTDDS_EXPORTED_API ReturnCode_t get_byte_values(ByteSeq &value, MemberId id)=0
Retrieves a sequence of byte values associated to an identifier.
virtual FASTDDS_EXPORTED_API ReturnCode_t set_char8_values(MemberId id, const CharSeq &value)=0
Sets a sequence of char8 values associated to an identifier.
virtual FASTDDS_EXPORTED_API ReturnCode_t get_wstring_value(std::wstring &value, MemberId id)=0
Retrieves an wstring value associated to an identifier.
virtual FASTDDS_EXPORTED_API ReturnCode_t set_char16_values(MemberId id, const WcharSeq &value)=0
Sets a sequence of char16 values associated to an identifier.
virtual FASTDDS_EXPORTED_API ReturnCode_t return_loaned_value(traits< DynamicData >::ref_type value)=0
Returns a loan retrieved using DynamicData::loan_value.
virtual FASTDDS_EXPORTED_API ReturnCode_t set_byte_value(MemberId id, eprosima::fastdds::rtps::octet value)=0
Sets an byte value associated to an identifier.
virtual FASTDDS_EXPORTED_API ReturnCode_t set_int32_value(MemberId id, int32_t value)=0
Sets an int32 value associated to an identifier.
virtual FASTDDS_EXPORTED_API ReturnCode_t set_int8_values(MemberId id, const Int8Seq &value)=0
Sets a sequence of int8 values associated to an identifier.
virtual FASTDDS_EXPORTED_API ReturnCode_t set_uint8_values(MemberId id, const UInt8Seq &value)=0
Sets a sequence of uint8 values associated to an identifier.
virtual FASTDDS_EXPORTED_API ReturnCode_t set_wstring_values(MemberId id, const WstringSeq &value)=0
Sets a sequence of wstring values associated to an identifier.
virtual FASTDDS_EXPORTED_API ReturnCode_t get_int32_value(int32_t &value, MemberId id)=0
Retrieves an int32 value associated to an identifier.
virtual FASTDDS_EXPORTED_API ReturnCode_t set_float32_value(MemberId id, float value)=0
Sets an float32 value associated to an identifier.
virtual FASTDDS_EXPORTED_API MemberId get_member_id_by_name(const ObjectName &name)=0
Queries MemberId by name.
virtual FASTDDS_EXPORTED_API ReturnCode_t get_float32_value(float &value, MemberId id)=0
Retrieves an float32 value associated to an identifier.
virtual ~DynamicData()=default
virtual FASTDDS_EXPORTED_API traits< DynamicData >::ref_type loan_value(MemberId id)=0
Loans a DynamicData reference within the sample
virtual FASTDDS_EXPORTED_API ReturnCode_t get_uint32_values(UInt32Seq &value, MemberId id)=0
Retrieves a sequence of uint32 values associated to an identifier.
virtual FASTDDS_EXPORTED_API ReturnCode_t clear_all_values()=0
Clear all members associated to the object.
virtual FASTDDS_EXPORTED_API ReturnCode_t set_float64_value(MemberId id, double value)=0
Sets an float64 value associated to an identifier.
virtual FASTDDS_EXPORTED_API ReturnCode_t set_byte_values(MemberId id, const ByteSeq &value)=0
Sets a sequence of byte values associated to an identifier.
virtual FASTDDS_EXPORTED_API ReturnCode_t set_string_value(MemberId id, const std::string &value)=0
Sets an string value associated to an identifier.
virtual FASTDDS_EXPORTED_API MemberId get_member_id_at_index(uint32_t index)=0
Queries MemberId by index The query result depends on the type of the sample.
virtual FASTDDS_EXPORTED_API ReturnCode_t get_uint64_values(UInt64Seq &value, MemberId id)=0
Retrieves a sequence of uint64 values associated to an identifier.
virtual FASTDDS_EXPORTED_API ReturnCode_t get_uint16_values(UInt16Seq &value, MemberId id)=0
Retrieves a sequence of uint16 values associated to an identifier.
virtual FASTDDS_EXPORTED_API traits< DynamicType >::ref_type type()=0
Retrieve the DynamicType reference associated to this DynamicData.
virtual FASTDDS_EXPORTED_API ReturnCode_t get_uint16_value(uint16_t &value, MemberId id)=0
Retrieves an uint16 value associated to an identifier.
virtual FASTDDS_EXPORTED_API ReturnCode_t get_uint8_value(uint8_t &value, MemberId id)=0
Retrieves an uint8 value associated to an identifier.
virtual FASTDDS_EXPORTED_API ReturnCode_t set_int32_values(MemberId id, const Int32Seq &value)=0
Sets a sequence of int32 values associated to an identifier.
traits< DynamicData >::ref_type _this()
virtual FASTDDS_EXPORTED_API ReturnCode_t set_char8_value(MemberId id, char value)=0
Sets an char8 value associated to an identifier.
virtual FASTDDS_EXPORTED_API ReturnCode_t set_complex_value(MemberId id, traits< DynamicData >::ref_type value)=0
Sets a complex value associated to an identifier.
virtual FASTDDS_EXPORTED_API ReturnCode_t set_uint16_values(MemberId id, const UInt16Seq &value)=0
Sets a sequence of uint16 values associated to an identifier.
virtual FASTDDS_EXPORTED_API ReturnCode_t get_int64_value(int64_t &value, MemberId id)=0
Retrieves an int64 value associated to an identifier.
Definition DomainParticipant.hpp:45
uint32_t MemberId
Definition dynamic_language_binding.hpp:122
std::vector< uint8_t > UInt8Seq
Definition dynamic_language_binding.hpp:132
std::vector< uint16_t > UInt16Seq
Definition dynamic_language_binding.hpp:136
std::vector< char > CharSeq
Definition dynamic_language_binding.hpp:148
std::vector< long double > Float128Seq
Definition dynamic_language_binding.hpp:146
std::vector< int64_t > Int64Seq
Definition dynamic_language_binding.hpp:138
std::vector< float > Float32Seq
Definition dynamic_language_binding.hpp:142
std::vector< double > Float64Seq
Definition dynamic_language_binding.hpp:144
std::vector< std::string > StringSeq
Definition dynamic_language_binding.hpp:156
std::vector< wchar_t > WcharSeq
Definition dynamic_language_binding.hpp:150
std::vector< uint32_t > UInt32Seq
Definition dynamic_language_binding.hpp:128
std::vector< bool > BooleanSeq
Definition dynamic_language_binding.hpp:152
std::vector< int32_t > Int32Seq
Definition dynamic_language_binding.hpp:126
std::vector< uint8_t > ByteSeq
Definition dynamic_language_binding.hpp:154
int32_t ReturnCode_t
Definition DDSReturnCode.hpp:59
std::vector< uint64_t > UInt64Seq
Definition dynamic_language_binding.hpp:140
eprosima::fastcdr::fixed_string< 256 > ObjectName
Definition dynamic_language_binding.hpp:66
std::vector< int16_t > Int16Seq
Definition dynamic_language_binding.hpp:134
std::vector< std::wstring > WstringSeq
Definition dynamic_language_binding.hpp:158
std::vector< int8_t > Int8Seq
Definition dynamic_language_binding.hpp:130
unsigned char octet
Definition Types.hpp:83
typename ::std::shared_ptr< T > ref_type
Definition type_traits.hpp:29