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

## Member Typedef Documentation

## Messages

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

private

Definition at line 130 of file MessageStore.h.

## Constructor & Destructor Documentation

## MemoryStore()

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

inline

Definition at line 99 of file MessageStore.h.

: m_nextSenderMsgSeqNum( 1 ), m_nextTargetMsgSeqNum( 1 ) {}
FIX::MemoryStore::m_nextSenderMsgSeqNum
int m_nextSenderMsgSeqNum
Definition: MessageStore.h:133
FIX::MemoryStore::m_nextTargetMsgSeqNum
int m_nextTargetMsgSeqNum
Definition: MessageStore.h:134

## 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 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 );
}
FIX::MemoryStore::m_messages
Messages m_messages
Definition: MessageStore.h:132

## getCreationTime()

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

inline virtual

Implements FIX::MessageStore.

Definition at line 119 of file MessageStore.h.

{ return m_creationTime; }
FIX::MemoryStore::m_creationTime
UtcTimeStamp m_creationTime
Definition: MessageStore.h:135

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

## getNextSenderMsgSeqNum()

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

inline virtual

Implements FIX::MessageStore.

Definition at line 104 of file MessageStore.h.

{ return m_nextSenderMsgSeqNum; }

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

## getNextTargetMsgSeqNum()

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

inline virtual

Implements FIX::MessageStore.

Definition at line 106 of file MessageStore.h.

{ return m_nextTargetMsgSeqNum; }

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

## incrNextSenderMsgSeqNum()

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

inline virtual

Implements FIX::MessageStore.

Definition at line 112 of file MessageStore.h.

{ ++m_nextSenderMsgSeqNum; }

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

## incrNextTargetMsgSeqNum()

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

inline virtual

Implements FIX::MessageStore.

Definition at line 114 of file MessageStore.h.

{ ++m_nextTargetMsgSeqNum; }

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

## refresh()

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

inline virtual

Implements FIX::MessageStore.

Definition at line 127 of file MessageStore.h.

{}

## reset()

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

inline virtual

Implements FIX::MessageStore.

Definition at line 122 of file MessageStore.h.

{
m_nextSenderMsgSeqNum = 1; m_nextTargetMsgSeqNum = 1;
m_messages.clear(); m_creationTime.setCurrent();
}
FIX::UtcTimeStamp::setCurrent
void setCurrent()
Definition: FieldTypes.h:626

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

## set()

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;
}

## setCreationTime()

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

inline

Definition at line 117 of file MessageStore.h.

{ m_creationTime = creationTime; }

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

## setNextSenderMsgSeqNum()

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

inline virtual

Implements FIX::MessageStore.

Definition at line 108 of file MessageStore.h.

{ m_nextSenderMsgSeqNum = value; }

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

## setNextTargetMsgSeqNum()

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

inline virtual

Implements FIX::MessageStore.

Definition at line 110 of file MessageStore.h.

{ m_nextTargetMsgSeqNum = value; }

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

## Member Data Documentation

## m_creationTime

UtcTimeStamp FIX::MemoryStore::m_creationTime

private

Definition at line 135 of file MessageStore.h.

## m_messages

Messages FIX::MemoryStore::m_messages

private

Definition at line 132 of file MessageStore.h.

## m_nextSenderMsgSeqNum

int FIX::MemoryStore::m_nextSenderMsgSeqNum

private

Definition at line 133 of file MessageStore.h.

## m_nextTargetMsgSeqNum

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:

- MessageStore.h
- MessageStore.cpp