|
Develop Biology
The language of life
|
#include <Periodic.h>
Inheritance diagram for bio::physical::Periodic:
Collaboration diagram for bio::physical::Periodic:Public Member Functions | |
| Periodic (TimeUS interval=GetDefaultInterval()) | |
| virtual | ~Periodic () |
| BIO_DISAMBIGUATE_ALL_CLASS_METHODS (physical, Periodic) static TimeUS GetDefaultInterval() | |
| virtual void | CheckIn () |
| TimeUS | GetInterval () const |
| float | GetIntervalInSeconds () const |
| virtual Properties | GetProperties () const |
| Timestamp | GetTimeLastPeaked () const |
| virtual void | InitializeImplementation (ByteStreams args) |
| virtual Code | Peak () |
| virtual Code | Reify (Symmetry *symmetry) |
| virtual void | SetInterval (TimeUS interval) |
| virtual void | SetLastPeakTimestamp (Timestamp lastPeak) |
| virtual Symmetry * | Spin () const |
Public Member Functions inherited from bio::physical::Class< Periodic > | |
| Class (Periodic *object, Symmetry *symmetry=NULL) | |
| virtual | ~Class () |
| virtual Wave * | AsWave () |
| virtual const Wave * | AsWave () const |
| virtual Wave * | Clone () const |
| Periodic * | Convert (Wave *wave) |
| virtual | operator Periodic * () |
| 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 |
Static Public Member Functions | |
| static Properties | GetClassProperties () |
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 Attributes | |
| TimeUS | m_interval |
| Timestamp | m_lastPeakTimestamp |
Protected Attributes inherited from bio::physical::Class< Periodic > | |
| Periodic * | m_object |
Protected Attributes inherited from bio::physical::Wave | |
| Wave * | m_signal |
| Symmetry * | m_symmetry |
Protected Attributes inherited from bio::VirtualBase | |
| bool | m_hasBeenInitialized |
Additional Inherited Members | |
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 |
Periodic objects do work at regular intervals.
Definition at line 34 of file Periodic.h.
| bio::physical::Periodic::Periodic | ( | TimeUS | interval = GetDefaultInterval() | ) |
| interval | the period that Peak() wants to be called in microseconds. |
Definition at line 44 of file Periodic.cpp.
|
virtual |
Definition at line 60 of file Periodic.cpp.
| bio::physical::Periodic::BIO_DISAMBIGUATE_ALL_CLASS_METHODS | ( | physical | , |
| Periodic | |||
| ) |
|
virtual |
Checks the current time & calls Peak, if a long enough interval has passed. Call this method regularly (i.e. on a clock).
Definition at line 119 of file Periodic.cpp.
References bio::physical::GetCurrentTimestamp(), GetInterval(), GetTimeLastPeaked(), Peak(), and SetLastPeakTimestamp().
|
static |
All Periodic objects share the "Periodic" Property.
Definition at line 36 of file Periodic.cpp.
References bio::property::Periodic(), and bio::Properties.
Referenced by GetProperties().
| TimeUS bio::physical::Periodic::GetInterval | ( | ) | const |
Definition at line 69 of file Periodic.cpp.
References m_interval.
Referenced by CheckIn().
| float bio::physical::Periodic::GetIntervalInSeconds | ( | ) | const |
Definition at line 79 of file Periodic.cpp.
References m_interval.
|
virtual |
Wave method. See that class for details.
Reimplemented from bio::physical::Wave.
Definition at line 114 of file Periodic.cpp.
References GetClassProperties().
| Timestamp bio::physical::Periodic::GetTimeLastPeaked | ( | ) | const |
Definition at line 74 of file Periodic.cpp.
References m_lastPeakTimestamp.
Referenced by CheckIn().
|
virtual |
VirtualBase required method. See that class for details (in common/)
| args |
Implements bio::VirtualBase.
Definition at line 105 of file Periodic.cpp.
References BIO_SANITIZE, and m_interval.
|
inlinevirtual |
Peak()s occur at Periodic::m_intervals. Define your main Periodic logic here. This method must be fast:
Reimplemented in bio::cellular::Cell, and bio::cellular::Organelle.
Definition at line 84 of file Periodic.h.
References bio::code::NotImplemented().
Referenced by CheckIn(), bio::cellular::Cell::Peak(), and bio::cellular::Organelle::Peak().
|
virtual |
Required method from Wave. See that class for details. Reconstruct *this from the given Symmetry.
| symmetry |
Reimplemented from bio::physical::Wave.
Definition at line 97 of file Periodic.cpp.
References bio::code::BadArgument1(), BIO_SANITIZE, bio::physical::Symmetry::GetValue(), m_interval, and bio::code::Success().
|
virtual |
Set how quickly *this should Peak()
| interval |
Definition at line 64 of file Periodic.cpp.
References m_interval.
|
virtual |
Sets the timestamp of the last time *this Peaked. USE WITH CAUTION!
| lastPeak |
Definition at line 84 of file Periodic.cpp.
References m_lastPeakTimestamp.
Referenced by CheckIn().
|
virtual |
Required method from Wave. See that class for details.
Reimplemented from bio::physical::Wave.
Definition at line 89 of file Periodic.cpp.
References bio::physical::Symmetry::AccessValue(), m_interval, bio::physical::Wave::m_symmetry, bio::ByteStream::Set(), and bio::physical::Wave::Spin().
|
protected |
Definition at line 146 of file Periodic.h.
Referenced by GetInterval(), GetIntervalInSeconds(), InitializeImplementation(), Reify(), SetInterval(), and Spin().
|
protected |
Definition at line 147 of file Periodic.h.
Referenced by GetTimeLastPeaked(), and SetLastPeakTimestamp().