![]() |
User Manual, Developers Guide and API Documentation |
![]() |
#include <ldk/FlowSeparator.hpp>


Public Types | |
| typedef std::list < ConnectorReceptacleSeparator * > | ConnectorReceptacleSeparatorList |
| typedef std::list < DelivererReceptacleSeparator * > | DelivererReceptacleSeparatorList |
| typedef std::map< ConstKeyPtr, FunctionalUnit *, DerefLess < ConstKeyPtr > > | InstanceMap |
| typedef std::list < ReceptorReceptacleSeparator * > | ReceptorReceptacleSeparatorList |
| typedef std::list< std::string > | StringList |
Public Member Functions | |
| void | addInstance (const ConstKeyPtr &key) |
| Register an instance for a given key. | |
| void | addInstance (const ConstKeyPtr &key, FunctionalUnit *functionalUnit) |
| Register an instance for a given key. | |
| FlowSeparator (const FlowSeparator &) | |
| FlowSeparator (fun::FUN *fuNet, const pyconfig::View &_config) | |
| FunctionalUnitFactory compliant constructor for automatic FUN creation. | |
| FlowSeparator (fun::FUN *fuNet, const pyconfig::View &_config, std::auto_ptr< KeyBuilder > _keyBuilder, std::auto_ptr< flowseparator::NotFoundStrategy > _notFound) | |
| Constructor for FlowSeparator usage outside automatic FUN creation. | |
| FunctionalUnit * | getInstance (const CompoundPtr &compound, int direction) const |
| FunctionalUnit * | getInstance (const ConstKeyPtr &key) const |
| Return the instance matching a key. | |
| ConstKeyPtr | getKey (const CompoundPtr &compound, int direction) const |
| Return the matching key for a given compound/direction. | |
| virtual void | onFUNCreated () |
| Resolve inter-FU dependencies. | |
| void | removeInstance (const ConstKeyPtr &key) |
| Remove an instance matching a key. | |
| virtual std::size_t | size () const |
| Return the number of instances currently managed by the FlowSeparator. | |
| virtual | ~FlowSeparator () |
Private Member Functions | |
| void | connectFU (FunctionalUnit *functionalUnit) const |
| Integrate FU instance. | |
| void | disintegrate (const ConstKeyPtr &key) |
| Disintegrate FU instance. | |
| void | init () |
| void | integrate (const ConstKeyPtr &key, FunctionalUnit *functionalUnit) |
| Integrate FU instance. | |
CompoundHandlerInterface | |
The CompoundHandlerInterface methods (isAccepting, doSendData, doOnData, wakeup) are delegated to the matching instance.
Instance retrieval is delegated to the internal implementation _getInstance. If no matching instance is found, new instances may get instantiated on the fly. In future this may depend on the FlowSeparator configuration. | |
| virtual bool | doIsAccepting (const CompoundPtr &compound) const |
| virtual void | doOnData (const CompoundPtr &compound) |
| virtual void | doSendData (const CompoundPtr &compound) |
| virtual void | doWakeup () |
Private Attributes | |
| pyconfig::View | config |
| ConnectorReceptacleSeparator * | connectorReceptacleSinglePort_ |
| ConnectorReceptacleSeparatorList | crsList_ |
| DelivererReceptacleSeparator * | delivererReceptacleSinglePort_ |
| wns::distribution::StandardUniform | dis |
| DelivererReceptacleSeparatorList | drsList_ |
| FunctionalUnit * | instanceBusy |
| InstanceMap | instances |
| std::auto_ptr< KeyBuilder > | keyBuilder |
| logger::Logger | logger |
| std::auto_ptr < flowseparator::NotFoundStrategy > | notFound |
| FunctionalUnit * | prototypeFU_ |
| ReceptorReceptacleSeparator * | receptorReceptacleSinglePort_ |
| ReceptorReceptacleSeparatorList | rrsList_ |
Friends | |
| class | ConnectorReceptacleSeparator |
Classes | |
| class | ConnectorReceptacleSeparator |
| class | DelivererReceptacleSeparator |
| class | InstanceNotFound |
| class | ReceptacleManagement |
| class | ReceptorReceptacleSeparator |
Definition at line 76 of file FlowSeparator.hpp.
| typedef std::list<ConnectorReceptacleSeparator*> wns::ldk::FlowSeparator::ConnectorReceptacleSeparatorList |
Definition at line 290 of file FlowSeparator.hpp.
| typedef std::list<DelivererReceptacleSeparator*> wns::ldk::FlowSeparator::DelivererReceptacleSeparatorList |
Definition at line 291 of file FlowSeparator.hpp.
| typedef std::map<ConstKeyPtr, FunctionalUnit*, DerefLess<ConstKeyPtr> > wns::ldk::FlowSeparator::InstanceMap |
Definition at line 288 of file FlowSeparator.hpp.
| typedef std::list<ReceptorReceptacleSeparator*> wns::ldk::FlowSeparator::ReceptorReceptacleSeparatorList |
Definition at line 292 of file FlowSeparator.hpp.
| typedef std::list<std::string> wns::ldk::FlowSeparator::StringList |
Definition at line 289 of file FlowSeparator.hpp.
| wns::ldk::FlowSeparator::FlowSeparator | ( | fun::FUN * | fuNet, | |
| const pyconfig::View & | _config, | |||
| std::auto_ptr< KeyBuilder > | _keyBuilder, | |||
| std::auto_ptr< flowseparator::NotFoundStrategy > | _notFound | |||
| ) |
| FlowSeparator::FlowSeparator | ( | fun::FUN * | fuNet, | |
| const pyconfig::View & | _config | |||
| ) |
Definition at line 233 of file FlowSeparator.cpp.
| FlowSeparator::FlowSeparator | ( | const FlowSeparator & | other | ) |
Definition at line 272 of file FlowSeparator.cpp.
| FlowSeparator::~FlowSeparator | ( | ) | [virtual] |
Definition at line 421 of file FlowSeparator.cpp.
| void wns::ldk::FlowSeparator::addInstance | ( | const ConstKeyPtr & | key | ) |
Don't keep references to key or functionalUnit, since FlowSeparator is authorized to delete them.
| void wns::ldk::FlowSeparator::addInstance | ( | const ConstKeyPtr & | key, | |
| FunctionalUnit * | functionalUnit | |||
| ) |
Don't keep references to key or functionalUnit, since FlowSeparator is authorized to delete them.
| void FlowSeparator::connectFU | ( | FunctionalUnit * | functionalUnit | ) | const [private] |
Apply bookkeeping and link instance into the FUN.
Definition at line 574 of file FlowSeparator.cpp.
| void wns::ldk::FlowSeparator::disintegrate | ( | const ConstKeyPtr & | key | ) | [private] |
Undo a previous integrateInstance.
| bool FlowSeparator::doIsAccepting | ( | const CompoundPtr & | compound | ) | const [private, virtual] |
Definition at line 558 of file FlowSeparator.cpp.
| void FlowSeparator::doOnData | ( | const CompoundPtr & | compound | ) | [private, virtual] |
Definition at line 480 of file FlowSeparator.cpp.
| void FlowSeparator::doSendData | ( | const CompoundPtr & | compound | ) | [private, virtual] |
Definition at line 472 of file FlowSeparator.cpp.
| void FlowSeparator::doWakeup | ( | ) | [private, virtual] |
Definition at line 566 of file FlowSeparator.cpp.
| FunctionalUnit * FlowSeparator::getInstance | ( | const CompoundPtr & | compound, | |
| int | direction | |||
| ) | const |
Definition at line 507 of file FlowSeparator.cpp.
| FunctionalUnit* wns::ldk::FlowSeparator::getInstance | ( | const ConstKeyPtr & | key | ) | const |
Returns NULL if no instance matching the key is found.
| ConstKeyPtr FlowSeparator::getKey | ( | const CompoundPtr & | compound, | |
| int | direction | |||
| ) | const |
Definition at line 513 of file FlowSeparator.cpp.
| void FlowSeparator::init | ( | ) | [private] |
Definition at line 280 of file FlowSeparator.cpp.
| void wns::ldk::FlowSeparator::integrate | ( | const ConstKeyPtr & | key, | |
| FunctionalUnit * | functionalUnit | |||
| ) | [private] |
Apply bookkeeping and link instance into the FUN.
| void FlowSeparator::onFUNCreated | ( | ) | [virtual] |
Often FunctionalUnits require the collaboration with other FunctionalUnits to accomplish their task. For the collaboration between FunctionalUnits we coined the term "friendship".
The onFUNCreated method is a hook being called after the complete FUN has been set up. FunctionalUnits requiring the collaboration with other FunctionalUnits should resolve these dependencies by implementing this hook accordingly.
Finding friends is usually done calling wns::ldk::fun::FUN::findFriend.
When building reconfigurable FUNs, this method may get called multiple times (e.g., after each FUN reconfiguration). Keep that in mind when allocating resources in your onFUNCreated implementation.
Reimplemented from wns::ldk::FunctionalUnit.
Definition at line 455 of file FlowSeparator.cpp.
| void wns::ldk::FlowSeparator::removeInstance | ( | const ConstKeyPtr & | key | ) |
Removes the FU matching the key and frees all resources (key and FU).
| std::size_t FlowSeparator::size | ( | ) | const [virtual] |
Definition at line 488 of file FlowSeparator.cpp.
friend class ConnectorReceptacleSeparator [friend] |
Definition at line 294 of file FlowSeparator.hpp.
Definition at line 441 of file FlowSeparator.hpp.
Definition at line 436 of file FlowSeparator.hpp.
Definition at line 431 of file FlowSeparator.hpp.
Definition at line 437 of file FlowSeparator.hpp.
Definition at line 447 of file FlowSeparator.hpp.
Definition at line 432 of file FlowSeparator.hpp.
Definition at line 439 of file FlowSeparator.hpp.
Definition at line 430 of file FlowSeparator.hpp.
std::auto_ptr<KeyBuilder> wns::ldk::FlowSeparator::keyBuilder [private] |
Definition at line 443 of file FlowSeparator.hpp.
Definition at line 449 of file FlowSeparator.hpp.
std::auto_ptr<flowseparator::NotFoundStrategy> wns::ldk::FlowSeparator::notFound [private] |
Definition at line 445 of file FlowSeparator.hpp.
Definition at line 435 of file FlowSeparator.hpp.
Definition at line 438 of file FlowSeparator.hpp.
Definition at line 433 of file FlowSeparator.hpp.
1.5.5