Public Member Functions | Private Types | Private Attributes
FIX::MemoryStore Class Reference

Memory based implementation of MessageStore. More...

#include <MessageStore.h>

Inheritance diagram for FIX::MemoryStore:
Inheritance graph
[legend]
Collaboration diagram for FIX::MemoryStore:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 MemoryStore ()
bool set (int, const std::string &) throw ( IOException )
void get (int, int, std::vector< std::string > &) const throw ( IOException )
int getNextSenderMsgSeqNum () const throw ( IOException )
int getNextTargetMsgSeqNum () const throw ( IOException )
void setNextSenderMsgSeqNum (int value) throw ( IOException )
void setNextTargetMsgSeqNum (int value) throw ( IOException )
void incrNextSenderMsgSeqNum () throw ( IOException )
void incrNextTargetMsgSeqNum () throw ( IOException )
void setCreationTime (const UtcTimeStamp &creationTime) throw ( IOException )
UtcTimeStamp getCreationTime () const throw ( IOException )
void reset () throw ( IOException )
void refresh () throw ( IOException )

Private Types

typedef std::map< int,
std::string > 
Messages

Private Attributes

Messages m_messages
int m_nextSenderMsgSeqNum
int m_nextTargetMsgSeqNum
UtcTimeStamp m_creationTime

Detailed Description

Memory based implementation of MessageStore.

This will lose all data on process terminition. This class should only be used for test applications, never in production.

Definition at line 96 of file MessageStore.h.


Member Typedef Documentation

typedef std::map< int, std::string > FIX::MemoryStore::Messages [private]

Definition at line 130 of file MessageStore.h.


Constructor & Destructor Documentation

Definition at line 99 of file MessageStore.h.


Member Function Documentation

void FIX::MemoryStore::get ( int  begin,
int  end,
std::vector< std::string > &  messages 
) const throw ( IOException ) [virtual]

Implements FIX::MessageStore.

Definition at line 47 of file MessageStore.cpp.

{
  messages.clear();
  Messages::const_iterator find = m_messages.find( begin );
  for ( ; find != m_messages.end() && find->first <= end; ++find )
    messages.push_back( find->second );
}
UtcTimeStamp FIX::MemoryStore::getCreationTime ( ) const throw ( IOException ) [inline, virtual]

Implements FIX::MessageStore.

Definition at line 119 of file MessageStore.h.

Referenced by FIX::FileStore::getCreationTime(), and FIX::FileStore::setSession().

  { return m_creationTime; }
int FIX::MemoryStore::getNextSenderMsgSeqNum ( ) const throw ( IOException ) [inline, virtual]

Implements FIX::MessageStore.

Definition at line 104 of file MessageStore.h.

Referenced by FIX::FileStore::getNextSenderMsgSeqNum().

  { return m_nextSenderMsgSeqNum; }
int FIX::MemoryStore::getNextTargetMsgSeqNum ( ) const throw ( IOException ) [inline, virtual]

Implements FIX::MessageStore.

Definition at line 106 of file MessageStore.h.

Referenced by FIX::FileStore::getNextTargetMsgSeqNum().

  { return m_nextTargetMsgSeqNum; }
void FIX::MemoryStore::incrNextSenderMsgSeqNum ( ) throw ( IOException ) [inline, virtual]

Implements FIX::MessageStore.

Definition at line 112 of file MessageStore.h.

Referenced by FIX::FileStore::incrNextSenderMsgSeqNum().

void FIX::MemoryStore::incrNextTargetMsgSeqNum ( ) throw ( IOException ) [inline, virtual]

Implements FIX::MessageStore.

Definition at line 114 of file MessageStore.h.

Referenced by FIX::FileStore::incrNextTargetMsgSeqNum().

void FIX::MemoryStore::refresh ( ) throw ( IOException ) [inline, virtual]

Implements FIX::MessageStore.

Definition at line 127 of file MessageStore.h.

{}
void FIX::MemoryStore::reset ( ) throw ( IOException ) [inline, virtual]
bool FIX::MemoryStore::set ( int  msgSeqNum,
const std::string &  msg 
) throw ( IOException ) [virtual]

Implements FIX::MessageStore.

Definition at line 40 of file MessageStore.cpp.

{
  m_messages[ msgSeqNum ] = msg;
  return true;
}
void FIX::MemoryStore::setCreationTime ( const UtcTimeStamp creationTime) throw ( IOException ) [inline]

Definition at line 117 of file MessageStore.h.

Referenced by FIX::FileStore::populateCache().

  { m_creationTime = creationTime; }
void FIX::MemoryStore::setNextSenderMsgSeqNum ( int  value) throw ( IOException ) [inline, virtual]

Implements FIX::MessageStore.

Definition at line 108 of file MessageStore.h.

Referenced by FIX::FileStore::populateCache().

  { m_nextSenderMsgSeqNum = value; }
void FIX::MemoryStore::setNextTargetMsgSeqNum ( int  value) throw ( IOException ) [inline, virtual]

Implements FIX::MessageStore.

Definition at line 110 of file MessageStore.h.

Referenced by FIX::FileStore::populateCache().

  { m_nextTargetMsgSeqNum = value; }

Member Data Documentation

Definition at line 135 of file MessageStore.h.

Definition at line 132 of file MessageStore.h.

Definition at line 133 of file MessageStore.h.

Definition at line 134 of file MessageStore.h.


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

Generated on Mon Sep 15 2014 01:23:57 for QuickFIX by doxygen 1.7.6.1 written by Dimitri van Heesch, © 1997-2001