OpenMAMA C++ API
Wombat::MamaSource Class Reference

A MAMA source maintains information about a data source, including the quality of the data coming from that source. More...

#include <MamaSource.h>

Inheritance diagram for Wombat::MamaSource:
Wombat::MamaSourceManager Wombat::MamaSourceDerivative

Public Member Functions

 MamaSource ()
 
 MamaSource (const char *id, const char *transportName, const char *subscSourceName, mamaBridge bridge, bool createTransport=true)
 
 MamaSource (const char *id, MamaTransport *transport, const char *subscSourceName)
 
virtual ~MamaSource ()
 
void setId (const char *id)
 
void setMappedId (const char *id)
 
void setDisplayId (const char *id)
 
void setQuality (mamaQuality quality)
 
void setState (mamaSourceState state)
 
void setParent (MamaSource *parent)
 
void setTransport (MamaTransport *transport)
 
void setTransportName (const char *transportName)
 
void setPublisherSourceName (const char *sourceName)
 
virtual const char * getId () const
 
virtual const char * getMappedId () const
 
virtual const char * getDisplayId () const
 
virtual mamaQuality getQuality () const
 
virtual mamaSourceState getState () const
 
virtual MamaSourcegetParent ()
 
virtual const MamaSourcegetParent () const
 
virtual MamaTransportgetTransport () const
 
virtual const char * getTransportName () const
 
virtual const char * getPublisherSourceName () const
 
mamaSource getCValue ()
 
const mamaSource getCValue () const
 
bool isPartOf (const MamaSource *source) const
 Is this source part of the supplied source i.e. More...
 
void addSubscription (const char *symbol, MamaSubscription *sub)
 Add a subscription. More...
 
MamaSubscriptionfindSubscription (const char *symbol)
 Look up a MamaSubscription. More...
 
MamaSubscriptionremoveSubscription (const char *symbol)
 Remove a MamaSubscription. More...
 
void deactivateSubscriptions ()
 Activate all subscriptions for this source. More...
 
void activateSubscriptions ()
 deactivate all subscriptions for this source. More...
 
void forEachSubscription (MamaSubscriptionIteratorCallback *callback, void *closure)
 Iterate through all subscriptions and call the MamaSubscriptionIterator's onSubscription method for each. More...
 
- Public Member Functions inherited from Wombat::MamaSourceManager
 MamaSourceManager ()
 
virtual ~MamaSourceManager ()
 
virtual MamaSourcecreate (const char *sourceName)
 
virtual MamaSourcefindOrCreate (const char *sourceName)
 
virtual MamaSourcefind (const char *sourceName)
 
virtual const MamaSourcefind (const char *sourceName) const
 
virtual void add (MamaSource *source)
 
virtual void add (const char *sourceName, MamaSource *source)
 
mama_size_t size () const
 
iterator begin ()
 
const_iterator begin () const
 
iterator end ()
 
const_iterator end () const
 
mamaSourceManager getCValue ()
 
const mamaSourceManager getCValue () const
 

Additional Inherited Members

- Public Types inherited from Wombat::MamaSourceManager
typedef const iterator const_iterator
 

Detailed Description

A MAMA source maintains information about a data source, including the quality of the data coming from that source.

It inherits MamaSourceManager because a source can have sub-sources.

Constructor & Destructor Documentation

§ MamaSource() [1/3]

Wombat::MamaSource::MamaSource ( )

§ MamaSource() [2/3]

Wombat::MamaSource::MamaSource ( const char *  id,
const char *  transportName,
const char *  subscSourceName,
mamaBridge  bridge,
bool  createTransport = true 
)

§ MamaSource() [3/3]

Wombat::MamaSource::MamaSource ( const char *  id,
MamaTransport transport,
const char *  subscSourceName 
)

§ ~MamaSource()

virtual Wombat::MamaSource::~MamaSource ( )
virtual

Member Function Documentation

§ setId()

void Wombat::MamaSource::setId ( const char *  id)

§ setMappedId()

void Wombat::MamaSource::setMappedId ( const char *  id)

§ setDisplayId()

void Wombat::MamaSource::setDisplayId ( const char *  id)

§ setQuality()

void Wombat::MamaSource::setQuality ( mamaQuality  quality)

§ setState()

void Wombat::MamaSource::setState ( mamaSourceState  state)

§ setParent()

void Wombat::MamaSource::setParent ( MamaSource parent)

§ setTransport()

void Wombat::MamaSource::setTransport ( MamaTransport transport)

§ setTransportName()

void Wombat::MamaSource::setTransportName ( const char *  transportName)

§ setPublisherSourceName()

void Wombat::MamaSource::setPublisherSourceName ( const char *  sourceName)

§ getId()

virtual const char* Wombat::MamaSource::getId ( ) const
virtual

§ getMappedId()

virtual const char* Wombat::MamaSource::getMappedId ( ) const
virtual

§ getDisplayId()

virtual const char* Wombat::MamaSource::getDisplayId ( ) const
virtual

§ getQuality()

virtual mamaQuality Wombat::MamaSource::getQuality ( ) const
virtual

Reimplemented in Wombat::MamaSourceDerivative.

§ getState()

virtual mamaSourceState Wombat::MamaSource::getState ( ) const
virtual

Reimplemented in Wombat::MamaSourceDerivative.

§ getParent() [1/2]

virtual MamaSource* Wombat::MamaSource::getParent ( )
virtual

§ getParent() [2/2]

virtual const MamaSource* Wombat::MamaSource::getParent ( ) const
virtual

§ getTransport()

virtual MamaTransport* Wombat::MamaSource::getTransport ( ) const
virtual

§ getTransportName()

virtual const char* Wombat::MamaSource::getTransportName ( ) const
virtual

§ getPublisherSourceName()

virtual const char* Wombat::MamaSource::getPublisherSourceName ( ) const
virtual

§ getCValue() [1/2]

mamaSource Wombat::MamaSource::getCValue ( )

§ getCValue() [2/2]

const mamaSource Wombat::MamaSource::getCValue ( ) const

§ isPartOf()

bool Wombat::MamaSource::isPartOf ( const MamaSource source) const

Is this source part of the supplied source i.e.

Is it the same as the supplied source or is the supplied source a parent (or parent of a parent) of this source

§ addSubscription()

void Wombat::MamaSource::addSubscription ( const char *  symbol,
MamaSubscription sub 
)

Add a subscription.

§ findSubscription()

MamaSubscription* Wombat::MamaSource::findSubscription ( const char *  symbol)

Look up a MamaSubscription.

NULL is returned if not found.

§ removeSubscription()

MamaSubscription* Wombat::MamaSource::removeSubscription ( const char *  symbol)

Remove a MamaSubscription.

Subscription return is the subscription removed from list of associated subscriptions. NULL is returned if not found.

§ deactivateSubscriptions()

void Wombat::MamaSource::deactivateSubscriptions ( )

Activate all subscriptions for this source.

§ activateSubscriptions()

void Wombat::MamaSource::activateSubscriptions ( )

deactivate all subscriptions for this source.

§ forEachSubscription()

void Wombat::MamaSource::forEachSubscription ( MamaSubscriptionIteratorCallback callback,
void *  closure 
)

Iterate through all subscriptions and call the MamaSubscriptionIterator's onSubscription method for each.