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

Base class for a process node. More...

#include <processes.hpp>

Public Types

using element_type = element_wrapper< Element >
 
using reaction_type = reaction< Element >
 
using decay_type = decay< Element >
 

Public Member Functions

 node (std::unique_ptr< element_type > &&ptr)
 Constructor from an element. More...
 
 node (std::unique_ptr< reaction_type > &&ptr)
 Constructor from a reaction. More...
 
 node (std::unique_ptr< decay_type > &&ptr)
 Construction from a decay. More...
 
 node (node &&other)
 Move constructor. More...
 
 ~node () noexcept(false)
 Destructor. More...
 
 node ()=delete
 
 node (node const &)=delete
 
nodeoperator= (node const &)=delete
 
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_kind type () const
 Get the node type. More...
 
node_object const * object () const
 Get the pointer to the underlying object. More...
 
Element const * ptr_as_element () const
 Return the pointer to the underlying object casted to an element. More...
 
reaction_type const * ptr_as_reaction () const
 Return the pointer to the underlying object casted to a reaction. More...
 
decay_type const * ptr_as_decay () const
 Return the pointer to the underlying object casted to a decay. More...
 

Protected Member Functions

element_type const * ptr_as_element_wrapper () const
 

Detailed Description

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

Base class for a process node.

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

Member Typedef Documentation

◆ decay_type

template<class Element >
using reactions::node< Element >::decay_type = decay<Element>

◆ element_type

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

◆ reaction_type

template<class Element >
using reactions::node< Element >::reaction_type = reaction<Element>

Constructor & Destructor Documentation

◆ node() [1/6]

template<class Element >
reactions::node< Element >::node ( std::unique_ptr< element_type > &&  ptr)
inline

Constructor from an element.

◆ node() [2/6]

template<class Element >
reactions::node< Element >::node ( std::unique_ptr< reaction_type > &&  ptr)
inline

Constructor from a reaction.

◆ node() [3/6]

template<class Element >
reactions::node< Element >::node ( std::unique_ptr< decay_type > &&  ptr)
inline

Construction from a decay.

◆ node() [4/6]

template<class Element >
reactions::node< Element >::node ( node< Element > &&  other)
inline

Move constructor.

◆ ~node()

template<class Element >
reactions::node< Element >::~node ( )
inlinenoexcept

Destructor.

◆ node() [5/6]

template<class Element >
reactions::node< Element >::node ( )
delete

◆ node() [6/6]

template<class Element >
reactions::node< Element >::node ( node< Element > const &  )
delete

Member Function Documentation

◆ is_decay()

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

Check if the underlying class is a decay.

◆ is_element()

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

Check if the underlying class is an element.

◆ is_reaction()

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

Check if the underlying class is a reaction.

◆ object()

template<class Element >
node_object const* reactions::node< Element >::object ( ) const
inline

Get the pointer to the underlying object.

◆ operator=()

template<class Element >
node& reactions::node< Element >::operator= ( node< Element > const &  )
delete

◆ ptr_as_decay()

template<class Element >
decay_type const* reactions::node< Element >::ptr_as_decay ( ) const
inline

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

◆ ptr_as_element()

template<class Element >
Element const* reactions::node< Element >::ptr_as_element ( ) const
inline

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

◆ ptr_as_element_wrapper()

template<class Element >
element_type const* reactions::node< Element >::ptr_as_element_wrapper ( ) const
inlineprotected

Internal method to return the underlying object casted to a wrapped element

◆ ptr_as_reaction()

template<class Element >
reaction_type const* reactions::node< Element >::ptr_as_reaction ( ) const
inline

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

◆ type()

template<class Element >
processes::node_kind reactions::node< Element >::type ( ) const
inline

Get the node type.


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