Index Source Files Annotated Class List Alphabetical Class List Class Hierarchy Graphical Class Hierarchy

# FIX::MemoryStore Class Reference

Memory based implementation of MessageStore. More...

`#include <MessageStore.h>`

Inheritance diagram for FIX::MemoryStore:
[legend]
Collaboration diagram for FIX::MemoryStore:
[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

FIX::MemoryStore::MemoryStore | ( |  | ) | `[inline]`

Definition at line 99 of file MessageStore.h.

    00099 : m_nextSenderMsgSeqNum( 1 ), m_nextTargetMsgSeqNum( 1 ) {}

## 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 51 of file MessageStore.cpp.

References QF_STACK_POP, and QF_STACK_PUSH.

    00054 { QF_STACK_PUSH(MemoryStore::get)
    00055
    00056   messages.clear();
    00057   Messages::const_iterator find = m_messages.find( begin );
    00058   for ( ; find != m_messages.end() && find->first <= end; ++find )
    00059     messages.push_back( find->second );
    00060
    00061   QF_STACK_POP
    00062 }

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().

    00120   { 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().

    00105   { 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().

    00107   { 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().

    00113   { ++m_nextSenderMsgSeqNum; }

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

Implements FIX::MessageStore.

Definition at line 114 of file MessageStore.h.

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

    00115   { ++m_nextTargetMsgSeqNum; }

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

Implements FIX::MessageStore.

Definition at line 127 of file MessageStore.h.

    00127 {}

void FIX::MemoryStore::reset | ( |  | ) | throw ( IOException )`[inline, virtual]`

Implements FIX::MessageStore.

Definition at line 122 of file MessageStore.h.

Referenced by FIX::FileStore::refresh(), and FIX::FileStore::reset().

    00123   {
    00124     m_nextSenderMsgSeqNum = 1; m_nextTargetMsgSeqNum = 1;
    00125     m_messages.clear(); m_creationTime.setCurrent();
    00126   }

bool FIX::MemoryStore::set | ( | int | msgSeqNum,
|  | const std::string & | msg |
| ) |  |  | throw ( IOException )`[virtual]`

Implements FIX::MessageStore.

Definition at line 43 of file MessageStore.cpp.

References QF_STACK_POP, and QF_STACK_PUSH.

    00045 { QF_STACK_PUSH(MemoryStore::set)
    00046   m_messages[ msgSeqNum ] = msg;
    00047   return true;
    00048   QF_STACK_POP
    00049 }

void FIX::MemoryStore::setCreationTime | ( | const UtcTimeStamp & | creationTime | ) | throw ( IOException )`[inline]`

Definition at line 117 of file MessageStore.h.

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

    00118   { 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().

    00109   { 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().

    00111   { m_nextTargetMsgSeqNum = value; }

## Member Data Documentation

UtcTimeStamp FIX::MemoryStore::m_creationTime`[private]`

Definition at line 135 of file MessageStore.h.

Messages FIX::MemoryStore::m_messages`[private]`

Definition at line 132 of file MessageStore.h.

int FIX::MemoryStore::m_nextSenderMsgSeqNum`[private]`

Definition at line 133 of file MessageStore.h.

int FIX::MemoryStore::m_nextTargetMsgSeqNum`[private]`

Definition at line 134 of file MessageStore.h.

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

- /home/omiller/Development/autobuild/quickfix/src/C++/MessageStore.h
- /home/omiller/Development/autobuild/quickfix/src/C++/MessageStore.cpp