quarx
high performance processing frameworks of interconnectable DSP modules
qx::node Class Referenceabstract

base clase - abstracts from value inheritance More...

#include <qx.h>

+ Inheritance diagram for qx::node:
+ Collaboration diagram for qx::node:

Public Types

typedef std::deque< std::shared_ptr< node > > container
 
typedef promoted< std::string > promoted
 

Public Member Functions

void clear () noexcept
 
virtual std::shared_ptr< nodeclone (node *parent) const =0
 
virtual const char * id () const noexcept
 
void ignore (promoted *value) noexcept
 
virtual bool inherits (const char *type) const noexcept
 
 node (const std::string &key, node *parent=nullptr, const decltype(attributes)&attributes={})
 
void obey (const std::initializer_list< promoted * > &values, bool initial_update=true) noexcept
 
void obey (promoted *value, bool initial_update=true) noexcept
 
template<typename node_t , typename petty_t = node_t, typename = enable_if_base_of <node, node_t>>
 operator const node_t & () const
 
template<typename value_t , typename = enable_if_value<value_t>>
 operator const value_t & () const
 
template<typename node_t , typename petty_t = node_t, typename = enable_if_base_of <node, node_t>>
 operator node_t & ()
 node derivate linkage explicit assignment (i.e. node= &out) More...
 
template<typename value_t , typename = enable_if_value<value_t>>
 operator value_t & ()
 
template<typename value_t , typename = enable_if_value<value_t>>
std::decay_t< value_t > & operator* ()
 
template<typename value_t , typename = enable_if_value<value_t>>
const std::decay_t< value_t > & operator* () const
 
template<typename value_t , typename = enable_if_value<value_t>>
void operator= (const value_t &value)
 anticipated value assignment with throwing casts More...
 
template<typename value_t , typename = enable_if_value<value_t>>
bool operator== (const std::decay_t< value_t > &value) const
 
virtual nodeoperator[] (const std::string &key) const =0
 
virtual nodeoperator[] (size_t pos) const =0
 
void remove ()
 
virtual void remove (const promoted &) noexcept
 indicate promoted end-of-lifetime More...
 
virtual noderesize (size_t)
 
void trigger () noexcept
 
virtual ~node ()=default
 

Static Public Member Functions

static bool static_inherits (const char *type) noexcept
 

Public Attributes

attributes attributes
 
promoted key
 name of node More...
 
nodeparent = nullptr
 
promoted path
 entire path of node in process network More...
 
std::set< promoted * > values
 

Static Public Attributes

static constexpr auto type = "node"
 generic node type ID More...
 

Protected Types

template<typename base_t , typename derrived_t >
using enable_if_base_of = std::enable_if_t< std::is_base_of_v< std::decay_t< base_t >, std::decay_t< derrived_t > >>
 
template<typename value_t >
using enable_if_value = std::enable_if_t< std::is_same_v< std::decay_t< value_t >, int32_t >||std::is_same_v< std::decay_t< value_t >, double >||std::is_same_v< std::decay_t< value_t >, node * > >
 

Detailed Description

base clase - abstracts from value inheritance

Member Typedef Documentation

◆ container

typedef std::deque<std::shared_ptr<node> > qx::node::container

◆ enable_if_base_of

template<typename base_t , typename derrived_t >
using qx::node::enable_if_base_of = std::enable_if_t<std::is_base_of_v <std::decay_t<base_t>, std::decay_t<derrived_t> >>
protected

◆ enable_if_value

template<typename value_t >
using qx::node::enable_if_value = std::enable_if_t< std::is_same_v<std::decay_t<value_t>, int32_t> || std::is_same_v<std::decay_t<value_t>, double> || std::is_same_v<std::decay_t<value_t>, node*> >
protected

◆ promoted

typedef promoted<std::string > qx::listen< std::string >::promoted
inherited

Constructor & Destructor Documentation

◆ node()

qx::node::node ( const std::string &  key,
node parent = nullptr,
const decltype(attributes)&  attributes = {} 
)

◆ ~node()

virtual qx::node::~node ( )
virtualdefault

Member Function Documentation

◆ clear()

void qx::listen< std::string >::clear ( )
inlinenoexceptinherited

◆ clone()

virtual std::shared_ptr<node> qx::node::clone ( node parent) const
pure virtual

◆ id()

virtual const char* qx::node::id ( ) const
inlinevirtualnoexcept

◆ ignore()

void qx::listen< std::string >::ignore ( promoted value)
inlinenoexceptinherited

◆ inherits()

virtual bool qx::node::inherits ( const char *  type) const
inlinevirtualnoexcept

◆ obey() [1/2]

void qx::listen< std::string >::obey ( const std::initializer_list< promoted * > &  values,
bool  initial_update = true 
)
inlinenoexceptinherited

◆ obey() [2/2]

void qx::listen< std::string >::obey ( promoted value,
bool  initial_update = true 
)
inlinenoexceptinherited

◆ operator const node_t &()

template<typename node_t , typename petty_t = node_t, typename = enable_if_base_of <node, node_t>>
qx::node::operator const node_t & ( ) const
inline

◆ operator const value_t &()

template<typename value_t , typename = enable_if_value<value_t>>
qx::node::operator const value_t & ( ) const
inline

◆ operator node_t &()

template<typename node_t , typename petty_t = node_t, typename = enable_if_base_of <node, node_t>>
qx::node::operator node_t & ( )
inline

node derivate linkage explicit assignment (i.e. node= &out)

◆ operator value_t &()

template<typename value_t , typename = enable_if_value<value_t>>
qx::node::operator value_t & ( )
inline

◆ operator*() [1/2]

template<typename value_t , typename = enable_if_value<value_t>>
std::decay_t<value_t>& qx::node::operator* ( )
inline

◆ operator*() [2/2]

template<typename value_t , typename = enable_if_value<value_t>>
const std::decay_t<value_t>& qx::node::operator* ( ) const
inline

◆ operator=()

template<typename value_t , typename = enable_if_value<value_t>>
void qx::node::operator= ( const value_t &  value)
inline

anticipated value assignment with throwing casts

◆ operator==()

template<typename value_t , typename = enable_if_value<value_t>>
bool qx::node::operator== ( const std::decay_t< value_t > &  value) const
inline

◆ operator[]() [1/2]

virtual node& qx::node::operator[] ( const std::string &  key) const
pure virtual

◆ operator[]() [2/2]

virtual node& qx::node::operator[] ( size_t  pos) const
pure virtual

◆ remove() [1/2]

void qx::node::remove ( )

◆ remove() [2/2]

virtual void qx::listen< std::string >::remove ( const promoted )
inlinevirtualnoexceptinherited

indicate promoted end-of-lifetime

◆ resize()

virtual node& qx::node::resize ( size_t  )
inlinevirtual

◆ static_inherits()

static bool qx::node::static_inherits ( const char *  type)
inlinestaticnoexcept

◆ trigger()

void qx::listen< std::string >::trigger ( )
inlinenoexceptinherited

Member Data Documentation

◆ attributes

attributes qx::node::attributes

◆ key

promoted qx::node::key

name of node

◆ parent

node* qx::node::parent = nullptr

◆ path

promoted qx::node::path

entire path of node in process network

◆ type

constexpr auto qx::node::type = "node"
staticconstexpr

generic node type ID

◆ values

std::set<promoted*> qx::listen< std::string >::values
inherited

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

(c) copyright 2009 dynamic acoustics e.U. generated on Fri Dec 17 2021

a closed source license may be obtained by requesting a written permission from dynamic acoustics e.U.
however - governmental use generally and military use especially is strictly prohibited though.