B2BITS FIX Antenna C++ 2.32.0
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Protected Member Functions | List of all members
FixDictionary2::Protocol Class Reference

Represents Protocol interface. More...

#include <B2BITS_Protocol.h>

+ Inheritance diagram for FixDictionary2::Protocol:
+ Collaboration diagram for FixDictionary2::Protocol:

Public Types

typedef std::map< std::string, BlockT::RefBlocksByIDMap
 
typedef std::map< std::string, MessageT::RefMessagesByTypeMap
 Messages by type map.
 
- 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

void addBlock (BlockT::Ptr block)
 Adds block to the protocol.
 
void addField (FieldT::Ptr field)
 Adds field to the protocol.
 
void addFieldType (FieldTypeT::Ptr type)
 Adds field type to the protocol.
 
void addFieldTypes (FieldTypeT::RefArray types, std::size_t size)
 Adds field types to the protocol.
 
void addFieldTypes (std::list< FieldTypeT::Ref > *types)
 Adds field types to the protocol.
 
void addMessage (MessageT::Ptr msg)
 Adds message to the protocol.
 
void addValBlock (ValBlockT::Ptr valBlock)
 Adds value block to the protocol.
 
ProtocolT::Ptr clone () const
 Make copy of object.
 
std::string const & description () const throw ()
 Returns description of the protocol.
 
BlockT::CPtr getBlock (std::string const &id) const throw ()
 Find block in protocol by id.
 
BlocksByIDMap const * getBlocks () const throw ()
 Returns block's set used in protocol.
 
std::string const & getDescription () const throw ()
 Returns description of the protocol.
 
FieldT::CPtr getField (int tag) const throw ()
 Find field in protocol by tag.
 
FieldT::CPtr getField (std::string const &name) const throw ()
 Find field in protocol by name.
 
Utils::Emptily< Engine::AsciiStringgetFieldNameByTag (const System::u32 tag) const
 Returns tag name according to tag number.
 
std::size_t getFields (FieldT::CRefArray *fields) const throw ()
 Returns fields registered in protocol.
 
Utils::Emptily< System::u32 > getFieldTagByName (std::string const &name) const
 Returns tag number according to tag's name.
 
FieldTypeT::Ptr getFieldType (std::string const &name) throw ()
 Returns field type by its name.
 
FieldTypeT::CPtr getFieldType (std::string const &name) const throw ()
 Finds FieldType in protocol by name.
 
std::map< std::string, FieldTypeT::Ref > const * getFieldTypes () const throw ()
 Returns field's types registered in protocol.
 
std::string const & getId () const throw ()
 Returns name of the Protocol, unique identifier.
 
MessageT::CPtr getMessage (std::string const &msgType) const throw ()
 Find message in protocol by message type.
 
MessagesByTypeMap const * getMessages () const throw ()
 Returns messages registered in protocol.
 
std::string const & getName () const throw ()
 Returns name of the Protocol, unique identifier.
 
std::string const & getTitle () const throw ()
 Returns name of Protocol.
 
ValBlockT::CPtr getValBlock (std::string const &id) const throw ()
 Finds ValBlock in protocol by id.
 
std::map< std::string, ValBlockT::Ref > const * getValBocks () const throw ()
 Returns messages registered in protocol.
 
std::string const & getVersion () const throw ()
 Returns base type of Protocol.
 
std::string const & id () const throw ()
 Returns name of the Protocol, unique identifier.
 
virtual ItemName itemName () const throw ()
 Returns the ItemName of object.
 
std::string const & name () const throw ()
 Returns name of the Protocol, unique identifier.
 
 Protocol (std::string const &name, std::string const &version, std::string const &title)
 Constructor.
 
void removeField (int tag)
 Removes field from the protocol.
 
void removeMessage (std::string const &msgType)
 Removes given message.
 
void save (std::string const &filePath) const
 Stores given protocol into XML file.
 
void setDescription (std::string const &value)
 Assigns description of the protocol.
 
ProtocolT::Ptr shallowClone (std::string const &name, std::string const &title) const
 Makes shallow copy of object.
 
std::string const & title () const throw ()
 Returns name of Protocol.
 
virtual ProtocolT::Ptr toProtocol ()
 Try downcast to Protocol class.
 
virtual ProtocolT::CPtr toProtocol () const
 Try downcast to Protocol class.
 
void updateBlock (BlockT::Ptr block)
 Replaces block with given.
 
void updateField (FieldT::Ptr field)
 Replaces field with given.
 
void updateFieldType (FieldTypeT::Ptr type)
 Replaces field type with given.
 
void updateMessage (MessageT::Ptr msg)
 Updates given message.
 
void updateValBlock (ValBlockT::Ptr valBlock)
 Replaces value block with given.
 
std::string const & version () const throw ()
 Returns base type of Protocol.
 
- 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 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

virtual ~Protocol () 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.
 

Detailed Description

Represents Protocol interface.

Member Typedef Documentation

◆ BlocksByIDMap

typedef std::map<std::string, BlockT::Ref> FixDictionary2::Protocol::BlocksByIDMap

◆ MessagesByTypeMap

Messages by type map.

Constructor & Destructor Documentation

◆ Protocol()

FixDictionary2::Protocol::Protocol ( std::string const & name,
std::string const & version,
std::string const & title )

Constructor.

◆ ~Protocol()

virtual FixDictionary2::Protocol::~Protocol ( )
throw ( )
protectedvirtual

Destructor.

Member Function Documentation

◆ addBlock()

void FixDictionary2::Protocol::addBlock ( BlockT::Ptr block)

Adds block to the protocol.

◆ addField()

void FixDictionary2::Protocol::addField ( FieldT::Ptr field)

Adds field to the protocol.

◆ addFieldType()

void FixDictionary2::Protocol::addFieldType ( FieldTypeT::Ptr type)

Adds field type to the protocol.

◆ addFieldTypes() [1/2]

void FixDictionary2::Protocol::addFieldTypes ( FieldTypeT::RefArray types,
std::size_t size )

Adds field types to the protocol.

◆ addFieldTypes() [2/2]

void FixDictionary2::Protocol::addFieldTypes ( std::list< FieldTypeT::Ref > * types)

Adds field types to the protocol.

◆ addMessage()

void FixDictionary2::Protocol::addMessage ( MessageT::Ptr msg)

Adds message to the protocol.

◆ addValBlock()

void FixDictionary2::Protocol::addValBlock ( ValBlockT::Ptr valBlock)

Adds value block to the protocol.

◆ clone()

ProtocolT::Ptr FixDictionary2::Protocol::clone ( ) const
virtual

Make copy of object.

Implements FixDictionary2::Item.

◆ description()

std::string const & FixDictionary2::Protocol::description ( ) const
throw ( )
inline

Returns description of the protocol.

◆ getBlock()

BlockT::CPtr FixDictionary2::Protocol::getBlock ( std::string const & id) const
throw ( )

Find block in protocol by id.

Parameters
idof block to find
Returns
found block; null otherwise.

◆ getBlocks()

BlocksByIDMap const * FixDictionary2::Protocol::getBlocks ( ) const
throw ( )

Returns block's set used in protocol.

Returns
block's set used in protocol

◆ getDescription()

std::string const & FixDictionary2::Protocol::getDescription ( ) const
throw ( )

Returns description of the protocol.

◆ getField() [1/2]

FieldT::CPtr FixDictionary2::Protocol::getField ( int tag) const
throw ( )

Find field in protocol by tag.

Parameters
tagof field to find
Returns
found tag; null otherwise

◆ getField() [2/2]

FieldT::CPtr FixDictionary2::Protocol::getField ( std::string const & name) const
throw ( )

Find field in protocol by name.

Parameters
nameName of the field
Returns
found tag; null otherwise

◆ getFieldNameByTag()

Utils::Emptily< Engine::AsciiString > FixDictionary2::Protocol::getFieldNameByTag ( const System::u32 tag) const

Returns tag name according to tag number.

Parameters
tagTag number of FIX field

◆ getFields()

std::size_t FixDictionary2::Protocol::getFields ( FieldT::CRefArray * fields) const
throw ( )

Returns fields registered in protocol.

Returns
fields registered in protocol

◆ getFieldTagByName()

Utils::Emptily< System::u32 > FixDictionary2::Protocol::getFieldTagByName ( std::string const & name) const

Returns tag number according to tag's name.

Parameters
nameName of FIX field

◆ getFieldType() [1/2]

FieldTypeT::Ptr FixDictionary2::Protocol::getFieldType ( std::string const & name)
throw ( )

Returns field type by its name.

If field is not found, method returns null.

◆ getFieldType() [2/2]

FieldTypeT::CPtr FixDictionary2::Protocol::getFieldType ( std::string const & name) const
throw ( )

Finds FieldType in protocol by name.

Parameters
nameof FieldType to find
Returns
found FieldType; NULL if field type is not found.

◆ getFieldTypes()

std::map< std::string, FieldTypeT::Ref > const * FixDictionary2::Protocol::getFieldTypes ( ) const
throw ( )

Returns field's types registered in protocol.

Returns
field's types registered in protocol

◆ getId()

std::string const & FixDictionary2::Protocol::getId ( ) const
throw ( )
inline

Returns name of the Protocol, unique identifier.

Note
"name" is "id" in the FIX XML
Returns
name of the Protocol

◆ getMessage()

MessageT::CPtr FixDictionary2::Protocol::getMessage ( std::string const & msgType) const
throw ( )

Find message in protocol by message type.

Parameters
typeof message to find
Returns
found message; null otherwise.

◆ getMessages()

MessagesByTypeMap const * FixDictionary2::Protocol::getMessages ( ) const
throw ( )

Returns messages registered in protocol.

Returns
messages registered in protocol

◆ getName()

std::string const & FixDictionary2::Protocol::getName ( ) const
throw ( )
inline

Returns name of the Protocol, unique identifier.

Note
"name" is "id" in the FIX XML
Returns
name of the Protocol

◆ getTitle()

std::string const & FixDictionary2::Protocol::getTitle ( ) const
throw ( )
inline

Returns name of Protocol.

Returns
name of Protocol

◆ getValBlock()

ValBlockT::CPtr FixDictionary2::Protocol::getValBlock ( std::string const & id) const
throw ( )

Finds ValBlock in protocol by id.

Parameters
idof the ValBlock to find
Returns
found ValBlock; null otherwise

◆ getValBocks()

std::map< std::string, ValBlockT::Ref > const * FixDictionary2::Protocol::getValBocks ( ) const
throw ( )

Returns messages registered in protocol.

Returns
messages registered in protocol

◆ getVersion()

std::string const & FixDictionary2::Protocol::getVersion ( ) const
throw ( )
inline

Returns base type of Protocol.

Returns
base type of Protocol

◆ id()

std::string const & FixDictionary2::Protocol::id ( ) const
throw ( )
inline

Returns name of the Protocol, unique identifier.

Note
"name" is "id" in the FIX XML
Returns
name of the Protocol

◆ itemName()

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

Returns the ItemName of object.

Returns
ItemName of Object

Implements FixDictionary2::Item.

◆ name()

std::string const & FixDictionary2::Protocol::name ( ) const
throw ( )

Returns name of the Protocol, unique identifier.

Note
"name" is "id" in the FIX XML
Returns
name of the Protocol

◆ removeField()

void FixDictionary2::Protocol::removeField ( int tag)

Removes field from the protocol.

◆ removeMessage()

void FixDictionary2::Protocol::removeMessage ( std::string const & msgType)

Removes given message.

◆ save()

void FixDictionary2::Protocol::save ( std::string const & filePath) const

Stores given protocol into XML file.

Created file can be loaded later by Dictionary.

◆ setDescription()

void FixDictionary2::Protocol::setDescription ( std::string const & value)

Assigns description of the protocol.

◆ shallowClone()

ProtocolT::Ptr FixDictionary2::Protocol::shallowClone ( std::string const & name,
std::string const & title ) const

Makes shallow copy of object.

◆ title()

std::string const & FixDictionary2::Protocol::title ( ) const
throw ( )

Returns name of Protocol.

Returns
name of Protocol

◆ toProtocol() [1/2]

virtual ProtocolT::Ptr FixDictionary2::Protocol::toProtocol ( )
virtual

Try downcast to Protocol class.

Returns
downcast to Protocol class

Reimplemented from FixDictionary2::Item.

◆ toProtocol() [2/2]

virtual ProtocolT::CPtr FixDictionary2::Protocol::toProtocol ( ) const
virtual

Try downcast to Protocol class.

Returns
downcast to Protocol class

Reimplemented from FixDictionary2::Item.

◆ updateBlock()

void FixDictionary2::Protocol::updateBlock ( BlockT::Ptr block)

Replaces block with given.

◆ updateField()

void FixDictionary2::Protocol::updateField ( FieldT::Ptr field)

Replaces field with given.

◆ updateFieldType()

void FixDictionary2::Protocol::updateFieldType ( FieldTypeT::Ptr type)

Replaces field type with given.

◆ updateMessage()

void FixDictionary2::Protocol::updateMessage ( MessageT::Ptr msg)

Updates given message.

◆ updateValBlock()

void FixDictionary2::Protocol::updateValBlock ( ValBlockT::Ptr valBlock)

Replaces value block with given.

◆ version()

std::string const & FixDictionary2::Protocol::version ( ) const
throw ( )

Returns base type of Protocol.

Returns
base type of Protocol