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

#include <Solute.h>

Inheritance diagram for bio::chemical::Solute:
Inheritance graph
[legend]
Collaboration diagram for bio::chemical::Solute:
Collaboration graph
[legend]

Public Member Functions

 BIO_DEFAULT_IDENTIFIABLE_CONSTRUCTORS_WITH_COMMON_CONSTRUCTOR (chemical, Solute, filter::Chemical()) Solute(const Solute &other)
 
 Solute (Pointer< Substance > dissolvedSubstance, const DiffusionTime &diffusionTime=diffusion::time::Destruction(), const DiffusionEffort &diffusionEffort=diffusion::effort::Active())
 
virtual ~Solute ()
 
Soluteoperator= (const Solute &other)
 
 operator Pointer< Substance > ()
 
 operator Pointer< const Substance > () const
 
Pointer< SubstanceGetDissolvedSubstance ()
 
Pointer< const SubstanceGetDissolvedSubstance () const
 
virtual Concentration GetConcentration () const
 
virtual void Diffuse () const
 
virtual Code Crest ()
 
virtual Code MixWith (const Solute &other)
 
virtual Code MixWith (Pointer< const Substance > other)
 
virtual void SetEnvironment (Pointer< Solution > environment)
 
virtual Index GetIndexInParentSolution () const
 
virtual void SetIndexInParentSolution (Index indexInParentSolution)
 
virtual void SetDiffusionTime (const DiffusionTime &diffusionTime)
 
virtual DiffusionTime GetDiffusionTime () const
 
virtual void SetDiffusionEffort (const DiffusionEffort &diffusionEffort)
 
virtual DiffusionEffort GetDiffusionEffort () const
 
- Public Member Functions inherited from bio::chemical::Class< Solute >
virtual Pointer< ::bio::physical::WaveClone () const
 
Pointer< ::bio::physical::WaveAsWave ()
 
Pointer< const ::bio::physical::WaveAsWave () const
 
 operator Pointer< ::bio::physical::Wave > ()
 
virtual Pointer< ::bio::physical::WaveModulate (Pointer< ::bio::physical::Wave > signal)
 
virtual Pointer< ::bio::physical::WaveDemodulate ()
 
virtual Pointer< const ::bio::physical::WaveDemodulate () const
 
virtual Pointer< ::bio::physical::WaveSuperpose (const ::bio::physical::ConstWaves &displacement, Pointer< ::bio::physical::Interference > pattern)
 
virtual bool Superpose (Pointer< const ::bio::physical::Wave > displacement, Pointer< ::bio::physical::Interference > pattern)
 
 Class (Pointer< Solute > object, Filter filter=filter::Default(), SymmetryType symmetryType=symmetry_type::Object())
 
 Class (Pointer< Solute > object, const Name &name, Filter filter=filter::Default(), SymmetryType symmetryType=symmetry_type::Object())
 
 Class (Pointer< Solute > object, const Id &id, Filter filter=filter::Default(), SymmetryType symmetryType=symmetry_type::Object())
 
 Class (const Class &other)
 
virtual ~Class ()
 
virtual bool RegisterProperties (const Properties &properties)
 
virtual Properties GetProperties () const
 
virtual Pointer< AtomAsAtom ()
 
virtual Pointer< const AtomAsAtom () const
 
virtual Code Attenuate (Pointer< const physical::Wave > other)
 
virtual Code Disattenuate (Pointer< const physical::Wave > other)
 
- Public Member Functions inherited from bio::physical::Class< T >
 Class (Pointer< T > object, Pointer< Symmetry > symmetry=NULL)
 
 Class (Pointer< T > object, SymmetryFactory symmetryFactory)
 
 Class (const Class &other)
 
virtual Pointer< TGetWaveObject ()
 
virtual Pointer< const TGetWaveObject () const
 
virtual operator T& ()
 
virtual operator const T & () const
 
Pointer< WaveAsWave ()
 
Pointer< const WaveAsWave () const
 
virtual operator Pointer< Wave > ()
 
- Public Member Functions inherited from bio::physical::Wave
 Wave (Pointer< Symmetry > symmetry=NULL)
 
 Wave (const Wave &other)
 
Waveoperator= (const Wave &other)
 
virtual ~Wave ()
 
Pointer< const SymmetryGetSymmetry () const
 
virtual bool Superpose (Pointer< const Wave > displacement, Pointer< Interference > pattern)
 
virtual Pointer< WaveSuperpose (const ConstWaves &displacement, Pointer< Interference > pattern)
 
virtual Pointer< WaveModulate (Pointer< Wave > signal)
 
Pointer< WaveAsWave ()
 
Pointer< const WaveAsWave () const
 
virtual void operator| (Pointer< Symmetry > symmetry)
 
virtual Pointer< Waveoperator* (Pointer< Wave > signal)
 
virtual Pointer< Waveoperator* ()
 
virtual Pointer< const Waveoperator* () const
 
virtual void operator+ (Pointer< const Wave > other)
 
virtual void operator- (Pointer< const Wave > other)
 
uint16_t GetTypeId () const
 
void SetTypeId (uint16_t typeId)
 
- Public Member Functions inherited from bio::physical::Identifiable< Id >
 Identifiable (Pointer< Perspective< Id > > perspective=NULL)
 
 Identifiable (const Name &name, Pointer< Perspective< Id > > perspective=NULL)
 
 Identifiable (Identifier id, Pointer< Perspective< Id > > perspective=NULL)
 
 Identifiable (const Identifiable &other)
 
virtual ~Identifiable ()
 
virtual operator Id () const
 
virtual bool operator== (const Identifier id) const
 
virtual bool operator== (const Name &name) const
 
virtual bool operator== (const Identifiable< Id > &other) const
 
virtual Name GetName () const
 
virtual Identifier GetId () const
 
virtual bool SetName (const Name &name)
 
virtual bool SetId (Identifier id)
 
virtual bool IsName (const Name &name) const
 
virtual bool IsNameInsensitive (const Name &name) const
 
virtual bool IsId (Identifier id) const
 
virtual void SetPerspective (Pointer< Perspective< Id > > perspective)
 
- Public Member Functions inherited from bio::physical::Observer< PERSPECTIVE >
 Observer (Pointer< Perspective > perspective=NULL)
 
 Observer (const Observer &other)
 
virtual ~Observer ()
 
virtual void SetPerspective (Pointer< Perspective > perspective)
 
virtual Pointer< PerspectiveGetPerspective () const
 
- Public Member Functions inherited from bio::log::Writer
 Writer ()
 
 Writer (Filter logFilter)
 
virtual ~Writer ()
 
virtual Pointer< const WriterAsLogWriter () const
 
bool IsEnabled (LogLevel level) const
 
virtual void Log (LogLevel level, const char *format, va_list args) const
 
- Public Member Functions inherited from bio::physical::Class< Writer >
 Class (Pointer< Writer > object, Pointer< Symmetry > symmetry=NULL)
 
 Class (Pointer< Writer > object, SymmetryFactory symmetryFactory)
 
 Class (const Class &other)
 
virtual Pointer< Writer > GetWaveObject ()
 
virtual Pointer< const Writer > GetWaveObject () const
 
virtual operator Writer & ()
 
virtual operator const Writer & () const
 
Pointer< WaveAsWave ()
 
Pointer< const WaveAsWave () const
 
virtual operator Pointer< Wave > ()
 
- Public Member Functions inherited from bio::physical::Filterable
 Filterable ()
 
 Filterable (Filter filter)
 
virtual ~Filterable ()
 
virtual void InitializeImplementation (ByteStreams &args)
 
virtual void SetFilter (Filter filter)
 
Filter GetFilter () const
 
virtual Pointer< const SymmetrySpin () const
 
virtual Code Reify (Pointer< const Symmetry > symmetry)
 
- Public Member Functions inherited from bio::physical::Class< Filterable >
 Class (Pointer< Filterable > object, Pointer< Symmetry > symmetry=NULL)
 
 Class (Pointer< Filterable > object, SymmetryFactory symmetryFactory)
 
 Class (const Class &other)
 
virtual Pointer< FilterableGetWaveObject ()
 
virtual Pointer< const FilterableGetWaveObject () const
 
virtual operator Filterable & ()
 
virtual operator const Filterable & () const
 
Pointer< WaveAsWave ()
 
Pointer< const WaveAsWave () const
 
virtual operator Pointer< Wave > ()
 
- Public Member Functions inherited from bio::chemical::Atom
 Atom ()
 
 Atom (const Atom &other)
 
virtual ~Atom ()
 
void CloneBondsFrom (const Atom &other, BondClonePolicy policy=&Atom::DefaultBondClonePolicy)
 
virtual Pointer< const physical::SymmetrySpin () const
 
virtual Code Reify (Pointer< const physical::Symmetry > symmetry)
 
Pointer< physical::WaveGetBonded (Valence position)
 
Pointer< const physical::WaveGetBonded (Valence position) const
 
Pointer< const physical::WaveResolveBondedForReadById (AtomicNumber bondId) const
 
Pointer< physical::WaveResolveBondedForWriteById (AtomicNumber bondId)
 
template<typename T >
Cow< TAsBonded () const
 
template<typename T >
Pointer< TAsBondedQuantum () const
 
template<typename T >
atom_detail::AsResultType< T, type::IsWaveImplementation< typenametype::RemovePointer< T >::Type >::sValue >::Type As () const
 
template<typename T >
 operator T () const
 
template<typename T >
Valence FormBond (T toBond, BondType type=bond_type::Unknown())
 
template<typename T >
bool BreakBond (T toDisassociate, BondType type=bond_type::Unknown())
 
Valence GetBondPosition (AtomicNumber bondedId) const
 
Valence GetBondPosition (const Name &typeName) const
 
Valence GetBondPositionLocked (AtomicNumber bondedId) const
 
template<typename T >
Valence GetBondPosition () const
 
BondType GetBondType (Valence position) const
 
template<typename T >
BondType GetBondType () const
 
Pointer< BondsGetAllBonds ()
 
Pointer< const BondsGetAllBonds () const
 
void ForEachBond (BondVisitor visitor, void *context=NULL) const
 
void ForEachBondMutable (BondMutator mutator, void *context=NULL)
 
virtual Valence FormBondImplementation (Pointer< physical::Wave > toBond, AtomicNumber id, BondType type)
 
Valence FormBondImplementation (Pointer< physical::Wave > toBond, AtomicNumber id, BondType type, bool ownsBonded)
 
Valence FormBondImplementationLocked (Pointer< physical::Wave > toBond, AtomicNumber id, BondType type, bool ownsBonded)
 
virtual bool BreakBondImplementation (AtomicNumber id, BondType type)
 
bool BreakBondImplementationLocked (AtomicNumber id, BondType type)
 
- Public Member Functions inherited from bio::physical::Class< Atom >
 Class (Pointer< Atom > object, Pointer< Symmetry > symmetry=NULL)
 
 Class (Pointer< Atom > object, SymmetryFactory symmetryFactory)
 
 Class (const Class &other)
 
virtual Pointer< Atom > GetWaveObject ()
 
virtual Pointer< const Atom > GetWaveObject () const
 
virtual operator Atom & ()
 
virtual operator const Atom & () const
 
Pointer< WaveAsWave ()
 
Pointer< const WaveAsWave () const
 
virtual operator Pointer< Wave > ()
 
- Public Member Functions inherited from bio::ThreadSafe
 ThreadSafe ()
 
 ThreadSafe (const ThreadSafe &toCopy)
 
ThreadSafeoperator= (const ThreadSafe &toCopy)
 
 ~ThreadSafe ()
 
void LockThread () const
 
void UnlockThread () const
 
void LockMutexShared () const
 
void UnlockMutexShared () const
 
- Public Member Functions inherited from bio::chemical::EnvironmentDependent< Solution >
 EnvironmentDependent (EnvironmentPointer environment=NULL)
 
virtual ~EnvironmentDependent ()
 
virtual EnvironmentPointer GetEnvironment ()
 
virtual const EnvironmentPointer GetEnvironment () const
 
virtual void SetEnvironment (EnvironmentPointer environment)
 
- Public Member Functions inherited from bio::physical::Periodic
 Periodic (Milliseconds interval=GetDefaultInterval())
 
virtual ~Periodic ()
 
virtual void InitializeImplementation (ByteStreams &args)
 
virtual bool CheckIn ()
 
virtual Code SetInterval (Milliseconds interval)
 
Milliseconds GetInterval () const
 
Timestamp GetTimeLastCrested () const
 
float GetIntervalInSeconds () const
 
virtual void SetLastCrestTimestamp (Timestamp lastCrest)
 
virtual Pointer< const SymmetrySpin () const
 
virtual Code Reify (Pointer< const Symmetry > symmetry)
 
virtual Properties GetProperties () const
 
- Public Member Functions inherited from bio::physical::Class< Periodic >
 Class (Pointer< Periodic > object, Pointer< Symmetry > symmetry=NULL)
 
 Class (Pointer< Periodic > object, SymmetryFactory symmetryFactory)
 
 Class (const Class &other)
 
virtual ~Class ()
 
virtual Pointer< PeriodicGetWaveObject ()
 
virtual Pointer< const PeriodicGetWaveObject () const
 
virtual operator Periodic & ()
 
virtual operator const Periodic & () const
 
virtual Pointer< WaveClone () const
 
Pointer< WaveAsWave ()
 
Pointer< const WaveAsWave () const
 
virtual operator Pointer< Wave > ()
 

Protected Member Functions

virtual void Destructor ()
 
- Protected Member Functions inherited from bio::chemical::Elementary< T >
void RegisterType ()
 
 Elementary (const Properties properties)
 
 Elementary ()
 
virtual ~Elementary ()
 
- Protected Member Functions inherited from bio::physical::Identifiable< Id >
virtual void InitializeImplementation (ByteStreams &args)
 
friend::std::ostream & operator<< (std::ostream &out, const Identifiable< Id > &t)
 
 Identifiable (Pointer< Perspective< Id > > perspective=NULL)
 
 Identifiable (const Name &name, Pointer< Perspective< Id > > perspective=NULL)
 
 Identifiable (Identifier id, Pointer< Perspective< Id > > perspective=NULL)
 
 Identifiable (const Identifiable &other)
 
virtual ~Identifiable ()
 
virtual operator Id () const
 
virtual bool operator== (const Identifier id) const
 
virtual bool operator== (const Name &name) const
 
virtual bool operator== (const Identifiable< Id > &other) const
 
virtual Name GetName () const
 
virtual Identifier GetId () const
 
virtual bool SetName (const Name &name)
 
virtual bool SetId (Identifier id)
 
virtual bool IsName (const Name &name) const
 
virtual bool IsNameInsensitive (const Name &name) const
 
virtual bool IsId (Identifier id) const
 
virtual void SetPerspective (Pointer< Perspective< Id > > perspective)
 
- Protected Member Functions inherited from bio::physical::Observer< PERSPECTIVE >
 Observer (Pointer< Perspective > perspective=NULL)
 
 Observer (const Observer &other)
 
virtual ~Observer ()
 
virtual void SetPerspective (Pointer< Perspective > perspective)
 
virtual Pointer< PerspectiveGetPerspective () const
 
- Protected Member Functions inherited from bio::VirtualBase
 VirtualBase ()
 
virtual ~VirtualBase ()
 
void Initialize (ByteStreams &args)
 
void Initialize (ByteStream arg1)
 
void Initialize (ByteStream arg1, ByteStream arg2)
 
void Initialize (ByteStream arg1, ByteStream arg2, ByteStream arg3)
 
- Protected Member Functions inherited from bio::log::Writer
 Writer ()
 
 Writer (Filter logFilter)
 
virtual ~Writer ()
 
virtual Pointer< const WriterAsLogWriter () const
 
bool IsEnabled (LogLevel level) const
 
virtual void Log (LogLevel level, const char *format, va_list args) const
 
- Protected Member Functions inherited from bio::physical::Class< Writer >
 Class (Pointer< Writer > object, Pointer< Symmetry > symmetry=NULL)
 
 Class (Pointer< Writer > object, SymmetryFactory symmetryFactory)
 
 Class (const Class &other)
 
virtual Pointer< Writer > GetWaveObject ()
 
virtual Pointer< const Writer > GetWaveObject () const
 
virtual operator Writer & ()
 
virtual operator const Writer & () const
 
Pointer< WaveAsWave ()
 
Pointer< const WaveAsWave () const
 
virtual operator Pointer< Wave > ()
 
- Protected Member Functions inherited from bio::physical::Filterable
 Filterable ()
 
 Filterable (Filter filter)
 
virtual ~Filterable ()
 
virtual void InitializeImplementation (ByteStreams &args)
 
virtual void SetFilter (Filter filter)
 
Filter GetFilter () const
 
virtual Pointer< const SymmetrySpin () const
 
virtual Code Reify (Pointer< const Symmetry > symmetry)
 
- Protected Member Functions inherited from bio::physical::Class< Filterable >
 Class (Pointer< Filterable > object, Pointer< Symmetry > symmetry=NULL)
 
 Class (Pointer< Filterable > object, SymmetryFactory symmetryFactory)
 
 Class (const Class &other)
 
virtual Pointer< FilterableGetWaveObject ()
 
virtual Pointer< const FilterableGetWaveObject () const
 
virtual operator Filterable & ()
 
virtual operator const Filterable & () const
 
Pointer< WaveAsWave ()
 
Pointer< const WaveAsWave () const
 
virtual operator Pointer< Wave > ()
 
- Protected Member Functions inherited from bio::chemical::Atom
void IndexBond (AtomicNumber bondedId, Valence position)
 
void UnindexBond (AtomicNumber bondedId)
 
 Atom ()
 
 Atom (const Atom &other)
 
virtual ~Atom ()
 
void CloneBondsFrom (const Atom &other, BondClonePolicy policy=&Atom::DefaultBondClonePolicy)
 
virtual Pointer< const physical::SymmetrySpin () const
 
virtual Code Reify (Pointer< const physical::Symmetry > symmetry)
 
Pointer< physical::WaveGetBonded (Valence position)
 
Pointer< const physical::WaveGetBonded (Valence position) const
 
Pointer< const physical::WaveResolveBondedForReadById (AtomicNumber bondId) const
 
Pointer< physical::WaveResolveBondedForWriteById (AtomicNumber bondId)
 
template<typename T >
Cow< TAsBonded () const
 
template<typename T >
Pointer< TAsBondedQuantum () const
 
template<typename T >
atom_detail::AsResultType< T, type::IsWaveImplementation< typenametype::RemovePointer< T >::Type >::sValue >::Type As () const
 
template<typename T >
 operator T () const
 
template<typename T >
Valence FormBond (T toBond, BondType type=bond_type::Unknown())
 
template<typename T >
bool BreakBond (T toDisassociate, BondType type=bond_type::Unknown())
 
Valence GetBondPosition (AtomicNumber bondedId) const
 
Valence GetBondPosition (const Name &typeName) const
 
Valence GetBondPositionLocked (AtomicNumber bondedId) const
 
template<typename T >
Valence GetBondPosition () const
 
BondType GetBondType (Valence position) const
 
template<typename T >
BondType GetBondType () const
 
Pointer< BondsGetAllBonds ()
 
Pointer< const BondsGetAllBonds () const
 
void ForEachBond (BondVisitor visitor, void *context=NULL) const
 
void ForEachBondMutable (BondMutator mutator, void *context=NULL)
 
virtual Valence FormBondImplementation (Pointer< physical::Wave > toBond, AtomicNumber id, BondType type)
 
Valence FormBondImplementation (Pointer< physical::Wave > toBond, AtomicNumber id, BondType type, bool ownsBonded)
 
Valence FormBondImplementationLocked (Pointer< physical::Wave > toBond, AtomicNumber id, BondType type, bool ownsBonded)
 
virtual bool BreakBondImplementation (AtomicNumber id, BondType type)
 
bool BreakBondImplementationLocked (AtomicNumber id, BondType type)
 
- Protected Member Functions inherited from bio::physical::Class< Atom >
 Class (Pointer< Atom > object, Pointer< Symmetry > symmetry=NULL)
 
 Class (Pointer< Atom > object, SymmetryFactory symmetryFactory)
 
 Class (const Class &other)
 
virtual Pointer< Atom > GetWaveObject ()
 
virtual Pointer< const Atom > GetWaveObject () const
 
virtual operator Atom & ()
 
virtual operator const Atom & () const
 
Pointer< WaveAsWave ()
 
Pointer< const WaveAsWave () const
 
virtual operator Pointer< Wave > ()
 
- Protected Member Functions inherited from bio::ThreadSafe
 ThreadSafe ()
 
 ThreadSafe (const ThreadSafe &toCopy)
 
ThreadSafeoperator= (const ThreadSafe &toCopy)
 
 ~ThreadSafe ()
 
void LockThread () const
 
void UnlockThread () const
 
void LockMutexShared () const
 
void UnlockMutexShared () const
 

Protected Attributes

Pointer< SubstancemDissolvedSubstance
 
Pointer< SolutemParentSolute
 
Index mIndexInParent
 
DiffusionTime mDiffusionTime
 
DiffusionEffort mDiffusionEffort
 
- Protected Attributes inherited from bio::physical::Class< T >
Pointer< TmObject
 
- Protected Attributes inherited from bio::physical::Wave
LazyPointer< SymmetrymSymmetry
 
bool mHasSignal
 
uint16_t mTypeId
 
- Protected Attributes inherited from bio::VirtualBase
bool mHasBeenInitialized
 
- Protected Attributes inherited from bio::physical::Class< Writer >
Pointer< Writer > mObject
 
- Protected Attributes inherited from bio::physical::Filterable
Filter mFilter
 
- Protected Attributes inherited from bio::physical::Class< Filterable >
Pointer< FilterablemObject
 
- Protected Attributes inherited from bio::chemical::Atom
Bonds mBonds
 
::std::map< AtomicNumber, ValencemBondIndex
 
Arrangement< Pointer< const physical::Wave > > mBackflowPreventer
 
- Protected Attributes inherited from bio::physical::Class< Atom >
Pointer< Atom > mObject
 
- Protected Attributes inherited from bio::chemical::EnvironmentDependent< Solution >
EnvironmentPointer mEnvironment
 
- Protected Attributes inherited from bio::physical::Periodic
Milliseconds mInterval
 
Timestamp mLastCrestTimestamp
 
- Protected Attributes inherited from bio::physical::Class< Periodic >
Pointer< PeriodicmObject
 

Friends

class Solution
 

Additional Inherited Members

- Public Types inherited from bio::physical::Identifiable< Id >
typedef Id Identifier
 
typedef Arrangement< IdentifierIds
 
- Public Types inherited from bio::physical::Observer< PERSPECTIVE >
typedef PERSPECTIVE Perspective
 
- Public Types inherited from bio::chemical::Atom
typedef BondCloneAction(* BondClonePolicy) (const Bond &bond)
 
typedef void(* BondVisitor) (const Bond &bond, void *context)
 
typedef BondCloneAction(* BondMutator) (Bond &bond, void *context)
 
- Public Types inherited from bio::chemical::EnvironmentDependent< Solution >
typedef type::RemovePointer< Solution >::Type EnvironmentType
 
typedef Pointer< EnvironmentTypeEnvironmentPointer
 
- Static Public Member Functions inherited from bio::physical::Class< T >
static Pointer< TConvert (Pointer< Wave > wave)
 
- Static Public Member Functions inherited from bio::physical::Wave
static Properties GetResonanceBetween (ConstWaves waves)
 
static Properties GetResonanceBetween (Pointer< const Wave > wave1, Pointer< const Wave > wave2)
 
static Properties GetResonanceBetween (Pointer< const Wave > wave, const Properties &properties)
 
- Static Public Member Functions inherited from bio::log::Writer
static void Log (Pointer< const Writer > writer, LogLevel level, const char *format,...)
 
static bool ShouldLog (Pointer< const Writer > writer, LogLevel level)
 
- Static Public Member Functions inherited from bio::physical::Class< Writer >
static Pointer< Writer > Convert (Pointer< Wave > wave)
 
- Static Public Member Functions inherited from bio::physical::Class< Filterable >
static Pointer< FilterableConvert (Pointer< Wave > wave)
 
- Static Public Member Functions inherited from bio::chemical::Atom
static BondCloneAction DefaultBondClonePolicy (const Bond &bond)
 
template<typename T >
static AtomicNumber GetBondId ()
 
- Static Public Member Functions inherited from bio::physical::Class< Atom >
static Pointer< Atom > Convert (Pointer< Wave > wave)
 
- Static Public Member Functions inherited from bio::physical::Periodic
static Milliseconds GetDefaultInterval ()
 
static Properties GetClassProperties ()
 
static SymmetryMakePeriodicSymmetry ()
 
- Static Public Member Functions inherited from bio::physical::Class< Periodic >
static Pointer< PeriodicConvert (Pointer< Wave > wave)
 
- Protected Types inherited from bio::physical::Identifiable< Id >
typedef Id Identifier
 
typedef Arrangement< IdentifierIds
 
- Protected Types inherited from bio::physical::Observer< PERSPECTIVE >
typedef PERSPECTIVE Perspective
 
- Protected Types inherited from bio::chemical::Atom
typedef BondCloneAction(* BondClonePolicy) (const Bond &bond)
 
typedef void(* BondVisitor) (const Bond &bond, void *context)
 
typedef BondCloneAction(* BondMutator) (Bond &bond, void *context)
 
- Static Protected Member Functions inherited from bio::log::Writer
static void Log (Pointer< const Writer > writer, LogLevel level, const char *format,...)
 
static bool ShouldLog (Pointer< const Writer > writer, LogLevel level)
 
- Static Protected Member Functions inherited from bio::physical::Class< Writer >
static Pointer< Writer > Convert (Pointer< Wave > wave)
 
- Static Protected Member Functions inherited from bio::physical::Class< Filterable >
static Pointer< FilterableConvert (Pointer< Wave > wave)
 
- Static Protected Member Functions inherited from bio::chemical::Atom
static BondCloneAction DefaultBondClonePolicy (const Bond &bond)
 
template<typename T >
static AtomicNumber GetBondId ()
 
- Static Protected Member Functions inherited from bio::physical::Class< Atom >
static Pointer< Atom > Convert (Pointer< Wave > wave)
 

Detailed Description

Solutes are used to implement shared-pointer style garbage collection.
The idea is that Solutes have a "Concentration" representing their overall abundance. Once the Concentration of a Solute drops to 0, it is destroyed.
The Concentration of a Solute is increased when it becomes available to a novel context (i.e. Solution) through Solution::Efflux (e.g. passed to a function).

Solute is very similar to physical::Linear. However, it is intended to be more user-facing and feature-rich. Where Linear is used to implement shared pointers for Structures, Solute implements shared pointer logic for Solutions. See Solution.h for more info, including the definition of Efflux and Influx.

Solutes can be accessed (Effluxed) in 2 distinct manners. Both manners of Effluxing increase the Concentration of the desired Solute.

  1. When const (read-only) Effluxing, Solutes use a parent-child relationship: only the parent will contain a valid pointer to the Dissolved Substance, each child then points to the parent. This is slower across threads, as each read operation requires a lock, but is faster overall, since the Dissolved Substance doesn't need to be duplicated.
  2. When non-const (read-write & mutable) Effluxing, the Dissolved Substance pointer is SHARED (not cloned) and a parent-child relationship is used to indicate the source Substance. Note: the original design intended for the mutable path to Clone the Dissolved Substance so that it could be modified without mutex locks, but the lock-free clone path is not yet implemented — the shipped code shares mDissolvedSubstance directly via the Solute copy constructor. As a result, concurrent mutable access across threads still requires external synchronisation. When you would like to merge the Solute back into the original Solution, you can Diffuse it, which will call Influx on the parent's Solution, Mixing the Solute with its parent.

    DEFERRED (lock-free clone-on-mutable-Efflux): the implementation vehicle now exists — bio::CowPtr< Substance > (inc/bio/chemical/wrapper/CowPtr.h, RFC_COW_WRAPPER). The plan: hold mDissolvedSubstance behind a CowPtr< Substance >; const-Efflux Read()s (shares, as today), mutable-Efflux Write(SubstanceCloner)s (detaches a private clone so it is modified lock-free), and the existing Diffuse -> Influx -> Mix machinery merges the detached clone back into the parent. This is INTENTIONALLY NOT landed in the v7 batch: it CHANGES the mutable-Efflux contract (from "shared, externally synchronised" to "isolated until Diffuse"), which is downstream-visible concurrency semantics and warrants its own RFC + consumer coordination rather than riding the COW/arena ABI cascade. Until then, treat mutable Solutes as shared-pointer access, not copy-on-write.

    For mutable Solutes, Diffusion happens automatically when the Solute is destroyed, unless you set SetDiffusionTime(diffusion::time::Never()). You may also set SetDiffusionTime(diffusion::time::Interval()) and SetInterval(...) to regularly Diffuse (this implies diffusion::time::Destruction() too).
    The default diffusion::effort is Active(), whereby changes are pushed up the Concentration gradient, toward the source of the Dissolved Substance. However, parents of mutable Solutes can push changes to children using SetDiffusionEffort(diffusion::effort::Passive()) (or ActiveAndPassive()). Passive() Diffusion is only applicable to Solutes which have a diffusion::time::Interval().
    You should prefer Active() Diffusion for Solutes with short lifetimes, as it is more efficient and requires less work. Inversely, you should prefer Passive() Diffusion for Solutes that you intend to keep around; this will help keep the system in sync.

    When Solutes are Mixed, either through Diffusion or Solution::Influx, they are combined according to their Miscibilities.
    See Types.h & Miscibility.h for more info on Mixing strategies.

    To illustrate why parent Concentrations are increased when mutable Solutes are Effluxed, if function A uses Solute U1 from Solution V1 and function B also uses U1, even if each function exists in an isolated sub-Solution of V1, both functions will start with the same value. Furthermore, if B depends on modifications to U1 made by A, then having U1 be removed from V1 after A completes would break B.
    Thus, by keeping Solutes around when they are not needed by the immediate context allows sub-contexts to depend on the assumption that other, isolated sub-contexts can reach the same values.

Constructor & Destructor Documentation

◆ Solute()

bio::chemical::Solute::Solute ( Pointer< Substance dissolvedSubstance,
const DiffusionTime diffusionTime = diffusion::time::Destruction(),
const DiffusionEffort diffusionEffort = diffusion::effort::Active() 
)

Constructor for creating a Solute from a Substance.
This is used to create Solutes that are not yet in a Solution.
This is nearly identical to Solution::Dissolve(), except that it does not add the Solute to a Solution.

Parameters
dissolvedSubstancethe Substance to Dissolve.
diffusionTimethe time it takes for this Solute to diffuse.
diffusionEffortthe effort with which this Solute diffuses.

◆ ~Solute()

bio::chemical::Solute::~Solute ( )
virtual

Member Function Documentation

◆ BIO_DEFAULT_IDENTIFIABLE_CONSTRUCTORS_WITH_COMMON_CONSTRUCTOR()

bio::chemical::Solute::BIO_DEFAULT_IDENTIFIABLE_CONSTRUCTORS_WITH_COMMON_CONSTRUCTOR ( chemical  ,
Solute  ,
filter::Chemical()   
) const &

Ensure virtual methods point to Class implementations.
Copy constructor.
Adds the newly created Solute to the parent's Solution.
NOTE: const is a lie!

Parameters
other

◆ Crest()

Code bio::chemical::Solute::Crest ( )
virtual

physical::Periodic method.
Only does work if the DiffusionTime is Interval().

Returns
the result of diffusion

Reimplemented from bio::physical::Periodic.

◆ Destructor()

void bio::chemical::Solute::Destructor ( )
protectedvirtual

This is what happens when mConcentration = 0.
We use this instead of the proper destructor method to allow resolution of virtual methods.

◆ Diffuse()

void bio::chemical::Solute::Diffuse ( ) const
virtual

Influx() *this back into the parent Solution, if it exists.

◆ GetConcentration()

Concentration bio::chemical::Solute::GetConcentration ( ) const
virtual

Get the Concentration of *this (i.e. its reference count).

Returns
the mConcentration of *this.

◆ GetDiffusionEffort()

DiffusionEffort bio::chemical::Solute::GetDiffusionEffort ( ) const
virtual
Returns
the diffusion effort of *this.

◆ GetDiffusionTime()

DiffusionTime bio::chemical::Solute::GetDiffusionTime ( ) const
virtual
Returns
the diffusion time of *this.

◆ GetDissolvedSubstance() [1/2]

Pointer< Substance > bio::chemical::Solute::GetDissolvedSubstance ( )

Only applicable if *this is mutable.

Returns
the Substance that was Dissolved to form *this.

◆ GetDissolvedSubstance() [2/2]

Pointer< const Substance > bio::chemical::Solute::GetDissolvedSubstance ( ) const
Returns
the Substance that was Dissolved to form *this.

◆ GetIndexInParentSolution()

Index bio::chemical::Solute::GetIndexInParentSolution ( ) const
virtual
Returns
the Index of *this in its parent Solution.

◆ MixWith() [1/2]

Code bio::chemical::Solute::MixWith ( const Solute other)
virtual

Combine *this with another Solute.
Uses the Mix Reaction to implement; see Mix.h for more info.
Only *this will be modified.

Parameters
other
Returns
the result of Mixing *this with other.

◆ MixWith() [2/2]

Code bio::chemical::Solute::MixWith ( Pointer< const Substance other)
virtual

Combine *this with another Substance.
Uses the Mix Reaction to implement; see Mix.h for more info.
Only *this will be modified.

Parameters
other
Returns
the result of Mixing *this with other.

◆ operator Pointer< const Substance >()

bio::chemical::Solute::operator Pointer< const Substance > ( ) const
inline
Returns
the Dissolved Substance of *this.

◆ operator Pointer< Substance >()

bio::chemical::Solute::operator Pointer< Substance > ( )
inline

Only applicable if *this is mutable.

Returns
the Dissolved Substance of *this.

◆ operator=()

Solute & bio::chemical::Solute::operator= ( const Solute other)

Same as copy ctor.
const is a lie!

Parameters
other
Returns
*this.

◆ SetDiffusionEffort()

void bio::chemical::Solute::SetDiffusionEffort ( const DiffusionEffort diffusionEffort)
virtual

Set the diffusion effort of *this.
Setting the DiffusionEffort will control how *this is Diffused.
See Diffusion.h for some example values.

Parameters
diffusionEffort

◆ SetDiffusionTime()

void bio::chemical::Solute::SetDiffusionTime ( const DiffusionTime diffusionTime)
virtual

Set the diffusion time of *this.
Setting the DiffusionTime will control when *this is Diffused.
See Diffusion.h for some example values.

Parameters
diffusionTime

◆ SetEnvironment()

void bio::chemical::Solute::SetEnvironment ( Pointer< Solution environment)
virtual

Sets the Environment and the Perspective of *this.
Don't let the environment go out of scope or be deleted before *this!

Parameters
environment

◆ SetIndexInParentSolution()

void bio::chemical::Solute::SetIndexInParentSolution ( Index  indexInParentSolution)
virtual

Set the Index of *this in its parent Solution.

Parameters
indexInParentSolution

Friends And Related Symbol Documentation

◆ Solution

Member Data Documentation

◆ mDiffusionEffort

DiffusionEffort bio::chemical::Solute::mDiffusionEffort
protected

◆ mDiffusionTime

DiffusionTime bio::chemical::Solute::mDiffusionTime
protected

◆ mDissolvedSubstance

Pointer< Substance > bio::chemical::Solute::mDissolvedSubstance
protected

The actual pointer to be shared.

◆ mIndexInParent

Index bio::chemical::Solute::mIndexInParent
mutableprotected

◆ mParentSolute

Pointer< Solute > bio::chemical::Solute::mParentSolute
mutableprotected

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