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

Series is a homogeneous container of complex data type entries. More...

Inheritance diagram for thomsonreuters::ema::access::Series:
thomsonreuters::ema::access::ComplexType thomsonreuters::ema::access::Data

Public Member Functions

Constructor
 Series ()
 
Destructor
virtual ~Series ()
 
Operations
Seriesclear ()
 
SeriestotalCountHint (UInt32 totalCountHint)
 
SeriessummaryData (const ComplexType &data)
 
Seriesadd (const ComplexType &value)
 
Seriesadd ()
 
const Seriescomplete ()
 
Accessors
DataType::DataTypeEnum getDataType () const
 
Data::DataCode getCode () const
 
const EmaBuffergetAsHex () const
 
const EmaStringtoString () const
 
bool forth () const
 
void reset () const
 
const SeriesEntrygetEntry () const
 
bool hasTotalCountHint () const
 
UInt32 getTotalCountHint () const
 
const SummaryDatagetSummaryData () const
 
- Public Member Functions inherited from thomsonreuters::ema::access::ComplexType
virtual ~ComplexType ()
 
- Public Member Functions inherited from thomsonreuters::ema::access::Data
const EmaStringgetCodeAsString () const
 
 operator const char * () const
 
virtual ~Data ()
 

Friends

class thomsonreuters::ema::rdm::DataDictionaryImpl
 

Additional Inherited Members

- Public Types inherited from thomsonreuters::ema::access::Data
enum  DataCode {
  NoCodeEnum = 0,
  BlankEnum = 1
}
 
- Protected Member Functions inherited from thomsonreuters::ema::access::ComplexType
 ComplexType ()
 
- Protected Member Functions inherited from thomsonreuters::ema::access::Data
 Data ()
 

Detailed Description

Series entries have no explicit identification. They are implicitly indexed inside Series.

Series supports two methods of adding containers; they are:

The first method of adding of already populated containers allows for easy data manipulation but incurs additional memory copy. This method is useful in applications extracting data containers from some messages or containers and then setting them on other containers.

The second method allows for fast container population since it avoids additional memory copy incurred by the first method. This method is useful in source applications setting OMM data from native data formats.

The following code snippet shows addition of entry and summaryData to Series.

FieldList fList;
fList.addInt( 1, 1 ).
addUInt( 100, 2 ).
addArray( 2000, Array().addInt( 1 ).addInt( 2 ).complete() ).
Series series;
series.summaryData( fList ).
.add( fList ).

The following code snippet shows extracting of Series and its content.

void decodeSeries( const Series& series )
{
switch ( series.getSummaryData().getDataType() )
{
decodeFieldList( series.getSummaryData().getFieldList() );
break;
break;
}
while ( series.forth() )
{
const SeriesEntry& sEntry = series.getEntry();
switch ( sEntry.getLoad().getDataType() )
{
decodeFieldList( sEntry.getLoad().getFieldList() );
break;
break;
}
}
}
Remarks
These two methods apply to containers only, e.g.: ElementList, FieldList, FilterList, Map, Series, and Vector.
Objects of this class are intended to be short lived or rather transitional.
This class is designed to efficiently perform setting and extracting of Series and its content.
Objects of this class are not cache-able.
All methods in this class are Lock-free Method.
See Also
Data, SeriesEntry, SummaryData, ReqMsg, RefreshMsg, UpdateMsg, StatusMsg, GenericMsg, PostMsg, AckMsg, ElementList, Map, Vector, Series, FilterList, OmmOpaque, OmmXml, OmmAnsiPage, OmmError, EmaString, EmaBuffer

Definition at line 128 of file Series.h.

Constructor & Destructor Documentation

thomsonreuters::ema::access::Series::Series ( )

Constructs Series.

virtual thomsonreuters::ema::access::Series::~Series ( )
virtual

Destructor.

Member Function Documentation

Series& thomsonreuters::ema::access::Series::add ( const ComplexType value)

Adds complex OMM data identified by a specific complex type of OMM data.

Remarks
All entries must have same complex data type
Exceptions
OmmInvalidUsageExceptionif an error is detected (exception will specify the cause of the error)
Parameters
[in]valuecomplex type contained in this entry
Returns
reference to this object
Series& thomsonreuters::ema::access::Series::add ( )

Adds an entry with no payload to the Series.

Exceptions
OmmInvalidUsageExceptionif an error is detected (exception will specify the cause of the error)
Returns
reference to this object
Series& thomsonreuters::ema::access::Series::clear ( )

Clears the Series.

Remarks
Invoking clear() method clears all the values and resets all the defaults
Returns
reference to this object
const Series& thomsonreuters::ema::access::Series::complete ( )

Completes encoding of the Series.

Exceptions
OmmInvalidUsageExceptionif an error is detected (exception will specify the cause of the error)
Returns
const reference to this object
bool thomsonreuters::ema::access::Series::forth ( ) const

Iterates through a list of Data of any DataType. Typical usage is to extract the entry during each iteration via getEntry().

Returns
false at the end of Series; true otherwise
const EmaBuffer& thomsonreuters::ema::access::Series::getAsHex ( ) const
virtual

Returns a buffer that in turn provides an alphanumeric null-terminated hexadecimal string representation.

Returns
EmaBuffer with the message hex information

Implements thomsonreuters::ema::access::Data.

Data::DataCode thomsonreuters::ema::access::Series::getCode ( ) const
virtual

Returns the Code, which indicates a special state of a DataType.

Returns
Data::NoCodeEnum

Implements thomsonreuters::ema::access::Data.

DataType::DataTypeEnum thomsonreuters::ema::access::Series::getDataType ( ) const
virtual

Returns the DataType, which is the type of Omm data. Results in this class type.

Returns
DataType::SeriesEnum

Implements thomsonreuters::ema::access::Data.

const SeriesEntry& thomsonreuters::ema::access::Series::getEntry ( ) const

Returns Entry.

Exceptions
OmmInvalidUsageExceptionif forth() was not called first
Returns
SeriesEntry
const SummaryData& thomsonreuters::ema::access::Series::getSummaryData ( ) const

Returns the contained summaryData Data based on the summaryData DataType.

Remarks
SummaryData contains no data if SummaryData::getDataType() returns Data::NoDataEnum
Returns
SummaryData
UInt32 thomsonreuters::ema::access::Series::getTotalCountHint ( ) const

Returns TotalCountHint.

Remarks
will throw OmmInvalidUsageException if hasTotalCountHint() returns false
Returns
total count hint
bool thomsonreuters::ema::access::Series::hasTotalCountHint ( ) const

Indicates presence of TotalCountHint.

Returns
true if total count hint is set; false otherwise
void thomsonreuters::ema::access::Series::reset ( ) const

Resets iteration to start of container.

Series& thomsonreuters::ema::access::Series::summaryData ( const ComplexType data)

Specifies the SummaryData OMM Data.

Remarks
Call to summaryData( ) must happen prior to calling the add( ) method
Parameters
[in]summaryDataspecifies complex type as summaryData
Exceptions
OmmInvalidUsageExceptionif an error is detected (exception will specify the cause of the error)
Returns
reference to this object
const EmaString& thomsonreuters::ema::access::Series::toString ( ) const
virtual

Returns a string representation of the class instance.

Returns
string representation of the class instance

Implements thomsonreuters::ema::access::Data.

Series& thomsonreuters::ema::access::Series::totalCountHint ( UInt32  totalCountHint)

Specifies TotalCountHint.

Parameters
[in]totalCountHintspecifies total count hint
Exceptions
OmmInvalidUsageExceptionif an error is detected (exception will specify the cause of the error)
Returns
reference to this object

Friends And Related Function Documentation

friend class thomsonreuters::ema::rdm::DataDictionaryImpl
friend

Definition at line 247 of file Series.h.