![]() |
anatomist
5.1.2
3D neuroimaging data viewer
|
CommandWriter is a helper class logging commands into a history file. More...
#include <anatomist/processor/Writer.h>
Public Member Functions | |
Constructors and Destructor | |
CommandWriter () | |
Create a CommandWriter. More... | |
CommandWriter (const std::string &filename) | |
Create a CommandWriter to log commands. More... | |
virtual | ~CommandWriter () |
does nothing More... | |
File | |
void | open (const std::string &filename) |
Attach to a file. More... | |
int | operator! () const |
Create a CommandWriter to log commands. More... | |
![]() | |
virtual | ~Observer () |
![]() | |
Serializer () | |
does nothing More... | |
virtual | ~Serializer () |
does nothing More... | |
int | serialize (void *ptr) |
Generate a unique ID to serialize a pointer. More... | |
Command logging | |
virtual void | update (const Observable *observable, void *arg) |
Log a command into the stream associated with the CommandWriter. More... | |
Additional Inherited Members | |
![]() | |
virtual void | cleanupObserver () |
call this function from inherited classes destructors. More... | |
virtual void | registerObservable (Observable *) |
only called by Observable: don't use this function directly More... | |
virtual void | unregisterObservable (Observable *) |
Called when an observable is destroyed, only called by Observable: don't use this function directly. More... | |
const std::set< Observable * > & | observed () const |
![]() | |
std::map< void *, int > | _ptr2id |
Pointer to ID lookup table. More... | |
int | _id |
Current ID: begin from 0 and increment with every new pointer. More... | |
CommandWriter is a helper class logging commands into a history file.
anatomist::CommandWriter::CommandWriter | ( | ) |
Create a CommandWriter.
anatomist::CommandWriter::CommandWriter | ( | const std::string & | filename | ) |
Create a CommandWriter to log commands.
filename | name of the file to log commands into |
|
virtual |
does nothing
void anatomist::CommandWriter::open | ( | const std::string & | filename | ) |
Attach to a file.
filename | name of the file to log commands into |
int anatomist::CommandWriter::operator! | ( | ) | const |
Create a CommandWriter to log commands.
filename | name of the file to log commands into |
|
virtual |
Log a command into the stream associated with the CommandWriter.
observable | observed Processor |
arg | cast back to a Processor::Memo to retrieve the command to log |
Implements anatomist::Observer.