Ginga  0.13.6.2086-83aa
The iTV middleware.
Context Class Reference
Inheritance diagram for Context:
Collaboration diagram for Context:

Public Member Functions

 Context (const string &)
 
string getObjectTypeAsString () override
 
string toString () override
 
string getProperty (const string &) override
 
void setProperty (const string &, const string &, Time dur=0) override
 
void sendKey (const string &, bool) override
 
void sendTick (Time, Time, Time) override
 
bool beforeTransition (Event *, Event::Transition) override
 Initiates event transition. More...
 
bool afterTransition (Event *, Event::Transition) override
 Finishes event transition. More...
 
const list< Event * > * getPorts ()
 
void addPort (Event *)
 
const list< pair< list< Action >, list< Action > > > * getLinks ()
 
void addLink (list< Action >, list< Action >)
 
void incAwakeChildren ()
 
void decAwakeChildren ()
 
bool getLinksStatus ()
 
void setLinksStatus (bool)
 
- Public Member Functions inherited from Composition
 Composition (const string &)
 
const set< Object * > * getChildren ()
 
ObjectgetChildById (const string &)
 
ObjectgetChildByIdOrAlias (const string &)
 
void addChild (Object *)
 
- Public Member Functions inherited from Object
 Object (const string &)
 
string getId ()
 
DocumentgetDocument ()
 
void initDocument (Document *)
 
CompositiongetParent ()
 
void initParent (Composition *)
 
const list< string > * getAliases ()
 
bool hasAlias (const string &)
 
void addAlias (const string &)
 
const set< Event * > * getEvents ()
 
EventgetEvent (Event::Type, const string &)
 
EventgetAttributionEvent (const string &)
 
void addAttributionEvent (const string &)
 
EventgetPresentationEvent (const string &)
 
EventgetPresentationEventByLabel (const string &)
 
void addPresentationEvent (const string &, Time, Time)
 
void addPresentationEvent (const string &, const string &)
 
EventgetSelectionEvent (const string &)
 
void addSelectionEvent (const string &)
 
EventgetLambda ()
 
bool isOccurring ()
 
bool isPaused ()
 
bool isSleeping ()
 
const list< pair< Action, Time > > * getDelayedActions ()
 
void addDelayedAction (Event *, Event::Transition, const string &value="", Time delay=0)
 

Private Attributes

list< Event * > _ports
 List of ports.
 
list< pair< list< Action >, list< Action > > > _links
 List of links.
 
int _awakeChildren
 Counts awake children.
 
bool _status
 Whether links are active.
 

Additional Inherited Members

- Protected Member Functions inherited from Object
virtual void doStart ()
 
virtual void doStop ()
 
- Protected Attributes inherited from Composition
set< Object * > _children
 
- Protected Attributes inherited from Object
string _id
 
Document_doc
 
Composition_parent
 
list< string > _aliases
 
Time _time
 
map< string, string > _properties
 
Event_lambda
 
set< Event * > _events
 
list< pair< Action, Time > > _delayed
 

Member Function Documentation

◆ afterTransition()

bool Context::afterTransition ( Event ,
Event::Transition   
)
overridevirtual

Finishes event transition.

This function is called by Event::transition() immediately after transitioning evt. If the transition can finish successfully, the function returns true. Otherwise, if the transition must be reverted, e.g., due to some error, the function returns false.

Parameters
evtEvent that was transitioned.
transitionThe transition.
Returns
true if successful, or false otherwise (cancel transition).

Implements Object.

◆ beforeTransition()

bool Context::beforeTransition ( Event ,
Event::Transition   
)
overridevirtual

Initiates event transition.

This function is called by Event::transition() immediately before transitioning evt. If the transition can go on, the function returns true. Otherwise, if the transition must be cancelled, e.g., due to some error, the function returns false.

Parameters
evtEvent to be transitioned.
transitionThe desired transition.
Returns
true if successful, or false otherwise (cancel transition).

Implements Object.


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