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]

## 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 )
Public Member Functions inherited from FIX::MessageStore
virtual | ~MessageStore ()

## 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 113 of file MessageStore.h.

## Member Typedef Documentation

## Messages

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

private

Definition at line 147 of file MessageStore.h.

## Constructor & Destructor Documentation

## MemoryStore()

FIX::MemoryStore::MemoryStore | ( |  | ) |

inline

Definition at line 116 of file MessageStore.h.

{ m_creationTime = creationTime; }

## Member Function Documentation

## get()

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

virtual

Implements FIX::MessageStore.

Definition at line 64 of file MessageStore.cpp.

{
m_pFactory->destroy( pStore );
}
bool MessageStoreExceptionWrapper::set( int num, const std::string& msg, bool& threw, IOException& ex )
{
threw = false;
try { return m_pStore->set( num, msg ); }

References FIX::MessageStoreFactory::destroy(), and FIX::MessageStoreFactoryExceptionWrapper::m_pFactory.

## getCreationTime()

UtcTimeStamp FIX::MemoryStore::getCreationTime | ( |  | ) | const
throw | ( | IOException
| ) |  |

inline virtual

Implements FIX::MessageStore.

Definition at line 136 of file MessageStore.h.

{

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

## getNextSenderMsgSeqNum()

int FIX::MemoryStore::getNextSenderMsgSeqNum | ( |  | ) | const
throw | ( | IOException
| ) |  |

inline virtual

Implements FIX::MessageStore.

Definition at line 121 of file MessageStore.h.

{

## getNextTargetMsgSeqNum()

int FIX::MemoryStore::getNextTargetMsgSeqNum | ( |  | ) | const
throw | ( | IOException
| ) |  |

inline virtual

Implements FIX::MessageStore.

Definition at line 123 of file MessageStore.h.

{
m_nextSenderMsgSeqNum = 1; m_nextTargetMsgSeqNum = 1;

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

## incrNextSenderMsgSeqNum()

void FIX::MemoryStore::incrNextSenderMsgSeqNum | ( |  | ) |
throw | ( | IOException
| ) |  |

inline virtual

Implements FIX::MessageStore.

Definition at line 129 of file MessageStore.h.

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

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

## incrNextTargetMsgSeqNum()

void FIX::MemoryStore::incrNextTargetMsgSeqNum | ( |  | ) |
throw | ( | IOException
| ) |  |

inline virtual

Implements FIX::MessageStore.

Definition at line 131 of file MessageStore.h.

{

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

## refresh()

void FIX::MemoryStore::refresh | ( |  | ) |
throw | ( | IOException
| ) |  |

inline virtual

Implements FIX::MessageStore.

Definition at line 144 of file MessageStore.h.

: m_pFactory( pFactory ) {}

## reset()

void FIX::MemoryStore::reset | ( |  | ) |
throw | ( | IOException
| ) |  |

inline virtual

Implements FIX::MessageStore.

Definition at line 139 of file MessageStore.h.

{
private:
MessageStoreFactory* m_pFactory;
public:
MessageStoreFactoryExceptionWrapper( MessageStoreFactory* pFactory )

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

## set()

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

virtual

Implements FIX::MessageStore.

Definition at line 57 of file MessageStore.cpp.

{
threw = false;
try { return m_pFactory->create( sessionID ); }
catch ( ConfigError & e ) { threw = true; ex = e; return 0; }
}

References FIX::MessageStoreFactory::create(), and FIX::MessageStoreFactoryExceptionWrapper::m_pFactory.

## setCreationTime()

void FIX::MemoryStore::setCreationTime | ( | const UtcTimeStamp & | creationTime | ) |
throw | ( | IOException
| ) |  |

inline

Definition at line 134 of file MessageStore.h.

{

## setNextSenderMsgSeqNum()

void FIX::MemoryStore::setNextSenderMsgSeqNum | ( | int | value | ) |
throw | ( | IOException
| ) |  |

inline virtual

Implements FIX::MessageStore.

Definition at line 125 of file MessageStore.h.

{}

## setNextTargetMsgSeqNum()

void FIX::MemoryStore::setNextTargetMsgSeqNum | ( | int | value | ) |
throw | ( | IOException
| ) |  |

inline virtual

Implements FIX::MessageStore.

Definition at line 127 of file MessageStore.h.

{}

## Member Data Documentation

## m_creationTime

UtcTimeStamp FIX::MemoryStore::m_creationTime

private

Definition at line 152 of file MessageStore.h.

## m_messages

Messages FIX::MemoryStore::m_messages

private

Definition at line 149 of file MessageStore.h.

## m_nextSenderMsgSeqNum

int FIX::MemoryStore::m_nextSenderMsgSeqNum

private

Definition at line 150 of file MessageStore.h.

## m_nextTargetMsgSeqNum

int FIX::MemoryStore::m_nextTargetMsgSeqNum

private

Definition at line 151 of file MessageStore.h.

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

- MessageStore.h
- MessageStore.cpp

FIX::MemoryStore::Messages
std::map< int, std::string > Messages
Definition: MessageStore.h:147
FIX::MessageStoreExceptionWrapper::set
bool set(int, const std::string &, bool &, IOException &)
Definition: MessageStore.cpp:86
FIX::MemoryStore::m_nextSenderMsgSeqNum
int m_nextSenderMsgSeqNum
Definition: MessageStore.h:150
FIX::MemoryStore::m_creationTime
UtcTimeStamp m_creationTime
Definition: MessageStore.h:152
FIX::MemoryStore::m_nextTargetMsgSeqNum
int m_nextTargetMsgSeqNum
Definition: MessageStore.h:151