OpenMAMA
symbolmapfile.h File Reference
#include "mama/mama.h"

Go to the source code of this file.

Typedefs

typedef voidmamaSymbolMapFile
 

Functions

MAMAExpDLL void mamaSymbolMapFile_addMap (mamaSymbolMapFile fileMap, const char *fromSymbol, const char *toSymbol)
 Add additional individual symbology mapping. More...
 
MAMAExpDLL mama_status mamaSymbolMapFile_create (mamaSymbolMapFile *fileMap)
 Create a file-based symbol mapper. More...
 
MAMAExpDLL mama_status mamaSymbolMapFile_destroy (mamaSymbolMapFile fileMap)
 Destroy the file-based symbol mapper. More...
 
MAMAExpDLL mama_status mamaSymbolMapFile_load (mamaSymbolMapFile fileMap, const char *fileName)
 (Re)Load the map for the file-based symbol mapper. More...
 
MAMAExpDLL int mamaSymbolMapFile_map (mamaSymbolMapFile fileMap, char *result, const char *symbol, size_t maxLen)
 Perform a mapping from the file-based symbol mapper. More...
 
MAMAExpDLL int mamaSymbolMapFile_revMap (mamaSymbolMapFile fileMap, char *result, const char *symbol, size_t maxLen)
 Perform a reverse mapping from the file-based symbol mapper. More...
 

Typedef Documentation

Function Documentation

MAMAExpDLL void mamaSymbolMapFile_addMap ( mamaSymbolMapFile  fileMap,
const char *  fromSymbol,
const char *  toSymbol 
)

Add additional individual symbology mapping.

Parameters
fileMapHandle to the file-map to destroy.
fromSymbolThe from symbol.
toSymbolThe to symbol.
MAMAExpDLL mama_status mamaSymbolMapFile_create ( mamaSymbolMapFile fileMap)

Create a file-based symbol mapper.

Use mamaSymbolMapFile_load() to open the file. If the file exists, its contents should be a 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. when performing the mapping, if the symbol does not match anything in the file (or the file cannot be found), then the original symbol is used (i.e., no mapping).

Parameters
fileMapThe initialized file-map handle.
Returns
mama_status return value can be one of MAMA_STATUS_NOMEM MAMA_STATUS_OK
MAMAExpDLL mama_status mamaSymbolMapFile_destroy ( mamaSymbolMapFile  fileMap)

Destroy the file-based symbol mapper.

Parameters
fileMapHandle to the file-map to destroy.
Returns
mama_status return value can be one of MAMA_STATUS_INVALID_ARG MAMA_STATUS_OK
MAMAExpDLL mama_status mamaSymbolMapFile_load ( mamaSymbolMapFile  fileMap,
const char *  fileName 
)

(Re)Load the map for the file-based symbol mapper.

Parameters
fileMapHandle to the file-map to destroy.
fileNameThe name of the file containing symbols to map.
Returns
mama_status return value can be one of MAMA_STATUS_INVALID_ARG MAMA_STATUS_OK
MAMAExpDLL int mamaSymbolMapFile_map ( mamaSymbolMapFile  fileMap,
char *  result,
const char *  symbol,
size_t  maxLen 
)

Perform a mapping from the file-based symbol mapper.

Parameters
fileMapHandle to the file-map.
resultReturned "toSymbol" (feed side).
symbol"fromSymbol" (client side).
maxLenMax buffer length of result.
Returns
1 if a symbol could be mapped else 0.
MAMAExpDLL int mamaSymbolMapFile_revMap ( mamaSymbolMapFile  fileMap,
char *  result,
const char *  symbol,
size_t  maxLen 
)

Perform a reverse mapping from the file-based symbol mapper.

Parameters
fileMapHandle to the file-map.
resultReturned "fromSymbol" (client side).
symbol"toSymbol" (feed side).
maxLenMax buffer length of result.


© 2012 Linux Foundation