50 #ifndef FORMATTERCONVERTER_H_
51 #define FORMATTERCONVERTER_H_
53 #include "ncl/switches/SwitchNode.h"
54 using namespace ::br::pucrio::telemidia::ncl::switches;
56 #include "ncl/interfaces/PropertyAnchor.h"
57 #include "ncl/interfaces/ContentAnchor.h"
58 #include "ncl/interfaces/LambdaAnchor.h"
59 #include "ncl/interfaces/SwitchPort.h"
60 #include "ncl/interfaces/Port.h"
61 #include "ncl/interfaces/InterfacePoint.h"
62 using namespace ::br::pucrio::telemidia::ncl::interfaces;
64 #include "ncl/components/CompositeNode.h"
65 #include "ncl/components/ContextNode.h"
66 #include "ncl/components/ContentNode.h"
67 #include "ncl/components/Node.h"
68 #include "ncl/components/NodeEntity.h"
69 using namespace ::br::pucrio::telemidia::ncl::components;
71 #include "ncl/connectors/EventUtil.h"
72 using namespace ::br::pucrio::telemidia::ncl::connectors;
74 #include "ncl/descriptor/GenericDescriptor.h"
75 using namespace ::br::pucrio::telemidia::ncl::descriptor;
77 #include "ncl/link/Bind.h"
78 #include "ncl/link/CausalLink.h"
79 #include "ncl/link/Link.h"
80 using namespace ::br::pucrio::telemidia::ncl::link;
82 #include "ncl/reuse/ReferNode.h"
83 using namespace ::br::pucrio::telemidia::ncl::reuse;
85 #include "../model/ExecutionObjectSwitch.h"
86 #include "../model/SwitchEvent.h"
87 using namespace ::br::pucrio::telemidia::ginga::ncl::model::switches;
89 #include "../model/AttributionEvent.h"
90 #include "../model/PresentationEvent.h"
91 #include "../model/SelectionEvent.h"
92 #include "../model/IEventListener.h"
93 #include "../model/FormatterEvent.h"
94 #include "../model/PresentationEvent.h"
95 using namespace ::br::pucrio::telemidia::ginga::ncl::model::event;
97 #include "../model/FormatterCausalLink.h"
98 #include "../model/FormatterLink.h"
99 #include "../model/LinkAction.h"
100 #include "../model/LinkCompoundAction.h"
101 #include "../model/LinkSimpleAction.h"
102 #include "../model/ILinkActionListener.h"
103 using namespace ::br::pucrio::telemidia::ginga::ncl::model::link;
105 #include "../model/CascadingDescriptor.h"
106 #include "../model/FormatterLayout.h"
107 using namespace ::br::pucrio::telemidia::ginga::ncl::model::presentation;
109 #include "../model/CompositeExecutionObject.h"
110 #include "../model/ApplicationExecutionObject.h"
111 #include "../model/ExecutionObject.h"
112 #include "../model/NodeNesting.h"
113 using namespace ::br::pucrio::telemidia::ginga::ncl::model::components;
115 #include "../adaptation/context/RuleAdapter.h"
116 using namespace ::br::pucrio::telemidia::ginga::ncl::adaptation::context;
118 #include "../adapters/PlayerAdapterManager.h"
119 using namespace ::br::pucrio::telemidia::ginga::ncl::adapters;
121 #include "../IFormatterScheduler.h"
122 using namespace ::br::pucrio::telemidia::ginga::ncl;
124 #include "ObjectCreationForbiddenException.h"
134 namespace telemidia {
137 namespace emconverter {
141 static int dummyCount;
142 map<string, ExecutionObject*> executionObjects;
143 set<FormatterEvent*> listening;
144 set<ExecutionObject*> settingObjects;
147 ILinkActionListener* actionListener;
148 RuleAdapter* ruleAdapter;
149 pthread_mutex_t objectsMutex;
150 pthread_mutex_t lMutex;
157 void executionObjectReleased(
string objectId);
158 set<ExecutionObject*>* getRunningObjects();
159 void setHandlingStatus(
bool hanling);
160 ExecutionObject* getObjectFromNodeId(
string id);
163 void setLinkActionListener(ILinkActionListener* actionListener);
165 void setDepthLevel(
int level);
167 void checkGradSameInstance(
168 set<ReferNode*>* gradSame, ExecutionObject*
object);
170 CompositeExecutionObject* addSameInstance(
171 ExecutionObject* executionObject,
172 ReferNode* referNode);
175 void addExecutionObject(
176 ExecutionObject* executionObject,
177 CompositeExecutionObject* parentObject,
181 void compileExecutionObjectLinks(
182 ExecutionObject* executionObject,
int depthLevel);
184 ExecutionObject* getExecutionObjectFromPerspective(
185 NodeNesting* perspective,
186 GenericDescriptor* descriptor,
189 set<ExecutionObject*>* getSettingNodeObjects();
192 CompositeExecutionObject* getParentExecutionObject(
193 NodeNesting* perspective,
197 FormatterEvent* getEvent(
198 ExecutionObject* executionObject,
199 InterfacePoint* interfacePoint,
204 void createMultichannelObject(
205 CompositeExecutionObject* compositeObject,
int depthLevel);
207 ExecutionObject* createExecutionObject(
209 NodeNesting* perspective,
210 CascadingDescriptor* descriptor,
213 static bool hasDescriptorPropName(
string name);
215 static Descriptor* createDummyDescriptor(Node* node);
216 static CascadingDescriptor* createDummyCascadingDescriptor(
219 static CascadingDescriptor* checkCascadingDescriptor(Node* node);
220 static CascadingDescriptor* checkContextCascadingDescriptor(
221 NodeNesting* nodePerspective,
222 CascadingDescriptor* cascadingDescriptor,
226 static CascadingDescriptor* getCascadingDescriptor(
227 NodeNesting* nodePerspective,
228 GenericDescriptor* descriptor);
234 ExecutionObject* executionObject,
235 CompositeExecutionObject* parentObject);
238 void compileExecutionObjectLinks(
239 ExecutionObject* executionObject,
241 CompositeExecutionObject* parentObject,
245 void setActionListener(LinkAction* action);
248 ExecutionObject* processExecutionObjectSwitch(
249 ExecutionObjectSwitch* switchObject);
252 void resolveSwitchEvents(
253 ExecutionObjectSwitch* switchObject,
int depthLevel);
255 FormatterEvent* insertNode(
256 NodeNesting* perspective,
257 InterfacePoint* interfacePoint,
258 GenericDescriptor* descriptor);
261 FormatterEvent* insertContext(
262 NodeNesting* contextPerspective, Port* port);
264 bool removeExecutionObject(
265 ExecutionObject* executionObject, ReferNode* referNode);
267 bool removeExecutionObject(ExecutionObject* executionObject);
270 bool ntsRemoveExecutionObject(ExecutionObject* executionObject);
273 ExecutionObject* hasExecutionObject(
274 Node* node, GenericDescriptor* descriptor);
276 FormatterCausalLink* addCausalLink(
277 ContextNode* context, CausalLink* link);
279 void eventStateChanged(
280 void* someEvent,
short transition,
short previousState);
282 short getPriorityType();
Definition: IFormatterScheduler.h:60
Definition: FormatterConverter.h:138
Definition: ObjectCreationForbiddenException.h:61