Program Listing for File BuiltinTopicTypes.hpp
↰ Return to documentation for file (/tmp/ws/src/fastrtps/include/dds/core/BuiltinTopicTypes.hpp
)
/*
* Copyright 2010, Object Management Group, Inc.
* Copyright 2010, PrismTech, Corp.
* Copyright 2010, Real-Time Innovations, Inc.
* Copyright 2019, Proyectos y Sistemas de Mantenimiento SL (eProsima).
* All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef OMG_DDS_CORE_BUILTIN_TOPIC_TYPES_HPP_
#define OMG_DDS_CORE_BUILTIN_TOPIC_TYPES_HPP_
#include <dds/core/detail/conformance.hpp>
#include <dds/core/detail/BuiltinTopicTypes.hpp>
#if defined (OMG_DDS_X_TYPES_BUILTIN_TOPIC_TYPES_SUPPORT)
namespace dds {
namespace core {
template<typename DELEGATE>
class TBytesTopicType : public Value<DELEGATE>
{
public:
TBytesTopicType();
TBytesTopicType(
const std::vector<uint8_t>& data);
operator std::vector<uint8_t>&() const;
const std::vector<uint8_t>& data() const;
void data(
const std::vector<uint8_t>& data);
};
template<typename DELEGATE>
class TStringTopicType : public Value<DELEGATE>
{
public:
TStringTopicType();
TStringTopicType(
const std::string& data);
operator std::string& () const;
const std::string& data() const;
void data(
const std::string& data);
};
template<typename DELEGATE>
class TKeyedStringTopicType : public Value<DELEGATE>
{
public:
TKeyedStringTopicType();
TKeyedStringTopicType(
const std::string& key,
const std::string& value);
const std::string& key() const;
void key(
const std::string& key);
const std::string& value() const;
void value(
const std::string& value);
};
template<typename DELEGATE>
class TKeyedBytesTopicType : public Value<DELEGATE>
{
public:
TKeyedBytesTopicType();
TKeyedBytesTopicType(
const std::string& key,
const std::vector<uint8_t>& value);
const std::string& key() const;
void key(
const std::string& key);
const std::vector<uint8_t>& value() const;
void value(
const std::vector<uint8_t>& value);
};
typedef dds::core::detail::BytesTopicType BytesTopicType;
typedef dds::core::detail::StringTopicType StringTopicType;
typedef dds::core::detail::KeyedBytesTopicType KeyedBytesTopicType;
typedef dds::core::detail::KeyedStringTopicType KeyedStringTopicType;
} //namespace core
} //namespace dds
#endif //OMG_DDS_X_TYPES_BUILTIN_TOPIC_TYPES_SUPPORT
#endif //OMG_DDS_CORE_BUILTIN_TOPIC_TYPES_HPP_