libmoldeo (Moldeo 1.0 Core)
1.0
libmoldeo is the group of objects and functions that executes the basic operations of Moldeo 1.0 Platform.
moIODeviceManager.h
Ir a la documentación de este archivo.
1
/*******************************************************************************
2
3
moIODeviceManager.h
4
5
****************************************************************************
6
* *
7
* This source is free software; you can redistribute it and/or modify *
8
* it under the terms of the GNU General Public License as published by *
9
* the Free Software Foundation; either version 2 of the License, or *
10
* (at your option) any later version. *
11
* *
12
* This code is distributed in the hope that it will be useful, but *
13
* WITHOUT ANY WARRANTY; without even the implied warranty of *
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
15
* General Public License for more details. *
16
* *
17
* A copy of the GNU General Public License is available on the World *
18
* Wide Web at <http://www.gnu.org/copyleft/gpl.html>. You can also *
19
* obtain it by writing to the Free Software Foundation, *
20
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
21
* *
22
****************************************************************************
23
24
Copyright(C) 2006 Fabricio Costa
25
26
Authors:
27
Fabricio Costa
28
29
*******************************************************************************/
30
31
#ifndef __MO_IODEVICE_H
32
#define __MO_IODEVICE_H
33
34
#include "
moTypes.h
"
35
#include "
moText.h
"
36
#include "
moMoldeoObject.h
"
37
#include "
moDeviceCode.h
"
38
#include "
moEventList.h
"
39
#include "
moRenderManager.h
"
40
41
42
49
class
LIBMOLDEO_API
moIODevice
:
public
moMoldeoObject
{
50
51
public
:
52
56
moIODevice
();
57
61
virtual
~
moIODevice
();
62
66
virtual
void
Update
(
moEventList
*) = 0;
67
71
virtual
MOboolean
Init
() = 0;
72
76
virtual
MOswitch
GetStatus(
MOdevcode
) = 0;
//get the status of the specific devicecode
77
81
virtual
void
SetValue(
MOdevcode
,
MOint
);
82
86
virtual
void
SetValue(
MOdevcode
,
MOfloat
);
87
91
virtual
void
SetValue(
MOdevcode
,
moData
);
92
96
virtual
void
SetValue(
MOdevcode
,
MOlong
,
MOpointer
);
97
101
virtual
MOpointer
GetPointer(
MOdevcode
);
//in case we need to get a buffer data pointer
102
106
virtual
MOint
GetValue(
MOdevcode
devcode ) = 0;
//get the actual value of the specific devicecode
107
111
virtual
moData
GetValue(
MOdevcode
,
moDataType
);
//get the actual value of the specific devicecode
112
116
virtual
MOint
GetValue(
MOdevcode
,
MOint
);
//get the actual value of the specific devicecode
117
121
virtual
MOint
GetNValues(
MOdevcode
);
//get the actual value of the specific devicecode
122
126
virtual
MOswitch
SetStatus(
MOdevcode
,
MOswitch
) = 0;
127
131
virtual
MOdevcode
GetCode(
moText
) = 0;
//todos los codes estan definidos con un name en ascii por si las moscas
132
136
virtual
MOboolean
Finish
() = 0;
137
141
MOint
GetId
() {
return
m_DeviceId; }
142
146
void
SetId
(
MOint
p_id ) { m_DeviceId = p_id; }
147
148
protected
:
149
150
MOint
m_DeviceId;
//device id relative
151
152
};
153
154
moDeclareExportedDynamicArray
(
moIODevice
*, moIODevicesArray);
155
156
#include "
moIODevicePlugin.h
"
157
158
159
160
168
class
LIBMOLDEO_API
moIODeviceManager
:
public
moAbstract
{
169
170
public
:
171
175
moIODeviceManager
();
176
180
virtual
~
moIODeviceManager
();
181
185
moIODevice
* NewIODevice(
const
moText
& p_devname,
const
moText
& p_configname,
const
moText
& p_labelname,
const
moText
& p_keyname,
moMoldeoObjectType
p_type,
int
paramindex = -1,
int
valueindex = -1,
bool
p_activate=
true
);
186
190
MOboolean
RemoveIODevice(
MOint
p_ID );
191
192
196
moIODevicesArray& IODevices();
197
201
void
Update();
202
206
virtual
MOboolean
Init
();
207
211
virtual
MOboolean
Finish
();
212
216
MOswitch
GetStatus(
MOdevcode
);
217
221
MOswitch
SetStatus(
MOdevcode
,
MOswitch
);
222
226
MOdevcode
GetCode(
char
*);
227
231
moEventList
* GetEvents();
232
238
void
PurgeEvents();
239
240
private
:
241
242
moEventList
*
Events
;
243
moIODevicesArray
m_IODevices
;
244
moIODevicePluginsArray
m_Plugins
;
245
246
virtual
void
PollEvents();
//aplicacion de la libreria de SDL(hay que hacer la propia)
247
};
248
249
250
#endif
moMoldeoObjectType
moMoldeoObjectType
Tipos de objetos en Moldeo.
Definition:
moTypes.h:525
moIODevice::GetId
MOint GetId()
Definition:
moIODeviceManager.h:141
moDataType
moDataType
Definition:
moValue.h:98
moAbstract::Finish
virtual MOboolean Finish()
Finaliza el objeto, libera recursos.
Definition:
moAbstract.cpp:147
moIODevice
Definition:
moIODevice.h:41
moIODeviceManager
Definition:
moIODeviceManager.h:168
MOboolean
#define MOboolean
Definition:
moTypes.h:385
moRenderManager.h
moIODevice::SetId
void SetId(MOint p_id)
Definition:
moIODeviceManager.h:146
moTypes.h
moAbstract
Clase base abstracta de donde deben derivar los objetos [virtual pura].
Definition:
moAbstract.h:191
moAbstract::Init
virtual MOboolean Init()
Inicializa el objeto.
Definition:
moAbstract.cpp:141
moMoldeoObject.h
MOswitch
#define MOswitch
Definition:
moTypes.h:386
LIBMOLDEO_API
#define LIBMOLDEO_API
Definition:
moTypes.h:180
moDeclareExportedDynamicArray
moDeclareExportedDynamicArray(moIODevice *, moIODevicesArray)
MOfloat
#define MOfloat
Definition:
moTypes.h:403
moEventList
Lista de eventos.
Definition:
moEventList.h:139
moText0
clase de para manejar textos
Definition:
moText.h:75
MOlong
#define MOlong
Definition:
moTypes.h:391
MOdevcode
#define MOdevcode
Definition:
moTypes.h:412
moIODeviceManager::m_IODevices
moIODevicesArray m_IODevices
Definition:
moIODeviceManager.h:243
moIODevicePlugin.h
MOint
#define MOint
Definition:
moTypes.h:388
moIODeviceManager::Events
moEventList * Events
Definition:
moIODeviceManager.h:242
moMoldeoObject
Clase Base para Objetos Moldeo ( moEffect, moIODevice, moResource, moConsole )
Definition:
moMoldeoObject.h:409
moText.h
moMoldeoObject::Update
virtual void Update(moEventList *p_EventList)
Definition:
moMoldeoObject.cpp:1133
moIODeviceManager::m_Plugins
moIODevicePluginsArray m_Plugins
Definition:
moIODeviceManager.h:244
moData
Definition:
moValue.h:155
moDeviceCode.h
moMoldeoObject::Finish
virtual MOboolean Finish()
Definition:
moMoldeoObject.cpp:949
moEventList.h
MOpointer
#define MOpointer
Definition:
moTypes.h:409
moMoldeoObject::Init
virtual MOboolean Init()
Definition:
moMoldeoObject.cpp:472
libmoldeo
moIODeviceManager.h
Generado el Martes, 10 de Septiembre de 2019 21:27:07 para libmoldeo (Moldeo 1.0 Core) por
1.8.13