Gazebo Transport

API Reference

12.2.2
Interface.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2022 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_PARAMETERS_INTERFACE_HH_
19 #define GZ_TRANSPORT_PARAMETERS_INTERFACE_HH_
20 
21 #include <functional>
22 #include <memory>
23 #include <string>
24 #include <variant>
25 
26 #include <google/protobuf/message.h>
27 
28 #include <gz/msgs/parameter_declarations.pb.h>
29 
30 #include "gz/transport/config.hh"
32 #include "gz/transport/parameters/Export.hh"
33 
34 namespace gz
35 {
36  namespace transport
37  {
38  namespace parameters
39  {
40  // Inline bracket to help doxygen filtering.
41  inline namespace GZ_TRANSPORT_VERSION_NAMESPACE {
42 
45  class GZ_TRANSPORT_PARAMETERS_VISIBLE ParametersInterface
46  {
48  public: virtual ~ParametersInterface() = default;
49 
59  public: virtual ParameterResult DeclareParameter(
60  const std::string & _parameterName,
61  const google::protobuf::Message & _msg) = 0;
62 
72  public: virtual ParameterResult Parameter(
73  const std::string & _parameterName,
74  google::protobuf::Message & _parameter) const = 0;
75 
86  public: virtual ParameterResult Parameter(
87  const std::string & _parameterName,
88  std::unique_ptr<google::protobuf::Message> & _parameter) const = 0;
89 
98  public: virtual ParameterResult SetParameter(
99  const std::string & _parameterName,
100  const google::protobuf::Message & _msg) = 0;
101 
104  public: virtual gz::msgs::ParameterDeclarations
105  ListParameters() const = 0;
106  };
107  }
108  }
109  }
110 }
111 
112 #endif