50 #ifndef _EXECUTIONOBJECT_H_
51 #define _EXECUTIONOBJECT_H_
53 #include "util/functions.h"
54 using namespace ::br::pucrio::telemidia::util;
56 #include "system/thread/Thread.h"
57 using namespace ::br::pucrio::telemidia::ginga::core::system::thread;
59 #include "mb/interface/CodeMap.h"
60 using namespace ::br::pucrio::telemidia::ginga::core::mb;
62 #include "player/IPlayer.h"
63 using namespace ::br::pucrio::telemidia::ginga::core::player;
65 #include "ncl/animation/Animation.h"
66 using namespace ::br::pucrio::telemidia::ncl::animation;
68 #include "ncl/descriptor/GenericDescriptor.h"
69 using namespace ::br::pucrio::telemidia::ncl::descriptor;
71 #include "ncl/components/ReferenceContent.h"
72 using namespace ::br::pucrio::telemidia::ncl::components;
74 #include "ncl/interfaces/LabeledAnchor.h"
75 #include "ncl/interfaces/LambdaAnchor.h"
76 #include "ncl/interfaces/IntervalAnchor.h"
77 #include "ncl/interfaces/PropertyAnchor.h"
78 using namespace ::br::pucrio::telemidia::ncl::interfaces;
80 #include "ncl/layout/LayoutRegion.h"
81 using namespace ::br::pucrio::telemidia::ncl::layout;
83 #include "ncl/connectors/EventUtil.h"
84 using namespace ::br::pucrio::telemidia::ncl::connectors;
86 #include "FormatterEvent.h"
87 #include "PresentationEvent.h"
88 #include "SelectionEvent.h"
89 #include "AttributionEvent.h"
90 using namespace ::br::pucrio::telemidia::ginga::ncl::model::event;
92 #include "BeginEventTransition.h"
93 #include "EndEventTransition.h"
94 #include "EventTransition.h"
95 #include "EventTransitionManager.h"
96 #include "TransitionDispatcher.h"
97 using namespace ::br::pucrio::telemidia::ginga::ncl::model::event::transition;
99 #include "CascadingDescriptor.h"
100 #include "FormatterRegion.h"
101 using namespace ::br::pucrio::telemidia::ginga::ncl::model::presentation;
103 #include "LinkSimpleAction.h"
104 #include "ILinkActionListener.h"
105 using namespace ::br::pucrio::telemidia::ginga::ncl::model::link;
107 #include "NodeNesting.h"
119 namespace telemidia {
123 namespace components {
128 CascadingDescriptor* descriptor;
131 PresentationEvent* wholeContent;
134 pthread_mutex_t mutex;
135 pthread_mutex_t mutexEvent;
136 pthread_mutex_t mutexParentTable;
138 ILinkActionListener* seListener;
146 map<Node*, Node*> nodeParentTable;
149 map<Node*, void*> parentTable;
156 map<string, FormatterEvent*> events;
157 vector<PresentationEvent*> presEvents;
158 set<SelectionEvent*> selectionEvents;
159 vector<FormatterEvent*> otherEvents;
161 FormatterEvent* mainEvent;
162 EventTransitionManager* transMan;
165 static set<ExecutionObject*> objects;
166 static bool initMutex;
167 static pthread_mutex_t _objMutex;
178 ILinkActionListener* seListener);
183 GenericDescriptor* descriptor,
185 ILinkActionListener* seListener);
190 CascadingDescriptor* descriptor,
192 ILinkActionListener* seListener);
199 void initializeExecutionObject(
202 CascadingDescriptor* descriptor,
204 ILinkActionListener* seListener);
207 void destroyEvents();
208 virtual void unsetParentsAsListeners();
209 virtual void removeParentListenersFromEvent(FormatterEvent* event);
212 virtual bool isSleeping();
213 virtual bool isPaused();
214 bool instanceOf(
string s);
216 Node* getDataObject();
217 CascadingDescriptor* getDescriptor();
219 void* getParentObject();
220 void* getParentObject(Node* node);
221 void addParentObject(
void* parentObject, Node* parentNode);
222 void addParentObject(Node* node,
void* parentObject, Node* parentNode);
223 virtual void removeParentObject(Node* parentNode,
void* parentObject);
225 void setDescriptor(CascadingDescriptor* cascadingDescriptor);
226 void setDescriptor(GenericDescriptor* descriptor);
228 virtual bool addEvent(FormatterEvent* event);
229 void addPresentationEvent(PresentationEvent* event);
232 bool containsEvent(FormatterEvent* event);
233 FormatterEvent* getEventFromAnchorId(
string anchorId);
236 FormatterEvent* getEvent(
string id);
237 vector<FormatterEvent*>* getEvents();
238 bool hasSampleEvents();
239 set<AnchorEvent*>* getSampleEvents();
240 double getExpectedStartTime();
241 PresentationEvent* getWholeContentPresentationEvent();
242 void setStartTime(
double t);
243 void updateEventDurations();
244 void updateEventDuration(PresentationEvent* event);
245 bool removeEvent(FormatterEvent* event);
247 void setCompiled(
bool status);
248 void removeNode(Node* node);
249 vector<Node*>* getNodes();
250 vector<Anchor*>* getNCMAnchors();
251 PropertyAnchor* getNCMProperty(
string propertyName);
254 vector<ExecutionObject*>* getObjectPerspective();
255 vector<ExecutionObject*>* getObjectPerspective(Node* node);
256 vector<Node*>* getParentNodes();
257 FormatterEvent* getMainEvent();
258 virtual bool prepare(FormatterEvent* event,
double offsetTime);
259 virtual bool start();
261 void timeBaseNaturalEnd(int64_t timeValue,
short int transType);
262 void updateTransitionTable(
263 double value, IPlayer* player,
short int transType);
265 void resetTransitionEvents(
short int transType);
266 void prepareTransitionEvents(
short int transType,
double startTime);
267 set<double>* getTransitionsValues(
short int transType);
268 virtual EventTransition* getNextTransition();
270 virtual bool abort();
271 virtual bool pause();
272 virtual bool resume();
273 virtual bool setPropertyValue(
274 AttributionEvent* event,
string value);
276 virtual string getPropertyValue(
string propName);
278 virtual bool unprepare();
280 void setHandling(
bool isHandling);
281 void setHandler(
bool isHandler);
282 bool selectionEvent(
int keyCode,
double currentTime);
283 set<int>* getInputEvents();
293 void lockParentTable();
294 void unlockParentTable();
304 #endif //_EXECUTIONOBJECT_H_
Definition: ExecutionObject.h:124
Definition: NodeNesting.h:72