B2BITS FIX Antenna C++ 2.33.0
|
Represents Protocol interface. More...
#include <B2BITS_Protocol.h>
Public Types | |
typedef std::map< std::string, BlockT::Ref > | BlocksByIDMap |
typedef std::map< std::string, MessageT::Ref > | MessagesByTypeMap |
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::AsciiString > | getFieldNameByTag (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. | |
Item & | operator= (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. | |
Represents Protocol interface.
typedef std::map<std::string, BlockT::Ref> FixDictionary2::Protocol::BlocksByIDMap |
typedef std::map<std::string, MessageT::Ref> FixDictionary2::Protocol::MessagesByTypeMap |
Messages by type map.
FixDictionary2::Protocol::Protocol | ( | std::string const & | name, |
std::string const & | version, | ||
std::string const & | title ) |
Constructor.
|
protectedvirtual |
Destructor.
void FixDictionary2::Protocol::addBlock | ( | BlockT::Ptr | block | ) |
Adds block to the protocol.
void FixDictionary2::Protocol::addField | ( | FieldT::Ptr | field | ) |
Adds field to the protocol.
void FixDictionary2::Protocol::addFieldType | ( | FieldTypeT::Ptr | type | ) |
Adds field type to the protocol.
void FixDictionary2::Protocol::addFieldTypes | ( | FieldTypeT::RefArray | types, |
std::size_t | size ) |
Adds field types to the protocol.
void FixDictionary2::Protocol::addFieldTypes | ( | std::list< FieldTypeT::Ref > * | types | ) |
Adds field types to the protocol.
void FixDictionary2::Protocol::addMessage | ( | MessageT::Ptr | msg | ) |
Adds message to the protocol.
void FixDictionary2::Protocol::addValBlock | ( | ValBlockT::Ptr | valBlock | ) |
Adds value block to the protocol.
|
virtual |
Make copy of object.
Implements FixDictionary2::Item.
|
inline |
Returns description of the protocol.
BlockT::CPtr FixDictionary2::Protocol::getBlock | ( | std::string const & | id | ) | const | |
throw | ( | ) |
Find block in protocol by id.
id | of block to find |
BlocksByIDMap const * FixDictionary2::Protocol::getBlocks | ( | ) | const | |||
throw | ( | ) |
Returns block's set used in protocol.
std::string const & FixDictionary2::Protocol::getDescription | ( | ) | const | |||
throw | ( | ) |
Returns description of the protocol.
FieldT::CPtr FixDictionary2::Protocol::getField | ( | int | tag | ) | const | |
throw | ( | ) |
Find field in protocol by tag.
tag | of field to find |
FieldT::CPtr FixDictionary2::Protocol::getField | ( | std::string const & | name | ) | const | |
throw | ( | ) |
Find field in protocol by name.
name | Name of the field |
Utils::Emptily< Engine::AsciiString > FixDictionary2::Protocol::getFieldNameByTag | ( | const System::u32 | tag | ) | const |
Returns tag name according to tag number.
tag | Tag number of FIX field |
std::size_t FixDictionary2::Protocol::getFields | ( | FieldT::CRefArray * | fields | ) | const | |
throw | ( | ) |
Returns fields registered in protocol.
Utils::Emptily< System::u32 > FixDictionary2::Protocol::getFieldTagByName | ( | std::string const & | name | ) | const |
Returns tag number according to tag's name.
name | Name of FIX field |
FieldTypeT::Ptr FixDictionary2::Protocol::getFieldType | ( | std::string const & | name | ) | ||
throw | ( | ) |
Returns field type by its name.
If field is not found, method returns null.
FieldTypeT::CPtr FixDictionary2::Protocol::getFieldType | ( | std::string const & | name | ) | const | |
throw | ( | ) |
std::map< std::string, FieldTypeT::Ref > const * FixDictionary2::Protocol::getFieldTypes | ( | ) | const | |||
throw | ( | ) |
Returns field's types registered in protocol.
|
inline |
MessageT::CPtr FixDictionary2::Protocol::getMessage | ( | std::string const & | msgType | ) | const | |
throw | ( | ) |
Find message in protocol by message type.
type | of message to find |
MessagesByTypeMap const * FixDictionary2::Protocol::getMessages | ( | ) | const | |||
throw | ( | ) |
Returns messages registered in protocol.
|
inline |
|
inline |
ValBlockT::CPtr FixDictionary2::Protocol::getValBlock | ( | std::string const & | id | ) | const | |
throw | ( | ) |
std::map< std::string, ValBlockT::Ref > const * FixDictionary2::Protocol::getValBocks | ( | ) | const | |||
throw | ( | ) |
Returns messages registered in protocol.
|
inline |
|
inline |
|
virtual |
std::string const & FixDictionary2::Protocol::name | ( | ) | const | |||
throw | ( | ) |
void FixDictionary2::Protocol::removeField | ( | int | tag | ) |
Removes field from the protocol.
void FixDictionary2::Protocol::removeMessage | ( | std::string const & | msgType | ) |
Removes given message.
void FixDictionary2::Protocol::save | ( | std::string const & | filePath | ) | const |
Stores given protocol into XML file.
Created file can be loaded later by Dictionary.
void FixDictionary2::Protocol::setDescription | ( | std::string const & | value | ) |
Assigns description of the protocol.
ProtocolT::Ptr FixDictionary2::Protocol::shallowClone | ( | std::string const & | name, |
std::string const & | title ) const |
Makes shallow copy of object.
std::string const & FixDictionary2::Protocol::title | ( | ) | const | |||
throw | ( | ) |
|
virtual |
Try downcast to Protocol class.
Reimplemented from FixDictionary2::Item.
|
virtual |
Try downcast to Protocol class.
Reimplemented from FixDictionary2::Item.
void FixDictionary2::Protocol::updateBlock | ( | BlockT::Ptr | block | ) |
Replaces block with given.
void FixDictionary2::Protocol::updateField | ( | FieldT::Ptr | field | ) |
Replaces field with given.
void FixDictionary2::Protocol::updateFieldType | ( | FieldTypeT::Ptr | type | ) |
Replaces field type with given.
void FixDictionary2::Protocol::updateMessage | ( | MessageT::Ptr | msg | ) |
Updates given message.
void FixDictionary2::Protocol::updateValBlock | ( | ValBlockT::Ptr | valBlock | ) |
Replaces value block with given.