Develop Biology
The language of life
|
#include <Molecule.h>
Public Member Functions | |
virtual | ~Molecule () |
BIO_DISAMBIGUATE_ALL_CLASS_METHODS (molecular, Molecule) BIO_DEFAULT_IDENTIFIABLE_CONSTRUCTORS(molecular | |
StandardDimension | Define (Name varName) |
template<typename T > | |
StandardDimension | Define (Name varName) |
template<typename T > | |
StandardDimension | Define (Name varName, const T &assignment) |
virtual bool | DuplicateFrom (Molecule *source, Name surface) |
filter::Molecular ()) Molecule(const Molecule &toCopy) | |
& | MoleculePerspective::Instance () |
virtual Molecule * | operator<< (Molecule *source) |
virtual Molecule * | operator<< (Surface *source) |
virtual Molecule * | operator>> (Molecule *target) |
virtual Surface * | operator>> (Surface *target) |
virtual Code | Reify (physical::Symmetry *symmetry) |
virtual Surface * | RotateTo (Name surfaceName) |
virtual const Surface * | RotateTo (Name surfaceName) const |
template<typename T > | |
T | RotateTo (Name surfaceName) const |
virtual Surface * | RotateTo (StandardDimension surfaceId) |
virtual const Surface * | RotateTo (StandardDimension surfaceId) const |
template<typename T > | |
T | RotateTo (StandardDimension surfaceId) const |
virtual physical::Symmetry * | Spin () const |
virtual bool | TransferFrom (Molecule *source, Name surface) |
template<typename T > | |
StandardDimension | Use (Name varName, T *varPtr) |
virtual Surface * | operator() (StandardDimension surfaceId) |
virtual const Surface * | operator() (StandardDimension surfaceId) const |
template<typename T > | |
Surface * | operator() (StandardDimension surfaceId) |
virtual Surface * | operator() (Name name) |
virtual const Surface * | operator() (Name name) const |
template<typename T > | |
Surface * | operator() (Name surfaceName) |
Public Member Functions inherited from bio::molecular::Class< Molecule > | |
BIO_DISAMBIGUATE_ALL_CLASS_METHODS (chemical, Molecule) Class(Molecule *object | |
Public Member Functions inherited from bio::chemical::Class< T > | |
BIO_DISAMBIGUATE_ALL_CLASS_METHODS (physical, T) Class(T *object | |
Public Member Functions inherited from bio::physical::Class< T > | |
Class (T *object, Symmetry *symmetry=NULL) | |
virtual | ~Class () |
virtual Wave * | AsWave () |
virtual const Wave * | AsWave () const |
virtual Wave * | Clone () const |
T * | Convert (Wave *wave) |
virtual | operator T* () |
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 |
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 Perspective * | GetPerspective () 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 Wave * | AsWave () |
virtual const Wave * | AsWave () const |
virtual Wave * | Clone () 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 |
Engine * | GetLogEngine () |
const Engine * | GetLogEngine () 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 Symmetry * | Spin () const |
Public Member Functions inherited from bio::physical::Class< Filterable > | |
Class (Filterable *object, Symmetry *symmetry=NULL) | |
virtual | ~Class () |
virtual Wave * | AsWave () |
virtual const Wave * | AsWave () const |
virtual Wave * | Clone () const |
Filterable * | Convert (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 Wave * | AsWave () |
virtual const Wave * | AsWave () const |
virtual Wave * | Clone () const |
Writer * | Convert (Wave *wave) |
virtual | operator Wave * () |
virtual | operator Writer * () |
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::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 > | |
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::LinearStructureInterface | |
LinearStructureInterface () | |
virtual | ~LinearStructureInterface () |
template<typename T > | |
Emission | ForEach (ExcitationBase *excitation) |
template<typename T > | |
T | GetById (StandardDimension id) |
template<typename T > | |
const T | GetById (StandardDimension id) const |
template<typename T > | |
T | GetByName (Name name) |
template<typename T > | |
const T | GetByName (Name name) const |
template<typename T > | |
T | GetOrCreateById (StandardDimension id) |
template<typename T > | |
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::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 Container * | GetAllImplementation () |
virtual const Container * | GetAllImplementation () 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::physical::Perspective< StandardDimension > | |
Perspective () | |
virtual | ~Perspective () |
virtual bool | AssociateType (Id id, Wave *type) |
virtual bool | DisassociateType (Id id) |
Hadits::iterator | Find (Id id) |
Hadits::const_iterator | Find (Id id) const |
virtual Id | GetIdFromName (Name name) |
virtual Id | GetIdWithoutCreation (Name name) const |
virtual Name | GetNameFromId (Id id) const |
virtual Wave * | GetNewObjectFromId (Id id) const |
T | GetNewObjectFromIdAs (Id id) |
virtual Wave * | GetNewObjectFromName (Name name) |
T | GetNewObjectFromNameAs (Name name) |
virtual Id | GetNumUsedIds () const |
virtual const Wave * | GetTypeFromId (Id id) const |
const T | GetTypeFromIdAs (Id id) const |
virtual const Wave * | GetTypeFromName (Name name) const |
const T | GetTypeFromNameAs (Name name) const |
virtual Id | GetUniqueIdFor (Name name) |
Public Member Functions inherited from bio::chemical::LinearMotif< Surface * > | |
LinearMotif (const Contents *contents, physical::Perspective< StandardDimension > *perspective=NULL) | |
LinearMotif (const LinearMotif< Surface * > &toCopy) | |
LinearMotif (physical::Perspective< StandardDimension > *perspective=NULL) | |
virtual | ~LinearMotif () |
virtual Surface * | AddImplementation (Surface * content) |
virtual Code | Attenuate (const physical::Wave *other) |
BIO_DISAMBIGUATE_REQUIRED_CLASS_METHODS (chemical, LinearMotif< Surface * >) BIO_DISAMBIGUATE_OPTIONAL_CLASS_METHODS(physical | |
virtual void | ClearImplementation () |
virtual Surface * | CreateImplementation (StandardDimension id) |
virtual Code | Disattenuate (const physical::Wave *other) |
virtual Emission | ForEachImplementation (ExcitationBase *excitation) |
virtual Surface * | GetByIdImplementation (StandardDimension id) |
virtual const Surface * | GetByIdImplementation (StandardDimension id) const |
virtual Surface * | GetByNameImplementation (Name name) |
virtual const Surface * | GetByNameImplementation (Name name) const |
virtual Surface * | GetOrCreateByIdImplementation (StandardDimension id) |
virtual Surface * | GetOrCreateByNameImplementation (Name name) |
virtual std::string | GetStringFromImplementation (std::string separator=", ") |
physical::Perspective< StandardDimension > * | GetStructuralPerspective () |
const physical::Perspective< StandardDimension > * | GetStructuralPerspective () const |
virtual bool | HasImplementation (const Surface * &content) const |
virtual void | ImportImplementation (const LinearMotif< Surface * > *other) |
virtual Code | InsertImplementation (Surface * toAdd, const Position position=BOTTOM, const StandardDimension optionalPositionArg=0, const bool transferSubContents=false) |
Public Member Functions inherited from bio::chemical::Elementary< LinearMotif< Surface * > > | |
Elementary () | |
Elementary (const Properties properties) | |
virtual | ~Elementary () |
void | RegisterProperties (const Properties properties) |
Public Member Functions inherited from bio::chemical::Class< LinearMotif< Surface * > > | |
BIO_DISAMBIGUATE_ALL_CLASS_METHODS (physical, LinearMotif< Surface * >) Class(LinearMotif< Surface * > *object | |
Public Member Functions inherited from bio::chemical::UnorderedMotif< Surface * > | |
UnorderedMotif (const Contents *contents) | |
UnorderedMotif (const UnorderedMotif< Surface * > *toCopy) | |
virtual | ~UnorderedMotif () |
virtual Surface * | AddImplementation (const Surface * content) |
BIO_DISAMBIGUATE_ALL_CLASS_METHODS (chemical, UnorderedMotif< Surface * >) 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 Surface * content) const |
virtual void | ImportImplementation (const UnorderedMotif< Surface * > *other) |
virtual Surface * | RemoveImplementation (const Surface * content) |
Public Member Functions inherited from bio::chemical::Class< UnorderedMotif< Surface * > > | |
BIO_DISAMBIGUATE_ALL_CLASS_METHODS (physical, UnorderedMotif< Surface * >) Class(UnorderedMotif< Surface * > *object | |
Additional Inherited Members | |
Public Types inherited from bio::physical::Identifiable< StandardDimension > | |
typedef StandardDimension | Id |
typedef std::vector< Id > | Ids |
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 |
Public Types inherited from bio::physical::Perspective< StandardDimension > | |
typedef std::vector< Hadit > | Hadits |
typedef StandardDimension | Id |
typedef std::vector< Id > | Ids |
Public Types inherited from bio::chemical::LinearMotif< Surface * > | |
typedef physical::Line | Contents |
Public Types inherited from bio::chemical::UnorderedMotif< Surface * > | |
typedef physical::Arrangement< Surface * > | 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 () |
Static Public Member Functions inherited from bio::physical::Perspective< StandardDimension > | |
static Id | InvalidId () |
static Name | InvalidName () |
Static Public Member Functions inherited from bio::chemical::LinearMotif< Surface * > | |
static LinearMotif< Surface * > Properties | GetClassProperties () |
Static Public Attributes inherited from bio::chemical::Elementary< LinearMotif< Surface * > > | |
static bool | hasRegistered |
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 |
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::physical::Class< T > | |
T * | m_object |
Protected Attributes inherited from bio::physical::Wave | |
Wave * | m_signal |
Symmetry * | m_symmetry |
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 > | |
Filterable * | m_object |
Protected Attributes inherited from bio::physical::Class< Writer > | |
Writer * | m_object |
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::chemical::AbstractMotif | |
Container * | m_contents |
Protected Attributes inherited from bio::physical::Perspective< StandardDimension > | |
Hadits | m_hadits |
Id | m_nextId |
As a combination of relativistic Waves and chemical Bonds, Molecules are rather complicated. They're kinda like viewing particle physics from mathematical topology. I'm not sure I have the english words to describe this view of the world adequately, so looking at the code might be better. Still, I'll try to describe the idea as an imagination exercise:
Imagine a Quantum Wave (aka a built-in type, like bool or int) as a sphere. These quantum balls are the maximum resolution we can see any Molecule through (it doesn't get any more basic than built-in types). Next, imagine a collection of these spheres as some kind of glob. This represents a collection of basic types and would be akin to a class or struct. However, these globs can take whatever form we want and do not have to map into any hard-coded structure. We call these globular constructs a Surface. Most of the time, Surfaces will be singular globs, with a 1 to 1 Surface to primitive type correspondence. However, they can be arbitrarily knobby. Now imagine 10 or so of these Surfaces all stuck together as a Molecule. So, a Molecule is just a big globby mass. Surfaces do not (usually) overlap. They are, instead, distinct, identifiable (Identifiable<StandardDimension>) regions on a Molecule. Imagine identical 2 Molecules that have 1 globby collection (Surface) that differs between them. That kind of comparative difference helps us Identify the Surfaces from the otherwise indistinguishable mass of globs. Next, imagine 2 Molecules bumping into each other so that 1 or more of their Surfaces touch. When Surfaces interact in this manner, they can change each other. In computer science, we can just conjure change whenever, however, and wherever we want. However, in the real world, the idea that matter / energy is conserved requires that matter / energy be moved between the interacting surfaces in order to effect change. This same concept has been modeled here (see Transfer..., etc., below); though we can still do whatever the **** we want cause computers.
You can create Surfaces in 1 Molecule and then Transfer them to another. However, doing so may change (or break) the Molecules' interactions with other Molecules and systems. This would be like transferring variables between objects at runtime. This Transfer system is why Molecules are Perspectives. The Id of Surfaces in 1 Molecule may not hold within another Molecule and we don't want to enforce a global Surface labeling at this time. You can think of Surface::Ids as numbered variables. When an class (Molecule) is instantiated, we go through and number its member variables. Members can then be added or removed throughout the life of the object and each one will have a number that is unique to that Molecule. In other words, there is no absolutely right number for "MyVar"; instead, "MyVar" can be an int in one Molecule and a bool in another.
The ability to Transfer Surfaces between Molecules is just one advantage that comes from this member abstraction. Another advantage is Symmetry (i.e. reflection into other languages, like json). Beyond this point, Spin() and Reify(), which are native to physical::Waves, should no longer require definition, as we will be able to use the Biology structures we've created to determine those implementations dynamically.
Lastly, Surfaces also give us the ability to store methods via Proteins. See Protein.h for more on that.
In order realize the behavior described above, we have to employ a non-native, Biology-specific syntax. In short, Define<>() creates a member and RotateTo gets a member. For example: MyType myVar = SomeFunction(); => Define<MyType>("myVar", SomeFunction()); MyType another = myVar; => Define<MyType>("another", RotateTo("myVar")); Of course, in order to avoid slower string lookups, you can cache the Id of "myVar" within a Molecule by calling GetIdFromName("myVar"), which can then be used with RotateTo(...).
You can think of members as globs on the surface of our Molecule and we rotate this globby mass until the side we want is facing us. This allows us to interact with our desired Surface. In order to set a member, you would do something like: RotateTo("myVar")->operator=(*RotateTo("another")); or, more simply, (*RotateTo("myVar")) = (*RotateTo("another")) NOTE: if "myVar" or "another" don't exist in the Molecule, this will segfault. To avoid crashing, you may want to use BIO_SANITIZE() (from bio/common/Macros.h) This can be done because Surfaces can be treated as the values they are Bonded to.
Lastly, if you want to create a Molecule from a hard-coded data structure, you can call Use() instead of Define<>(), which will create a Surface from a (member) pointer. Surfaces created with Use will not be Transferable.
Definition at line 72 of file Molecule.h.
|
virtual |
Definition at line 44 of file Molecule.cpp.
bio::molecular::Molecule::BIO_DISAMBIGUATE_ALL_CLASS_METHODS | ( | molecular | , |
Molecule | |||
) |
Ensure virtual methods point to Class implementations. Standard ctors.
|
inline |
Create a new variable within *this, the Biology way. The created variable will have no type set upon creation. Will fail if varName already exists within *this.
varName |
Definition at line 135 of file Molecule.h.
References BIO_SANITIZE, bio::physical::Perspective< StandardDimension >::InvalidId(), and RotateTo().
Referenced by bio::genetic::FetchPlasmid::FetchPlasmid(), bio::genetic::RegisterPlasmid::RegisterPlasmid(), and bio::genetic::RNAPolymerase::RNAPolymerase().
|
inline |
Create a new variable within *this, the Biology way. Will fail if varName already exists within *this.
T |
varName |
Definition at line 155 of file Molecule.h.
References BIO_SANITIZE, bio::physical::Perspective< StandardDimension >::InvalidId(), bio::molecular::Surface::Manage(), and RotateTo().
|
inline |
Create a new variable within *this, the Biology way. Assigns the new variable to the value provided. Will fail if varName already exists within *this.
T |
varName | |
assignment |
Definition at line 178 of file Molecule.h.
References BIO_SANITIZE, bio::physical::Perspective< StandardDimension >::InvalidId(), bio::molecular::Surface::Manage(), and RotateTo().
Copy a Surface from another Molecule into *this.
source | |
surface |
Definition at line 84 of file Molecule.cpp.
References BIO_SANITIZE, BIO_SANITIZE_WITH_CACHE, and RotateTo().
bio::molecular::Molecule::filter::Molecular | ( | ) | const & |
Copying a Molecule will duplicate all Surfaces of toCopy.
toCopy |
& bio::molecular::Molecule::MoleculePerspective::Instance | ( | ) |
Definition at line 137 of file Molecule.cpp.
Definition at line 142 of file Molecule.cpp.
Definition at line 303 of file Molecule.h.
References RotateTo().
|
virtual |
operator wrappers around RotateTo
surfaceId |
Definition at line 127 of file Molecule.cpp.
|
inline |
Definition at line 293 of file Molecule.h.
References RotateTo().
|
virtual |
Definition at line 132 of file Molecule.cpp.
Molecule copy operation. Copies all Surfaces on the source Molecule onto *this.
source |
Definition at line 163 of file Molecule.cpp.
References BIO_SANITIZE.
Surface move operation. Moves a Surface onto *this.
source |
Definition at line 147 of file Molecule.cpp.
References BIO_SANITIZE.
Molecule move operation. Moves all Surfaces on *this onto the target Molecule. This REMOVES all Surfaces from *this.
target |
Definition at line 171 of file Molecule.cpp.
References BIO_SANITIZE, and bio::chemical::UnorderedStructureInterface::Import().
Surface move operation. Places *this in a Surface. NOTE: There is no check that *this is not in multiple Surfaces.
target |
Definition at line 155 of file Molecule.cpp.
References bio::chemical::UnorderedStructureInterface::Add(), and BIO_SANITIZE.
|
virtual |
Required method from Wave. See that class for details. Reconstruct *this from the given Symmetry.
symmetry |
Reimplemented from bio::chemical::Atom.
Definition at line 186 of file Molecule.cpp.
References bio::code::NotImplemented().
Get a variable from within *this. Use for getting and/or setting.
surfaceName |
Definition at line 66 of file Molecule.cpp.
References BIO_SANITIZE_WITH_CACHE.
const version of RotateTo
surfaceName |
Definition at line 75 of file Molecule.cpp.
References BIO_SANITIZE_WITH_CACHE.
|
inline |
Ease of use methods for getting variables as the desired type.
T |
Definition at line 242 of file Molecule.h.
References RotateTo().
|
virtual |
Get a variable from within *this. Use for getting and/or setting. REMINDER: use this->GetIdFromName("someName") to get the Id of a Surface with the given Name.
surfaceId |
Definition at line 48 of file Molecule.cpp.
References BIO_SANITIZE_WITH_CACHE.
Referenced by bio::genetic::FetchPlasmid::Activate(), bio::genetic::RegisterPlasmid::Activate(), Define(), DuplicateFrom(), bio::genetic::GenomeImplementation::FetchPlasmid(), operator()(), RotateTo(), bio::genetic::Plasmid::TranscribeFor(), TransferFrom(), and Use().
|
virtual |
const version of RotateTo
surfaceId |
Definition at line 57 of file Molecule.cpp.
References BIO_SANITIZE_WITH_CACHE.
|
inline |
Ease of use methods for getting variables as the desired type.
T |
Definition at line 216 of file Molecule.h.
References RotateTo().
|
virtual |
Required method from Wave. See that class for details.
Reimplemented from bio::chemical::Atom.
Definition at line 180 of file Molecule.cpp.
Move a Surface from another Molecule into *this.
source | |
surface |
Definition at line 105 of file Molecule.cpp.
References BIO_SANITIZE, BIO_SANITIZE_WITH_CACHE, bio::chemical::UnorderedStructureInterface::Remove(), and RotateTo().
|
inline |
Create a Surface from an existing (member) variable. Will fail if varName already exists within *this.
T |
varName | |
varPtr |
Definition at line 112 of file Molecule.h.
References BIO_SANITIZE, bio::physical::Perspective< StandardDimension >::InvalidId(), RotateTo(), and bio::molecular::Surface::Use().
bio::molecular::Molecule::Molecule |
Definition at line 88 of file Molecule.h.