Public Member Functions | Private Attributes | List of all members
FIX::FileStoreFactory Class Reference

Creates a file based implementation of MessageStore. More...

#include <FileStore.h>

Inheritance diagram for FIX::FileStoreFactory:
Inheritance graph
[legend]
Collaboration diagram for FIX::FileStoreFactory:
Collaboration graph
[legend]

Public Member Functions

 FileStoreFactory (const SessionSettings &settings)
 
 FileStoreFactory (const std::string &path)
 
MessageStorecreate (const SessionID &)
 
void destroy (MessageStore *)
 
- Public Member Functions inherited from FIX::MessageStoreFactory
virtual ~MessageStoreFactory ()
 

Private Attributes

std::string m_path
 
SessionSettings m_settings
 

Detailed Description

Creates a file based implementation of MessageStore.

Definition at line 56 of file FileStore.h.

Constructor & Destructor Documentation

◆ FileStoreFactory() [1/2]

FIX::FileStoreFactory::FileStoreFactory ( const SessionSettings settings)
inline

Definition at line 59 of file FileStore.h.

62  :<br>

◆ FileStoreFactory() [2/2]

FIX::FileStoreFactory::FileStoreFactory ( const std::string &  path)
inline

Definition at line 61 of file FileStore.h.

62  :<br>

Member Function Documentation

◆ create()

MessageStore * FIX::FileStoreFactory::create ( const SessionID s)
virtual

Implements FIX::MessageStoreFactory.

Definition at line 194 of file FileStore.cpp.

194 {
195  if ( fseek( m_msgFile, 0, SEEK_END ) )
196  throw IOException( "Cannot seek to end of " + m_msgFileName );
197  if ( fseek( m_headerFile, 0, SEEK_END ) )
198  throw IOException( "Cannot seek to end of " + m_headerFileName );
199 
200  long offset = ftell( m_msgFile );
201  if ( offset < 0 )
202  throw IOException( "Unable to get file pointer position from " + m_msgFileName );

◆ destroy()

void FIX::FileStoreFactory::destroy ( MessageStore pStore)
virtual

Implements FIX::MessageStoreFactory.

Definition at line 204 of file FileStore.cpp.

Member Data Documentation

◆ m_path

std::string FIX::FileStoreFactory::m_path
private

Definition at line 67 of file FileStore.h.

◆ m_settings

SessionSettings FIX::FileStoreFactory::m_settings
private

Definition at line 68 of file FileStore.h.


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

Generated on Wed Apr 29 2020 19:41:30 for QuickFIX by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2001