B2BITS FIX Antenna HFT  1.0.17
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | Protected Member Functions | List of all members
FixDictionary2::Dictionary Class Reference

Represents Dictionary interface. More...

#include <B2BITS_Dictionary.h>

+ Inheritance diagram for FixDictionary2::Dictionary:
+ Collaboration diagram for FixDictionary2::Dictionary:

Public Types

typedef std::map< std::string,
ProtocolT::Ref
ProtocolByNameMap
 
- Public Types inherited from FixDictionary2::Item
enum  ItemName {
  ITEM_FIELD, ITEM_FIELDTYPE, ITEM_FIELDREF, ITEM_REPEATINGGROUP,
  ITEM_BLOCK, ITEM_BLOCKREF, ITEM_VALBLOCK, ITEM_MESSAGE,
  ITEM_PROTOCOL, ITEM_DICTIONARY
}
 Dictionary Item Names. More...
 

Public Member Functions

ProtocolT::Ptr createProtocol (std::string const &name, std::string const &version, std::string const &title)
 Creates new protocol using name, version and title. More...
 
 Dictionary ()
 Constructor. More...
 
 Dictionary (std::string const &xmlFilePath, bool loadComments=false)
 Constructor. More...
 
ProtocolT::CPtr getProtocol (std::string const &name) const throw ()
 Returns registered protocol using protocol id. More...
 
ProtocolByNameMap const * getProtocols () const throw ()
 Returns all protocols. More...
 
virtual ItemName itemName () const throw ()
 Returns the ItemName of object. More...
 
void load (std::string const &xmlFilePath, bool loadComments=false)
 Loads protocols from either FIX Dictionary file or FIX protocol customization file. More...
 
void loadFromString (std::string const &xmlString, bool loadComments=false)
 Loads protocols from thestring. More...
 
void registerProtocol (ProtocolT::Ptr protocol)
 Register new protocol in Dictionary. More...
 
- Public Member Functions inherited from FixDictionary2::Item
virtual BlockT::Ptr toBlock ()
 Try downcast to Block class. More...
 
virtual BlockT::CPtr toBlock () const
 Try downcast to Block class. More...
 
virtual BlockRefT::Ptr toBlockRef ()
 Try downcast to BlockRef class. More...
 
virtual BlockRefT::CPtr toBlockRef () const
 Try downcast to BlockRef class. More...
 
virtual FieldT::Ptr toField ()
 Try downcast to Field class. More...
 
virtual FieldT::CPtr toField () const
 Try downcast to Field class. More...
 
virtual FieldRefT::Ptr toFieldRef ()
 Try downcast to FieldRef class. More...
 
virtual FieldRefT::CPtr toFieldRef () const
 Try downcast to FieldRef class. More...
 
virtual FieldTypeT::Ptr toFieldType ()
 Try downcast to FieldType class. More...
 
virtual FieldTypeT::CPtr toFieldType () const
 Try downcast to FieldType class. More...
 
virtual MessageT::Ptr toMessage ()
 Try downcast to Message class. More...
 
virtual MessageT::CPtr toMessage () const
 Try downcast to Message class. More...
 
virtual MessageItemT::Ptr toMessageItem ()
 Try downcast to MessageItem class. More...
 
virtual MessageItemT::CPtr toMessageItem () const
 Try downcast to MessageItem class. More...
 
virtual ProtocolT::Ptr toProtocol ()
 Try downcast to Protocol class. More...
 
virtual ProtocolT::CPtr toProtocol () const
 Try downcast to Protocol class. More...
 
virtual RepeatingGroupT::Ptr toRepeatingGroup ()
 Try downcast to RepeatingGroup class. More...
 
virtual RepeatingGroupT::CPtr toRepeatingGroup () const
 Try downcast to RepeatingGroup class. More...
 
- Public Member Functions inherited from Utils::ReferenceCounter
virtual bool addRef () const throw ()
 Increments reference counter. More...
 
long decrement () const throw ()
 
virtual long getNRef () const throw ()
 Returns the current value of the reference counter. More...
 
 ReferenceCounter () throw ()
 Constructor. More...
 
virtual long release () const throw ()
 Decrements reference counter. More...
 

Protected Member Functions

 ~Dictionary () throw ()
 Destructor. More...
 
- Protected Member Functions inherited from Utils::ReferenceCounter
virtual ~ReferenceCounter ()
 Destructor. More...
 

Additional Inherited Members

- Protected Attributes inherited from Utils::ReferenceCounter
volatile System::u32 m_nRef
 The counter. More...
 

Detailed Description

Represents Dictionary interface.

Member Typedef Documentation

Constructor & Destructor Documentation

FixDictionary2::Dictionary::Dictionary ( )

Constructor.

FixDictionary2::Dictionary::Dictionary ( std::string const &  xmlFilePath,
bool  loadComments = false 
)
explicit

Constructor.

FixDictionary2::Dictionary::~Dictionary ( )
throw (
)
protected

Destructor.

Member Function Documentation

ProtocolT::Ptr FixDictionary2::Dictionary::createProtocol ( std::string const &  name,
std::string const &  version,
std::string const &  title 
)

Creates new protocol using name, version and title.

Returns
pointer to new created protocol.
ProtocolT::CPtr FixDictionary2::Dictionary::getProtocol ( std::string const &  name) const
throw (
)

Returns registered protocol using protocol id.

If protocol by given name is unavailable, method returns null.

Referenced by FixProtocols::createCustomProtocols().

ProtocolByNameMap const* FixDictionary2::Dictionary::getProtocols ( ) const
throw (
)

Returns all protocols.

Referenced by FixProtocols::loadProtocolFile().

virtual ItemName FixDictionary2::Dictionary::itemName ( ) const
throw (
)
virtual

Returns the ItemName of object.

Returns
ItemName of Object

Implements FixDictionary2::Item.

void FixDictionary2::Dictionary::load ( std::string const &  xmlFilePath,
bool  loadComments = false 
)

Loads protocols from either FIX Dictionary file or FIX protocol customization file.

void FixDictionary2::Dictionary::loadFromString ( std::string const &  xmlString,
bool  loadComments = false 
)

Loads protocols from thestring.

void FixDictionary2::Dictionary::registerProtocol ( ProtocolT::Ptr  protocol)

Register new protocol in Dictionary.

Parameters
protocolProtocol for registering
Exceptions
UtilsExceptionif protocol with given id is already registered