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 
This interface must be implemented to create a MessageStore.
Definition: MessageStore.h:42
This interface must be implemented to store and retrieve messages and sequence numbers.
Definition: MessageStore.h:67
Null implementation of MessageStore.
Definition: NullStore.h:44
void destroy(MessageStore *)
Definition: NullStore.cpp:36
MessageStore * create(const SessionID &)
Definition: NullStore.cpp:31
Null implementation of MessageStore.
Definition: NullStore.h:59
void refresh()
Definition: NullStore.h:89
bool set(int, const std::string &)
Definition: NullStore.cpp:41
int getNextSenderMsgSeqNum() const
Definition: NullStore.h:66
UtcTimeStamp getCreationTime() const
Definition: NullStore.h:81
int getNextTargetMsgSeqNum() const
Definition: NullStore.h:68
void incrNextSenderMsgSeqNum()
Definition: NullStore.h:74
int m_nextTargetMsgSeqNum
Definition: NullStore.h:93
UtcTimeStamp m_creationTime
Definition: NullStore.h:94
void setCreationTime(const UtcTimeStamp &creationTime)
Definition: NullStore.h:79
void get(int, int, std::vector< std::string > &) const
Definition: NullStore.cpp:47
int m_nextSenderMsgSeqNum
Definition: NullStore.h:92
void setNextTargetMsgSeqNum(int value)
Definition: NullStore.h:72
void reset()
Definition: NullStore.h:84
void incrNextTargetMsgSeqNum()
Definition: NullStore.h:76
void setNextSenderMsgSeqNum(int value)
Definition: NullStore.h:70
Unique session id consists of BeginString, SenderCompID and TargetCompID.
Definition: SessionID.h:31
Date and Time represented in UTC.
Definition: FieldTypes.h:583
Definition: Acceptor.cpp:35

Generated on Wed Nov 24 2021 09:55:53 for QuickFIX by doxygen 1.9.1 written by Dimitri van Heesch, © 1997-2001