Develop Biology
The language of life
|
#include <UnorderedStructureInterface.h>
Public Member Functions | |
UnorderedStructureInterface () | |
virtual | ~UnorderedStructureInterface () |
template<typename T > | |
T | Add (const T t) |
template<typename T > | |
void | Clear () |
template<typename T > | |
Container * | GetAll () |
template<typename T > | |
const Container * | GetAll () 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 > | |
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 > | |
T | As () |
template<typename T > | |
const T | As () const |
template<typename T > | |
T | AsBonded () |
template<typename T > | |
const T | AsBonded () const |
template<typename T > | |
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()) |
Bonds * | GetAllBonds () |
const Bonds * | GetAllBonds () const |
Wave * | GetBonded (Valence position) |
const Wave * | GetBonded (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::Symmetry * | Spin () const |
Public Member Functions inherited from bio::physical::Class< Atom > | |
Class (Atom *object, Symmetry *symmetry=NULL) | |
virtual | ~Class () |
virtual Wave * | AsWave () |
virtual const Wave * | AsWave () const |
virtual Wave * | Clone () 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::Atom * | AsAtom () |
virtual const chemical::Atom * | AsAtom () const |
virtual Wave * | AsWave () |
virtual const Wave * | AsWave () const |
virtual Code | Attenuate (const Wave *other) |
virtual Wave * | Clone () const |
virtual Wave * | Demodulate () |
virtual const Wave * | Demodulate () const |
virtual Code | Disattenuate (const Wave *other) |
virtual Properties | GetProperties () const |
virtual Wave * | Modulate (Wave *signal) |
virtual Wave * | operator* () |
virtual const Wave * | operator* () const |
virtual Wave * | operator* (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 Symmetry * | Spin () const |
Additional Inherited Members | |
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) |
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 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 | |
Wave * | m_signal |
Symmetry * | m_symmetry |
Interface methods for all UnorderedMotif classes.
Definition at line 34 of file UnorderedStructureInterface.h.
|
inline |
Definition at line 43 of file UnorderedStructureInterface.h.
|
inlinevirtual |
Definition at line 50 of file UnorderedStructureInterface.h.
|
inline |
Adds to *this using the appropriate interface for T. Does not allow duplicates.
T |
t |
Definition at line 63 of file UnorderedStructureInterface.h.
References bio::chemical::UnorderedMotif< CONTENT_TYPE >::AddImplementation(), bio::ThreadSafe::LockThread(), and bio::ThreadSafe::UnlockThread().
Referenced by bio::genetic::GenomeDefault::GenomeDefault(), bio::genetic::RNAPolymerase::Activate(), and bio::molecular::Molecule::operator>>().
|
inline |
Removes all T from *this. Does not delete the contents! Does nothing if T is invalid.
T |
Definition at line 302 of file UnorderedStructureInterface.h.
References bio::chemical::UnorderedMotif< CONTENT_TYPE >::ClearImplementation(), bio::ThreadSafe::LockThread(), and bio::ThreadSafe::UnlockThread().
|
inline |
USE WITH CAUTION!!!
T |
Definition at line 202 of file UnorderedStructureInterface.h.
References bio::chemical::AbstractMotif::GetAllImplementation(), bio::ThreadSafe::LockThread(), and bio::ThreadSafe::UnlockThread().
Referenced by bio::genetic::RNAPolymerase::Activate(), and bio::chemical::Axis::Rotate().
|
inline |
Safer, const version of above.
T |
Definition at line 222 of file UnorderedStructureInterface.h.
References bio::chemical::AbstractMotif::GetAllImplementation(), bio::ThreadSafe::LockThread(), and bio::ThreadSafe::UnlockThread().
|
inline |
Ease of use wrapper around casting the contents of *this as a std::vector.
T |
Definition at line 338 of file UnorderedStructureInterface.h.
Referenced by bio::chemical::PeriodicTableImplementation::GetPropertiesOf().
|
inline |
Ease of use wrapper around casting the contents of *this as a std::vector.
T |
Definition at line 350 of file UnorderedStructureInterface.h.
|
inline |
Gives the number of T in *this
T |
Definition at line 182 of file UnorderedStructureInterface.h.
References bio::chemical::UnorderedMotif< CONTENT_TYPE >::GetCountImplementation(), bio::ThreadSafe::LockThread(), and bio::ThreadSafe::UnlockThread().
|
inline |
Gives the number of matching contents between *this & other.
other |
Definition at line 262 of file UnorderedStructureInterface.h.
References bio::chemical::UnorderedMotif< CONTENT_TYPE >::GetNumMatchingImplementation(), bio::ThreadSafe::LockThread(), and bio::ThreadSafe::UnlockThread().
|
inline |
Get the Contents of *this as a string.
separator | e.g. ", ", the default, or just " ". |
Definition at line 319 of file UnorderedStructureInterface.h.
References bio::chemical::UnorderedMotif< CONTENT_TYPE >::GetStringFromImplementation(), bio::ThreadSafe::LockThread(), and bio::ThreadSafe::UnlockThread().
|
inline |
Check for content.
T |
content |
Definition at line 243 of file UnorderedStructureInterface.h.
References bio::chemical::UnorderedMotif< CONTENT_TYPE >::HasImplementation(), bio::ThreadSafe::LockThread(), and bio::ThreadSafe::UnlockThread().
|
inline |
Check if *this contains all of the given contents Should NOT check if the given contents contain all those of *this.
content |
Definition at line 282 of file UnorderedStructureInterface.h.
References bio::chemical::UnorderedMotif< CONTENT_TYPE >::HasAllImplementation(), bio::ThreadSafe::LockThread(), and bio::ThreadSafe::UnlockThread().
Referenced by bio::genetic::RNAPolymerase::Activate(), and bio::chemical::Reaction::ReactantsMeetRequirements().
|
inline |
Copy the contents of a vector into *this. Will only work if *this contains an UnorderedMotif of the given type. Does nothing if T is invalid.
T |
other |
Definition at line 124 of file UnorderedStructureInterface.h.
|
inline |
Copy the contents of another container into *this. Does nothing if T is invalid.
T |
other |
Definition at line 105 of file UnorderedStructureInterface.h.
References bio::chemical::UnorderedMotif< CONTENT_TYPE >::ImportImplementation(), bio::ThreadSafe::LockThread(), and bio::ThreadSafe::UnlockThread().
Referenced by bio::cellular::Tissue::DifferentiateCells(), bio::molecular::Molecule::operator>>(), bio::molecular::Vesicle::operator>>=(), and bio::chemical::PeriodicTableImplementation::RecordPropertiesOf().
|
inline |
This method does way more than it should reasonably be able to. Here, we take advantage of some of the Biology features that are starting to form. Primarily, we leverage physical::Properties and Bonds (per Atom) to search through the pseudo-vtable of Atom, find all StructuralComponents in *this and attempt to Import the corresponding StructuralComponents of other. This method side-steps the typical inheritance encapsulation in order to prevent child classes from having to override this method and account for each new UnorderedMotif they add. In other words, complexity here removes repeated code downstream.
other |
Definition at line 142 of file UnorderedStructureInterface.h.
References bio::physical::Wave::AsAtom(), bio::code::BadArgument1(), BIO_SANITIZE, bio::Container::End(), bio::chemical::Atom::GetAllBonds(), bio::chemical::Bond::GetBonded(), bio::chemical::Atom::GetBonded(), bio::chemical::Atom::GetBondPosition(), bio::chemical::AbstractMotif::GetClassProperties(), bio::chemical::Bond::GetId(), bio::physical::Wave::GetResonanceBetween(), bio::SmartIterator::IsAtBeginning(), bio::chemical::Bond::IsEmpty(), bio::ThreadSafe::LockThread(), bio::code::Success(), and bio::ThreadSafe::UnlockThread().
|
inline |
Removes t from *this using the appropriate handler for T.
T |
t |
Definition at line 84 of file UnorderedStructureInterface.h.
References bio::ThreadSafe::LockThread(), bio::chemical::UnorderedMotif< CONTENT_TYPE >::RemoveImplementation(), and bio::ThreadSafe::UnlockThread().
Referenced by bio::molecular::Molecule::TransferFrom().