Develop Biology
The language of life
bio::chemical::Products Class Reference

#include <Products.h>

Public Member Functions

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

Protected Attributes

Code m_result
 
Substances m_substances
 

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.

Definition at line 36 of file Products.h.

Constructor & Destructor Documentation

◆ Products() [1/5]

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

Definition at line 28 of file Products.cpp.

29 :
30 m_result(CodePerspective::InvalidId())
31{
32
33}

◆ Products() [2/5]

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

Definition at line 35 of file Products.cpp.

36 :
37 m_result(result)
38{
39
40}

◆ Products() [3/5]

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

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

Parameters
substances

Definition at line 42 of file Products.cpp.

43 :
45 m_substances(*substances)
46{
47
48}
Substances m_substances
Definition: Products.h:105
Code Success()

◆ Products() [4/5]

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

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

Parameters
reactants

Definition at line 50 of file Products.cpp.

51 :
53 m_substances(reactants->GetAllAsVector< Substance* >())
54{
55
56}

◆ Products() [5/5]

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

Definition at line 58 of file Products.cpp.

62 :
63 m_result(result),
64 m_substances(*substances)
65{
66
67}

◆ ~Products()

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

Definition at line 69 of file Products.cpp.

70{
71
72}

Member Function Documentation

◆ operator Code()

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

Definition at line 74 of file Products.cpp.

75{
76 return m_result;
77}

◆ operator Reactants()

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

see molecular::Pathway for use.

Returns
*this as Reactants

Definition at line 84 of file Products.cpp.

85{
86 return Reactants(m_substances);
87}

◆ operator Substances()

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

Definition at line 79 of file Products.cpp.

80{
81 return m_substances;
82}

◆ 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.

Definition at line 89 of file Products.cpp.

90{
91 return m_result != code;
92}

References m_result.

◆ operator==()

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

Definition at line 94 of file Products.cpp.

95{
96 return m_result == code;
97}

References m_result.

Member Data Documentation

◆ m_result

Code bio::chemical::Products::m_result
protected

Definition at line 106 of file Products.h.

Referenced by operator!=(), and operator==().

◆ m_substances

Substances bio::chemical::Products::m_substances
protected

Definition at line 105 of file Products.h.


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