![]() |
This is an XML Handler for all ARCS native XML formats. More...
#include <arcsxmlhandler.h>
Public Types | |
enum | XMLType { XML_BLANK, XML_STATEMACHINE, XML_COMPOSITE, XML_APPLICATION, XML_INTERFACE, XML_PROFILE } |
This enumeration gives the list of ARCS XML structures. More... | |
Public Member Functions | |
ARCSXMLHandler () | |
Constructor. | |
bool | openFile (QString s) |
Opens a file given its path. The file should describe either an application or a composite component. More... | |
bool | saveFile (QString s) |
Saves a file given its path. The file will describe either an application or a composite component. More... | |
bool | setContents (QString s) |
Gives the content to parse. More... | |
QString | getContents () |
void | setType (XMLType t) |
XMLType | getType () |
bool | parseProcess (ARCSProcess *ap, QDomElement processNode) |
Parses the xml description of a process. More... | |
bool | parseSheet (ARCSSheet *as, QDomElement father) |
Parses the xml descriptions of a sheet. More... | |
bool | parseContext (ARCSContext *) |
Parses a context. | |
QStringList | parseLibraries (QDomElement libraries, bool *ok=0) |
bool | parseInterface (ARCSAbstractComponent *aac, QDomNode node=QDomNode()) |
bool | parseStateMachine (ARCSStateMachine *) |
bool | parseApplication (ARCSApplicationComponent *) |
bool | parseCompositeComponent (ARCSCompositeComponent *) |
bool | parseProfile (ARCSContext *) |
void | storeSheet (ARCSSheet *as, QDomElement father, QString id=QString::null) |
Stores the xml description of a sheet. More... | |
void | storeContext (ARCSContext *) |
void | storeStateMachine (ARCSStateMachine *) |
void | storeProfile (ARCSContext *) |
void | storeProcess (ARCSProcess *, QDomElement father) |
void | storeApplication (ARCSApplicationComponent *) |
void | storeCompositeComponent (ARCSCompositeComponent *) |
void | storeInterface (ARCSAbstractComponent *aac, QDomElement father=QDomElement()) |
This is an XML Handler for all ARCS native XML formats.
Add a path stack somewhere in this class.
Solve some troubles around strings describing components.
The ARCSXMLHandler parses and saves all basic ARCS XML structures.
Amongst them there are contexts, statemachines, applications and composite components.
Here is the markup structure for contexts. A context stores the list of libraries to load, a list of components to instanciate and a list of constants.
Definition at line 179 of file arcsxmlhandler.h.
bool ARCSXMLHandler::openFile | ( | QString | s | ) |
Opens a file given its path. The file should describe either an application or a composite component.
s | the file path |
true
if succeeded, false
otherwise Definition at line 56 of file arcsxmlhandler.cpp.
bool ARCSXMLHandler::parseInterface | ( | ARCSAbstractComponent * | aac, |
QDomNode | node = QDomNode() |
||
) |
Definition at line 604 of file arcsxmlhandler.cpp.
bool ARCSXMLHandler::parseProcess | ( | ARCSProcess * | ap, |
QDomElement | processNode | ||
) |
Parses the xml description of a process.
ap | a pointer to a process structure |
processNode | the XML node describing a process |
true
if successful, false
otherwise. Definition at line 433 of file arcsxmlhandler.cpp.
bool ARCSXMLHandler::parseSheet | ( | ARCSSheet * | sheet, |
QDomElement | father | ||
) |
Parses the xml descriptions of a sheet.
as | a pointer to a sheet structure ; |
father | the element containing the xml description of a sheet ; |
true
if sucessful, false
otherwise.Definition at line 192 of file arcsxmlhandler.cpp.
bool ARCSXMLHandler::saveFile | ( | QString | s | ) |
Saves a file given its path. The file will describe either an application or a composite component.
s | the file path |
true
if succeeded, false
otherwise Definition at line 120 of file arcsxmlhandler.cpp.
bool ARCSXMLHandler::setContents | ( | QString | s | ) |
Gives the content to parse.
This is especially interesting for ...
s | a string representing an xml stream to parse. |
true
if succeede, false
otherwise Definition at line 95 of file arcsxmlhandler.cpp.
void ARCSXMLHandler::storeInterface | ( | ARCSAbstractComponent * | aac, |
QDomElement | elt = QDomElement() |
||
) |
Definition at line 1185 of file arcsxmlhandler.cpp.
void ARCSXMLHandler::storeSheet | ( | ARCSSheet * | as, |
QDomElement | father, | ||
QString | id = QString::null |
||
) |
Stores the xml description of a sheet.
as | a pointer to a sheet structure |
father | the element to which the sheet xml description will be attached. |
Definition at line 848 of file arcsxmlhandler.cpp.