MamaSymbolListFile is a file based symbol list with the ability to detect external changes to the file. More...
#include <MamaSymbolListFile.h>
Public Member Functions | |
MamaSymbolListFile () | |
~MamaSymbolListFile () | |
void | setFileName (const char *fileName) |
Set the file name. | |
void | setBridge (const mamaBridge bridge) |
Set the bridge to use for creating transports. | |
void | readFile () |
Read the contents of the file into the symbol list. | |
void | writeFile () |
Write the symbol list to the file. | |
void | setFileMonitor (double checkSeconds, MamaQueue *queue) |
Set a timer to check whether the file has changed its contents. | |
![]() | |
MamaSymbolList () | |
virtual | ~MamaSymbolList () |
void | addMembershipHandler (MamaSymbolListMembershipHandler *handler) |
Add a "membership" handler that implements the MamaSymbolListMembershipHandler interface. | |
void | addMember (MamaSymbolListMember *member) |
Add a symbol to the list. | |
MamaSymbolListMember * | findMember (const char *symbol, const char *source, mamaTransport transport) |
Find a symbol in the list. | |
MamaSymbolListMember * | removeMember (const char *symbol, const char *source, mamaTransport transport) |
Remove a symbol from the list (providing it exists in the list). | |
void | removeMember (MamaSymbolListMember &member) |
Remove a symbol from the list (providing it exists in the list). | |
void | removeMemberAll (void) |
Remove all symbols from the list (providing it exists in the list). | |
void | clear () |
Remove all symbols from the list. | |
void | dump () |
Dump the contents of the list to stdout. | |
bool | empty () const |
mama_size_t | size () const |
void | setClosure (void *closure) |
Set the closure. | |
void * | getClosure () const |
Get the closure. | |
void | iterate (MamaSymbolListIteratorHandler &handler, void *iterateClosure=NULL) |
Iterate over all members of the symbol list. | |
mamaSymbolList | getCValue () |
Get the underlying Impl at C level. | |
const mamaSymbolList | getCValue () const |
Get the underlying Impl at C level. |
Additional Inherited Members | |
![]() | |
MamaSymbolListImpl * | myPimpl |
![]() | |
mamaSymbolList | myList |
MamaSymbolListFile is a file based symbol list with the ability to detect external changes to the file.
The file's structure is as follows:
For example: IBM CTA default DIS CTA default MSFT NASDAQ default
Wombat::MamaSymbolListFile::MamaSymbolListFile | ( | ) |
Wombat::MamaSymbolListFile::~MamaSymbolListFile | ( | ) |
void Wombat::MamaSymbolListFile::setFileName | ( | const char * | fileName | ) |
Set the file name.
void Wombat::MamaSymbolListFile::setBridge | ( | const mamaBridge | bridge | ) |
Set the bridge to use for creating transports.
void Wombat::MamaSymbolListFile::readFile | ( | ) |
Read the contents of the file into the symbol list.
void Wombat::MamaSymbolListFile::writeFile | ( | ) |
Write the symbol list to the file.
void Wombat::MamaSymbolListFile::setFileMonitor | ( | double | checkSeconds, |
MamaQueue * | queue | ||
) |
Set a timer to check whether the file has changed its contents.
If the contents have changed, various add/remove membership events may be applied to the MamaSymbolList.