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

#include <xmlrpc_value.hpp>

Inheritance diagram for cras::XmlRpcValueGetParamAdapter:
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
 
 XmlRpcValueGetParamAdapter (const ::XmlRpc::XmlRpcValue &baseParam, const ::std::string &baseNamespace)
 Create a GetParamAdapter that reads parameters from baseParam (which needs to be struct). More...
 
 ~XmlRpcValueGetParamAdapter () 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

::std::string baseNamespace
 
::XmlRpc::XmlRpcValue baseParam
 

Detailed Description

Definition at line 21 of file xmlrpc_value.hpp.

Constructor & Destructor Documentation

◆ XmlRpcValueGetParamAdapter()

cras::XmlRpcValueGetParamAdapter::XmlRpcValueGetParamAdapter ( const ::XmlRpc::XmlRpcValue baseParam,
const ::std::string &  baseNamespace 
)
explicit

Create a GetParamAdapter that reads parameters from baseParam (which needs to be struct).

Parameters
baseParamThe struct to read parameters from.
baseNamespaceAny namespace prepended before the name of the created adapter in logs.
Exceptions
std::runtime_errorIf baseParam is not a struct.

◆ ~XmlRpcValueGetParamAdapter()

cras::XmlRpcValueGetParamAdapter::~XmlRpcValueGetParamAdapter ( )
override

Member Function Documentation

◆ getNamespace()

::std::string cras::XmlRpcValueGetParamAdapter::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::XmlRpcValueGetParamAdapter::getNamespaced ( const ::std::string &  ns) const
overridenoexcept

◆ getParam()

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

◆ hasParam()

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

Member Data Documentation

◆ baseNamespace

::std::string cras::XmlRpcValueGetParamAdapter::baseNamespace
protected

Definition at line 40 of file xmlrpc_value.hpp.

◆ baseParam

::XmlRpc::XmlRpcValue cras::XmlRpcValueGetParamAdapter::baseParam
protected

Definition at line 39 of file xmlrpc_value.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