Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
lib
arcsapplicationobject.cpp
1
/*
2
name: lib/arcsapplicationobject.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/arcsapplicationobject.h>
30
#include <arcs/arcsapplicationcomponent.h>
31
32
33
ARCSApplicationObject::ARCSApplicationObject(QObject * parent) : QObject(parent)
34
{
35
36
}
37
38
39
void
ARCSApplicationObject::instanciate
(QString name)
40
{
41
ARCSContext
* context = ARCSApplicationComponent::getRunningInstance()->
getContext
();
42
if
(context)
43
{
44
ARCSAbstractComponent
* cmp = context->
getComponent
(name);
45
cmp->
instanciate
();
46
}
47
}
48
49
void
ARCSApplicationObject::destroy
(QString name)
50
{
51
ARCSContext
* context = ARCSApplicationComponent::getRunningInstance()->
getContext
();
52
if
(context != 0)
53
{
54
ARCSAbstractComponent
* cmp = context->
getComponent
(name);
55
cmp->
destroy
();
56
}
57
}
ARCSAbstractComponent::instanciate
bool instanciate()
Instanciates the real component.
Definition:
arcsabstractcomponent.h:111
ARCSAbstractComponent::destroy
void destroy()
Destroys the real component.
Definition:
arcsabstractcomponent.h:119
ARCSAbstractComponent
Class handling the generic description of a component.
Definition:
arcsabstractcomponent.h:102
ARCSContext::getComponent
ARCSAbstractComponent * getComponent(QString name)
Retrieves a component by its id.
Definition:
arcscontext.cpp:217
ARCSApplicationObject::instanciate
void instanciate(QString name)
This slot, provided with a component name, instanciates a component.
Definition:
arcsapplicationobject.cpp:39
ARCSContext
This class manages components and constants in a given context.
Definition:
arcscontext.h:45
ARCSApplicationComponent::getContext
ARCSContext * getContext()
Definition:
arcsapplicationcomponent.h:65
ARCSApplicationObject::destroy
void destroy(QString name)
This slot, provided with a component name, destroys a component.
Definition:
arcsapplicationobject.cpp:49
Generated on Fri Mar 14 2025 04:40:13 by
1.8.9.1