NullStore.h
Go to the documentation of this file.
1 /* -*- C++ -*- */
2 
3 /****************************************************************************
4 ** Copyright (c) 2001-2014
5 **
6 ** This file is part of the QuickFIX FIX Engine
7 **
8 ** This file may be distributed under the terms of the quickfixengine.org
9 ** license as defined by quickfixengine.org and appearing in the file
10 ** LICENSE included in the packaging of this file.
11 **
12 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
13 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
14 **
15 ** See http://www.quickfixengine.org/LICENSE for licensing information.
16 **
17 ** Contact ask@quickfixengine.org if any conditions of this licensing are
18 ** not clear to you.
19 **
20 ****************************************************************************/
21 
22 #ifndef FIX_NULLSTORE_H
23 #define FIX_NULLSTORE_H
24 
25 #ifdef _MSC_VER
26 #pragma warning( disable : 4503 4355 4786 4290 )
27 #endif
28 
29 #include "MessageStore.h"
30 #include "SessionSettings.h"
31 #include <string>
32 
33 namespace FIX
34 {
35 class Session;
36 
44 {
45 public:
46  MessageStore* create( const SessionID& );
47  void destroy( MessageStore* );
48 };
58 class NullStore : public MessageStore
59 {
60 public:
62 
63  bool set( int, const std::string& ) throw ( IOException );
64  void get( int, int, std::vector < std::string > & ) const throw ( IOException );
65 
66  int getNextSenderMsgSeqNum() const throw ( IOException )
67  { return m_nextSenderMsgSeqNum; }
68  int getNextTargetMsgSeqNum() const throw ( IOException )
69  { return m_nextTargetMsgSeqNum; }
70  void setNextSenderMsgSeqNum( int value ) throw ( IOException )
71  { m_nextSenderMsgSeqNum = value; }
72  void setNextTargetMsgSeqNum( int value ) throw ( IOException )
73  { m_nextTargetMsgSeqNum = value; }
78 
79  void setCreationTime( const UtcTimeStamp& creationTime ) throw ( IOException )
80  { m_creationTime = creationTime; }
82  { return m_creationTime; }
83 
84  void reset() throw ( IOException )
85  {
88  }
89  void refresh() throw ( IOException ) {}
90 
91 private:
95 };
96 }
97 
98 #endif // FIX_NULLSTORE_H
99 
UtcTimeStamp m_creationTime
Definition: NullStore.h:94
int getNextSenderMsgSeqNum() const
Definition: NullStore.h:66
int getNextTargetMsgSeqNum() const
Definition: NullStore.h:68
void setNextTargetMsgSeqNum(int value)
Definition: NullStore.h:72
int m_nextTargetMsgSeqNum
Definition: NullStore.h:93
MessageStore * create(const SessionID &)
Definition: NullStore.cpp:31
Null implementation of MessageStore.
Definition: NullStore.h:43
void destroy(MessageStore *)
Definition: NullStore.cpp:36
void setNextSenderMsgSeqNum(int value)
Definition: NullStore.h:70
void incrNextSenderMsgSeqNum()
Definition: NullStore.h:74
int m_nextSenderMsgSeqNum
Definition: NullStore.h:92
bool set(int, const std::string &)
Definition: NullStore.cpp:41
Null implementation of MessageStore.
Definition: NullStore.h:58
void refresh()
Definition: NullStore.h:89
void get(int, int, std::vector< std::string > &) const
Definition: NullStore.cpp:47
UtcTimeStamp getCreationTime() const
Definition: NullStore.h:81
void setCreationTime(const UtcTimeStamp &creationTime)
Definition: NullStore.h:79
void reset()
Definition: NullStore.h:84
This interface must be implemented to store and retrieve messages and sequence numbers.
Definition: MessageStore.h:66
This interface must be implemented to create a MessageStore.
Definition: MessageStore.h:41
Date and Time represented in UTC.
Definition: FieldTypes.h:399
Unique session id consists of BeginString, SenderCompID and TargetCompID.
Definition: SessionID.h:30
void incrNextTargetMsgSeqNum()
Definition: NullStore.h:76
IO Error.
Definition: Exceptions.h:238

Generated on Sat Mar 29 2014 15:13:32 for QuickFIX by doxygen 1.8.5 written by Dimitri van Heesch, © 1997-2001