Aleph-w
1.5a.2
Biblioteca general de algoritmos y estructuras de datos
Todo
Clases
Archivos
Funciones
Variables
'typedefs'
Enumeraciones
Amigas
Grupos
Páginas
ahDefs.H
1
# ifndef AHDEFS_H
2
# define AHDEFS_H
3
4
# include <unistd.h>
5
# include <time.h>
6
# include <stdint.h>
7
# include <stdlib.h>
8
# include <stdio.h>
9
# include <stdarg.h>
10
11
# include <stdexcept>
12
# include <utility>
13
14
enum
EmptyCtor { emptyCtor };
15
16
enum
SentinelCtor { sentinelCtor };
17
18
namespace
Aleph
19
{
20
typedef
uint32_t IPv4_Address;
21
22
extern
const
IPv4_Address Null_IPv4_Address;
23
24
struct
Empty_Class
25
{
26
Empty_Class
() {
/* empty */
}
27
28
Empty_Class
(EmptyCtor) {
/* empty */
}
29
30
Empty_Class
(SentinelCtor) {
/* empty */
}
31
32
bool
operator == (
const
Empty_Class
&)
const
33
{
34
return
true
;
35
}
36
37
bool
operator != (
const
Empty_Class
&)
const
38
{
39
return
false
;
40
}
41
};
42
43
const
int
UnknownSize = -1;
44
const
int
UnknownLine = -1;
45
const
int
UnknownLoad = -1;
46
47
extern
bool
daemonized;
48
49
extern
void
message(
const
char
* file,
int
line,
const
char
*format, ...);
50
51
extern
void
error(
const
char
* file,
int
line,
const
char
*format, ...);
52
53
extern
void
exit(
const
char
* file,
int
line,
const
char
*format, ...);
54
55
extern
void
warning(
const
char
* file,
int
line,
const
char
*format, ...);
56
57
extern
void
syslog(
const
char
* format, va_list ap);
58
}
59
60
# ifdef MESSAGES
61
62
# define MESSAGE(format, args...) \
63
Aleph::message(__FILE__, __LINE__, format , ##args)
64
# define WARNING(format, args...) \
65
Aleph::warning(__FILE__, __LINE__, format , ##args)
66
67
# else
68
69
# define MESSAGE(format, args...)
70
# define WARNING(format, args...)
71
72
# endif
73
74
# define ERROR(format, args...) \
75
Aleph::error(__FILE__, __LINE__, format , ##args)
76
77
# define EXIT(format, args...) \
78
Aleph::exit(__FILE__, __LINE__, format , ##args)
79
80
# define POINTER_HAS_BEEN_FOUND(ptr) ((ptr) not_eq NULL)
81
# define POINTER_HAS_NOT_BEEN_FOUND(ptr) ((ptr) == NULL)
82
83
# define Exception_Prototypes(list...) throw(std::exception, ##list)
84
85
#endif // AHDEFS_H
86
87
88
89
Aleph::Empty_Class
Definition:
ahDefs.H:24
Leandro Rabindranath León