Fast DDS  Version 3.0.1
Fast DDS
Loading...
Searching...
No Matches
utils.hpp
1// Copyright 2024 Proyectos y Sistemas de Mantenimiento SL (eProsima).
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
19#ifndef FASTDDS_DDS_XTYPES__UTILS_HPP
20#define FASTDDS_DDS_XTYPES__UTILS_HPP
21
22#include <iostream>
23#include <string>
24
25#include <fastdds/dds/core/ReturnCode.hpp>
26#include <fastdds/dds/xtypes/dynamic_types/DynamicData.hpp>
27#include <fastdds/dds/xtypes/dynamic_types/DynamicType.hpp>
28#include <fastdds/fastdds_dll.hpp>
29
30namespace eprosima {
31namespace fastdds {
32namespace dds {
33
35{
36 OMG,
38};
39
47FASTDDS_EXPORTED_API ReturnCode_t idl_serialize(
48 const DynamicType::_ref_type& dynamic_type,
49 std::ostream& output) noexcept;
50
58FASTDDS_EXPORTED_API ReturnCode_t json_serialize(
59 const DynamicData::_ref_type& data,
61 std::ostream& output) noexcept;
62
63} // dds
64} // fastdds
65} // eprosima
66
67#endif // FASTDDS_DDS_XTYPES__UTILS_HPP
typename traits< DynamicData >::ref_type _ref_type
Definition DynamicData.hpp:35
typename traits< DynamicType >::ref_type _ref_type
Definition DynamicType.hpp:36
Definition DomainParticipant.hpp:45
DynamicDataJsonFormat
Definition utils.hpp:35
int32_t ReturnCode_t
Definition DDSReturnCode.hpp:59
FASTDDS_EXPORTED_API ReturnCode_t idl_serialize(const DynamicType::_ref_type &dynamic_type, std::ostream &output) noexcept
Serializes a DynamicType into its IDL representation.
FASTDDS_EXPORTED_API ReturnCode_t json_serialize(const DynamicData::_ref_type &data, DynamicDataJsonFormat format, std::ostream &output) noexcept
Serializes a DynamicData into a JSON object, which is then dumped into an std::ostream.
eProsima namespace.