UHD 003.002.002
Public Member Functions | Static Public Member Functions | Public Attributes

uhd::named_prop_t Struct Reference

#include <props.hpp>

List of all members.

Public Member Functions

template<typename T >
as (void)
 Convert the key to the specified type.
 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

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

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

Convert the key to the specified type.

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

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

The documentation for this struct was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines