|
| | BIO_DEFAULT_IDENTIFIABLE_CONSTRUCTORS (chemical, Reaction, filter::Chemical(), symmetry_type::Operation()) explicit Reaction(const Name &name |
| |
| virtual void | Require (Pointer< Reactant > reactant) |
| |
| void | Require (const Name &typeName, Pointer< const Substance > substance) |
| |
| void | Require (const Name &typeName, const UnorderedMotif< Property > &properties, const UnorderedMotif< State > &states) |
| |
| template<typename T > |
| void | Require () |
| |
| template<typename T > |
| void | Require (Pointer< const T > substance) |
| |
| template<typename T > |
| void | Require (Pointer< const typename UnorderedMotif< Property >::Contents > properties, Pointer< const typename UnorderedMotif< State >::Contents > states) |
| |
| virtual Products | Process (Pointer< Reactants > reactants) const |
| |
| virtual bool | ReactantsMeetRequirements (Pointer< const Reactants > toCheck) const |
| |
| virtual Products | operator() (Pointer< Reactants > reactants) const |
| |
| virtual Pointer< ::bio::physical::Wave > | Clone () const |
| |
| Pointer< ::bio::physical::Wave > | AsWave () |
| |
| Pointer< const ::bio::physical::Wave > | AsWave () const |
| |
| | operator Pointer< ::bio::physical::Wave > () |
| |
| virtual Pointer< ::bio::physical::Wave > | Modulate (Pointer< ::bio::physical::Wave > signal) |
| |
| virtual Pointer< ::bio::physical::Wave > | Demodulate () |
| |
| virtual Pointer< const ::bio::physical::Wave > | Demodulate () const |
| |
| virtual Pointer< ::bio::physical::Wave > | Superpose (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< Reaction > object, Filter filter=filter::Default(), SymmetryType symmetryType=symmetry_type::Object()) |
| |
| | Class (Pointer< Reaction > object, const Name &name, Filter filter=filter::Default(), SymmetryType symmetryType=symmetry_type::Object()) |
| |
| | Class (Pointer< Reaction > 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< Atom > | AsAtom () |
| |
| virtual Pointer< const Atom > | AsAtom () const |
| |
| virtual Code | Attenuate (Pointer< const physical::Wave > other) |
| |
| virtual Code | Disattenuate (Pointer< const physical::Wave > other) |
| |
| | Class (Pointer< T > object, Pointer< Symmetry > symmetry=NULL) |
| |
| | Class (Pointer< T > object, SymmetryFactory symmetryFactory) |
| |
| | Class (const Class &other) |
| |
| virtual Pointer< T > | GetWaveObject () |
| |
| virtual Pointer< const T > | GetWaveObject () const |
| |
| virtual | operator T& () |
| |
| virtual | operator const T & () const |
| |
| Pointer< Wave > | AsWave () |
| |
| Pointer< const Wave > | AsWave () const |
| |
| virtual | operator Pointer< Wave > () |
| |
| | Wave (Pointer< Symmetry > symmetry=NULL) |
| |
| | Wave (const Wave &other) |
| |
| Wave & | operator= (const Wave &other) |
| |
| virtual | ~Wave () |
| |
| Pointer< const Symmetry > | GetSymmetry () const |
| |
| virtual bool | Superpose (Pointer< const Wave > displacement, Pointer< Interference > pattern) |
| |
| virtual Pointer< Wave > | Superpose (const ConstWaves &displacement, Pointer< Interference > pattern) |
| |
| virtual Pointer< Wave > | Modulate (Pointer< Wave > signal) |
| |
| Pointer< Wave > | AsWave () |
| |
| Pointer< const Wave > | AsWave () const |
| |
| virtual void | operator| (Pointer< Symmetry > symmetry) |
| |
| virtual Pointer< Wave > | operator* (Pointer< Wave > signal) |
| |
| virtual Pointer< Wave > | operator* () |
| |
| virtual Pointer< const Wave > | operator* () const |
| |
| virtual void | operator+ (Pointer< const Wave > other) |
| |
| virtual void | operator- (Pointer< const Wave > other) |
| |
| uint16_t | GetTypeId () const |
| |
| void | SetTypeId (uint16_t typeId) |
| |
| | 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) |
| |
| | Observer (Pointer< Perspective > perspective=NULL) |
| |
| | Observer (const Observer &other) |
| |
| virtual | ~Observer () |
| |
| virtual void | SetPerspective (Pointer< Perspective > perspective) |
| |
| virtual Pointer< Perspective > | GetPerspective () const |
| |
| | Writer () |
| |
| | Writer (Filter logFilter) |
| |
| virtual | ~Writer () |
| |
| virtual Pointer< const Writer > | AsLogWriter () const |
| |
| bool | IsEnabled (LogLevel level) const |
| |
| virtual void | Log (LogLevel level, const char *format, va_list args) const |
| |
| | 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< Wave > | AsWave () |
| |
| Pointer< const Wave > | AsWave () const |
| |
| virtual | operator Pointer< Wave > () |
| |
| | Filterable () |
| |
| | Filterable (Filter filter) |
| |
| virtual | ~Filterable () |
| |
| virtual void | InitializeImplementation (ByteStreams &args) |
| |
| virtual void | SetFilter (Filter filter) |
| |
| Filter | GetFilter () const |
| |
| virtual Pointer< const Symmetry > | Spin () const |
| |
| virtual Code | Reify (Pointer< const Symmetry > symmetry) |
| |
| | Class (Pointer< Filterable > object, Pointer< Symmetry > symmetry=NULL) |
| |
| | Class (Pointer< Filterable > object, SymmetryFactory symmetryFactory) |
| |
| | Class (const Class &other) |
| |
| virtual Pointer< Filterable > | GetWaveObject () |
| |
| virtual Pointer< const Filterable > | GetWaveObject () const |
| |
| virtual | operator Filterable & () |
| |
| virtual | operator const Filterable & () const |
| |
| Pointer< Wave > | AsWave () |
| |
| Pointer< const Wave > | AsWave () const |
| |
| virtual | operator Pointer< Wave > () |
| |
| | Atom () |
| |
| | Atom (const Atom &other) |
| |
| virtual | ~Atom () |
| |
| void | CloneBondsFrom (const Atom &other, BondClonePolicy policy=&Atom::DefaultBondClonePolicy) |
| |
| virtual Pointer< const physical::Symmetry > | Spin () const |
| |
| virtual Code | Reify (Pointer< const physical::Symmetry > symmetry) |
| |
| Pointer< physical::Wave > | GetBonded (Valence position) |
| |
| Pointer< const physical::Wave > | GetBonded (Valence position) const |
| |
| Pointer< const physical::Wave > | ResolveBondedForReadById (AtomicNumber bondId) const |
| |
| Pointer< physical::Wave > | ResolveBondedForWriteById (AtomicNumber bondId) |
| |
| template<typename T > |
| Cow< T > | AsBonded () const |
| |
| template<typename T > |
| Pointer< T > | AsBondedQuantum () 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< Bonds > | GetAllBonds () |
| |
| Pointer< const Bonds > | GetAllBonds () 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) |
| |
| | 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< Wave > | AsWave () |
| |
| Pointer< const Wave > | AsWave () const |
| |
| virtual | operator Pointer< Wave > () |
| |
| | ThreadSafe () |
| |
| | ThreadSafe (const ThreadSafe &toCopy) |
| |
| ThreadSafe & | operator= (const ThreadSafe &toCopy) |
| |
| | ~ThreadSafe () |
| |
| void | LockThread () const |
| |
| void | UnlockThread () const |
| |
| void | LockMutexShared () const |
| |
| void | UnlockMutexShared () const |
| |
| | Structure () |
| |
| virtual | ~Structure () |
| |
| | UnorderedStructureInterface () |
| |
| virtual | ~UnorderedStructureInterface () |
| |
| template<typename T > |
| T | Add (const T t) |
| |
| template<typename T > |
| Pointer< T > | Add (Pointer< T > t) |
| |
| template<typename T > |
| Code | Remove (const T t) |
| |
| template<typename T > |
| Code | Remove (Pointer< T > t) |
| |
| template<typename T > |
| void | Import (Pointer< const UnorderedMotif< T > > other) |
| |
| template<typename T > |
| void | Import (Pointer< const LinearMotif< T > > other) |
| |
| template<typename T > |
| void | Import (const ::bio::Arrangement< T > &other) |
| |
| Code | ImportAll (Pointer< const physical::Wave > other) |
| |
| template<typename T > |
| Index | GetCount () const |
| |
| template<typename T > |
| Pointer< Container > | GetAll () |
| |
| template<typename T > |
| Pointer< const Container > | GetAll () const |
| |
| template<typename T > |
| bool | Has (T content) const |
| |
| template<typename T > |
| bool | Has (Pointer< T > content) const |
| |
| template<typename T > |
| unsigned int | GetNumMatching (Pointer< const Container > other) const |
| |
| template<typename T > |
| bool | HasAll (Pointer< const Container > contents) const |
| |
| template<typename T > |
| void | Clear () |
| |
| template<typename T > |
| std::string | GetStringFrom (std::string separator=", ") |
| |
| template<typename T > |
| void | Log (const LogLevel &level=log_level::Info(), const Filter &filter=FilterPerspective::InvalidId()) |
| |
| | LinearStructureInterface () |
| |
| virtual | ~LinearStructureInterface () |
| |
| template<typename T > |
| Code | Insert (typename LinearStructureRequest< T >::PointerType toAdd, const Position position=BOTTOM, const Id optionalPositionArg=0, const bool transferSubContents=false) |
| |
| template<typename T > |
| LinearStructureRequest< T >::PointerType | GetById (const Id &id) |
| |
| template<typename T > |
| const LinearStructureRequest< T >::PointerType | GetById (const Id &id) const |
| |
| template<typename T > |
| LinearStructureRequest< T >::PointerType | GetByName (const Name &name) |
| |
| template<typename T > |
| const LinearStructureRequest< T >::PointerType | GetByName (const Name &name) const |
| |
| template<typename T > |
| LinearStructureRequest< T >::PointerType | GetOrCreateById (Id id) |
| |
| template<typename T > |
| LinearStructureRequest< T >::PointerType | GetOrCreateByName (const Name &name) |
| |
| template<typename T > |
| Code | RemoveById (const Id &id) |
| |
| template<typename T > |
| Code | RemoveByName (const Name &name) |
| |
| template<typename T > |
| LinearMotif< typenameLinearStructureRequest< T >::Pointee >::Contents | GetAllLike (Pointer< const Affinity > affinity) const |
| |
| template<typename T > |
| Emission | ForEach (Pointer< ExcitationBase > excitation) |
| |
|
| typedef Id | Identifier |
| |
| typedef Arrangement< Identifier > | Ids |
| |
| typedef PERSPECTIVE | Perspective |
| |
| typedef BondCloneAction(* | BondClonePolicy) (const Bond &bond) |
| |
| typedef void(* | BondVisitor) (const Bond &bond, void *context) |
| |
| typedef BondCloneAction(* | BondMutator) (Bond &bond, void *context) |
| |
| typedef Id | Identifier |
| |
| typedef Arrangement< Identifier > | Ids |
| |
| typedef PERSPECTIVE | Perspective |
| |
| typedef BondCloneAction(* | BondClonePolicy) (const Bond &bond) |
| |
| typedef void(* | BondVisitor) (const Bond &bond, void *context) |
| |
| typedef BondCloneAction(* | BondMutator) (Bond &bond, void *context) |
| |
| void | RegisterType () |
| |
| | Elementary (const Properties properties) |
| |
| | Elementary () |
| |
| virtual | ~Elementary () |
| |
| 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) |
| |
| | Observer (Pointer< Perspective > perspective=NULL) |
| |
| | Observer (const Observer &other) |
| |
| virtual | ~Observer () |
| |
| virtual void | SetPerspective (Pointer< Perspective > perspective) |
| |
| virtual Pointer< Perspective > | GetPerspective () const |
| |
| | 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) |
| |
| | Writer () |
| |
| | Writer (Filter logFilter) |
| |
| virtual | ~Writer () |
| |
| virtual Pointer< const Writer > | AsLogWriter () const |
| |
| bool | IsEnabled (LogLevel level) const |
| |
| virtual void | Log (LogLevel level, const char *format, va_list args) const |
| |
| | 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< Wave > | AsWave () |
| |
| Pointer< const Wave > | AsWave () const |
| |
| virtual | operator Pointer< Wave > () |
| |
| | Filterable () |
| |
| | Filterable (Filter filter) |
| |
| virtual | ~Filterable () |
| |
| virtual void | InitializeImplementation (ByteStreams &args) |
| |
| virtual void | SetFilter (Filter filter) |
| |
| Filter | GetFilter () const |
| |
| virtual Pointer< const Symmetry > | Spin () const |
| |
| virtual Code | Reify (Pointer< const Symmetry > symmetry) |
| |
| | Class (Pointer< Filterable > object, Pointer< Symmetry > symmetry=NULL) |
| |
| | Class (Pointer< Filterable > object, SymmetryFactory symmetryFactory) |
| |
| | Class (const Class &other) |
| |
| virtual Pointer< Filterable > | GetWaveObject () |
| |
| virtual Pointer< const Filterable > | GetWaveObject () const |
| |
| virtual | operator Filterable & () |
| |
| virtual | operator const Filterable & () const |
| |
| Pointer< Wave > | AsWave () |
| |
| Pointer< const Wave > | AsWave () const |
| |
| virtual | operator Pointer< Wave > () |
| |
| 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::Symmetry > | Spin () const |
| |
| virtual Code | Reify (Pointer< const physical::Symmetry > symmetry) |
| |
| Pointer< physical::Wave > | GetBonded (Valence position) |
| |
| Pointer< const physical::Wave > | GetBonded (Valence position) const |
| |
| Pointer< const physical::Wave > | ResolveBondedForReadById (AtomicNumber bondId) const |
| |
| Pointer< physical::Wave > | ResolveBondedForWriteById (AtomicNumber bondId) |
| |
| template<typename T > |
| Cow< T > | AsBonded () const |
| |
| template<typename T > |
| Pointer< T > | AsBondedQuantum () 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< Bonds > | GetAllBonds () |
| |
| Pointer< const Bonds > | GetAllBonds () 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) |
| |
| | 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< Wave > | AsWave () |
| |
| Pointer< const Wave > | AsWave () const |
| |
| virtual | operator Pointer< Wave > () |
| |
| | ThreadSafe () |
| |
| | ThreadSafe (const ThreadSafe &toCopy) |
| |
| ThreadSafe & | operator= (const ThreadSafe &toCopy) |
| |
| | ~ThreadSafe () |
| |
| void | LockThread () const |
| |
| void | UnlockThread () const |
| |
| void | LockMutexShared () const |
| |
| void | UnlockMutexShared () const |
| |
| template<typename T > |
| Pointer< LinearMotif< T > > | ResolveLinearMotif () |
| |
| template<typename T > |
| Pointer< const LinearMotif< T > > | ResolveLinearMotif () const |
| |
| static void | Log (Pointer< const Writer > writer, LogLevel level, const char *format,...) |
| |
| static bool | ShouldLog (Pointer< const Writer > writer, LogLevel level) |
| |
| static Pointer< Writer > | Convert (Pointer< Wave > wave) |
| |
| static Pointer< Filterable > | Convert (Pointer< Wave > wave) |
| |
| static BondCloneAction | DefaultBondClonePolicy (const Bond &bond) |
| |
| template<typename T > |
| static AtomicNumber | GetBondId () |
| |
| static Pointer< Atom > | Convert (Pointer< Wave > wave) |
| |
A chemical::Reaction takes in Reactants and produces Products, performing some work in between.
For more info, see Reactants.h, Reactant.h (singular), Products.h, and Substance.h
This is basically a fancy functor that takes advantage of Atom::Bonds and Substance Properties and States to do argument validation.
Reactions, like those in real life, will often deal with the changing of chemical Bonds and Properties.
Both Excitation and Reaction are functors but the behavior and minimum requirements for using each are different.
Reactions are for turning iron into gold. All lesser magicks can be performed with Excitation!
In a more real sense, Excitations should not make or break Bonds (except in rare circumstances) whereas Reactions, when fully Processed, should change the Reactants in some significant way, hence their return as Products.
Another difference between Reactants and Excitations is that Excitations act ON a Wave (i.e. wave->someMethod()) while Reactions act WITH Substances.
Additionally, Excitations store their arguments as members, requiring each kind of Excitation function call to be a new object (e.g. to call firstObject->method(firstArg) and secondObject->method(firstArg) is 1 Excitation while firstObject->method(secondArg) would require a new Excitation).
Reactions, on the other hand, are more traditional functors and do not (by default) maintain any state between calls, meaning the same Reaction object can be used for all invokations.
A real life corollary:
Imagine a sound wave hitting a wall. This could be modeled as an Excitation: the energy from the air molecules excite those in the wall, passing energy between them. We might write this as soundEnergyTransferExcitation = EnergyTransferExcitation(sound); soundEnergyTransferExcitation(wall), which could produce code like wall->ExchangeEnergy(sound) and could be used on anything the sound wave hit (e.g. soundEnergyTransferExcitation(floor)).
A similar, but inappropriate Reaction could be EnergyTransferReaction(wall, sound) which might produce code like wall->ExchangeEnergy(sound); return {wall, sound}, saying that a sound wave hitting a wall creates a new wall and sound wave. The same Reaction would have to be called again for each object the sound wave impacted.
A more appropriate Reaction would be something like Burn(fuel, air), which might return {flame, ash, smoke, air}, where you could then check the flame->GetColor(), smoke->GetSmell(), reactantAir->GetQuantity("Oxygen") - productAir->GetQuantity("Oxygen"), and so on.
The inappropriate Excitation analog, airBurnExcitation = BurnExcitation(air); airBurnExcitation(fuel), would call fuel->burn(air), which could work but would require that anything capable of being burned implement the burn method.
While the semantic difference between the implementations of Excitation and Reaction is subtle and possibly pedantic, the use case of calling a class method vs calling a function with a class should be clear cut.
In reality, you'll probably want to use Excitations in your Reactions and vice-versa. For instance, hitting a wall with a nuclear blast would be far more complex than modeling a sound wave.
See Excitation.h for more info.
To make a Reaction, you must overload Process (virtual chemical::Products Process(chemical::Substances& reactants) = 0;)
Then, preferably in your constructor, state the Require()ments.
Each Require()d Reactant* will be checked against the reactants (Substances&) provided to *this. ORDER MATTERS! The reactants must follow the same order as the Required Reactants!
To invoke a Reaction, use the operator(), providing reactants.
For example: MyReaction r; r(MyReactants);
Doing so will do all necessary input checking and then call Process(), if all is good. Otherwise no Products are returned and you will get a code::FailedReaction().
Other ways to invoke a reaction include:
Reaction::Attempt<MyReaction>(myReactants);
myReaction = Reaction::Initiate<MyReaction>(); myReaction(myReactants);