libbio
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Static Protected Member Functions | Protected Attributes | List of all members
bio::physical::Quantum< T > Class Template Reference

#include <Quantum.h>

Inheritance diagram for bio::physical::Quantum< T >:
Inheritance graph
[legend]
Collaboration diagram for bio::physical::Quantum< T >:
Collaboration graph
[legend]

Public Member Functions

 Quantum ()
 
 Quantum (const T &assignment)
 
 Quantum (Pointer< T > directControl)
 
 Quantum (Pointer< T > directControl, bool controlling)
 
 Quantum (const Quantum< T > &other)
 
virtual ~Quantum ()
 
virtual Properties GetProperties () const
 
virtual Pointer< TGetQuantumObject ()
 
virtual Pointer< const TGetQuantumObject () const
 
 operator T& ()
 
 operator const T & () const
 
virtual Pointer< const SymmetrySpin () const
 
virtual Code Reify (Pointer< const Symmetry > symmetry)
 
virtual Pointer< WaveSuperpose (const ConstWaves &displacement, Pointer< Interference > pattern)
 
- Public Member Functions inherited from bio::physical::Class< Quantum< T > >
 Class (Pointer< Quantum< T > > object, Pointer< Symmetry > symmetry=NULL)
 
 Class (Pointer< Quantum< T > > object, SymmetryFactory symmetryFactory)
 
 Class (const Class &other)
 
virtual ~Class ()
 
virtual Pointer< Quantum< T > > GetWaveObject ()
 
virtual Pointer< const Quantum< T > > GetWaveObject () const
 
virtual operator Quantum< T > & ()
 
virtual operator const Quantum< T > & () const
 
virtual Pointer< WaveClone () 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< WaveModulate (Pointer< Wave > signal)
 
virtual Pointer< WaveDemodulate ()
 
virtual Pointer< const WaveDemodulate () const
 
virtual Code Attenuate (Pointer< const Wave > other)
 
virtual Code Disattenuate (Pointer< const Wave > other)
 
Pointer< WaveAsWave ()
 
Pointer< const WaveAsWave () const
 
virtual Pointer< chemical::AtomAsAtom ()
 
virtual Pointer< const chemical::AtomAsAtom () 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)
 

Static Public Member Functions

::bio::physical::SymmetryMakeSymmetry ()
 
- Static Public Member Functions inherited from bio::physical::Class< Quantum< T > >
static Pointer< Quantum< T > > Convert (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 Protected Member Functions

static Pointer< TNewControlled ()
 
static Pointer< TNewControlled (const T &value)
 

Protected Attributes

Pointer< TmQuantized
 
bool mControlling
 
- Protected Attributes inherited from bio::physical::Class< Quantum< T > >
Pointer< Quantum< T > > mObject
 
- Protected Attributes inherited from bio::physical::Wave
LazyPointer< SymmetrymSymmetry
 
bool mHasSignal
 
uint16_t mTypeId
 

Detailed Description

template<typename T>
class bio::physical::Quantum< T >

Quanta are simple Waves intended for built-in types.
They allow anything to be treated as a Biological Wave.
Iff you cannot derive from Wave, use Quantum<> instead.
Each Quantum<T> will store a pointer to a T which it will new on creation and delete on destruction.

Template Parameters
T

Constructor & Destructor Documentation

◆ Quantum() [1/5]

template<typename T >
bio::physical::Quantum< T >::Quantum ( )
inline

◆ Quantum() [2/5]

template<typename T >
bio::physical::Quantum< T >::Quantum ( const T assignment)
inline
Parameters
assignment

◆ Quantum() [3/5]

template<typename T >
bio::physical::Quantum< T >::Quantum ( Pointer< T directControl)
inline

◆ Quantum() [4/5]

template<typename T >
bio::physical::Quantum< T >::Quantum ( Pointer< T directControl,
bool  controlling 
)
inline

◆ Quantum() [5/5]

template<typename T >
bio::physical::Quantum< T >::Quantum ( const Quantum< T > &  other)
inline
Parameters
other

◆ ~Quantum()

template<typename T >
virtual bio::physical::Quantum< T >::~Quantum ( )
inlinevirtual

Member Function Documentation

◆ GetProperties()

template<typename T >
virtual Properties bio::physical::Quantum< T >::GetProperties ( ) const
inlinevirtual

Quanta have properties matching their types.
This enables the IsInstance method in the PeriodicTable to work with Quantum-wrapped, primitive types.

Returns
Properties of *this, including the type T.

Reimplemented from bio::physical::Wave.

◆ GetQuantumObject() [1/2]

template<typename T >
virtual Pointer< T > bio::physical::Quantum< T >::GetQuantumObject ( )
inlinevirtual

Simple getter.

Returns
the object wrapped by *this.

◆ GetQuantumObject() [2/2]

template<typename T >
virtual Pointer< const T > bio::physical::Quantum< T >::GetQuantumObject ( ) const
inlinevirtual

Simple getter.

Returns
the object wrapped by *this.

◆ MakeSymmetry()

template<typename T >
::bio::physical::Symmetry * bio::physical::Quantum< T >::MakeSymmetry ( )
inlinestatic

Lazy-Symmetry factory wired into the Wave LazyPointer by the physical::Class<T> factory ctor (replaces the eager per-instance new Symmetry). Materialises only when something Spins/derefs this Quantum's Symmetry — most never do. Stamps T's value-Symmetry exactly as the old eager path did.

◆ NewControlled() [1/2]

template<typename T >
static Pointer< T > bio::physical::Quantum< T >::NewControlled ( )
inlinestaticprotected

◆ NewControlled() [2/2]

template<typename T >
static Pointer< T > bio::physical::Quantum< T >::NewControlled ( const T value)
inlinestaticprotected

◆ operator const T &()

template<typename T >
bio::physical::Quantum< T >::operator const T & ( ) const
inline

Transparent access to the value of *this.
For ease of use.

Returns
*this as a T.

◆ operator T&()

template<typename T >
bio::physical::Quantum< T >::operator T& ( )
inline

Transparent access to the value of *this.
For ease of use.

Returns
*this as a T.

◆ Reify()

template<typename T >
virtual Code bio::physical::Quantum< T >::Reify ( Pointer< const Symmetry symmetry)
inlinevirtual

Required method from Wave. See that class for details.
Reconstruct *this from the given Symmetry.

Parameters
symmetry

Reimplemented from bio::physical::Wave.

◆ Spin()

template<typename T >
virtual Pointer< const Symmetry > bio::physical::Quantum< T >::Spin ( ) const
inlinevirtual

Required method from Wave. See that class for details.

Returns
a Symmetrical image of *this

Reimplemented from bio::physical::Wave.

◆ Superpose()

template<typename T >
virtual Pointer< Wave > bio::physical::Quantum< T >::Superpose ( const ConstWaves displacement,
Pointer< Interference pattern 
)
inlinevirtual

Override of Wave method.
Here, we enable Superposing all Quantum Variables.
NOTE: The value of our mInterference does not matter; the mInterference of the interferer shall prevail.

Parameters
displacement
pattern
Returns
whether or not there is more work to do; see Wave.h for more info.

Reimplemented from bio::physical::Wave.

Member Data Documentation

◆ mControlling

template<typename T >
bool bio::physical::Quantum< T >::mControlling
protected

◆ mQuantized

template<typename T >
Pointer< T > bio::physical::Quantum< T >::mQuantized
protected

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