CoreLinux++  0.4.32
Public Member Functions | Protected Member Functions | List of all members
corelinux::Colleague Class Referenceabstract

Colleague knows its Mediator object, communicates with its mediator whenever it would have otherwise communicated with another Colleague. More...

#include <Colleague.hpp>

Public Member Functions

 Colleague (MediatorPtr) throw ( NullPointerException )
 Default constructor requires a Mediator. More...
 
 Colleague (ColleagueCref)
 Copy constructor copies the mediator reference. More...
 
virtual ~Colleague (void)
 Virtual destructor.
 
ColleagueRef operator= (ColleagueCref)
 Assignment operator.
 
bool operator== (ColleagueCref) const
 Equality operator.
 
virtual void getEventsGenerated (EventIdentifiersRef)=0
 Implementation defined to return the identifiers of the events that this Colleague generates. More...
 
virtual void getInterestedEvents (EventIdentifiersRef)=0
 Implementation defined to return the identifiers of the events that this Colleague is interested in. More...
 
virtual void action (Event< Identifier > *)=0
 Called by the mediator when another Colleague has generated an event that this colleague instance is interested in. More...
 

Protected Member Functions

 Colleague (void) throw ( Assertion )
 Default constructor not allowed.
 
virtual void invokeMediator (Event< Identifier > *) throw ( NullPointerException )
 Called by the Colleague implementation to have the Mediator::action called with the event type. More...
 

Detailed Description

Colleague knows its Mediator object, communicates with its mediator whenever it would have otherwise communicated with another Colleague.

Constructor & Destructor Documentation

§ Colleague() [1/2]

corelinux::Colleague::Colleague ( MediatorPtr  aMediator)
throw (NullPointerException
)

Default constructor requires a Mediator.

Parameters
Mediatorpointer
Exceptions
NullPointerExceptionif MediatorPtr is NULLPTR

§ Colleague() [2/2]

corelinux::Colleague::Colleague ( ColleagueCref  aColleague)

Copy constructor copies the mediator reference.

Parameters
Colleagueconst referencee

Member Function Documentation

§ action()

virtual void corelinux::Colleague::action ( Event< Identifier > *  )
pure virtual

Called by the mediator when another Colleague has generated an event that this colleague instance is interested in.

Parameters
Eventpointer to event

§ getEventsGenerated()

virtual void corelinux::Colleague::getEventsGenerated ( EventIdentifiersRef  )
pure virtual

Implementation defined to return the identifiers of the events that this Colleague generates.

Parameters
EventIdentifiersvector reference

§ getInterestedEvents()

virtual void corelinux::Colleague::getInterestedEvents ( EventIdentifiersRef  )
pure virtual

Implementation defined to return the identifiers of the events that this Colleague is interested in.

Parameters
EventIdentifiersvector reference

§ invokeMediator()

void corelinux::Colleague::invokeMediator ( Event< Identifier > *  anEvent)
throw (NullPointerException
)
protectedvirtual

Called by the Colleague implementation to have the Mediator::action called with the event type.

Parameters
Eventpointer to event
Exceptions
NullPointerExceptionif EventPtr is NULLPTR

The documentation for this class was generated from the following files:

This is the CoreLinux++ reference manual
Provided by The CoreLinux Consortium