OpenMAMA C++ API
Wombat::MamaSymbolMapFile Class Reference

MamaSymbolMapFile is a concrete implementation of a symbology map. More...

#include <MamaSymbolMapFile.h>

Inheritance diagram for Wombat::MamaSymbolMapFile:
Wombat::MamaSymbolMap

Public Member Functions

 MamaSymbolMapFile ()
 
virtual ~MamaSymbolMapFile ()
 
virtual mama_status load (const char *mapFileName)
 
virtual void addMap (const char *fromSymbol, const char *toSymbol)
 
virtual bool map (char *result, const char *symbol, size_t maxLen) const
 Map a symbol. More...
 
virtual bool revMap (char *result, const char *symbol, size_t maxLen) const
 Map a feed side symbol. More...
 
- Public Member Functions inherited from Wombat::MamaSymbolMap
virtual ~MamaSymbolMap (void)
 

Detailed Description

MamaSymbolMapFile is a concrete implementation of a symbology map.

It can load a filename and expects the contents of that file to contain two columns of data, with the columns separated by white space. A matching symbol of the left column is mapped to the symbol in the right column. If the symbol does not match anything in the file (or the file cannot be found), then the original symbol is used (no mapping).

Constructor & Destructor Documentation

§ MamaSymbolMapFile()

Wombat::MamaSymbolMapFile::MamaSymbolMapFile ( )

§ ~MamaSymbolMapFile()

virtual Wombat::MamaSymbolMapFile::~MamaSymbolMapFile ( )
virtual

Member Function Documentation

§ load()

virtual mama_status Wombat::MamaSymbolMapFile::load ( const char *  mapFileName)
virtual

§ addMap()

virtual void Wombat::MamaSymbolMapFile::addMap ( const char *  fromSymbol,
const char *  toSymbol 
)
virtual

§ map()

virtual bool Wombat::MamaSymbolMapFile::map ( char *  result,
const char *  symbol,
size_t  maxLen 
) const
virtual

Map a symbol.

The result is the feed side symbol used to actually subscribe to in the infrastructure. The return value indicates whether or not a symbology mapping existed for the given symbol (True = yes, False = No).

Implements Wombat::MamaSymbolMap.

§ revMap()

virtual bool Wombat::MamaSymbolMapFile::revMap ( char *  result,
const char *  symbol,
size_t  maxLen 
) const
virtual

Map a feed side symbol.

This is reverse of the natural mapping schema and the result in this case is the corresponding client side symbol. The return value indicates whether or not a symbology mapping existed for the given symbol (True = yes, False = No).

Implements Wombat::MamaSymbolMap.