A MAMA source group monitors a set of MAMA sources that presumably provide a duplicate set of data. More...
#include <MamaSourceGroup.h>
Classes | |
| class | iterator |
Public Types | |
| typedef const iterator | const_iterator |
Public Member Functions | |
| MamaSourceGroup (const char *name) | |
| ~MamaSourceGroup () | |
| const char * | getName () const |
| MamaSource * | find (const char *sourceName) |
| const MamaSource * | find (const char *sourceName) const |
| void | add (MamaSource *source, mama_u32_t weight) |
| void | add (const char *sourceName, mama_u32_t weight, MamaSource *source) |
| void | setWeight (const char *sourceName, mama_u32_t weight) |
| mama_u32_t | getWeight (const char *sourceName) const |
| mama_size_t | size () const |
| void | registerStateChangeCallback (MamaSourceStateChangeCallback &cb) |
| Applications interested in event notifications can register for events. More... | |
| void | unregisterStateChangeCallback (MamaSourceStateChangeCallback &cb) |
| Applications interested in event notifications can unregister for events. More... | |
| bool | reevaluate () |
| Re-evaluate the group by checking all of the relative weights and changing the state of each MamaSource in the group as appropriate. More... | |
| iterator | begin () |
| const_iterator | begin () const |
| iterator | end () |
| const_iterator | end () const |
A MAMA source group monitors a set of MAMA sources that presumably provide a duplicate set of data.
Each member of the group is given a priority and the member with the highest priority is given the mamaSourceState, MAMA_SOURCE_STATE_OK; the other members of the group are given the state, MAMA_SOURCE_STATE_OFF.
| typedef const iterator Wombat::MamaSourceGroup::const_iterator |
| Wombat::MamaSourceGroup::MamaSourceGroup | ( | const char * | name | ) |
| Wombat::MamaSourceGroup::~MamaSourceGroup | ( | ) |
| const char* Wombat::MamaSourceGroup::getName | ( | ) | const |
| MamaSource* Wombat::MamaSourceGroup::find | ( | const char * | sourceName | ) |
| const MamaSource* Wombat::MamaSourceGroup::find | ( | const char * | sourceName | ) | const |
| void Wombat::MamaSourceGroup::add | ( | MamaSource * | source, |
| mama_u32_t | weight | ||
| ) |
| void Wombat::MamaSourceGroup::add | ( | const char * | sourceName, |
| mama_u32_t | weight, | ||
| MamaSource * | source | ||
| ) |
| void Wombat::MamaSourceGroup::setWeight | ( | const char * | sourceName, |
| mama_u32_t | weight | ||
| ) |
| mama_u32_t Wombat::MamaSourceGroup::getWeight | ( | const char * | sourceName | ) | const |
| mama_size_t Wombat::MamaSourceGroup::size | ( | ) | const |
| void Wombat::MamaSourceGroup::registerStateChangeCallback | ( | MamaSourceStateChangeCallback & | cb | ) |
Applications interested in event notifications can register for events.
| cb | callback to register |
| void Wombat::MamaSourceGroup::unregisterStateChangeCallback | ( | MamaSourceStateChangeCallback & | cb | ) |
Applications interested in event notifications can unregister for events.
| cb | callback to unregister |
| bool Wombat::MamaSourceGroup::reevaluate | ( | ) |
Re-evaluate the group by checking all of the relative weights and changing the state of each MamaSource in the group as appropriate.
Returns true if any states were changed; otherwise false.
| iterator Wombat::MamaSourceGroup::begin | ( | ) |
| const_iterator Wombat::MamaSourceGroup::begin | ( | ) | const |
| iterator Wombat::MamaSourceGroup::end | ( | ) |
| const_iterator Wombat::MamaSourceGroup::end | ( | ) | const |