An adapter that allows getting ROS parameters from various sources.
More...
#include <get_param_adapter.hpp>
|
virtual std::string | getNamespace () const noexcept=0 |
| Get the namespace of this adapter. It should somehow represent the source of the parameters. More...
|
|
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. More...
|
|
virtual bool | getParam (const std::string &name, XmlRpc::XmlRpcValue &value) const noexcept=0 |
| Get the value of a parameter as XmlRpcValue. More...
|
|
virtual bool | hasParam (const std::string &name) const noexcept=0 |
| Return whether this adapter is able to get a value of the given parameter. More...
|
|
virtual | ~GetParamAdapter ()=default |
|
An adapter that allows getting ROS parameters from various sources.
Definition at line 22 of file get_param_adapter.hpp.
◆ ~GetParamAdapter()
virtual cras::GetParamAdapter::~GetParamAdapter |
( |
| ) |
|
|
virtualdefault |
◆ getNamespace()
virtual std::string cras::GetParamAdapter::getNamespace |
( |
| ) |
const |
|
pure virtualnoexcept |
◆ getNamespaced()
virtual std::shared_ptr<GetParamAdapter> cras::GetParamAdapter::getNamespaced |
( |
const std::string & |
ns | ) |
const |
|
pure virtualnoexcept |
Construct another adapter whose source are parameters that are in a sub-namespace of this adapter.
- Parameters
-
[in] | ns | The namespace to search parameters in. |
- Returns
- The constructed adapter. The function should never return null (throw an exception on failure).
- Exceptions
-
std::runtime_error | If something fails. |
ros::InvalidNameException | If the namespace specification does not follow ROS parameter name rules. |
◆ getParam()
virtual bool cras::GetParamAdapter::getParam |
( |
const std::string & |
name, |
|
|
XmlRpc::XmlRpcValue & |
value |
|
) |
| const |
|
pure virtualnoexcept |
Get the value of a parameter as XmlRpcValue.
- Parameters
-
[in] | name | Name of the parameter. |
[out] | value | Value of the parameter (unchanged if getting the parameter failed). |
- Returns
- Whether getting the parameter succeeded.
◆ hasParam()
virtual bool cras::GetParamAdapter::hasParam |
( |
const std::string & |
name | ) |
const |
|
pure virtualnoexcept |
Return whether this adapter is able to get a value of the given parameter.
- Parameters
-
[in] | name | Name of the parameter. |
- Returns
- Whether this adapter is able to get a value of the given parameter.
The documentation for this struct was generated from the following file: