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

EmaBufferU16 represents general use binary buffer. More...

Public Member Functions

Constructor
 EmaBufferU16 ()
  More...
 
 EmaBufferU16 (const UInt16 *buf, UInt32 length)
  More...
 
 EmaBufferU16 (const EmaBufferU16 &buf)
  More...
 
Destructor
virtual ~EmaBufferU16 ()
  More...
 
Operations
EmaBufferU16clear ()
  More...
 
EmaBufferU16operator= (const EmaBufferU16 &buf)
  More...
 
EmaBufferU16setFrom (const UInt16 *buf, UInt32 length)
  More...
 
EmaBufferU16append (const EmaBufferU16 &buf)
  More...
 
EmaBufferU16append (UInt16 c)
  More...
 
EmaBufferU16append (const UInt16 *buf, UInt32 length)
  More...
 
EmaBufferU16operator+= (const EmaBufferU16 &buf)
  More...
 
EmaBufferU16operator+= (UInt16)
  More...
 
UInt16operator[] (UInt32 index)
  More...
 

Accessors

UInt16_pBuffer
 
UInt32 _length
 
UInt32 _capacity
 
const UInt16u16_buf () const
  More...
 
UInt32 length () const
  More...
 
bool operator== (const EmaBufferU16 &buf) const
  More...
 
UInt16 operator[] (UInt32 index) const
  More...
 

Detailed Description

EmaBufferU16 is a buffer of 16 bit long characters where each character is represented by UInt16. EmaBufferU16 is used to contain UTF16 data.

Remarks
EmaBufferU16 class contains a copy of the buffer passed on set methods.
All methods in this class are Lock-free Method.

Definition at line 31 of file EmaBufferU16.h.

Constructor & Destructor Documentation

◆ EmaBufferU16() [1/3]

refinitiv::ema::access::EmaBufferU16::EmaBufferU16 ( )

Constructs EmaBufferU16

◆ EmaBufferU16() [2/3]

refinitiv::ema::access::EmaBufferU16::EmaBufferU16 ( const UInt16 buf,
UInt32  length 
)

Assignment constructor

Exceptions
OmmMemoryExhaustionExceptionif application runs out of memory
Parameters
[in]bufpointer to the memory containing copied in buffer
[in]lengthspecifies number of characters to copy

◆ EmaBufferU16() [3/3]

refinitiv::ema::access::EmaBufferU16::EmaBufferU16 ( const EmaBufferU16 buf)

Copy constructor.

Exceptions
OmmMemoryExhaustionExceptionif application runs out of memory
Parameters
[in]bufcopied in EmaBufferU16 object

◆ ~EmaBufferU16()

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

Destructor.

Member Function Documentation

◆ append() [1/3]

EmaBufferU16& refinitiv::ema::access::EmaBufferU16::append ( const EmaBufferU16 buf)

method to append this object with the passed in EmaBufferU16 object

Exceptions
OmmMemoryExhaustionExceptionif application runs out of memory
Parameters
[in]bufEmaBufferU16 to append to this object
Returns
reference to this object

◆ append() [2/3]

EmaBufferU16& refinitiv::ema::access::EmaBufferU16::append ( const UInt16 buf,
UInt32  length 
)

method to append this object with the passed in char buffer

Exceptions
OmmMemoryExhaustionExceptionif application runs out of memory
Parameters
[in]bufpointer to the memory containing appended buffer
[in]lengthspecifies number of characters to append
Returns
reference to this object

◆ append() [3/3]

EmaBufferU16& refinitiv::ema::access::EmaBufferU16::append ( UInt16  c)

method to append this object with the passed in 16 byte long character

Exceptions
OmmMemoryExhaustionExceptionif application runs out of memory
Parameters
[in]ccharacter to append to this object
Returns
reference to this object

◆ clear()

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

Clears contained buffer.

Returns
reference to this object

◆ length()

UInt32 refinitiv::ema::access::EmaBufferU16::length ( ) const

Returns length of the internal storage memory.

Returns
length of the internal buffer

◆ operator+=() [1/2]

EmaBufferU16& refinitiv::ema::access::EmaBufferU16::operator+= ( const EmaBufferU16 buf)

method to append this object with the passed in EmaBufferU16 object

Exceptions
OmmMemoryExhaustionExceptionif application runs out of memory
Parameters
[in]bufEmaBuffer to append to this object
Returns
reference to this object

◆ operator+=() [2/2]

EmaBufferU16& refinitiv::ema::access::EmaBufferU16::operator+= ( UInt16  )

method to append this object with the passed in 16 byte long char

Exceptions
OmmMemoryExhaustionExceptionif application runs out of memory
Parameters
[in]ccharacter to append to this object
Returns
reference to this object

◆ operator=()

EmaBufferU16& refinitiv::ema::access::EmaBufferU16::operator= ( const EmaBufferU16 buf)

Assignment operator.

Exceptions
OmmMemoryExhaustionExceptionif application runs out of memory
Parameters
[in]bufcopied in EmaBufferU16 object
Returns
reference to this object

◆ operator==()

bool refinitiv::ema::access::EmaBufferU16::operator== ( const EmaBufferU16 buf) const

Compare operator.

Parameters
[in]bufcompared EmaBufferU16 object
Returns
true if this and passed in object match

◆ operator[]() [1/2]

UInt16& refinitiv::ema::access::EmaBufferU16::operator[] ( UInt32  index)

read write index operator

Exceptions
OmmOutOfRangeExceptionif passed in index is greater than the length of the contained buffer
Parameters
[in]indexspecifies position to read or write
Returns
reference to the byte at the specified position

◆ operator[]() [2/2]

UInt16 refinitiv::ema::access::EmaBufferU16::operator[] ( UInt32  index) const

read only index operator

Exceptions
OmmOutOfRangeExceptionif passed in index is greater than the length of the contained buffer
Parameters
[in]indexspecifies position to read
Returns
byte at the specified position

◆ setFrom()

EmaBufferU16& refinitiv::ema::access::EmaBufferU16::setFrom ( const UInt16 buf,
UInt32  length 
)

Method to set Buffer.

Exceptions
OmmMemoryExhaustionExceptionif application runs out of memory
Parameters
[in]bufpointer to the memory are containing copied in buffer
[in]lengthspecifies number of characters to copy
Returns
reference to this object

◆ u16_buf()

const UInt16* refinitiv::ema::access::EmaBufferU16::u16_buf ( ) const

Returns pointer to the internal storage memory

Returns
pointer to the internal memory area containing buffer data