ChirpSim
Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Friends
Macros
include
physicalobjectfactory.h
Go to the documentation of this file.
1
#ifndef PHYSICALOBJECTFACTORY_H
2
#define PHYSICALOBJECTFACTORY_H
3
4
#include <QObject>
5
#include <QMap>
6
#include <QJsonObject>
7
#include "
PhysicalObjects/physicalobject.h
"
8
#include "
world.h
"
9
14
typedef
PhysicalObject
*
FactoryFunction
(
World
*,
const
QJsonObject&);
15
19
class
PhysicalObjectFactory
:
public
QObject
20
{
21
Q_OBJECT
22
23
24
public
:
30
void
addFactory
(
const
QString& name,
FactoryFunction
factoryFunction);
31
37
FactoryFunction
*
getFactory
(
const
QString& name);
38
42
static
PhysicalObjectFactory
*
instance
();
43
signals:
44
45
public
slots:
46
47
private
:
48
explicit
PhysicalObjectFactory
();
49
50
static
PhysicalObjectFactory
*
_instance
;
51
52
QMap<QString, FactoryFunction*>
_map
;
53
};
54
55
#endif // PHYSICALOBJECTFACTORY_H
Generated on Tue Jun 18 2013 18:44:13 for ChirpSim by
1.8.4