arcscontrollercomponent.cpp
1 /*
2  name: lib/arcscontrollercomponent.cpp
3 
4  This file is part of ARCS - Augmented Reality Component System
5  (version 2-current), written by Jean-Yves Didier
6  for IBISC Laboratory (http://www.ibisc.univ-evry.fr)
7 
8  Copyright (C) 2013 Université d'Evry-Val d'Essonne
9 
10  This program is free software: you can redistribute it and/or modify
11  it under the terms of the GNU General Public License as published by
12  the Free Software Foundation, either version 2 of the License, or
13  (at your option) any later version.
14 
15  This program is distributed in the hope that it will be useful,
16  but WITHOUT ANY WARRANTY; without even the implied warranty of
17  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18  GNU General Public License for more details.
19 
20  You should have received a copy of the GNU General Public License
21  along with this program. If not, see <http://www.gnu.org/licenses/>.
22 
23 
24  Please send bugreports with examples or suggestions to
25  jean-yves.didier__at__ibisc.univ-evry.fr
26 */
27 
28 
29 #include <arcs/arcscontrollercomponent.h>
30 #include <arcs/arcsxmlhandler.h>
31 
32 ARCSControllerComponent::ARCSControllerComponent()
33 {
34  statemachine = new ARCSStateMachine();
35 
36 
37 
38 }
39 
40 
41 ARCSControllerComponent::~ARCSControllerComponent()
42 {
43  delete statemachine;
44 }
45 
46 
48 {
49  ARCSXMLHandler xmlHandler;
50  xmlHandler.storeStateMachine(statemachine);
51  return xmlHandler.getContents();
52 }
53 
54 
56 {
57  ARCSXMLHandler xmlHandler;
58  if (! xmlHandler.setContents(s))
59  return false;
60  return xmlHandler.parseStateMachine(statemachine);
61 }
62 
63 
65 {
66  return true;
67 }
68 
69 
71 {
72 }
73 
bool setContents(QString s)
Gives the content to parse.
virtual void genuineDestroy()
This method should implement the destruction of the actual component.
virtual bool genuineInstanciate()
This method should implement the instanciation of the actual component.
Class describing a state machine in order to control an application.
virtual bool parseString(QString s)
Defines a basic seralization mechanism.
virtual QString toString()
Defines a basic seralization mechanism.
This is an XML Handler for all ARCS native XML formats.