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.
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Modules
Pages
moIODevicePlugin.h
Go to the documentation of this file.
1
/*******************************************************************************
2
3
moIODevicePlugin.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
#include "
moTypes.h
"
32
#include "
moArray.h
"
33
#include "
moBasePlugin.h
"
34
#include "
moIODeviceManager.h
"
35
36
37
#ifndef __MO_IODEVICE_PLUGIN_H__
38
#define __MO_IODEVICE_PLUGIN_H__
39
41
44
class
LIBMOLDEO_API
moIODeviceFactory
45
{
46
public
:
47
moIODeviceFactory
() {}
48
virtual
~
moIODeviceFactory
();
49
virtual
moIODevice
* Create(
void
) = 0;
50
virtual
void
Destroy(
moIODevice
* fx) = 0;
51
};
52
53
typedef
moIODeviceFactory
*(
MO_PLG_ENTRY
*
CreateIODeviceFactoryFunction
)();
54
typedef
void(
MO_PLG_ENTRY
*
DestroyIODeviceFactoryFunction
)();
55
56
58
61
class
LIBMOLDEO_API
moIODevicePlugin
62
{
63
public
:
64
moIODevice
**
array
;
65
int
n
;
66
67
CreateIODeviceFactoryFunction
CreateIODeviceFactory
;
68
DestroyIODeviceFactoryFunction
DestroyIODeviceFactory
;
69
70
moIODeviceFactory
*
m_factory
;
71
72
moIODevicePlugin
() { handle = NULL; n=0; array = NULL; m_factory = NULL; }
73
moIODevicePlugin
(
moText
plugin_file) { m_factory = NULL; handle = NULL; n = 0; array = NULL; Load(plugin_file); }
74
virtual
~moIODevicePlugin
() {
if
(handle != NULL) Unload(); }
75
76
void
Load(
moText
plugin_file);
77
void
Unload();
78
moIODevice
* Create();
79
bool
Destroy(
moIODevice
*iodevice);
80
moText
GetName
() {
return
name; }
81
82
private
:
83
moText
name;
84
MOpluginHandle
handle;
85
86
};
87
moDeclareExportedDynamicArray
(
moIODevicePlugin
*, moIODevicePluginsArray );
88
89
LIBMOLDEO_API
moIODevice
*
moNewIODevice
(
moText
iodevice_name, moIODevicePluginsArray &plugins);
90
LIBMOLDEO_API
bool
moDeleteIODevice
(
moIODevice
* iodevice, moIODevicePluginsArray &plugins);
91
92
#endif
93
moIODevicePlugin::CreateIODeviceFactory
CreateIODeviceFactoryFunction CreateIODeviceFactory
Definition:
moIODevicePlugin.h:67
moArray.h
moIODevice
Definition:
moIODevice.h:41
moIODevicePlugin::GetName
moText GetName()
Definition:
moIODevicePlugin.h:80
moNewIODevice
LIBMOLDEO_API moIODevice * moNewIODevice(moText iodevice_name, moIODevicePluginsArray &plugins)
Definition:
moIODevicePlugin.cpp:149
moTypes.h
moIODeviceFactory::moIODeviceFactory
moIODeviceFactory()
Definition:
moIODevicePlugin.h:47
LIBMOLDEO_API
#define LIBMOLDEO_API
Definition:
moTypes.h:180
MO_PLG_ENTRY
#define MO_PLG_ENTRY
Definition:
moBasePlugin.h:46
moText0
clase de para manejar textos
Definition:
moText.h:75
moIODeviceFactory
clase base para una fábrica de plugins de dipositivos de E/S
Definition:
moIODevicePlugin.h:44
moIODevicePlugin::moIODevicePlugin
moIODevicePlugin()
Definition:
moIODevicePlugin.h:72
moIODevicePlugin::n
int n
Definition:
moIODevicePlugin.h:65
moDeclareExportedDynamicArray
moDeclareExportedDynamicArray(moIODevicePlugin *, moIODevicePluginsArray)
moDeleteIODevice
LIBMOLDEO_API bool moDeleteIODevice(moIODevice *iodevice, moIODevicePluginsArray &plugins)
Definition:
moIODevicePlugin.cpp:198
moIODeviceManager.h
MOpluginHandle
void * MOpluginHandle
Definition:
moBasePlugin.h:44
moIODevicePlugin::moIODevicePlugin
moIODevicePlugin(moText plugin_file)
Definition:
moIODevicePlugin.h:73
moIODevicePlugin::array
moIODevice ** array
Definition:
moIODevicePlugin.h:64
moIODevicePlugin::~moIODevicePlugin
virtual ~moIODevicePlugin()
Definition:
moIODevicePlugin.h:74
moIODevicePlugin
clase base para un plugin de dipositivos de E/S
Definition:
moIODevicePlugin.h:61
moIODevicePlugin::DestroyIODeviceFactory
DestroyIODeviceFactoryFunction DestroyIODeviceFactory
Definition:
moIODevicePlugin.h:68
moIODevicePlugin::m_factory
moIODeviceFactory * m_factory
Definition:
moIODevicePlugin.h:70
DestroyIODeviceFactoryFunction
void(MO_PLG_ENTRY * DestroyIODeviceFactoryFunction)()
Definition:
moIODevicePlugin.h:54
moBasePlugin.h
CreateIODeviceFactoryFunction
moIODeviceFactory *(MO_PLG_ENTRY * CreateIODeviceFactoryFunction)()
Definition:
moIODevicePlugin.h:53
libmoldeo
moIODevicePlugin.h
Generated on Wed May 17 2017 14:09:17 for libmoldeo (Moldeo 1.0 Core) by
1.8.8