Gazebo Transport

API Reference

13.4.1
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::transport::parameters
35 {
36  // Inline bracket to help doxygen filtering.
37  inline namespace GZ_TRANSPORT_VERSION_NAMESPACE {
38 
41  class GZ_TRANSPORT_PARAMETERS_VISIBLE ParametersInterface
42  {
44  public: virtual ~ParametersInterface() = default;
45 
56  const std::string & _parameterName,
57  const google::protobuf::Message & _msg) = 0;
58 
68  public: virtual ParameterResult Parameter(
69  const std::string & _parameterName,
70  google::protobuf::Message & _parameter) const = 0;
71 
82  public: virtual ParameterResult Parameter(
83  const std::string & _parameterName,
84  std::unique_ptr<google::protobuf::Message> & _parameter) const = 0;
85 
94  public: virtual ParameterResult SetParameter(
95  const std::string & _parameterName,
96  const google::protobuf::Message & _msg) = 0;
97 
100  public: virtual gz::msgs::ParameterDeclarations ListParameters() const = 0;
101  };
102  }
103 }
104 
105 #endif