Classes Files

Wombat::MamaDictionary

Maps field identifiers (FIDs) to human-readable strings More…

Inherits from Wombat.MamaWrapper, IDisposable

Public Functions

  Name
  MamaDictionary()
Default constructor
void create(MamaQueue queue, MamaDictionaryCallback callback, MamaSource source, int retries, double timeout)
Create a data dictionary from a subscription
void create(string filename)
void writeToFile(string filename)
string getFeedName()
string getFeedHost()
MamaFieldDescriptor getFieldByName(string fieldName)
Return the descriptor of the field with the specified name.
int getMaxFid()
Returns the highest field identifier.
int getSize()
Returns the the number of entries in the dictionary.
MamaFieldDescriptor getFieldByFid(int fid)
Return the field with the specified field FID. This method is very efficient.
MamaFieldDescriptor getFieldByIndex(int index)
Return the field with the corresponding zero based index. This method is O (N) with respect to the size of the dictionary.
void buildDictionaryFromMessage(MamaMsg msg)
Recreate a data dictionary from the MamaMsg supplied. The MamaMsg is copied and can therefore be deleted after the method has returned.
MamaMsg getDictionaryMessage()
Returns a MamaMsg representing the data dictionary. This message can be published or used to create a new MamaDictionary object. A new MamaMsg is created for each invocation of the method. It is the responsibility of the caller to delete the message when no longer needed.

Protected Functions

  Name
virtual override MamaStatus.mamaStatus DestroyNativePeer()
Implements the destruction of the underlying peer object

Additional inherited members

Public Functions inherited from Wombat.MamaWrapper

  Name
void Dispose()
Destroys the underlying peer object and unbinds the wrapper from it.
void setNativeHandle(IntPtr nHandle)
Sets the native handle of the native peer object. Should only be used by subclasses and in the same assembly.

Protected Functions inherited from Wombat.MamaWrapper

  Name
  MamaWrapper()
Constructs a new wrapper object but doesn’t create it. If the object is not explicitly disposed it will remain registered for finalization and will attempt the destroy the native peer object when finalized.
  MamaWrapper(IntPtr nativeHandle)
Constructs a managed wrapper from an existing native peer. The peer object will not be automatically finalized
virtual void Dispose(bool disposing, bool destroyNativeHandle =true)
The actual implementation of Dispose - called by both the Dispose method and the finalizer.
virtual void OnDispose()

Protected Attributes inherited from Wombat.MamaWrapper

  Name
IntPtr nativeHandle
the handle to the native peer object

Detailed Description

class Wombat::MamaDictionary;

Maps field identifiers (FIDs) to human-readable strings

Any incoming MamaMsg might contain FIDs but no field names. The dictionary allows applications to determine the name associated with a given FID.

Public Functions Documentation

function MamaDictionary

MamaDictionary()

Default constructor

function create

void create(
    MamaQueue queue,
    MamaDictionaryCallback callback,
    MamaSource source,
    int retries,
    double timeout
)

Create a data dictionary from a subscription

function create

void create(
    string filename
)

function writeToFile

void writeToFile(
    string filename
)

function getFeedName

string getFeedName()

function getFeedHost

string getFeedHost()

function getFieldByName

MamaFieldDescriptor getFieldByName(
    string fieldName
)

Return the descriptor of the field with the specified name.

If there is more than one field with the same name, the one with the lowest field id is returned.

function getMaxFid

int getMaxFid()

Returns the highest field identifier.

function getSize

int getSize()

Returns the the number of entries in the dictionary.

function getFieldByFid

MamaFieldDescriptor getFieldByFid(
    int fid
)

Return the field with the specified field FID. This method is very efficient.

function getFieldByIndex

MamaFieldDescriptor getFieldByIndex(
    int index
)

Return the field with the corresponding zero based index. This method is O (N) with respect to the size of the dictionary.

function buildDictionaryFromMessage

void buildDictionaryFromMessage(
    MamaMsg msg
)

Recreate a data dictionary from the MamaMsg supplied. The MamaMsg is copied and can therefore be deleted after the method has returned.

function getDictionaryMessage

MamaMsg getDictionaryMessage()

Returns a MamaMsg representing the data dictionary. This message can be published or used to create a new MamaDictionary object. A new MamaMsg is created for each invocation of the method. It is the responsibility of the caller to delete the message when no longer needed.

Protected Functions Documentation

function DestroyNativePeer

virtual override MamaStatus.mamaStatus DestroyNativePeer()

Implements the destruction of the underlying peer object

Reimplements: Wombat::MamaWrapper::DestroyNativePeer


Updated on 2023-03-31 at 15:29:32 +0100