B2BITS FIX Antenna C++ 2.32.0
Loading...
Searching...
No Matches
Classes | Public Types | Public Member Functions | Protected Member Functions | Friends | 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:

Classes

struct  DictionaryInfo
 Describes loaded dictionary's attributes for later use for creating protocols and sessions. More...
 

Public Types

typedef std::vector< DictionaryInfoDictionariesInfo
 
typedef std::map< std::string, ProtocolT::RefProtocolByNameMap
 Protocol by name map.
 
typedef std::shared_ptr< ProtocolByNameMap const > ProtocolByNameMapPtr
 
typedef std::list< std::string > Warnings
 
- 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.
 
 Dictionary ()
 Constructor.
 
 Dictionary (std::string const &xmlFilePath, bool loadComments=false)
 Constructor.
 
ProtocolT::CPtr getProtocol (std::string const &name) const throw ()
 Returns registered protocol using protocol id.
 
ProtocolByNameMapPtr getProtocols () const throw ()
 Returns all protocols.
 
const WarningsgetWarnings () const
 Get duplicates (if any)
 
virtual ItemName itemName () const throw ()
 Returns the ItemName of object.
 
DictionariesInfo load (std::string const &xmlFilePath, bool loadComments=false, bool keepXmlInCommentsS=false, bool allowUpdating=true)
 Loads protocols from either FIX Dictionary file or FIX protocol customization file.
 
DictionariesInfo loadFromString (std::string const &xmlString, bool loadComments=false, bool keepXmlInComments=false, bool allowUpdating=true)
 Loads protocols from the string.
 
void registerProtocol (ProtocolT::Ptr protocol)
 Register new protocol in Dictionary.
 
- Public Member Functions inherited from FixDictionary2::Item
ItemName getItemName () const throw ()
 Returns the ItemName of object.
 
 Item ()
 Default constructor.
 
 Item (Item const &obj)
 Copy constructor.
 
Itemoperator= (Item const &obj)
 Assign operator.
 
virtual BlockT::Ptr toBlock ()
 Try downcast to Block class.
 
virtual BlockT::CPtr toBlock () const
 Try downcast to Block class.
 
virtual BlockRefT::Ptr toBlockRef ()
 Try downcast to BlockRef class.
 
virtual BlockRefT::CPtr toBlockRef () const
 Try downcast to BlockRef class.
 
virtual FieldT::Ptr toField ()
 Try downcast to Field class.
 
virtual FieldT::CPtr toField () const
 Try downcast to Field class.
 
virtual FieldRefT::Ptr toFieldRef ()
 Try downcast to FieldRef class.
 
virtual FieldRefT::CPtr toFieldRef () const
 Try downcast to FieldRef class.
 
virtual FieldTypeT::Ptr toFieldType ()
 Try downcast to FieldType class.
 
virtual FieldTypeT::CPtr toFieldType () const
 Try downcast to FieldType class.
 
virtual MessageT::Ptr toMessage ()
 Try downcast to Message class.
 
virtual MessageT::CPtr toMessage () const
 Try downcast to Message class.
 
virtual MessageItemT::Ptr toMessageItem ()
 Try downcast to MessageItem class.
 
virtual MessageItemT::CPtr toMessageItem () const
 Try downcast to MessageItem class.
 
virtual ProtocolT::Ptr toProtocol ()
 Try downcast to Protocol class.
 
virtual ProtocolT::CPtr toProtocol () const
 Try downcast to Protocol class.
 
virtual RepeatingGroupT::Ptr toRepeatingGroup ()
 Try downcast to RepeatingGroup class.
 
virtual RepeatingGroupT::CPtr toRepeatingGroup () const
 Try downcast to RepeatingGroup class.
 
- Public Member Functions inherited from Utils::ReferenceCounter
virtual bool addRef () const throw ()
 Increments reference counter.
 
virtual long getNRef () const throw ()
 Returns the current value of the reference counter.
 
 ReferenceCounter () throw ()
 Constructor.
 
virtual long release () const throw ()
 Decrements reference counter.
 

Protected Member Functions

 ~Dictionary () throw ()
 Destructor.
 
- Protected Member Functions inherited from Utils::ReferenceCounter
long decrement () const throw ()
 Decrements counter and returns new counter value.
 
long increment () const throw ()
 Increments counter and returns new counter value.
 
virtual ~ReferenceCounter ()
 Destructor.
 

Friends

struct DictionaryImpl
 

Detailed Description

Represents Dictionary interface.

Member Typedef Documentation

◆ DictionariesInfo

◆ ProtocolByNameMap

Protocol by name map.

◆ ProtocolByNameMapPtr

◆ Warnings

typedef std::list<std::string> FixDictionary2::Dictionary::Warnings

Constructor & Destructor Documentation

◆ Dictionary() [1/2]

FixDictionary2::Dictionary::Dictionary ( )

Constructor.

◆ Dictionary() [2/2]

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

Constructor.

◆ ~Dictionary()

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

Destructor.

Member Function Documentation

◆ createProtocol()

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.

◆ getProtocol()

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.

◆ getProtocols()

ProtocolByNameMapPtr FixDictionary2::Dictionary::getProtocols ( ) const
throw ( )

Returns all protocols.

◆ getWarnings()

const Warnings & FixDictionary2::Dictionary::getWarnings ( ) const

Get duplicates (if any)

◆ itemName()

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

Returns the ItemName of object.

Returns
ItemName of Object

Implements FixDictionary2::Item.

◆ load()

DictionariesInfo FixDictionary2::Dictionary::load ( std::string const & xmlFilePath,
bool loadComments = false,
bool keepXmlInCommentsS = false,
bool allowUpdating = true )

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

Parameters
allowUpdatingSet to allow patching already loaded dictionaries
Returns
A vector of descriptions of loaded dictionaries

◆ loadFromString()

DictionariesInfo FixDictionary2::Dictionary::loadFromString ( std::string const & xmlString,
bool loadComments = false,
bool keepXmlInComments = false,
bool allowUpdating = true )

Loads protocols from the string.

Parameters
allowUpdatingSet to allow patching already loaded dictionaries
Returns
A vector of descriptions of loaded dictionaries

◆ registerProtocol()

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

Register new protocol in Dictionary.

Parameters
protocolProtocol for registering
Exceptions
Utils::Exceptionif protocol with given id is already registered

Friends And Related Symbol Documentation

◆ DictionaryImpl

friend struct DictionaryImpl
friend