Public Member Functions | Protected Attributes | List of all members
cras::NodeHandleGetParamAdapter Struct Reference

An adapter that allows getting ROS parameters from a node handle. More...

#include <node_handle.hpp>

Inheritance diagram for cras::NodeHandleGetParamAdapter:
Inheritance graph
[legend]

Public Member Functions

::std::string getNamespace () const noexcept override
 Get the namespace of this adapter. It should somehow represent the source of the parameters. More...
 
::std::shared_ptr<::cras::GetParamAdaptergetNamespaced (const ::std::string &ns) const noexcept(false) override
 
bool getParam (const ::std::string &name, ::XmlRpc::XmlRpcValue &v) const noexcept override
 
bool hasParam (const ::std::string &name) const noexcept override
 
 NodeHandleGetParamAdapter (const ::ros::NodeHandle &nh) noexcept
 Create a GetParamAdapter that reads parameters from the given node handle. More...
 
 ~NodeHandleGetParamAdapter () override
 
- Public Member Functions inherited from cras::GetParamAdapter
virtual std::shared_ptr< GetParamAdaptergetNamespaced (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
 

Protected Attributes

ros::NodeHandle nh
 

Detailed Description

An adapter that allows getting ROS parameters from a node handle.

Definition at line 25 of file node_handle.hpp.

Constructor & Destructor Documentation

◆ NodeHandleGetParamAdapter()

cras::NodeHandleGetParamAdapter::NodeHandleGetParamAdapter ( const ::ros::NodeHandle nh)
explicitnoexcept

Create a GetParamAdapter that reads parameters from the given node handle.

Parameters
nhThe node handle to read params from.

◆ ~NodeHandleGetParamAdapter()

cras::NodeHandleGetParamAdapter::~NodeHandleGetParamAdapter ( )
override

Member Function Documentation

◆ getNamespace()

::std::string cras::NodeHandleGetParamAdapter::getNamespace ( ) const
overridevirtualnoexcept

Get the namespace of this adapter. It should somehow represent the source of the parameters.

Returns
The namespace.

Implements cras::GetParamAdapter.

◆ getNamespaced()

::std::shared_ptr<::cras::GetParamAdapter> cras::NodeHandleGetParamAdapter::getNamespaced ( const ::std::string &  ns) const
overridenoexcept

◆ getParam()

bool cras::NodeHandleGetParamAdapter::getParam ( const ::std::string &  name,
::XmlRpc::XmlRpcValue v 
) const
overridenoexcept

◆ hasParam()

bool cras::NodeHandleGetParamAdapter::hasParam ( const ::std::string &  name) const
overridenoexcept

Member Data Documentation

◆ nh

ros::NodeHandle cras::NodeHandleGetParamAdapter::nh
protected

Definition at line 41 of file node_handle.hpp.


The documentation for this struct was generated from the following file:


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