LRAUV  revA
AllLogWriter Class Reference

Base class for a generalized set of "log data destinations," including to files (text or binary), over communications links, etc. More...

#include <AllLogWriter.h>

Inheritance diagram for AllLogWriter:
Collaboration diagram for AllLogWriter:

Public Member Functions

 AllLogWriter (LogWriter &outputTo)
 Constructor. More...
 
virtual ~AllLogWriter ()
 Destructor. More...
 
virtual unsigned int writeHeader ()
 Write the log header, if any. More...
 
virtual unsigned int write (const LogEntry *entry, const Unit *unit=NULL)
 Write the given LogEntry - should lock the writeMutex_. More...
 
virtual void endCycle ()
 Do what needs to be done at the end of the cycle. More...
 
virtual unsigned int writeFooter ()
 Write the log footer, if any. More...
 
- Public Member Functions inherited from DecimationLogWriter
 DecimationLogWriter (LogWriter &outputTo, DecimationType decimationType)
 Constructor. More...
 
virtual ~DecimationLogWriter ()
 Destructor. More...
 
DecimationType getDecimationType () const
 
virtual void setParameter (DataValue *parameter, Logger &logger)
 
virtual unsigned int flush ()
 
- Public Member Functions inherited from LogWriter
virtual ~LogWriter ()
 Destructor. More...
 
virtual void setOutStream (OutStream &outStream)
 Sets the OutStream. More...
 
virtual bool isValid ()
 Return true if logStream_ is available. More...
 
virtual void config (Logger &logger)
 Configure from a config file. More...
 
virtual void resetInputs ()
 Reset cached input settings. More...
 
void addParent ()
 
void removeParent ()
 
int getParentCount ()
 
virtual void activate ()
 
virtual void deactivate ()
 
virtual bool isActive ()
 
virtual void lockWrites ()
 
virtual void unlockWrites ()
 

Private Member Functions

 AllLogWriter (const AllLogWriter &old)
 

Additional Inherited Members

- Public Types inherited from DecimationLogWriter
enum  DecimationType {
  UNDEFINED_DECIMATION = -1, NO_DECIMATION, ALL_DATA, LINEAR_APPROXIMATION,
  MOST_RECENT, DECIMATION_COUNT, DECIMATION_MULTI
}
 
- Public Types inherited from LogWriter
enum  ServiceType {
  NO_SERVICE = -1, SERVICE_COURIER, SERVICE_EXPRESS, SERVICE_PRIORITY,
  SERVICE_NORMAL, SERVICE_BULK, SERVICE_COUNT, SERVICE_MULTI
}
 
- Static Public Member Functions inherited from DecimationLogWriter
static const char * DecimationType2Str (DecimationLogWriter::DecimationType decimationType)
 
static DecimationType Str2DecimationType (const char *const typeStr, int len=-1)
 
- Static Public Member Functions inherited from LogWriter
static ServiceType Str2ServiceType (const char *const serviceTypeStr, int len=-1)
 
static const char * ServiceType2Str (LogWriter::ServiceType serviceType)
 
static size_t ServiceType2Strlen (LogWriter::ServiceType serviceType)
 
- Static Public Attributes inherited from DecimationLogWriter
static const char *const DECIMATION_TYPE_STRS [DECIMATION_COUNT]
 
static const size_t DECIMATION_TYPE_STRLEN [DECIMATION_COUNT]
 
- Static Public Attributes inherited from LogWriter
static const char *const SERVICE_TYPE_STRS [SERVICE_COUNT]
 
static size_t const SERVICE_TYPE_STRLEN [SERVICE_COUNT]
 
- Protected Member Functions inherited from LogWriter
 LogWriter ()
 Protected constructor for pure virtual class. More...
 
 LogWriter (OutStream &outStream)
 Protected constructor for pure virtual class. More...
 
- Protected Attributes inherited from DecimationLogWriter
LogWriteroutputTo_
 Stores an LogWriter. More...
 
DecimationType decimationType_
 Stores the decimationType. More...
 
- Protected Attributes inherited from LogWriter
OutStreamlogStream_
 Stores an OutStream. More...
 
bool wroteHeader_
 
bool wroteFooter_
 
Mutex writeMutex_
 
int parentCount_
 
bool active_
 

Detailed Description

Base class for a generalized set of "log data destinations," including to files (text or binary), over communications links, etc.

Constructor & Destructor Documentation

AllLogWriter::AllLogWriter ( LogWriter outputTo)

Constructor.

AllLogWriter::~AllLogWriter ( )
virtual

Destructor.

AllLogWriter::AllLogWriter ( const AllLogWriter old)
private

Member Function Documentation

void AllLogWriter::endCycle ( )
virtual

Do what needs to be done at the end of the cycle.

Reimplemented from LogWriter.

References LogWriter::endCycle(), and DecimationLogWriter::outputTo_.

unsigned int AllLogWriter::write ( const LogEntry entry,
const Unit unit = NULL 
)
virtual

Write the given LogEntry - should lock the writeMutex_.

Implements LogWriter.

References DecimationLogWriter::outputTo_, and LogWriter::write().

unsigned int AllLogWriter::writeFooter ( )
virtual

Write the log footer, if any.

Reimplemented from LogWriter.

References DecimationLogWriter::outputTo_, and LogWriter::writeFooter().

unsigned int AllLogWriter::writeHeader ( )
virtual

Write the log header, if any.

Reimplemented from LogWriter.

References DecimationLogWriter::outputTo_, LogWriter::writeHeader(), and LogWriter::wroteHeader_.


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