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 39 of file FileStore.h.

Constructor & Destructor Documentation

◆ FileStoreFactory() [1/2]

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

Definition at line 42 of file FileStore.h.

43 : m_settings( settings ) {};
SessionSettings m_settings
Definition: FileStore.h:51

◆ FileStoreFactory() [2/2]

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

Definition at line 44 of file FileStore.h.

References create(), and destroy().

45 : m_path( path ) {};
std::string m_path
Definition: FileStore.h:50

Member Function Documentation

◆ create()

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

Implements FIX::MessageStoreFactory.

Definition at line 177 of file FileStore.cpp.

References FIX::FILE_STORE_PATH, FIX::FileStore::FileStore(), and FIX::Dictionary::getString().

Referenced by FileStoreFactory().

178 {
179  if ( m_path.size() ) return new FileStore( m_path, s );
180 
181  std::string path;
182  Dictionary settings = m_settings.get( s );
183  path = settings.getString( FILE_STORE_PATH );
184  return new FileStore( path, s );
185 }
const char FILE_STORE_PATH[]
const Dictionary & get(const SessionID &) const
Get a dictionary for a session.
SessionSettings m_settings
Definition: FileStore.h:51
std::string m_path
Definition: FileStore.h:50
std::string getString(const std::string &, bool capitalize=false) const
Get a value as a string.
Definition: Dictionary.cpp:32

◆ destroy()

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

Implements FIX::MessageStoreFactory.

Definition at line 187 of file FileStore.cpp.

Referenced by FileStoreFactory().

188 {
189  delete pStore;
190 }

Member Data Documentation

◆ m_path

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

Definition at line 50 of file FileStore.h.

◆ m_settings

SessionSettings FIX::FileStoreFactory::m_settings
private

Definition at line 51 of file FileStore.h.


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

Generated on Wed Aug 28 2019 14:13:46 for QuickFIX by doxygen 1.8.13 written by Dimitri van Heesch, © 1997-2001