EMA C++ Edition
List of all members
refinitiv::ema::access::FilterList Class Reference

FilterList is a heterogeneous container of complex data type entries. More...

Inheritance diagram for refinitiv::ema::access::FilterList:
refinitiv::ema::access::ComplexType refinitiv::ema::access::Data

Public Member Functions

Constructor
 FilterList ()
  More...
 
Destructor
virtual ~FilterList ()
  More...
 
Accessors
DataType::DataTypeEnum getDataType () const
  More...
 
Data::DataCode getCode () const
  More...
 
const EmaBuffergetAsHex () const
  More...
 
const EmaStringtoString () const
  More...
 
const EmaStringtoString (const refinitiv::ema::rdm::DataDictionary &dictionary) const
  More...
 
bool hasTotalCountHint () const
  More...
 
UInt32 getTotalCountHint () const
  More...
 
bool forth () const
  More...
 
bool forth (UInt8 filterId) const
  More...
 
const FilterEntrygetEntry () const
  More...
 
void reset () const
  More...
 
- Public Member Functions inherited from refinitiv::ema::access::ComplexType
virtual ~ComplexType ()
  More...
 
- Public Member Functions inherited from refinitiv::ema::access::Data
const EmaStringgetCodeAsString () const
  More...
 
 operator const char * () const
  More...
 
virtual ~Data ()
  More...
 

Operations

FilterListclear ()
  More...
 
FilterListtotalCountHint (UInt32 totalCountHint)
  More...
 
FilterListadd (UInt8 filterId, FilterEntry::FilterAction action, const ComplexType &value, const EmaBuffer &permissionData=EmaBuffer())
  More...
 
FilterListadd (UInt8 filterId, FilterEntry::FilterAction action, const EmaBuffer &permissionData=EmaBuffer())
  More...
 
const FilterListcomplete ()
  More...
 

Additional Inherited Members

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

Detailed Description

FilterList entries are identified by Filter Id. For the source directory information, the Filter Ids are defined in the RDM (see also EmaRdm.h file).

FilterList 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 pre populated containers to FilterList.

FieldList fieldList;
Map map;
// first step - populate Map with the fieldList
map.addKeyBuffer( EmaBuffer( "1234321" ), MapEntry::AddEnum, fieldList ).complete();
// second step - add already populated Map to FilterList
FilterList filterList;
filterList.add( 2, FilterEntry::SetEnum; map );
// third step - complete FilterList
filterList.complete();
friend class FieldList
Definition: Data.h:133

The following code snippet shows addition of clear containers to FilterList. The added containers are populated right after addition.

FilterList fList;
Map map;
// first step - add clear map to filterList
fList.add( 2, FilterEntry::SetEnum; map )
// second step - populate Map
map.addKeyBuffer( EmaBuffer( "1234321" ), MapEntry::AddEnum, fieldList ).complete();
// third step - complete FilterList
fList.complete()

The following code snippet shows extracting data from FilterList.

while ( filterList.forth() )
{
const FilterEntry& entry = filterList.getEntry();
switch ( entry.getLoadType() )
{
cout << "filter id = " << (UInt32)entry.getFilterId() << "\n";
cout << "action = " << entry.getFilterActionAsString() << "\n";
decode( entry.getMap() );
break;
...
}
}
unsigned int UInt32
represents 32-bit unsigned integer
Definition: Common.h:56
friend class FilterEntry
Definition: Data.h:142
Remarks
These two methods apply to containers only: 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 FilterList and its content.
Objects of this class are not cache-able.
All methods in this class are Lock-free Method.
See also
Data, FilterEntry, ReqMsg, RefreshMsg, UpdateMsg, StatusMsg, GenericMsg, PostMsg, AckMsg, ElementList, Map, Vector, Series, FilterList, OmmOpaque, OmmXml, OmmAnsiPage, OmmError, EmaString, EmaBuffer

Definition at line 133 of file FilterList.h.

Constructor & Destructor Documentation

◆ FilterList()

refinitiv::ema::access::FilterList::FilterList ( )

Constructs FilterList.

◆ ~FilterList()

virtual refinitiv::ema::access::FilterList::~FilterList ( )
virtual

Destructor.

Member Function Documentation

◆ add() [1/2]

FilterList& refinitiv::ema::access::FilterList::add ( UInt8  filterId,
FilterEntry::FilterAction  action,
const ComplexType value,
const EmaBuffer permissionData = EmaBuffer() 
)

Adds a complex type of OMM data to the FilterList.

Exceptions
OmmInvalidUsageExceptionif an error is detected (exception will specify the cause of the error)
Parameters
[in]filterIdspecifies filter id for the added FilterEntry
[in]actionspecifies action for the added FilterEntry
[in]valuespecifies load for the added FilterEntry
[in]permissionDataspecifies permissions for the added FilterEntry
Returns
reference to this object

◆ add() [2/2]

FilterList& refinitiv::ema::access::FilterList::add ( UInt8  filterId,
FilterEntry::FilterAction  action,
const EmaBuffer permissionData = EmaBuffer() 
)

Adds no payload to the FilterList.

Exceptions
OmmInvalidUsageExceptionif an error is detected (exception will specify the cause of the error)
Parameters
[in]filterIdspecifies filter id for the added FilterEntry
[in]actionspecifies action for the added FilterEntry
[in]permissionDataspecifies permissions for the added FilterEntry
Returns
reference to this object

◆ clear()

FilterList& refinitiv::ema::access::FilterList::clear ( )

Clears the FilterList.

Remarks
Invoking clear() method clears all the values and resets all the defaults
Returns
reference to this object

◆ complete()

const FilterList& refinitiv::ema::access::FilterList::complete ( )

Completes encoding of FilterList.

Exceptions
OmmInvalidUsageExceptionif an error is detected (exception will specify the cause of the error)
Returns
const reference to this object

◆ forth() [1/2]

bool refinitiv::ema::access::FilterList::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 FilterList; true otherwise

◆ forth() [2/2]

bool refinitiv::ema::access::FilterList::forth ( UInt8  filterId) const

Iterates through a list of Data having matched actual filterId with the one passed in. Typical usage is to extract the entry during each iteration via getEntry().

Parameters
[in]filterIdlooked up filter id
Returns
false at the end of FilterList; true otherwise

◆ getAsHex()

const EmaBuffer& refinitiv::ema::access::FilterList::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 refinitiv::ema::access::Data.

◆ getCode()

Data::DataCode refinitiv::ema::access::FilterList::getCode ( ) const
virtual

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

Returns
Data::NoCodeEnum

Implements refinitiv::ema::access::Data.

◆ getDataType()

DataType::DataTypeEnum refinitiv::ema::access::FilterList::getDataType ( ) const
virtual

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

Returns
DataType::FilterListEnum

Implements refinitiv::ema::access::Data.

◆ getEntry()

const FilterEntry& refinitiv::ema::access::FilterList::getEntry ( ) const

Returns Entry.

Exceptions
OmmInvalidUsageExceptionif forth() was not called first
Returns
FilterEntry

◆ getTotalCountHint()

UInt32 refinitiv::ema::access::FilterList::getTotalCountHint ( ) const

Returns TotalCountHint.

Exceptions
OmmInvalidUsageExceptionif hasTotalCountHint() returns false
Returns
total count hint

◆ hasTotalCountHint()

bool refinitiv::ema::access::FilterList::hasTotalCountHint ( ) const

Indicates presence of TotalCountHint.

Returns
true if total count hint is set; false otherwise

◆ reset()

void refinitiv::ema::access::FilterList::reset ( ) const

Resets iteration to start of container.

◆ toString() [1/2]

const EmaString& refinitiv::ema::access::FilterList::toString ( ) const
virtual

Returns a string representation of the class instance.

Returns
string representation of the class instance

Implements refinitiv::ema::access::Data.

◆ toString() [2/2]

const EmaString& refinitiv::ema::access::FilterList::toString ( const refinitiv::ema::rdm::DataDictionary dictionary) const

Returns a string representation of the class instance for just encoded object.

Parameters
[in]dictionaryuse for toString() conversion
Returns
string representation of the class instance

◆ totalCountHint()

FilterList& refinitiv::ema::access::FilterList::totalCountHint ( UInt32  totalCountHint)

Specifies TotalCountHint.

Exceptions
OmmInvalidUsageExceptionif this method is called after adding an entry to FilterList.
Parameters
[in]totalCountHintspecifies estimated total number of entries
Returns
reference to this object