get_param_adapter.hpp
Go to the documentation of this file.
1 #pragma once
2 
11 #include <memory>
12 #include <string>
13 
14 #include <XmlRpcValue.h>
15 
16 namespace cras
17 {
18 
23 {
24  virtual ~GetParamAdapter() = default;
25 
32  virtual bool getParam(const std::string& name, XmlRpc::XmlRpcValue& value) const noexcept = 0;
33 
39  virtual bool hasParam(const std::string& name) const noexcept = 0;
40 
45  virtual std::string getNamespace() const noexcept = 0;
46 
54  virtual std::shared_ptr<GetParamAdapter> getNamespaced(const std::string& ns) const noexcept(false) = 0;
55 };
56 
57 typedef ::std::shared_ptr<::cras::GetParamAdapter> GetParamAdapterPtr;
58 }
virtual ~GetParamAdapter()=default
::std::shared_ptr<::cras::GetParamAdapter > GetParamAdapterPtr
An adapter that allows getting ROS parameters from various sources.
virtual std::shared_ptr< GetParamAdapter > getNamespaced(const std::string &ns) const noexcept(false)=0
Construct another adapter whose source are parameters that are in a sub-namespace of this adapter...
virtual bool hasParam(const std::string &name) const noexcept=0
Return whether this adapter is able to get a value of the given parameter.
Definition: any.hpp:15
virtual std::string getNamespace() const noexcept=0
Get the namespace of this adapter. It should somehow represent the source of the parameters.
virtual bool getParam(const std::string &name, XmlRpc::XmlRpcValue &value) const noexcept=0
Get the value of a parameter as XmlRpcValue.


cras_cpp_common
Author(s): Martin Pecka
autogenerated on Sat Jun 17 2023 02:32:53