B2BITS FIX Antenna HFT  1.0.13
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
Engine::LogFileT< FileT > Class Template Reference

#include <LogMsgFile.h>

+ Collaboration diagram for Engine::LogFileT< FileT >:

Public Types

enum  { INVALID_MSG_HANDLE = -1 }
 
typedef IndexFileT< FileT >
::Data::Flags 
Flags
 
typedef IndexFileT< FileT >::Offset MsgHandle
 
typedef std::map< MsgHandle,
typename IndexFileT< FileT >
::Data > 
MsgHandle2Data
 
typedef FastFileT< FileT >::Offset Offset
 
typedef IndexFileT< FileT >
::Data::SeqNum 
SeqNum
 

Public Member Functions

void close ()
 
void closeHandle (MsgHandle handle)
 
MsgHandle find (SeqNum seqNum)
 
MsgHandle find (const std::string &msg)
 
void flush ()
 
LogFilePosT< FileT > getCurrPos ()
 
IndexFileT< FileT >::Data getData (MsgHandle handle)
 
bool isRejected (MsgHandle handle)
 
void load (MsgHandle handle, std::string &msg)
 
void load (const typename IndexFileT< FileT >::Data &data, std::string &msg)
 
MsgHandle log (const char *msg, System::u32 size, SeqNum seqNum, Flags flags, const PersistentData &persistentData, bool isTimestampsInLogsMode, bool flush=false, const char *custom_timestamp=0)
 
 LogFileT (FileT &file, FileT &indx, bool chunkAlloc)
 
void markRejected (MsgHandle handle)
 
void markToBeResent (MsgHandle handle)
 
bool next (std::string &msg)
 
bool next (typename IndexFileT< FileT >::Data &data)
 
bool next (MsgHandle &handle)
 
bool next (MsgHandle &handle, typename IndexFileT< FileT >::Data &data)
 
bool prev (typename IndexFileT< FileT >::Data &data)
 
bool prev (MsgHandle &handle, typename IndexFileT< FileT >::Data &data)
 
void save (MsgHandle handle, const std::string &msg)
 
void save (const typename IndexFileT< FileT >::Data &data, const std::string &msg)
 
void seekTo (const LogFilePosT< FileT > &)
 
void sync ()
 
void toBegin ()
 
bool toBeResent (MsgHandle handle)
 
void toEnd ()
 
void unmarkRejected (MsgHandle handle)
 
void unmarkToBeResent (MsgHandle handle)
 
 ~LogFileT ()
 

Static Public Member Functions

static bool isRejected (typename IndexFileT< FileT >::Data &data)
 
static bool isValid (MsgHandle handle)
 
static bool toBeResent (typename IndexFileT< FileT >::Data &data)
 

Protected Attributes

FastFileT< FileT > file_
 
IndexFileT< FileT > indx_
 
MsgHandle2Data msgHandleCash_
 
Offset nextWritePtr_
 

Member Typedef Documentation

template<typename FileT>
typedef IndexFileT<FileT>::Data::Flags Engine::LogFileT< FileT >::Flags
template<typename FileT>
typedef IndexFileT<FileT>::Offset Engine::LogFileT< FileT >::MsgHandle
template<typename FileT>
typedef std::map<MsgHandle, typename IndexFileT<FileT>::Data> Engine::LogFileT< FileT >::MsgHandle2Data
template<typename FileT>
typedef FastFileT<FileT>::Offset Engine::LogFileT< FileT >::Offset
template<typename FileT>
typedef IndexFileT<FileT>::Data::SeqNum Engine::LogFileT< FileT >::SeqNum

Member Enumeration Documentation

template<typename FileT>
anonymous enum
Enumerator
INVALID_MSG_HANDLE 

Constructor & Destructor Documentation

template<typename FileT>
Engine::LogFileT< FileT >::LogFileT ( FileT &  file,
FileT &  indx,
bool  chunkAlloc 
)
template<typename FileT >
Engine::LogFileT< FileT >::~LogFileT ( )

Member Function Documentation

template<typename FileT >
void Engine::LogFileT< FileT >::close ( )
template<typename FileT >
void Engine::LogFileT< FileT >::closeHandle ( MsgHandle  handle)
template<typename FileT >
Engine::LogFileT< FileT >::MsgHandle Engine::LogFileT< FileT >::find ( SeqNum  seqNum)
template<typename FileT >
Engine::LogFileT< FileT >::MsgHandle Engine::LogFileT< FileT >::find ( const std::string &  msg)
template<typename FileT >
void Engine::LogFileT< FileT >::flush ( )
template<typename FileT >
Engine::LogFilePosT< FileT > Engine::LogFileT< FileT >::getCurrPos ( )
template<typename FileT >
Engine::IndexFileT< FileT >::Data Engine::LogFileT< FileT >::getData ( MsgHandle  handle)
template<typename FileT>
bool Engine::LogFileT< FileT >::isRejected ( typename IndexFileT< FileT >::Data &  data)
static
template<typename FileT>
bool Engine::LogFileT< FileT >::isRejected ( MsgHandle  handle)
template<typename FileT >
bool Engine::LogFileT< FileT >::isValid ( MsgHandle  handle)
static
template<typename FileT >
void Engine::LogFileT< FileT >::load ( MsgHandle  handle,
std::string &  msg 
)
template<typename FileT>
void Engine::LogFileT< FileT >::load ( const typename IndexFileT< FileT >::Data &  data,
std::string &  msg 
)
template<typename FileT >
Engine::LogFileT< FileT >::MsgHandle Engine::LogFileT< FileT >::log ( const char *  msg,
System::u32  size,
SeqNum  seqNum,
Flags  flags,
const PersistentData persistentData,
bool  isTimestampsInLogsMode,
bool  flush = false,
const char *  custom_timestamp = 0 
)
template<typename FileT >
void Engine::LogFileT< FileT >::markRejected ( MsgHandle  handle)
template<typename FileT >
void Engine::LogFileT< FileT >::markToBeResent ( MsgHandle  handle)
template<typename FileT >
bool Engine::LogFileT< FileT >::next ( std::string &  msg)
template<typename FileT>
bool Engine::LogFileT< FileT >::next ( typename IndexFileT< FileT >::Data &  data)
template<typename FileT>
bool Engine::LogFileT< FileT >::next ( MsgHandle handle)
template<typename FileT>
bool Engine::LogFileT< FileT >::next ( MsgHandle handle,
typename IndexFileT< FileT >::Data &  data 
)
template<typename FileT>
bool Engine::LogFileT< FileT >::prev ( typename IndexFileT< FileT >::Data &  data)
template<typename FileT>
bool Engine::LogFileT< FileT >::prev ( MsgHandle handle,
typename IndexFileT< FileT >::Data &  data 
)
template<typename FileT >
void Engine::LogFileT< FileT >::save ( MsgHandle  handle,
const std::string &  msg 
)
template<typename FileT>
void Engine::LogFileT< FileT >::save ( const typename IndexFileT< FileT >::Data &  data,
const std::string &  msg 
)
template<typename FileT>
void Engine::LogFileT< FileT >::seekTo ( const LogFilePosT< FileT > &  pos)
template<typename FileT >
void Engine::LogFileT< FileT >::sync ( )
template<typename FileT >
void Engine::LogFileT< FileT >::toBegin ( )
template<typename FileT>
bool Engine::LogFileT< FileT >::toBeResent ( typename IndexFileT< FileT >::Data &  data)
static
template<typename FileT>
bool Engine::LogFileT< FileT >::toBeResent ( MsgHandle  handle)
template<typename FileT >
void Engine::LogFileT< FileT >::toEnd ( )
template<typename FileT >
void Engine::LogFileT< FileT >::unmarkRejected ( MsgHandle  handle)
template<typename FileT >
void Engine::LogFileT< FileT >::unmarkToBeResent ( MsgHandle  handle)

Member Data Documentation

template<typename FileT>
FastFileT<FileT> Engine::LogFileT< FileT >::file_
protected
template<typename FileT>
IndexFileT<FileT> Engine::LogFileT< FileT >::indx_
protected
template<typename FileT>
MsgHandle2Data Engine::LogFileT< FileT >::msgHandleCash_
protected
template<typename FileT>
Offset Engine::LogFileT< FileT >::nextWritePtr_
protected