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.
moAbstract.h
Ir a la documentación de este archivo.
1
/*******************************************************************************
2
3
moAbstract.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
32
#ifndef __MO_ABSTRACT_H__
33
#define __MO_ABSTRACT_H__
34
35
#include "
moTypes.h
"
36
#include "
moText.h
"
37
#include "
moLock.h
"
38
40
47
class
LIBMOLDEO_API
moDebug
48
{
49
public
:
50
51
moDebug
();
52
53
virtual
~
moDebug
();
54
55
57
62
void
SetStdout(
const
moText
& filename =
moText
(
""
) );
63
64
66
71
bool
Lock
() {
return
m_Lock.Lock(); }
72
74
79
bool
Unlock
() {
return
m_Lock.Unlock(); }
80
82
86
void
Error(
moText
p_text );
87
89
93
void
Warning(
moText
p_text );
94
96
100
void
Message(
moText
p_text );
101
103
108
void
Log(
moText
p_text );
109
111
115
void
Push
(
moText
p_text ) {
116
Lock();
117
m_Debug.Push( p_text );
118
Unlock();
119
}
120
122
126
moText
Pop
() {
127
moText
poped;
128
Lock();
129
poped = m_Debug.Pop();
130
Unlock();
131
return
poped;
132
}
133
134
136
MOint
Count
() {
137
return
m_Debug.Count();
138
}
139
141
149
moTextHeap
&
GetMessages
() {
150
return
m_Debug;
151
}
152
153
private
:
154
158
moTextHeap
m_Debug
;
159
163
ofstream
moErr
;
164
168
ofstream
moLog
;
169
173
ofstream
moStdOut
;
174
175
streambuf *
psbuf
, *backup;
176
177
178
moLock
m_Lock
;
179
180
};
181
183
191
class
LIBMOLDEO_API
moAbstract
192
{
193
public
:
194
198
moAbstract
();
199
virtual
~
moAbstract
();
200
206
virtual
MOboolean
Init();
207
213
virtual
MOboolean
Finish();
214
220
MOboolean
Initialized();
221
222
223
MOboolean
m_bInitialized
;
224
225
static
moDebug
*
MODebug2
;
226
static
moTextHeap
*
MODebug
;
227
};
228
229
230
231
#endif
232
moDebug::Pop
moText Pop()
Saca y devuelve el primer texto ingresado a la lista.
Definition:
moAbstract.h:126
moDebug::moLog
ofstream moLog
Cadena de salida de los mensajes registrados.
Definition:
moAbstract.h:168
moLock
Definition:
moLock.h:50
moDebug::Count
MOint Count()
Devuelve la cantidad de mensajes almacenados.
Definition:
moAbstract.h:136
MOboolean
#define MOboolean
Definition:
moTypes.h:385
moTypes.h
moAbstract
Clase base abstracta de donde deben derivar los objetos [virtual pura].
Definition:
moAbstract.h:191
LIBMOLDEO_API
#define LIBMOLDEO_API
Definition:
moTypes.h:180
moText0
clase de para manejar textos
Definition:
moText.h:75
moDebug::GetMessages
moTextHeap & GetMessages()
Devuelve una referencia a la pila de mensajes.
Definition:
moAbstract.h:149
moDebug::psbuf
streambuf * psbuf
Definition:
moAbstract.h:175
moDebug::moErr
ofstream moErr
Cadena de salida de los mensajes de error.
Definition:
moAbstract.h:163
moText
moText0 moText
Definition:
moText.h:291
MOint
#define MOint
Definition:
moTypes.h:388
moLock.h
moText.h
moDebug::moStdOut
ofstream moStdOut
Cadena de salida cout y stdout.
Definition:
moAbstract.h:173
moTextHeap
lista de textos
Definition:
moText.h:306
moDebug::Lock
bool Lock()
Paraliza el acceso a las funciones de escritura.
Definition:
moAbstract.h:71
moDebug::m_Debug
moTextHeap m_Debug
Pila de mensajes.
Definition:
moAbstract.h:158
moAbstract::MODebug2
static moDebug * MODebug2
Clase de impresión de errores para depuración.
Definition:
moAbstract.h:225
moDebug::m_Lock
moLock m_Lock
semáforo para el acceso asincrónico
Definition:
moAbstract.h:178
moDebug::Push
void Push(moText p_text)
Apila el mensaje dentro de la pila de mensajes.
Definition:
moAbstract.h:115
moAbstract::m_bInitialized
MOboolean m_bInitialized
Valor de inicialización.
Definition:
moAbstract.h:223
moDebug::Unlock
bool Unlock()
Libera el acceso a las funciones de escritura.
Definition:
moAbstract.h:79
moAbstract::MODebug
static moTextHeap * MODebug
Lista de textos.
Definition:
moAbstract.h:226
moDebug
Lista de mensajes para la depuración de errores y anuncio de errores y mensajes.
Definition:
moAbstract.h:47
libmoldeo
moAbstract.h
Generado el Martes, 10 de Septiembre de 2019 21:27:06 para libmoldeo (Moldeo 1.0 Core) por
1.8.13