29 #include <arcs/arcsapplicationcomponent.h>
30 #include <arcs/arcsxmlhandler.h>
31 #include <arcs/arcsappmode.h>
35 #include <arcs/arcslog.h>
38 void* ARCSApplicationComponent::_interface = 0;
54 applicationFinished =
true;
63 ARCSLog::logInformation(ARCS_SOURCE,
"needed to make \"this\"");
68 var.setValue((QObject*)defaultCore);
96 ARCSLog::logInformation(ARCS_SOURCE,
"$ Rev: 207 $");
97 applicationFinished =
false;
99 runningInstance =
this;
108 for ( i = 1; i < processes.count() ; i++)
110 processes.at(i)->setReferenceApplicationMode(currentMode);
111 processes.at(i)->startProcess();
115 for ( i = 1; i < processes.count() ; i++)
116 processes.at(i)->waitForFirstSheet();
118 processes.at(0)->startProcess();
120 if (processes.at(0)->hasFinished())
121 ARCSLog::logInformation(ARCS_SOURCE,
"main process has finished.");
130 applicationFinished =
true;
140 void ARCSApplicationComponent::removeComponent(QString name)
146 for (
int i=0; i < processes.count(); i++)
149 if (processes[i]->getControllerId() == name)
150 processes[i]->setController();
151 QStringList sheetNames = processes[i]->getSheetNames();
153 for (j=0; j < sheetNames.count(); j++ )
154 processes[i]->getSheet(sheetNames[j]).removeComponent(name);
165 return xmlHandler.parseApplication(
this);
175 return xmlHandler.parseApplication(
this);
183 for (
int i = processes.count()-1 ; i >= 0;i--)
185 processes.at(i)->wait();
bool setContents(QString s)
Gives the content to parse.
ARCSAppFlag
Flags to specify in which mode applications should start.
Application objects are used to implement specific interfaces when the application needs to be embedd...
virtual bool parseString(QString s)
Defines a basic seralization mechanism.
This class represents an application.
QStringList getComponentList()
bool openFile(QString s)
Opens a file given its path. The file should describe either an application or a composite component...
bool addComponent(QString name, QString className, QString contents=QString::null)
Adds a component to the list.
None of the application mode has been selected so far.
void removeComponent(QString name)
Removes a component from the component pool.
ARCSAbstractComponent * getComponent(QString name)
Retrieves a component by its id.
virtual bool loadFile(QString fn)
Defines a way to load a component description from a file.
bool instanciatePool()
Instanciates the whole pool of components inside the context.
virtual QVariant getGenuineComponentInstance()
ARCSApplicationComponent(ARCS::ARCSAppFlag flag=ARCS::ARCS_APP_EVENT)
This is an XML Handler for all ARCS native XML formats.