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 }
cras::GetParamAdapter
An adapter that allows getting ROS parameters from various sources.
Definition: get_param_adapter.hpp:22
cras
Definition: any.hpp:15
cras::GetParamAdapter::getParam
virtual bool getParam(const std::string &name, XmlRpc::XmlRpcValue &value) const noexcept=0
Get the value of a parameter as XmlRpcValue.
cras::GetParamAdapter::getNamespace
virtual std::string getNamespace() const noexcept=0
Get the namespace of this adapter. It should somehow represent the source of the parameters.
cras::GetParamAdapter::hasParam
virtual bool hasParam(const std::string &name) const noexcept=0
Return whether this adapter is able to get a value of the given parameter.
cras::GetParamAdapterPtr
::std::shared_ptr<::cras::GetParamAdapter > GetParamAdapterPtr
Definition: get_param_adapter.hpp:57
XmlRpcValue.h
cras::GetParamAdapter::getNamespaced
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.
cras::GetParamAdapter::~GetParamAdapter
virtual ~GetParamAdapter()=default
XmlRpc::XmlRpcValue


cras_cpp_common
Author(s): Martin Pecka
autogenerated on Tue Nov 26 2024 03:49:04