Reactions  0.1.2
Handling reaction trees and decays
Public Types | Public Member Functions | Protected Member Functions | List of all members
reactions::node< Element, Chain > Class Template Referencefinal

Base class for a process node. More...

#include <processes.hpp>

Inheritance diagram for reactions::node< Element, Chain >:
Inheritance graph
[legend]
Collaboration diagram for reactions::node< Element, Chain >:
Collaboration graph
[legend]

Public Types

using base_type = std::variant< element_wrapper< Element >, Chain< Element > >
 
using element_type = element_wrapper< Element >
 
using chain_type = Chain< Element >
 

Public Member Functions

bool is_element () const
 Check if the underlying class is an element. More...
 
bool is_reaction () const
 Check if the underlying class is a reaction. More...
 
bool is_decay () const
 Check if the underlying class is a decay. More...
 
processes::node_type type () const
 Get the node type. More...
 
Element const & as_element () const
 Return the pointer to the underlying object casted to an element. More...
 
chain_type const & as_chain () const
 Return the pointer to the underlying object casted to a reaction. More...
 

Protected Member Functions

element_type const & as_element_wrapper () const
 Return the underlying object casted to a wrapped. More...
 
- Protected Member Functions inherited from std::variant< element_wrapper< Element >, Chain< Element > >
emplace (T... args)
 
index (T... args)
 
operator= (T... args)
 
swap (T... args)
 
valueless_by_exception (T... args)
 
variant (T... args)
 
~variant (T... args)
 

Detailed Description

template<class Element, template< class > class Chain>
class reactions::node< Element, Chain >

Base class for a process node.

This abstract class allows to check if the underlying class is an element or a chain object.

Member Typedef Documentation

◆ base_type

template<class Element, template< class > class Chain>
using reactions::node< Element, Chain >::base_type = std::variant<element_wrapper<Element>, Chain<Element> >

◆ chain_type

template<class Element, template< class > class Chain>
using reactions::node< Element, Chain >::chain_type = Chain<Element>

◆ element_type

template<class Element, template< class > class Chain>
using reactions::node< Element, Chain >::element_type = element_wrapper<Element>

Member Function Documentation

◆ as_chain()

template<class Element, template< class > class Chain>
chain_type const& reactions::node< Element, Chain >::as_chain ( ) const
inline

Return the pointer to the underlying object casted to a reaction.

◆ as_element()

template<class Element, template< class > class Chain>
Element const& reactions::node< Element, Chain >::as_element ( ) const
inline

Return the pointer to the underlying object casted to an element.

◆ as_element_wrapper()

template<class Element, template< class > class Chain>
element_type const& reactions::node< Element, Chain >::as_element_wrapper ( ) const
inlineprotected

Return the underlying object casted to a wrapped.

◆ is_decay()

template<class Element, template< class > class Chain>
bool reactions::node< Element, Chain >::is_decay ( ) const
inline

Check if the underlying class is a decay.

◆ is_element()

template<class Element, template< class > class Chain>
bool reactions::node< Element, Chain >::is_element ( ) const
inline

Check if the underlying class is an element.

◆ is_reaction()

template<class Element, template< class > class Chain>
bool reactions::node< Element, Chain >::is_reaction ( ) const
inline

Check if the underlying class is a reaction.

◆ type()

template<class Element, template< class > class Chain>
processes::node_type reactions::node< Element, Chain >::type ( ) const
inline

Get the node type.


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