Reactions  0.1.1
Handling reaction trees and decays
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
reactions::decay< Element > Class Template Reference

Description of a process where head particle generate a set of products. More...

#include <processes.hpp>

Collaboration diagram for reactions::decay< Element >:
Collaboration graph
[legend]

Public Types

using element_type = element_wrapper< Element >
 
using builder_type = element_traits::builder_tpl_t< Element >
 
using nodes_type = std::vector< node< Element, decay > >
 

Public Member Functions

 decay (decay &&)=default
 Default move constructor. More...
 
 decay (const decay &)=default
 Default copy constructor. More...
 
decayoperator= (const decay &)=default
 Default assignment operator. More...
 
 ~decay ()=default
 Default destructor. More...
 
 decay ()=delete
 
Element const & head () const
 Get the head particle of the decay. More...
 
nodes_type const & products () const
 Get the products of the decay. More...
 
bool operator== (decay< Element > const &other) const
 Comparison operator. More...
 
bool operator!= (decay< Element > const &other) const
 Comparison operator. More...
 

Protected Member Functions

 decay (std::string::const_iterator &&begin, std::string::const_iterator const &end, builder_type builder)
 Constructor from the string iterators. More...
 
 decay (std::string::const_iterator &sit, std::string::const_iterator const &end, builder_type builder)
 Constructor from the string iterators. More...
 

Protected Attributes

std::optional< element_typem_head
 Head particle. More...
 
nodes_type m_products
 Products. More...
 

Friends

template<class Process >
Process reactions::processes::make_process (std::string const &, typename Process::builder_type)
 

Detailed Description

template<class Element>
class reactions::decay< Element >

Description of a process where head particle generate a set of products.

This can be seen as a special reaction with only one reactant, and where subsequent chain nodes are also decays.

Member Typedef Documentation

◆ builder_type

template<class Element>
using reactions::decay< Element >::builder_type = element_traits::builder_tpl_t<Element>

◆ element_type

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

◆ nodes_type

template<class Element>
using reactions::decay< Element >::nodes_type = std::vector<node<Element, decay> >

Constructor & Destructor Documentation

◆ decay() [1/5]

template<class Element>
reactions::decay< Element >::decay ( decay< Element > &&  )
default

Default move constructor.

◆ decay() [2/5]

template<class Element>
reactions::decay< Element >::decay ( const decay< Element > &  )
default

Default copy constructor.

◆ ~decay()

template<class Element>
reactions::decay< Element >::~decay ( )
default

Default destructor.

◆ decay() [3/5]

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

◆ decay() [4/5]

template<class Element>
reactions::decay< Element >::decay ( std::string::const_iterator &&  begin,
std::string::const_iterator const &  end,
builder_type  builder 
)
inlineprotected

Constructor from the string iterators.

This constructor is called internally when creating decays that contain other decays.

Parameters
beginiterator pointing to the beginning of the string.
enditerator pointing to the end of the string.
builderfunction to create the underlying element from a string.

◆ decay() [5/5]

template<class Element>
reactions::decay< Element >::decay ( std::string::const_iterator &  sit,
std::string::const_iterator const &  end,
builder_type  builder 
)
inlineprotected

Constructor from the string iterators.

This constructor is called internally when creating decays that contain other decays.

Parameters
sititerator pointing to the current point int the string.
enditerator pointing to the end of the string.
builderfunction to create the underlying element from a string.

Member Function Documentation

◆ head()

template<class Element>
Element const& reactions::decay< Element >::head ( ) const
inline

Get the head particle of the decay.

◆ operator!=()

template<class Element>
bool reactions::decay< Element >::operator!= ( decay< Element > const &  other) const
inline

Comparison operator.

◆ operator=()

template<class Element>
decay& reactions::decay< Element >::operator= ( const decay< Element > &  )
default

Default assignment operator.

◆ operator==()

template<class Element>
bool reactions::decay< Element >::operator== ( decay< Element > const &  other) const
inline

Comparison operator.

◆ products()

template<class Element>
nodes_type const& reactions::decay< Element >::products ( ) const
inline

Get the products of the decay.

Friends And Related Function Documentation

◆ reactions::processes::make_process

template<class Element>
template<class Process >
Process reactions::processes::make_process ( std::string const &  ,
typename Process::builder_type   
)
friend

Member Data Documentation

◆ m_head

template<class Element>
std::optional<element_type> reactions::decay< Element >::m_head
protected

Head particle.

◆ m_products

template<class Element>
nodes_type reactions::decay< Element >::m_products
protected

Products.


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