libbio
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
bio::chemical::Products Class Reference

#include <Products.h>

Collaboration diagram for bio::chemical::Products:
Collaboration graph
[legend]

Public Member Functions

 Products ()
 
 Products (Code result)
 
 Products (Pointer< const Substances > substances)
 
 Products (Pointer< const Reactants > reactants)
 
 Products (Code result, Pointer< const Substances > substances)
 
 Products (Code result, Pointer< const Reactants > reactants)
 
virtual ~Products ()
 
virtual bool operator== (const Code code) const
 
virtual bool operator!= (const Code code) const
 
 operator Code ()
 
 operator Substances ()
 
 operator Reactants ()
 

Protected Attributes

Substances mSubstances
 
Code mResult
 

Detailed Description

Products are the result of a chemical::Reaction.
As such, they include Substances (in order to chain Reactions)
And they include a Code, indicating the result of the reaction.
They can be treated as either Substances or a Code.

Constructor & Destructor Documentation

◆ Products() [1/6]

bio::chemical::Products::Products ( )

◆ Products() [2/6]

bio::chemical::Products::Products ( Code  result)
Parameters
result

◆ Products() [3/6]

bio::chemical::Products::Products ( Pointer< const Substances substances)

Assume mResult Success(), since we're given a value and no error to report.

Parameters
substances

◆ Products() [4/6]

bio::chemical::Products::Products ( Pointer< const Reactants reactants)

Assume mResult Success(), since we're given a value and no error to report.

Parameters
reactants

◆ Products() [5/6]

bio::chemical::Products::Products ( Code  result,
Pointer< const Substances substances 
)
Parameters
result
substances

◆ Products() [6/6]

bio::chemical::Products::Products ( Code  result,
Pointer< const Reactants reactants 
)

Like Products(const Reactants*) but carries an explicit result Code instead of assuming Success. This is the ctor Reaction::Attempt's "no reaction found" failure branch always assumed existed — it returned Products(code::NotImplemented(), reactants) — but the overload was missing, so that branch never compiled. It only escaped notice because BIO_SANITIZE at the default safety level drops the failure branch entirely.

Parameters
resultthe result Code (e.g. code::NotImplemented()).
reactantsthe Reactants to carry through as Products' Substances.

◆ ~Products()

bio::chemical::Products::~Products ( )
virtual

Member Function Documentation

◆ operator Code()

bio::chemical::Products::operator Code ( )
Returns
*this as a Code.

◆ operator Reactants()

bio::chemical::Products::operator Reactants ( )

see molecular::Pathway for use.

Returns
*this as Reactants

◆ operator Substances()

bio::chemical::Products::operator Substances ( )
Returns
*this as Substances.

◆ operator!=()

bool bio::chemical::Products::operator!= ( const Code  code) const
virtual
Parameters
code
Returns
whether or not the given code does not match that of *this.

◆ operator==()

bool bio::chemical::Products::operator== ( const Code  code) const
virtual
Parameters
code
Returns
whether or not the given code matches that of *this.

Member Data Documentation

◆ mResult

Code bio::chemical::Products::mResult
protected

◆ mSubstances

Substances bio::chemical::Products::mSubstances
protected

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