B2BITS FIX Antenna HFT  1.0.13
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | List of all members
CmiProductCatalog Class Reference

#include <cmi_symbols.h>

+ Collaboration diagram for CmiProductCatalog:

Public Member Functions

bool addSymbol (SimpleSessionI *session, Parser::LiteFixMessage &msg, bool &throttle)
 
void addSymbol (CmiTradeSessionId tradeSessionId, const char *underlyingSymbol, int underlyingSymbol_len, const char *optParams, int optParams_len, CmiProductKey cmiSymbol, unsigned secondsTs)
 
 CmiProductCatalog ()
 
std::string currYYYYMMAsString ()
 
void decrementOutstandingReqs ()
 
void finishedAddingSymbols (bool wasLoadedFromLiveSource)
 
int getOutstandingReqs ()
 
int getSymbolsLoadedCount ()
 
bool hasTodaysRecords ()
 
bool hasUnsavedData ()
 
void incrementOutstandingReqs ()
 
void init (const char *basepath, const char *prefix)
 
void initCommunication ()
 
bool isBusyDownloading ()
 
bool isLoadedFromFile ()
 
bool isLoadedFromLiveSource ()
 
void loadFromFile (const char *filepath)
 
void loadFromLatestFile ()
 
bool lookup (CmiTradeSessionId tradeSessionId, CmiProductKey key, CmiOption **sym)
 
bool lookup (CmiTradeSessionId tradeSessionId, CmiOption &sym, CmiProductKey *cmiSymbol)
 
void replaceAll (char *start, char *end, char pattern, char replChar)
 
void resetOutstandingReqs ()
 
void saveToFile ()
 
void saveToFile (const std::string &filepath)
 
void sendSecurityDefinitionRequest (SimpleSessionI *session)
 
void sendSecurityDefinitionRequest (SimpleSessionI *session, Parser::LiteFixMessage &msg)
 

Static Public Member Functions

static bool isSymbolClassDefMessage (Parser::LiteFixMessage &msg)
 

Public Attributes

std::string basepath_
 
volatile int currSymMap_
 
bool dirty_
 
bool hasTodaysRecords_
 
bool isLoadedFromFile_
 
bool isLoadedFromLiveSource_
 
int outstandingReqs_
 
std::string prefix_
 
boost::ptr_vector
< Parser::LiteFixMessage
reqMsg_
 
boost::ptr_vector
< Parser::LiteFixMessage
reqOptMsg_
 
unsigned requestId_
 
volatile int symbolsLoaded_
 
volatile int symbolsLoadedSinceLastTime_
 
rwlock symMap_locks_ [2]
 
CmiTradeSessionSymMap symMaps_ [2]
 
tape_allocator tapeAllocator_
 
volatile bool unsavedData_
 

Static Public Attributes

static const int MAX_OUSTANDING_PRODUCT_REQS = 5
 

Constructor & Destructor Documentation

CmiProductCatalog::CmiProductCatalog ( )
inline

Member Function Documentation

bool CmiProductCatalog::addSymbol ( SimpleSessionI session,
Parser::LiteFixMessage msg,
bool &  throttle 
)
inline

Referenced by loadFromFile().

void CmiProductCatalog::addSymbol ( CmiTradeSessionId  tradeSessionId,
const char *  underlyingSymbol,
int  underlyingSymbol_len,
const char *  optParams,
int  optParams_len,
CmiProductKey  cmiSymbol,
unsigned  secondsTs 
)
inline
std::string CmiProductCatalog::currYYYYMMAsString ( )
inline

References now().

Referenced by saveToFile().

void CmiProductCatalog::decrementOutstandingReqs ( )
inline

References outstandingReqs_.

void CmiProductCatalog::finishedAddingSymbols ( bool  wasLoadedFromLiveSource)
inline
int CmiProductCatalog::getOutstandingReqs ( )
inline

References outstandingReqs_.

int CmiProductCatalog::getSymbolsLoadedCount ( )
inline

References symbolsLoaded_.

bool CmiProductCatalog::hasTodaysRecords ( )
inline

References hasTodaysRecords_.

bool CmiProductCatalog::hasUnsavedData ( )
inline

References unsavedData_.

Referenced by isBusyDownloading().

void CmiProductCatalog::incrementOutstandingReqs ( )
inline

References outstandingReqs_.

void CmiProductCatalog::init ( const char *  basepath,
const char *  prefix 
)
inline
void CmiProductCatalog::initCommunication ( )
inline
bool CmiProductCatalog::isBusyDownloading ( )
inline

References hasUnsavedData().

bool CmiProductCatalog::isLoadedFromFile ( )
inline

References isLoadedFromFile_.

bool CmiProductCatalog::isLoadedFromLiveSource ( )
inline
static bool CmiProductCatalog::isSymbolClassDefMessage ( Parser::LiteFixMessage msg)
inlinestatic
void CmiProductCatalog::loadFromFile ( const char *  filepath)
inline
void CmiProductCatalog::loadFromLatestFile ( )
inline
bool CmiProductCatalog::lookup ( CmiTradeSessionId  tradeSessionId,
CmiProductKey  key,
CmiOption **  sym 
)
inline
bool CmiProductCatalog::lookup ( CmiTradeSessionId  tradeSessionId,
CmiOption sym,
CmiProductKey cmiSymbol 
)
inline

References currSymMap_, symMap_locks_, and symMaps_.

void CmiProductCatalog::replaceAll ( char *  start,
char *  end,
char  pattern,
char  replChar 
)
inline

Referenced by init().

void CmiProductCatalog::resetOutstandingReqs ( )
inline

References outstandingReqs_.

void CmiProductCatalog::saveToFile ( )
inline
void CmiProductCatalog::saveToFile ( const std::string &  filepath)
inline
void CmiProductCatalog::sendSecurityDefinitionRequest ( SimpleSessionI session)
inline
void CmiProductCatalog::sendSecurityDefinitionRequest ( SimpleSessionI session,
Parser::LiteFixMessage msg 
)
inline

Member Data Documentation

std::string CmiProductCatalog::basepath_
volatile int CmiProductCatalog::currSymMap_
bool CmiProductCatalog::dirty_
bool CmiProductCatalog::hasTodaysRecords_

Referenced by addSymbol(), hasTodaysRecords(), and init().

bool CmiProductCatalog::isLoadedFromFile_
bool CmiProductCatalog::isLoadedFromLiveSource_

Referenced by init(), and isLoadedFromLiveSource().

const int CmiProductCatalog::MAX_OUSTANDING_PRODUCT_REQS = 5
static
int CmiProductCatalog::outstandingReqs_
std::string CmiProductCatalog::prefix_
boost::ptr_vector<Parser::LiteFixMessage> CmiProductCatalog::reqMsg_
boost::ptr_vector<Parser::LiteFixMessage> CmiProductCatalog::reqOptMsg_
unsigned CmiProductCatalog::requestId_
volatile int CmiProductCatalog::symbolsLoaded_
volatile int CmiProductCatalog::symbolsLoadedSinceLastTime_

Referenced by addSymbol(), and init().

rwlock CmiProductCatalog::symMap_locks_[2]
CmiTradeSessionSymMap CmiProductCatalog::symMaps_[2]

Referenced by addSymbol(), lookup(), and saveToFile().

tape_allocator CmiProductCatalog::tapeAllocator_

Referenced by addSymbol().

volatile bool CmiProductCatalog::unsavedData_

Referenced by hasUnsavedData(), init(), and saveToFile().