Gazebo Transport

API Reference

14.1.0
MessageInfo.hh
Go to the documentation of this file.
1/*
2 * Copyright (C) 2016 Open Source Robotics Foundation
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 *
16*/
17
18#ifndef GZ_TRANSPORT_MESSAGEINFO_HH_
19#define GZ_TRANSPORT_MESSAGEINFO_HH_
20
21#include <memory>
22#include <string>
23
24#include "gz/transport/config.hh"
25#include "gz/transport/Export.hh"
26
27namespace gz::transport
28{
29 // Inline bracket to help doxygen filtering.
30 inline namespace GZ_TRANSPORT_VERSION_NAMESPACE {
31 //
32 class MessageInfoPrivate;
33
35 class GZ_TRANSPORT_VISIBLE MessageInfo
36 {
38 public: MessageInfo();
39
43 public: MessageInfo(const MessageInfo &_other);
44
47 public: MessageInfo(MessageInfo &&_other); // NOLINT
48
50 public: ~MessageInfo();
51
54 public: const std::string &Topic() const;
55
57 public: void SetTopic(const std::string &_topic);
58
61 public: const std::string &Type() const;
62
65 public: void SetType(const std::string &_type);
66
69 public: const std::string &Partition() const;
70
73 public: void SetPartition(const std::string &_partition);
74
80 public: bool SetTopicAndPartition(const std::string &_fullyQualifiedName);
81
84 public: bool IntraProcess() const;
85
88 public: void SetIntraProcess(bool _value);
89
90#ifdef _WIN32
91// Disable warning C4251 which is triggered by
92// std::unique_ptr
93#pragma warning(push)
94#pragma warning(disable: 4251)
95#endif
99#ifdef _WIN32
100#pragma warning(pop)
101#endif
102 };
103 }
104}
105#endif