anatomist  5.1.2
3D neuroimaging data viewer
anatomist::CommandReader Class Reference

CommandReader replays history files. More...

#include <anatomist/processor/Reader.h>

Public Member Functions

 CommandReader (const std::string &filename, carto::MutexRcPtr< CommandContext > &context)
 Create a CommandReader to read commands from. More...
 
 CommandReader (carto::MutexRcPtr< CommandContext > &context)
 Creates a command reader not bound to a file descriptor. More...
 
virtual ~CommandReader ()
 Create a CommandReader to read commands from. More...
 
void attach (std::istream &is)
 Attach to an open stream. More...
 
void close ()
 Detach stream (destroys it if owned) More...
 
bool askedToClose () const
 Reader is asked to be closed (by the command just being read) More...
 
bool askedToRemovePipeFile () const
 Reader is asked to remove the named pipe file after closing. More...
 

Command replay

void read ()
 Replay the logged commands. More...
 
void readOne ()
 Replay next command. More...
 

Detailed Description

CommandReader replays history files.

Definition at line 57 of file Reader.h.

Constructor & Destructor Documentation

◆ CommandReader() [1/2]

anatomist::CommandReader::CommandReader ( const std::string &  filename,
carto::MutexRcPtr< CommandContext > &  context 
)

Create a CommandReader to read commands from.

Parameters
filenamename of the file to read commands from

◆ CommandReader() [2/2]

anatomist::CommandReader::CommandReader ( carto::MutexRcPtr< CommandContext > &  context)

Creates a command reader not bound to a file descriptor.

◆ ~CommandReader()

virtual anatomist::CommandReader::~CommandReader ( )
virtual

Create a CommandReader to read commands from.

Parameters
filenamename of the file to read commands from

Member Function Documentation

◆ askedToClose()

bool anatomist::CommandReader::askedToClose ( ) const
inline

Reader is asked to be closed (by the command just being read)

Definition at line 80 of file Reader.h.

◆ askedToRemovePipeFile()

bool anatomist::CommandReader::askedToRemovePipeFile ( ) const
inline

Reader is asked to remove the named pipe file after closing.

Definition at line 82 of file Reader.h.

◆ attach()

void anatomist::CommandReader::attach ( std::istream &  is)

Attach to an open stream.

◆ close()

void anatomist::CommandReader::close ( )

Detach stream (destroys it if owned)

◆ read()

void anatomist::CommandReader::read ( )

Replay the logged commands.

◆ readOne()

void anatomist::CommandReader::readOne ( )

Replay next command.


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