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.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
moIODevice.h
Go to the documentation of this file.
1 /*******************************************************************************
2 
3  moIODevice.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  Andrs Colubri
29 
30 *******************************************************************************/
31 
32 #ifndef __MO_IO_DEVICE_H__
33 #define __MO_IO_DEVICE_H__
34 #include <moTypes.h>
35 #include <moMoldeoObject.h>
42 {
43  public:
47  moIODevice ();
48 
52  virtual ~ moIODevice ();
53 
57  virtual void Update (moEventList *) = 0;
58 
62  virtual MOboolean Init () = 0;
63 
67  //get the status of the specific devicecode
68  virtual MOswitch GetStatus (MOdevcode) = 0;
69 
73  virtual void SetValue (MOdevcode, MOint);
74 
78  virtual void SetValue (MOdevcode, MOfloat);
79 
83  virtual void SetValue (MOdevcode, moData);
84 
88  virtual void SetValue (MOdevcode, MOlong, MOpointer);
89 
93  //in case we need to get a buffer data pointer
94  virtual MOpointer GetPointer (MOdevcode);
95 
99  //get the actual value of the specific devicecode
100  virtual MOint GetValue (MOdevcode) = 0;
101 
105  //get the actual value of the specific devicecode
106  virtual moData GetValue (MOdevcode, moDataType);
107 
111  //get the actual value of the specific devicecode
112  virtual MOint GetValue (MOdevcode, MOint);
113 
117  //get the actual value of the specific devicecode
118  virtual MOint GetNValues (MOdevcode);
119 
123  virtual MOswitch SetStatus (MOdevcode, MOswitch) = 0;
124 
128  //todos los codes estan definidos con un name en ascii por si las moscas
129  virtual MOdevcode GetCode (moText) = 0;
130 
134  virtual MOboolean Finish () = 0;
135 
140  {
141  return m_DeviceId;
142  }
143 
147  void SetId (MOint p_id)
148  {
149  m_DeviceId = p_id;
150  } protected:MOint m_DeviceId;
151  //device id relative
152 };
153 
154 /*
155 template class LIBMOLDEO_API moDynamicArray<moIODevice*>;
156 typedef moDynamicArray<moIODevice*> moIODevicesArray;
157 */
158 moDeclareExportedDynamicArray (moIODevice *, moIODevicesArray)
159 #endif /* __MO_IO_DEVICE_H__ */
MOint GetId()
Definition: moIODevice.h:139
moDataType
Definition: moValue.h:98
#define MOboolean
Definition: moTypes.h:385
void SetId(MOint p_id)
Definition: moIODevice.h:147
#define MOswitch
Definition: moTypes.h:386
#define LIBMOLDEO_API
Definition: moTypes.h:180
#define MOfloat
Definition: moTypes.h:403
Lista de eventos.
Definition: moEventList.h:139
clase de para manejar textos
Definition: moText.h:75
#define MOlong
Definition: moTypes.h:391
#define MOdevcode
Definition: moTypes.h:412
#define MOint
Definition: moTypes.h:388
Clase Base para Objetos Moldeo ( moEffect, moIODevice, moResource, moConsole )
virtual void Update(moEventList *p_EventList)
#define moDeclareExportedDynamicArray(T, name)
Definition: moArrayH.h:278
virtual MOboolean Finish()
#define MOpointer
Definition: moTypes.h:409
virtual MOboolean Init()