UHD  003.001.002
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
uhd::named_prop_t Struct Reference

#include <props.hpp>

Public Member Functions

template<typename T >
as (void)
 Convert the key to the specified type. More...
 
 named_prop_t (const wax::obj &key, const std::string &name)
 

Static Public Member Functions

static named_prop_t extract (const wax::obj &key, const std::string &name="")
 

Public Attributes

const wax::obj key
 
const std::string name
 

Detailed Description

A named prop struct holds a key and a name. Allows properties to be sub-sectioned by name.

Constructor & Destructor Documentation

◆ named_prop_t()

uhd::named_prop_t::named_prop_t ( const wax::obj key,
const std::string &  name 
)

Create a new named prop from key and name.

Parameters
keythe property key
namethe string name

Member Function Documentation

◆ as()

template<typename T >
T uhd::named_prop_t::as ( void  )
inline

Convert the key to the specified type.

◆ extract()

static named_prop_t uhd::named_prop_t::extract ( const wax::obj key,
const std::string &  name = "" 
)
static

Utility function to convert generic key into a named prop. If the key was already a named prop, the prop will be split. Otherwise, the key will be the key, and the name will be used.

Parameters
keya reference to the prop object
namea reference to the name object
Returns
a named property struct with key and name

Member Data Documentation

◆ key

const wax::obj uhd::named_prop_t::key

◆ name

const std::string uhd::named_prop_t::name

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