MamaSymbolList manages a list of MAMA symbols and related attributes. More...
#include <MamaSymbolList.h>
Public Member Functions | |
MamaSymbolList () | |
virtual | ~MamaSymbolList () |
void | addMembershipHandler (MamaSymbolListMembershipHandler *handler) |
Add a "membership" handler that implements the MamaSymbolListMembershipHandler interface. More... | |
void | addMember (MamaSymbolListMember *member) |
Add a symbol to the list. More... | |
MamaSymbolListMember * | findMember (const char *symbol, const char *source, mamaTransport transport) |
Find a symbol in the list. More... | |
MamaSymbolListMember * | removeMember (const char *symbol, const char *source, mamaTransport transport) |
Remove a symbol from the list (providing it exists in the list). More... | |
void | removeMember (MamaSymbolListMember &member) |
Remove a symbol from the list (providing it exists in the list). More... | |
void | removeMemberAll (void) |
Remove all symbols from the list (providing it exists in the list). More... | |
void | clear () |
Remove all symbols from the list. More... | |
void | dump () |
Dump the contents of the list to stdout. More... | |
bool | empty () const |
mama_size_t | size () const |
void | setClosure (void *closure) |
Set the closure. More... | |
void * | getClosure () const |
Get the closure. More... | |
void | iterate (MamaSymbolListIteratorHandler &handler, void *iterateClosure=NULL) |
Iterate over all members of the symbol list. More... | |
mamaSymbolList | getCValue () |
Get the underlying Impl at C level. More... | |
const mamaSymbolList | getCValue () const |
Get the underlying Impl at C level. More... | |
Public Attributes | |
MamaSymbolListImpl * | myPimpl |
Protected Attributes | |
mamaSymbolList | myList |
MamaSymbolList manages a list of MAMA symbols and related attributes.
Methods are provided for creating, updating and sorting the members of the list. Handler interfaces are provided so that it is possible to handle asynchronous/external changes to the symbol list, as many types of symbol lists can be quite dynamic.
Wombat::MamaSymbolList::MamaSymbolList | ( | ) |
|
virtual |
void Wombat::MamaSymbolList::addMembershipHandler | ( | MamaSymbolListMembershipHandler * | handler | ) |
Add a "membership" handler that implements the MamaSymbolListMembershipHandler interface.
Multiple handlers may be registered.
handler | The handler to be registered. |
void Wombat::MamaSymbolList::addMember | ( | MamaSymbolListMember * | member | ) |
Add a symbol to the list.
The list maintains a unique list of symbols.
member | The symbol member to be added. |
MamaSymbolListMember* Wombat::MamaSymbolList::findMember | ( | const char * | symbol, |
const char * | source, | ||
mamaTransport | transport | ||
) |
Find a symbol in the list.
symbol | The name of the symbol to be removed. |
source | The source of the symbol to be removed. |
transport | The transport of the symbol to be removed. |
MamaSymbolListMember* Wombat::MamaSymbolList::removeMember | ( | const char * | symbol, |
const char * | source, | ||
mamaTransport | transport | ||
) |
Remove a symbol from the list (providing it exists in the list).
The member itself is not destroyed but returned as the result of this method.
symbol | The symbol to be removed. |
source | The source of the symbol to be removed |
transport | The transport of the symbol to be removed |
void Wombat::MamaSymbolList::removeMember | ( | MamaSymbolListMember & | member | ) |
Remove a symbol from the list (providing it exists in the list).
The member itself is not destroyed.
member | The member to be removed. |
void Wombat::MamaSymbolList::removeMemberAll | ( | void | ) |
Remove all symbols from the list (providing it exists in the list).
The member itself is not destroyed.
void Wombat::MamaSymbolList::clear | ( | ) |
Remove all symbols from the list.
Handlers remain registered.
void Wombat::MamaSymbolList::dump | ( | ) |
Dump the contents of the list to stdout.
For debugging.
bool Wombat::MamaSymbolList::empty | ( | ) | const |
mama_size_t Wombat::MamaSymbolList::size | ( | ) | const |
void Wombat::MamaSymbolList::setClosure | ( | void * | closure | ) |
Set the closure.
closure | The closure. |
void* Wombat::MamaSymbolList::getClosure | ( | ) | const |
Get the closure.
void Wombat::MamaSymbolList::iterate | ( | MamaSymbolListIteratorHandler & | handler, |
void * | iterateClosure = NULL |
||
) |
Iterate over all members of the symbol list.
handler | Handler invoked for each member of the symbol list. |
iterateClosure | The closure passed to the MamaSymbolListIteratorHandler::onMember() interface. |
mamaSymbolList Wombat::MamaSymbolList::getCValue | ( | ) |
Get the underlying Impl at C level.
const mamaSymbolList Wombat::MamaSymbolList::getCValue | ( | ) | const |
Get the underlying Impl at C level.
MamaSymbolListImpl* Wombat::MamaSymbolList::myPimpl |
|
protected |