EMA C++ Edition
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
List of all members | Friends
thomsonreuters::ema::rdm::DataDictionary Class Reference

Public Member Functions

Constructor
 DataDictionary ()
 
 DataDictionary (const DataDictionary &)
 
Destructor
virtual ~DataDictionary ()
 
Accessors
thomsonreuters::ema::access::Int32 getMinFid () const
 
thomsonreuters::ema::access::Int32 getMaxFid () const
 
const
thomsonreuters::ema::access::EmaVector
< DictionaryEntry > & 
getEntries () const
 
const
thomsonreuters::ema::access::EmaVector
< EnumTypeTable > & 
getEnumTables () const
 
thomsonreuters::ema::access::Int32 getDictionaryId () const
 
const
thomsonreuters::ema::access::EmaString
getFieldVersion () const
 
const
thomsonreuters::ema::access::EmaString
getEnumRecordTemplateVersion () const
 
const
thomsonreuters::ema::access::EmaString
getEnumDisplayTemplateVersion () const
 
const
thomsonreuters::ema::access::EmaString
getFieldFilename () const
 
const
thomsonreuters::ema::access::EmaString
getFieldDescription () const
 
const
thomsonreuters::ema::access::EmaString
getFieldBuild () const
 
const
thomsonreuters::ema::access::EmaString
getFieldDate () const
 
const
thomsonreuters::ema::access::EmaString
getEnumFilename () const
 
const
thomsonreuters::ema::access::EmaString
getEnumDescription () const
 
const
thomsonreuters::ema::access::EmaString
getEnumDate () const
 
bool hasEntry (thomsonreuters::ema::access::Int16 fieldId) const
 
void getEntry (thomsonreuters::ema::access::Int16 fieldId, DictionaryEntry &entry) const
 
const DictionaryEntrygetEntry (thomsonreuters::ema::access::Int16 fieldId) const
 
bool hasEntry (const thomsonreuters::ema::access::EmaString &fieldName) const
 
void getEntry (const thomsonreuters::ema::access::EmaString &fieldName, DictionaryEntry &entry) const
 
const DictionaryEntrygetEntry (const thomsonreuters::ema::access::EmaString &fieldName) const
 
bool hasEnumType (thomsonreuters::ema::access::Int16 fieldId, thomsonreuters::ema::access::UInt16 value) const
 
const EnumTypegetEnumType (thomsonreuters::ema::access::Int16 fieldId, thomsonreuters::ema::access::UInt16 value) const
 
Operations
void clear ()
 
void loadFieldDictionary (const thomsonreuters::ema::access::EmaString &filename)
 
void loadEnumTypeDictionary (const thomsonreuters::ema::access::EmaString &filename)
 
void encodeFieldDictionary (thomsonreuters::ema::access::Series &series, thomsonreuters::ema::access::UInt32 verbosity)
 
bool encodeFieldDictionary (thomsonreuters::ema::access::Series &series, thomsonreuters::ema::access::Int32 &currentFid, thomsonreuters::ema::access::UInt32 verbosity, thomsonreuters::ema::access::UInt32 fragmentationSize)
 
void decodeFieldDictionary (const thomsonreuters::ema::access::Series &series, thomsonreuters::ema::access::UInt32 verbosity)
 
void encodeEnumTypeDictionary (thomsonreuters::ema::access::Series &series, thomsonreuters::ema::access::UInt32 verbosity)
 
bool encodeEnumTypeDictionary (thomsonreuters::ema::access::Series &series, thomsonreuters::ema::access::Int32 &enumTableCount, thomsonreuters::ema::access::UInt32 verbosity, thomsonreuters::ema::access::UInt32 fragmentationSize)
 
void decodeEnumTypeDictionary (const thomsonreuters::ema::access::Series &series, thomsonreuters::ema::access::UInt32 verbosity)
 
thomsonreuters::ema::access::UInt32 extractDictionaryType (const thomsonreuters::ema::access::Series &series)
 
const
thomsonreuters::ema::access::EmaString
toString () const
 
 operator const char * () const
 

Friends

class thomsonreuters::ema::access::FieldListDecoder
 

Detailed Description

Definition at line 52 of file DataDictionary.h.

Constructor & Destructor Documentation

thomsonreuters::ema::rdm::DataDictionary::DataDictionary ( )

Constructs DataDictionary.

thomsonreuters::ema::rdm::DataDictionary::DataDictionary ( const DataDictionary )

Copy Constructor.

virtual thomsonreuters::ema::rdm::DataDictionary::~DataDictionary ( )
virtual

Destructor.

Member Function Documentation

void thomsonreuters::ema::rdm::DataDictionary::clear ( )

Clears DataDictionary.

This method is used to clear the existing dictionary information.

void thomsonreuters::ema::rdm::DataDictionary::decodeEnumTypeDictionary ( const thomsonreuters::ema::access::Series series,
thomsonreuters::ema::access::UInt32  verbosity 
)

Decode the enumerated types information contained in an encoded enum types dictionary according to the domain model. This method may be called multiple times on the same dictionary, to load information from dictionaries that have been encoded in multiple parts.

Parameters
[in]seriesspecifies Series to be used for decoding enumerated types information from.
[in]verbosityspecifies the desired verbosity to decode.
Exceptions
OmmInvalidUsageExceptionif fails to decode enumerated types dictionary.
Remarks
see verbosity definition at "Rdm/Include/EmaRdm.h"
void thomsonreuters::ema::rdm::DataDictionary::decodeFieldDictionary ( const thomsonreuters::ema::access::Series series,
thomsonreuters::ema::access::UInt32  verbosity 
)

Decode the field dictionary information contained in a data payload according to the domain model. This method may be called multiple times on the same dictionary, to load information from dictionaries that have been encoded in multiple parts.

Parameters
[in]seriesspecifies Series to be used for decoding dictionary information from.
[in]verbosityspecifies the desired verbosity to decode.
Exceptions
OmmInvalidUsageExceptionif fails to decode field dictionary information.
Remarks
see verbosity definition at "Rdm/Include/EmaRdm.h"
void thomsonreuters::ema::rdm::DataDictionary::encodeEnumTypeDictionary ( thomsonreuters::ema::access::Series series,
thomsonreuters::ema::access::UInt32  verbosity 
)

Encode the enumerated types dictionary according the domain model, using the information from the tables and referencing fields present in this dictionary. Note: This method will use the type Ascii for the DISPLAY array.

Parameters
[in]seriesspecifies Series to be used for encoding enumerated types dictionary into.
[in]verbosityspecifies the desired verbosity to encode.
Exceptions
OmmInvalidUsageExceptionif fails to encode enumerated types dictionary.
Remarks
see verbosity definition at "Rdm/Include/EmaRdm.h"
bool thomsonreuters::ema::rdm::DataDictionary::encodeEnumTypeDictionary ( thomsonreuters::ema::access::Series series,
thomsonreuters::ema::access::Int32 enumTableCount,
thomsonreuters::ema::access::UInt32  verbosity,
thomsonreuters::ema::access::UInt32  fragmentationSize 
)

Encode the enumerated types dictionary according the domain model, using the information from the tables and referencing fields present in this dictionary. Note: This method will use the type Ascii for the DISPLAY array. This method supports building the encoded data in multiple parts according to the fragmentation size.

Parameters
[in]seriesspecifies Series to be used for encoding enumerated types dictionary into.
[in]enumTableCounttracks how many Enum table have been encoded in case of multi-part encoding. Must be initialized to 0 on the first call and is updated with each successfully encoded part
[in]verbosityspecifies the desired verbosity to encode.
[in]fragmentationSizespecifies the fragmentation size in number of bytes.
Returns
true to indicate final part or single complete payload otherwise false
Exceptions
OmmInvalidUsageExceptionif fails to encode enumerated types dictionary.
Remarks
see verbosity definition at "Rdm/Include/EmaRdm.h"
void thomsonreuters::ema::rdm::DataDictionary::encodeFieldDictionary ( thomsonreuters::ema::access::Series series,
thomsonreuters::ema::access::UInt32  verbosity 
)

Encode the field dictionary information into a data payload according the domain model, using the field information from the entries present in this dictionary. This method supports building the encoded data in one full part.

Parameters
[in]seriesspecifies Series to be used for encoding dictionary information into.
[in]verbosityspecifies the desired verbosity to encode.
Exceptions
OmmInvalidUsageExceptionif fails to encode field dictionary information.
Remarks
see verbosity definition at "Rdm/Include/EmaRdm.h"
bool thomsonreuters::ema::rdm::DataDictionary::encodeFieldDictionary ( thomsonreuters::ema::access::Series series,
thomsonreuters::ema::access::Int32 currentFid,
thomsonreuters::ema::access::UInt32  verbosity,
thomsonreuters::ema::access::UInt32  fragmentationSize 
)

Encode the field dictionary information into a data payload according the domain model, using the field information from the entries present in this dictionary. This method supports building the encoded data in multiple parts according to the fragmentation size.

Parameters
[in]seriesspecifies Series to be used for encoding dictionary information into.
[in]currentFidtracks which fields have been encoded in case of multi-part encoding. Must be initialized to getMinFid() on the first call and is updated with each successfully encoded part
[in]verbosityspecifies the desired verbosity to encode.
[in]fragmentationSizespecifies the fragmentation size in number of bytes.
Returns
true to indicate final part or single complete payload otherwise false
Exceptions
OmmInvalidUsageExceptionif fails to encode field dictionary information.
Remarks
see verbosity definition at "Rdm/Include/EmaRdm.h"
thomsonreuters::ema::access::UInt32 thomsonreuters::ema::rdm::DataDictionary::extractDictionaryType ( const thomsonreuters::ema::access::Series series)

Extract dictionary type from the encoded payload of a EMA message where the domain type is DICTIONARY.

Parameters
[in]seriesSeries to be used for extracting dictionary type.
Returns
The dictionary type defined in EmaRdm.
Exceptions
OmmInvalidUsageExceptionIf dictionary type is not available.
Remarks
see verbosity definition at "Rdm/Include/EmaRdm.h"
thomsonreuters::ema::access::Int32 thomsonreuters::ema::rdm::DataDictionary::getDictionaryId ( ) const

DictionaryId Tag. All dictionaries loaded using this object will have this tag matched if found.

Returns
the DictionaryId
const thomsonreuters::ema::access::EmaVector<DictionaryEntry>& thomsonreuters::ema::rdm::DataDictionary::getEntries ( ) const

The list of DictionaryEntry of this DataDictionary.

Returns
the list of DictionaryEntry
void thomsonreuters::ema::rdm::DataDictionary::getEntry ( thomsonreuters::ema::access::Int16  fieldId,
DictionaryEntry entry 
) const

Returns the entry in the dictionary corresponding to the given fieldId, if the entry exists.

Parameters
[in]fieldIdspecifies the fieldId to get the dictionary entry for [out] the entry in the dictionary corresponding to the given fieldId, if the entry exists
Exceptions
OmmInvalidUsageExceptionif the entry does not exist Same like DataDictionary#getEntry(thomsonreuters::ema::access::Int16) note, entry should be created first and managed by the user
const DictionaryEntry& thomsonreuters::ema::rdm::DataDictionary::getEntry ( thomsonreuters::ema::access::Int16  fieldId) const

Returns the entry in the dictionary corresponding to the given fieldId, if the entry exists.

Parameters
[in]fieldIdspecifies the fieldId to get the dictionary entry for
Exceptions
OmmInvalidUsageExceptionif the entry does not exist
Returns
the dictionary entry if it exists
void thomsonreuters::ema::rdm::DataDictionary::getEntry ( const thomsonreuters::ema::access::EmaString fieldName,
DictionaryEntry entry 
) const

Returns the entry in the dictionary corresponding to the given fieldName, if the entry exists.

Parameters
[in]fieldNamespecifies the fieldId to get the dictionary entry for [out] the entry in the dictionary corresponding to the given fieldName, if the entry exists
Exceptions
OmmInvalidUsageExceptionif the entry does not exist Same like DataDictionary#getEntry(const thomsonreuters::ema::access::EmaString&) note, entry should be created first and managed by the user
const DictionaryEntry& thomsonreuters::ema::rdm::DataDictionary::getEntry ( const thomsonreuters::ema::access::EmaString fieldName) const

Returns the entry in the dictionary corresponding to the given fieldName, if the entry exists.

Parameters
[in]fieldNamespecifies the fieldId to get the dictionary entry for
Exceptions
OmmInvalidUsageExceptionif the entry does not exist
Returns
the dictionary entry if it exists
const thomsonreuters::ema::access::EmaString& thomsonreuters::ema::rdm::DataDictionary::getEnumDate ( ) const

Enum Date Tag.

Returns
the EnumDate
const thomsonreuters::ema::access::EmaString& thomsonreuters::ema::rdm::DataDictionary::getEnumDescription ( ) const

Enum Description Tag.

Returns
the EnumDescription
const thomsonreuters::ema::access::EmaString& thomsonreuters::ema::rdm::DataDictionary::getEnumDisplayTemplateVersion ( ) const

Enum DT_Version Tag.

Returns
the EnumDisplayTemplateVersion
const thomsonreuters::ema::access::EmaString& thomsonreuters::ema::rdm::DataDictionary::getEnumFilename ( ) const

Enum Filename Tag.

Returns
the EnumFilename
const thomsonreuters::ema::access::EmaString& thomsonreuters::ema::rdm::DataDictionary::getEnumRecordTemplateVersion ( ) const

Enum RT_Version Tag.

Returns
the EnumRecordTemplateVersion
const thomsonreuters::ema::access::EmaVector<EnumTypeTable>& thomsonreuters::ema::rdm::DataDictionary::getEnumTables ( ) const

The list of EnumTypeTable of this DataDictionary.

Returns
the list of EnumTypeTable
const EnumType& thomsonreuters::ema::rdm::DataDictionary::getEnumType ( thomsonreuters::ema::access::Int16  fieldId,
thomsonreuters::ema::access::UInt16  value 
) const

Returns the corresponding enumerated type in the dictionary entry's table, if the type exists.

Parameters
[in]fieldIdspecifies the fieldId to get the enumerated type from
[in]valuespecifies the value of the enumerated type to get
Exceptions
OmmInvalidUsageExceptionif the entry does not exist
Returns
the enumerated type if it exists
const thomsonreuters::ema::access::EmaString& thomsonreuters::ema::rdm::DataDictionary::getFieldBuild ( ) const

Field Build Tag.

Returns
the FieldBuild
const thomsonreuters::ema::access::EmaString& thomsonreuters::ema::rdm::DataDictionary::getFieldDate ( ) const

Field Date Tag.

Returns
the FieldDate
const thomsonreuters::ema::access::EmaString& thomsonreuters::ema::rdm::DataDictionary::getFieldDescription ( ) const

Field Description Tag.

Returns
the FieldDescription
const thomsonreuters::ema::access::EmaString& thomsonreuters::ema::rdm::DataDictionary::getFieldFilename ( ) const

Field Filename Tag.

Returns
the FieldFilename
const thomsonreuters::ema::access::EmaString& thomsonreuters::ema::rdm::DataDictionary::getFieldVersion ( ) const

Field Version Tag.

Returns
the FieldVersion
thomsonreuters::ema::access::Int32 thomsonreuters::ema::rdm::DataDictionary::getMaxFid ( ) const

The highest fieldId present in the dictionary.

Returns
the maxFid
thomsonreuters::ema::access::Int32 thomsonreuters::ema::rdm::DataDictionary::getMinFid ( ) const

The lowest fieldId present in the dictionary.

Returns
the minFid
bool thomsonreuters::ema::rdm::DataDictionary::hasEntry ( thomsonreuters::ema::access::Int16  fieldId) const

Check whether the DictionaryEntry exists

Parameters
[in]fieldIdthe fieldId to check the dictionary entry
Returns
true if the DictionaryEntry exists otherwise false
bool thomsonreuters::ema::rdm::DataDictionary::hasEntry ( const thomsonreuters::ema::access::EmaString fieldName) const

Check whether the DictionaryEntry exists

Parameters
[in]fieldNamethe field name to check the dictionary entry
Returns
true if the DictionaryEntry exists otherwise false
bool thomsonreuters::ema::rdm::DataDictionary::hasEnumType ( thomsonreuters::ema::access::Int16  fieldId,
thomsonreuters::ema::access::UInt16  value 
) const

Check whether the EnumType exists

Parameters
[in]fieldIdthe fieldId to check the enumerated type
[in]valuethe value of the enumerated type to check
Returns
the enumerated type if it exists
void thomsonreuters::ema::rdm::DataDictionary::loadEnumTypeDictionary ( const thomsonreuters::ema::access::EmaString filename)

Adds information from an enumerated types dictionary file to the data dictionary object. Subsequent calls to this method may be made to the same DataDictionary to load additional dictionaries (provided that there are no duplicate table references for any field).

Parameters
[in]filenamespecifies an enumerated types dictionary file
Exceptions
OmmInvalidUsageExceptionif fails to load from the specified file name from filename.
void thomsonreuters::ema::rdm::DataDictionary::loadFieldDictionary ( const thomsonreuters::ema::access::EmaString filename)

Adds information from a field dictionary file to the data dictionary object. Subsequent calls to this method may be made to the same DataDictionary to load additional dictionaries (provided the fields do not conflict).

Parameters
[in]filenamespecifies a field dictionary file
Exceptions
OmmInvalidUsageExceptionif fails to load from the specified file name from filename.
thomsonreuters::ema::rdm::DataDictionary::operator const char * ( ) const
Operator const char* overload.
Exceptions
OmmMemoryExhaustionExceptionif app runs out of memory
const thomsonreuters::ema::access::EmaString& thomsonreuters::ema::rdm::DataDictionary::toString ( ) const
Returns a string representation of the class instance.
Exceptions
OmmMemoryExhaustionExceptionif app runs out of memory
Returns
string representation of the class instance

Friends And Related Function Documentation

friend class thomsonreuters::ema::access::FieldListDecoder
friend

Definition at line 439 of file DataDictionary.h.