Public Types | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Private Member Functions
MAKLogger::DtCheckpointPolicy Class Reference

Checkpoint policy class responsible. More...

+ Inheritance diagram for MAKLogger::DtCheckpointPolicy:
+ Collaboration diagram for MAKLogger::DtCheckpointPolicy:

List of all members.

Public Types

enum  Policy {
  ByCount,
  BySize,
  ByTime
}

Public Member Functions

virtual ~DtCheckpointPolicy ()
 DTOR.
virtual bool timeForCheckpoint () const =0
 Function called to check to see if it is time to create a checkpoint, called after every packet is written.
virtual void reset ()=0
 Function called if the checkpoint mechanism should be reset.
virtual void checkpointWritten ()=0
 Function called after a checkpoint has been written.
virtual void packetWritten (const DtPacket &)=0
 Function called after every packet written.
virtual void connectFileOutput (DtMessageState *, DtLgrFileOutput *)
 Set the file output object. Called if the FileOuput changes.

Protected Types

typedef DtObserverFunctor
< DtCheckpointPolicy, DtPacket
PacketObserverFunctor
 Type of the functor connecting the checkpoint policy to the output.

Protected Member Functions

void onPacketWritten (const DtPacket &)

Protected Attributes

PacketObserverFunctor myPacketWrittenObserver
DtMessageStatemyMessageState
DtLgrFileOutputmyLgrFileOutput

Private Member Functions

 DtCheckpointPolicy (const DtCheckpointPolicy &)
 Not Implemented.
DtCheckpointPolicyoperator= (const DtCheckpointPolicy &)
 Not Implemented.

Detailed Description

Checkpoint policy class responsible.


Member Function Documentation

virtual void MAKLogger::DtCheckpointPolicy::packetWritten ( const DtPacket ) [pure virtual]

Function called after every packet written.

This should be a fast function.

Implemented in MAKLogger::DtCheckpointByTime, MAKLogger::DtCheckpointByCount, and MAKLogger::DtCheckpointBySize.

virtual bool MAKLogger::DtCheckpointPolicy::timeForCheckpoint ( ) const [pure virtual]

Function called to check to see if it is time to create a checkpoint, called after every packet is written.

Return values:
trueTime for checkpoint.
falseNot time for checkpoint.

Implemented in MAKLogger::DtCheckpointByTime, MAKLogger::DtCheckpointByCount, and MAKLogger::DtCheckpointBySize.


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

Document ID: Generated on Tue Oct 11 19:41:03 EDT 2011 from SVN revision 107422
Copyright © 2005-2011 VT MÄK Inc. All Rights Reserved (www.mak.com)