Develop Biology
The language of life
|
#include <Writer.h>
Public Member Functions | |
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::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::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 * () |
Protected Member Functions | |
virtual void | InitializeImplementation (ByteStreams args) |
void | Log (Level level, const char *format,...) const |
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 |
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 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::Wave | |
Wave * | m_signal |
Symmetry * | m_symmetry |
Protected Attributes inherited from bio::VirtualBase | |
bool | m_hasBeenInitialized |
Protected Attributes inherited from bio::physical::Class< Writer > | |
Writer * | m_object |
A Writer is a base class for any other object that can write to a log engine. The reason for Writer to be a base class, rather than using a singleton log engine is that some objects may wish to write logs to different files than others or, perhaps some logs should be seen only in console output while others should be saved to a file. This also allows an easy drop-in replacement of log::Engine for specific platforms and apps. The above is accomplished by passing log::Engine as a pointer to all LoggerObjects.
bio::log::Writer::Writer | ( | Engine * | logEngine, |
Filter | logFilter | ||
) |
logEngine | |
logFilter |
Definition at line 31 of file Writer.cpp.
|
virtual |
Definition at line 52 of file Writer.cpp.
bio::log::Writer::BIO_DISAMBIGUATE_ALL_CLASS_METHODS | ( | physical | , |
Writer | |||
) |
Ensure virtual methods point to Class implementations.
void bio::log::Writer::ExternalLog | ( | Filter | logFilter, |
Level | level, | ||
const char * | format, | ||
... | |||
) | const |
For static callers only. This is a little hacky, but its better than having a static logger
logFilter | |
level | |
format | |
... |
Definition at line 106 of file Writer.cpp.
References BIO_SANITIZE, and bio::log::Engine::Log().
Engine * bio::log::Writer::GetLogEngine | ( | ) |
Definition at line 62 of file Writer.cpp.
const Engine * bio::log::Writer::GetLogEngine | ( | ) | const |
Definition at line 67 of file Writer.cpp.
bool bio::log::Writer::HasLogEngine | ( | ) | const |
Definition at line 72 of file Writer.cpp.
|
protectedvirtual |
VirtualBase required method. See that class for details (in common/)
args |
Reimplemented from bio::physical::Filterable.
Definition at line 128 of file Writer.cpp.
|
protected |
In case the above are too restrictive
level | |
format | |
... |
Definition at line 77 of file Writer.cpp.
References BIO_SANITIZE, BIO_SANITIZE_AT_SAFETY_LEVEL_2, bio::log::Engine::FilterPass(), bio::log::Engine::Log(), and bio::physical::Filterable::m_filter.
|
virtual |
Set the log::Engine* for this. Propagate logEngine to any and all related classes that should receive the change. if *this contains member LoggerObjects, these may be overridden to pass the call along to those objects as well. It should be assumed (and is true for bio classes) that the creation of any Writer within another Writer will have its m_logEngine set by the owner object AND that calling SetLogEngine on an owner object will also call SetLogEngine on all objects owned by it. This is not true for SetFilter, as each class may use a different filter
logEngine |
Definition at line 57 of file Writer.cpp.