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

#include <Reactant.h>

+ Inheritance diagram for bio::chemical::Reactant:
+ Collaboration diagram for bio::chemical::Reactant:

Public Member Functions

 Reactant (Name typeName, const Substance *substance)
 
 Reactant (Name typeName, const typename UnorderedMotif< Property >::Contents *properties, const typename UnorderedMotif< State >::Contents *states)
 
virtual ~Reactant ()
 
 BIO_DISAMBIGUATE_ALL_CLASS_METHODS (chemical, Reactant) Reactant(Name typeName)
 
virtual bool operator== (const Substance &other) const
 
- Public Member Functions inherited from bio::chemical::Substance
Substance Substance (const typename UnorderedMotif< Property >::Contents *properties, const typename UnorderedMotif< State >::Contents *states)
 
virtual ~Substance ()
 
 BIO_DEFAULT_IDENTIFIABLE_CONSTRUCTORS_WITH_CTOR_COMMON (chemical, Substance, &SubstancePerspective::Instance(), filter::Chemical()) BIO_DISAMBIGUATE_ALL_CLASS_METHODS(chemical
 
virtual void Disable ()
 
virtual void Enable ()
 
virtual bool IsEnabled () const
 
- Public Member Functions inherited from bio::chemical::Structure
 Structure ()
 
virtual ~Structure ()
 
- Public Member Functions inherited from bio::chemical::UnorderedStructureInterface
 UnorderedStructureInterface ()
 
virtual ~UnorderedStructureInterface ()
 
template<typename T >
Add (const T t)
 
template<typename T >
void Clear ()
 
template<typename T >
ContainerGetAll ()
 
template<typename T >
const ContainerGetAll () const
 
template<typename T >
std::vector< T > GetAllAsVector ()
 
template<typename T >
const std::vector< T > GetAllAsVector () const
 
template<typename T >
unsigned long GetCount () const
 
template<typename T >
unsigned int GetNumMatching (const Container *other) const
 
template<typename T >
std::string GetStringFrom (std::string separator=", ")
 
template<typename T >
bool Has (T content) const
 
template<typename T >
bool HasAll (const Container *contents) const
 
template<typename T >
void Import (const std::vector< T > &other)
 
template<typename T >
void Import (const UnorderedMotif< T > *other)
 
Code ImportAll (const physical::Wave *other)
 
template<typename T >
Remove (const T t)
 
- Public Member Functions inherited from bio::ThreadSafe
 ThreadSafe ()
 
 ThreadSafe (const ThreadSafe &toCopy)
 
virtual ~ThreadSafe ()
 
void LockThread () const
 
void UnlockThread () const
 
- Public Member Functions inherited from bio::chemical::Atom
 Atom (const Atom &other)
 
virtual ~Atom ()
 
template<typename T >
As ()
 
template<typename T >
const T As () const
 
template<typename T >
AsBonded ()
 
template<typename T >
const T AsBonded () const
 
template<typename T >
AsBondedQuantum ()
 
template<typename T >
const T AsBondedQuantum () const
 
virtual Code Attenuate (const Wave *other)
 
 BIO_DISAMBIGUATE_ALL_CLASS_METHODS (physical, Atom) explicit Atom()
 
template<typename T >
bool BreakBond (T toDisassociate, BondType type=bond_type::Unknown())
 
virtual Code Disattenuate (const Wave *other)
 
template<typename T >
bool FormBond (T toBond, BondType type=bond_type::Unknown())
 
BondsGetAllBonds ()
 
const BondsGetAllBonds () const
 
WaveGetBonded (Valence position)
 
const WaveGetBonded (Valence position) const
 
template<typename T >
Valence GetBondPosition () const
 
Valence GetBondPosition (AtomicNumber bondedId) const
 
Valence GetBondPosition (Name typeName) const
 
template<typename T >
BondType GetBondType () const
 
BondType GetBondType (Valence position) const
 
template<typename T >
 operator T ()
 
virtual Code Reify (physical::Symmetry *symmetry)
 
virtual physical::SymmetrySpin () const
 
- Public Member Functions inherited from bio::physical::Class< Atom >
 Class (Atom *object, Symmetry *symmetry=NULL)
 
virtual ~Class ()
 
virtual WaveAsWave ()
 
virtual const WaveAsWave () const
 
virtual WaveClone () const
 
Atom * Convert (Wave *wave)
 
virtual operator Atom * ()
 
virtual operator Wave * ()
 
- Public Member Functions inherited from bio::physical::Wave
 Wave (Symmetry *symmetry=NULL)
 
virtual ~Wave ()
 
virtual chemical::AtomAsAtom ()
 
virtual const chemical::AtomAsAtom () const
 
virtual WaveAsWave ()
 
virtual const WaveAsWave () const
 
virtual Code Attenuate (const Wave *other)
 
virtual WaveClone () const
 
virtual WaveDemodulate ()
 
virtual const WaveDemodulate () const
 
virtual Code Disattenuate (const Wave *other)
 
virtual Properties GetProperties () const
 
virtual WaveModulate (Wave *signal)
 
virtual Waveoperator* ()
 
virtual const Waveoperator* () const
 
virtual Waveoperator* (Wave *signal)
 
virtual void operator+ (const Wave *other)
 
virtual void operator- (const Wave *other)
 
virtual void operator| (Symmetry *symmetry)
 
virtual Code Reify (Symmetry *symmetry)
 
virtual SymmetrySpin () const
 
- Public Member Functions inherited from bio::chemical::LinearStructureInterface
 LinearStructureInterface ()
 
virtual ~LinearStructureInterface ()
 
template<typename T >
Emission ForEach (ExcitationBase *excitation)
 
template<typename T >
GetById (StandardDimension id)
 
template<typename T >
const T GetById (StandardDimension id) const
 
template<typename T >
GetByName (Name name)
 
template<typename T >
const T GetByName (Name name) const
 
template<typename T >
GetOrCreateById (StandardDimension id)
 
template<typename T >
GetOrCreateByName (Name name)
 
template<typename T >
Code Insert (T toAdd, const Position position=BOTTOM, const StandardDimension optionalPositionArg=0, const bool transferSubContents=false)
 
- Public Member Functions inherited from bio::chemical::Class< Substance >
 BIO_DISAMBIGUATE_ALL_CLASS_METHODS (physical, Substance) Class(Substance *object
 
- Public Member Functions inherited from bio::physical::Class< T >
 Class (T *object, Symmetry *symmetry=NULL)
 
virtual ~Class ()
 
virtual WaveAsWave ()
 
virtual const WaveAsWave () const
 
virtual WaveClone () const
 
T * Convert (Wave *wave)
 
virtual operator T* ()
 
virtual operator Wave * ()
 
- Public Member Functions inherited from bio::physical::Identifiable< StandardDimension >
 BIO_DISAMBIGUATE_ALL_CLASS_METHODS (physical, Identifiable< StandardDimension >) explicit Identifiable(Perspective< StandardDimension > *perspective
 
void CloneIntoName (Name name)
 
- Public Member Functions inherited from bio::physical::Observer< Perspective< StandardDimension > >
 Observer (const Observer &other)
 
 Observer (Perspective *perspective=NULL)
 
virtual ~Observer ()
 
virtual PerspectiveGetPerspective () const
 
virtual void SetPerspective (Perspective *perspective)
 
- Public Member Functions inherited from bio::physical::Class< Identifiable< StandardDimension > >
 Class (Identifiable< StandardDimension > *object, Symmetry *symmetry=NULL)
 
virtual ~Class ()
 
virtual WaveAsWave ()
 
virtual const WaveAsWave () const
 
virtual WaveClone () const
 
Identifiable< StandardDimension > * Convert (Wave *wave)
 
virtual operator Identifiable< StandardDimension > * ()
 
virtual operator Wave * ()
 
- Public Member Functions inherited from bio::log::Writer
 Writer (Engine *logEngine, Filter logFilter)
 
virtual ~Writer ()
 
 BIO_DISAMBIGUATE_ALL_CLASS_METHODS (physical, Writer) Writer()
 
void ExternalLog (Filter logFilter, Level level, const char *format,...) const
 
EngineGetLogEngine ()
 
const EngineGetLogEngine () const
 
bool HasLogEngine () const
 
virtual void SetLogEngine (Engine *logEngine)
 
- Public Member Functions inherited from bio::physical::Filterable
 Filterable (Filter filter)
 
virtual ~Filterable ()
 
 BIO_DISAMBIGUATE_ALL_CLASS_METHODS (physical, Filterable) Filterable()
 
Filter GetFilter () const
 
virtual void InitializeImplementation (ByteStreams args)
 
virtual Code Reify (Symmetry *symmetry)
 
virtual void SetFilter (Filter filter)
 
virtual SymmetrySpin () const
 
- Public Member Functions inherited from bio::physical::Class< Filterable >
 Class (Filterable *object, Symmetry *symmetry=NULL)
 
virtual ~Class ()
 
virtual WaveAsWave ()
 
virtual const WaveAsWave () const
 
virtual WaveClone () const
 
FilterableConvert (Wave *wave)
 
virtual operator Filterable * ()
 
virtual operator Wave * ()
 
- Public Member Functions inherited from bio::physical::Class< Writer >
 Class (Writer *object, Symmetry *symmetry=NULL)
 
virtual ~Class ()
 
virtual WaveAsWave ()
 
virtual const WaveAsWave () const
 
virtual WaveClone () const
 
Writer * Convert (Wave *wave)
 
virtual operator Wave * ()
 
virtual operator Writer * ()
 
- Public Member Functions inherited from bio::chemical::UnorderedMotif< Property >
 UnorderedMotif (const Contents *contents)
 
 UnorderedMotif (const UnorderedMotif< Property > *toCopy)
 
virtual ~UnorderedMotif ()
 
virtual Property AddImplementation (const Property content)
 
 BIO_DISAMBIGUATE_ALL_CLASS_METHODS (chemical, UnorderedMotif< Property >) UnorderedMotif()
 
virtual void ClearImplementation ()
 
virtual unsigned long GetCountImplementation () const
 
virtual unsigned int GetNumMatchingImplementation (const Container *other) const
 
virtual std::string GetStringFromImplementation (std::string separator=", ")
 
virtual bool HasAllImplementation (const Container *contents) const
 
virtual bool HasImplementation (const Property content) const
 
virtual void ImportImplementation (const UnorderedMotif< Property > *other)
 
virtual Property RemoveImplementation (const Property content)
 
- Public Member Functions inherited from bio::chemical::Class< UnorderedMotif< Property > >
 BIO_DISAMBIGUATE_ALL_CLASS_METHODS (physical, UnorderedMotif< Property >) Class(UnorderedMotif< Property > *object
 
- Public Member Functions inherited from bio::chemical::AbstractMotif
 AbstractMotif ()
 
virtual ~AbstractMotif ()
 
virtual void ClearImplementation ()
 
virtual ContainerGetAllImplementation ()
 
virtual const ContainerGetAllImplementation () const
 
virtual unsigned long GetCountImplementation () const
 
virtual std::string GetStringFromImplementation (std::string separator=", ")
 
virtual void ImportImplementation (const void *other)
 
- Public Member Functions inherited from bio::chemical::UnorderedMotif< State >
 UnorderedMotif (const Contents *contents)
 
 UnorderedMotif (const UnorderedMotif< State > *toCopy)
 
virtual ~UnorderedMotif ()
 
virtual State AddImplementation (const State content)
 
 BIO_DISAMBIGUATE_ALL_CLASS_METHODS (chemical, UnorderedMotif< State >) UnorderedMotif()
 
virtual void ClearImplementation ()
 
virtual unsigned long GetCountImplementation () const
 
virtual unsigned int GetNumMatchingImplementation (const Container *other) const
 
virtual std::string GetStringFromImplementation (std::string separator=", ")
 
virtual bool HasAllImplementation (const Container *contents) const
 
virtual bool HasImplementation (const State content) const
 
virtual void ImportImplementation (const UnorderedMotif< State > *other)
 
virtual State RemoveImplementation (const State content)
 
- Public Member Functions inherited from bio::chemical::Class< UnorderedMotif< State > >
 BIO_DISAMBIGUATE_ALL_CLASS_METHODS (physical, UnorderedMotif< State >) Class(UnorderedMotif< State > *object
 
- Public Member Functions inherited from bio::chemical::Class< Reactant >
 BIO_DISAMBIGUATE_ALL_CLASS_METHODS (physical, Reactant) Class(Reactant *object
 

Protected Attributes

Name m_typeName
 
- Protected Attributes inherited from bio::chemical::Atom
Bonds m_bonds
 
- Protected Attributes inherited from bio::physical::Class< Atom >
Atom * m_object
 
- Protected Attributes inherited from bio::physical::Wave
Wavem_signal
 
Symmetrym_symmetry
 
- Protected Attributes inherited from bio::physical::Class< T >
T * m_object
 
- Protected Attributes inherited from bio::VirtualBase
bool m_hasBeenInitialized
 
- Protected Attributes inherited from bio::physical::Class< Identifiable< StandardDimension > >
Identifiable< StandardDimension > * m_object
 
- Protected Attributes inherited from bio::physical::Filterable
Filter m_filter
 
- Protected Attributes inherited from bio::physical::Class< Filterable >
Filterablem_object
 
- Protected Attributes inherited from bio::physical::Class< Writer >
Writer * m_object
 
- Protected Attributes inherited from bio::chemical::AbstractMotif
Containerm_contents
 

Additional Inherited Members

- Public Types inherited from bio::physical::Identifiable< StandardDimension >
typedef StandardDimension Id
 
typedef std::vector< IdIds
 
- Public Types inherited from bio::physical::Observer< Perspective< StandardDimension > >
typedef Perspective< StandardDimension > Perspective
 
- Public Types inherited from bio::chemical::UnorderedMotif< Property >
typedef physical::Arrangement< Property > Contents
 
- Public Types inherited from bio::chemical::UnorderedMotif< State >
typedef physical::Arrangement< State > Contents
 
- Static Public Member Functions inherited from bio::physical::Wave
static Properties GetResonanceBetween (const Wave *wave, const Properties &properties)
 
static Properties GetResonanceBetween (const Wave *wave1, const Wave *wave2)
 
static Properties GetResonanceBetween (ConstWaves waves)
 
- Static Public Member Functions inherited from bio::chemical::AbstractMotif
static Properties GetClassProperties ()
 
- Public Attributes inherited from bio::chemical::Class< Substance >
physical::Perspective< StandardDimension > Filter filter
 
physical::Perspective< StandardDimension > * perspective
 
- Public Attributes inherited from bio::physical::Identifiable< StandardDimension >
Id m_id
 
- Public Attributes inherited from bio::chemical::Class< UnorderedMotif< Property > >
physical::Perspective< StandardDimension > Filter filter
 
physical::Perspective< StandardDimension > * perspective
 
- Public Attributes inherited from bio::chemical::Class< UnorderedMotif< State > >
physical::Perspective< StandardDimension > Filter filter
 
physical::Perspective< StandardDimension > * perspective
 
- Public Attributes inherited from bio::chemical::Class< Reactant >
physical::Perspective< StandardDimension > Filter filter
 
physical::Perspective< StandardDimension > * perspective
 
- Protected Member Functions inherited from bio::chemical::Atom
virtual bool BreakBondImplementation (Wave *toDisassociate, AtomicNumber id, BondType type)
 
virtual bool FormBondImplementation (Wave *toBond, AtomicNumber id, BondType type)
 
- Protected Member Functions inherited from bio::physical::Observer< Perspective< StandardDimension > >
virtual void InitializeImplementation (ByteStreams args)
 
- Protected Member Functions inherited from bio::VirtualBase
 VirtualBase ()
 
virtual ~VirtualBase ()
 
void Initialize (ByteStream arg1)
 
void Initialize (ByteStream arg1, ByteStream arg2)
 
void Initialize (ByteStream arg1, ByteStream arg2, ByteStream arg3)
 
void Initialize (ByteStreams args)
 
virtual void InitializeImplementation (ByteStreams args)=0
 
- Protected Member Functions inherited from bio::log::Writer
virtual void InitializeImplementation (ByteStreams args)
 
void Log (Level level, const char *format,...) const
 

Detailed Description

A Reactant is a Substance that has a type. Reactants are intended to be used in Reactions. In order to ensure the Substances provided to a Reaction are the proper types, we override the equality operator. This ensures that the compared value can be cast as the type recorded in *this.

Definition at line 34 of file Reactant.h.

Constructor & Destructor Documentation

◆ Reactant() [1/2]

bio::chemical::Reactant::Reactant ( Name  typeName,
const Substance substance 
)
Parameters
typeName
substance

Definition at line 59 of file Reactant.cpp.

63 :
65 Substance(*substance)
66{
67 CtorCommon(typeName);
68}
Substance Substance(const typename UnorderedMotif< Property >::Contents *properties, const typename UnorderedMotif< State >::Contents *states)
Definition: Substance.cpp:27

◆ Reactant() [2/2]

bio::chemical::Reactant::Reactant ( Name  typeName,
const typename UnorderedMotif< Property >::Contents properties,
const typename UnorderedMotif< State >::Contents states 
)
Parameters
typeName
properties
states

Definition at line 44 of file Reactant.cpp.

49 :
52 properties,
53 states
54 )
55{
56 CtorCommon(typeName);
57}

◆ ~Reactant()

bio::chemical::Reactant::~Reactant ( )
virtual

Definition at line 71 of file Reactant.cpp.

72{
73 delete[] m_typeName;
74}

References m_typeName.

Member Function Documentation

◆ BIO_DISAMBIGUATE_ALL_CLASS_METHODS()

bio::chemical::Reactant::BIO_DISAMBIGUATE_ALL_CLASS_METHODS ( chemical  ,
Reactant   
)

Ensure virtual methods point to Class implementations.

Parameters
typeName

◆ operator==()

bool bio::chemical::Reactant::operator== ( const Substance other) const
virtual
Parameters
other
Returns
whether *this is the same as other and other can be cast to the appropriate type.

Definition at line 76 of file Reactant.cpp.

77{
78 return Substance::operator==(other) && other.GetBondPosition(m_typeName) != 0;
79}

References bio::chemical::Atom::GetBondPosition(), and m_typeName.

Member Data Documentation

◆ m_typeName

Name bio::chemical::Reactant::m_typeName
protected

Definition at line 83 of file Reactant.h.

Referenced by ~Reactant(), and operator==().


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