#include <StrMod/RouterModule.h>
Inheritance diagram for strmod::strmod::RouterModule:

Public Methods | |
| RouterModule (unievent::Dispatcher &disp) | |
| Construct, given the strmod::unievent::Dispatcher to use to post scan events. | |
| virtual | ~RouterModule () |
| Destroy the RouterModule and all of its plugs. | |
| virtual int | AreYouA (const lcore::ClassIdent &cid) const |
| Asks if a class is of a particular type, or publicly derived from that type. | |
| virtual bool | canCreate (int side) const=0 |
| Can a plug be created on the given side? | |
| virtual bool | ownsPlug (const Plug *plug) const |
| Does the module own this plug? | |
| virtual bool | deletePlug (Plug *plug) |
| Please delete this plug. | |
Static Public Attributes | |
| const STR_ClassIdent | identifier |
| A unique identifier for this class. | |
Protected Types | |
| typedef std::deque< RPlug * > | RPlugList |
| Just a type alias to avoid errors in typing deque<RPlug *>. | |
|
typedef std::back_insert_iterator< RPlugList > | RPlugAdder |
| Just a type alias to avoid errors in typing back_insert_iterator<RPlugList>. | |
Protected Methods | |
| virtual const lcore::ClassIdent * | i_GetIdent () const |
| Returns the class identifier for the class the object actually is. | |
| virtual Plug * | i_MakePlug (int side)=0 |
| Makes a plug on the given side. | |
| void | addNewPlug (RPlug *rp) |
| Add a new plug to the internal list of all plugs. | |
| void | postScan () |
| If a scan event isn't posted, post one. | |
| virtual void | getDestinations (const StrChunkPtr &chunk, const RPlug &source, const RPlugList::const_iterator &begin, const RPlugList::const_iterator &end, RPlugAdder &destlist) const=0 |
| Compute a list of destination plugs for a given incoming chunk. | |
Friends | |
| class | RPlug |
| class | ScanEvent |
Definition at line 49 of file RouterModule.h.
|
|
Add a new plug to the internal list of all plugs. Must be called before i_MakePlug returns a new plug! Definition at line 129 of file RouterModule.cxx. |
|
|
Asks if a class is of a particular type, or publicly derived from that type. Overriden in every derived class (with a static identifier member) to compare against the identifier, then call the AreYouA methods of all the superclasses.
Reimplemented from strmod::strmod::StreamModule. Definition at line 67 of file RouterModule.h. |
|
|
Please delete this plug. Modules are supposed to own plugs, so you aren't supposed to delete them yourself. Returns false on failure. Failure could happen because module does not own the plug. Implements strmod::strmod::StreamModule. Definition at line 109 of file RouterModule.cxx. |
|
||||||||||||||||||||||||
|
Compute a list of destination plugs for a given incoming chunk.
|
|
|
Returns the class identifier for the class the object actually is. Should always be overridden in any class that has a static identifier member. Reimplemented from strmod::strmod::StreamModule. Definition at line 78 of file RouterModule.h. |
|
|
Makes a plug on the given side. Guaranteed to never be called if canCreate would return false. Must NEVER return 0 (NULL). Implements strmod::strmod::StreamModule. |
|
|
If a scan event isn't posted, post one. A scan is always posted because a piece of data came in from an RPlug, and data is only allowed to in from a particular RPlug once per scan. This is to ensure that one RPlug cannot monopolize the RouterModule. Definition at line 163 of file RouterModule.h. |
1.3-rc1