LRAUV  revA
DirectoryLogWriter Class Reference

Defines a LogWriter specific to writing binary values to a stream See FileLogWriter for output to the filesystem. More...

#include <DirectoryLogWriter.h>

Inheritance diagram for DirectoryLogWriter:
Collaboration diagram for DirectoryLogWriter:

Public Member Functions

 DirectoryLogWriter (bool forceInitialized=false)
 Default Constructor. More...
 
virtual ~DirectoryLogWriter ()
 Destructor. More...
 
virtual unsigned int writeHeader ()
 Start the binary log. More...
 
- Public Member Functions inherited from BinaryLogWriter
 BinaryLogWriter (bool withDirectory=false)
 Default Constructor Assumes that the stream will be assigned later via setOutStream() More...
 
 BinaryLogWriter (OutStream &stream, bool withDirectory=false)
 Constructor, takes an OutStream. More...
 
virtual ~BinaryLogWriter ()
 Destructor. More...
 
virtual unsigned int write (const LogEntry *entry, const Unit *unit=NULL)
 Write an entry to the log. More...
 
virtual void resetTimeBase ()
 Calling this resets the time base to "zero". More...
 
- 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 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...
 
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 ()
 

Static Private Member Functions

static void Uninitialize ()
 Unsets Initialized_. More...
 

Private Attributes

bool initialized_
 Have we been initiailized? More...
 

Static Private Attributes

static bool Initialized_
 Has the directory been initialized? More...
 
static bool Restarted_
 Have we restarted the app? More...
 

Friends

class Supervisor
 Lets Supervisor call Uninitialize. More...
 

Additional Inherited Members

- 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 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 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 BinaryLogWriter
Timestamp timeBase_
 Start of the cycle time. More...
 
bool withDirectory_
 
- Protected Attributes inherited from LogWriter
OutStreamlogStream_
 Stores an OutStream. More...
 
bool wroteHeader_
 
bool wroteFooter_
 
Mutex writeMutex_
 
int parentCount_
 
bool active_
 

Detailed Description

Defines a LogWriter specific to writing binary values to a stream See FileLogWriter for output to the filesystem.

Constructor & Destructor Documentation

DirectoryLogWriter::DirectoryLogWriter ( bool  forceInitialized = false)

Default Constructor.

References Initialized_, and initialized_.

DirectoryLogWriter::~DirectoryLogWriter ( )
virtual

Destructor.

Member Function Documentation

void DirectoryLogWriter::Uninitialize ( )
staticprivate

Unsets Initialized_.

References Initialized_, and Restarted_.

Referenced by Supervisor::uninitialize().

unsigned int DirectoryLogWriter::writeHeader ( )
virtual

Start the binary log.

Reimplemented from BinaryLogWriter.

References Initialized_, initialized_, Restarted_, Slate::WriteDirectory(), and BinaryLogWriter::writeHeader().

Friends And Related Function Documentation

friend class Supervisor
friend

Lets Supervisor call Uninitialize.

Member Data Documentation

bool DirectoryLogWriter::Initialized_
staticprivate

Has the directory been initialized?

Static initialization.

Referenced by DirectoryLogWriter(), Uninitialize(), and writeHeader().

bool DirectoryLogWriter::initialized_
private

Have we been initiailized?

Referenced by DirectoryLogWriter(), and writeHeader().

bool DirectoryLogWriter::Restarted_
staticprivate

Have we restarted the app?

Referenced by Uninitialize(), and writeHeader().


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