FACT++
1.0
Main Page
Related Pages
Namespaces
Classes
Files
Examples
File List
File Members
Markus.cxx
Go to the documentation of this file.
1
#include <iostream>
2
#include <
dic.hxx
>
3
using namespace
std
;
4
5
class
DnsInfo
;
6
7
class
FloatInfo
:
public
virtual
DimInfoHandler
8
{
9
DimInfo
*
fInfo
;
10
float
no_link
, *
data
;
11
DnsInfo
*
m_dns
;
12
13
protected
:
14
friend
class
DnsInfo
;
15
void
addHandler
()
16
{
17
if
(!fInfo)
18
fInfo =
new
DimInfo
(
"SIMPLE_SERVICE"
, (
void
*)&no_link,
19
sizeof
(no_link),
this
);
20
}
21
void
removeHandler
()
22
{
23
if
(fInfo)
24
{
25
delete
fInfo
;
26
fInfo = 0;
27
}
28
}
29
public
:
30
FloatInfo
()
31
{
32
fInfo = 0;
33
no_link = -1;
34
};
35
void
initialize
();
36
void
infoHandler
()
37
{
38
data = (
float
*)
getInfo
()->
getData
();
39
cout <<
"Received : "
<< *data << endl;
40
}
41
};
42
43
class
DnsInfo
:
public
DimInfo
44
{
45
46
char
*
data
;
47
FloatInfo
&
fInfo
;
48
49
void
infoHandler
()
50
{
51
data = getString();
52
cout <<
"Received : "
<< data << endl;
53
if
(data[0] ==
'+'
)
54
{
55
fInfo.
addHandler
();
56
}
57
else
if
(data[0] ==
'-'
)
58
{
59
fInfo.
removeHandler
();
60
}
61
}
62
public
:
63
DnsInfo
(
FloatInfo
&f) :
DimInfo
(
"DIS_DNS/SERVER_LIST"
,
"DEAD"
),
64
fInfo(f) {}
65
virtual
~DnsInfo
() {}
66
};
67
68
void
FloatInfo::initialize
()
69
{
70
m_dns =
new
DnsInfo
(*
this
);
71
}
72
73
main
()
74
{
75
FloatInfo
*fInfo;
76
77
fInfo =
new
FloatInfo
();
78
fInfo->
initialize
();
79
80
while
(1)
81
pause();
82
}
DnsInfo
Definition:
Markus.cxx:43
DnsInfo::DnsInfo
DnsInfo(FloatInfo &f)
Definition:
Markus.cxx:63
DnsInfo::infoHandler
void infoHandler()
Definition:
Markus.cxx:49
dic.hxx
DnsInfo::~DnsInfo
virtual ~DnsInfo()
Definition:
Markus.cxx:65
main
main()
Definition:
Markus.cxx:73
std
STL namespace.
DimInfo
Definition:
dic.hxx:31
FloatInfo::addHandler
void addHandler()
Definition:
Markus.cxx:15
DimInfo::DimInfo
DimInfo()
Definition:
dic.hxx:36
DnsInfo::fInfo
FloatInfo & fInfo
Definition:
Markus.cxx:47
FloatInfo::removeHandler
void removeHandler()
Definition:
Markus.cxx:21
FloatInfo::no_link
float no_link
Definition:
Markus.cxx:10
initialize
void initialize()
Definition:
feeserver.c:385
DimInfo::getData
void * getData()
Definition:
diccpp.cxx:213
FloatInfo::fInfo
DimInfo * fInfo
Definition:
Markus.cxx:9
FloatInfo::infoHandler
void infoHandler()
Definition:
Markus.cxx:36
FloatInfo
Definition:
Markus.cxx:7
data
float data[4 *1440]
Definition:
EventBuilderWrapper.h:95
FloatInfo::FloatInfo
FloatInfo()
Definition:
Markus.cxx:30
DnsInfo::data
char * data
Definition:
Markus.cxx:46
DimInfoHandler::getInfo
DimInfo * getInfo()
Definition:
dic.hxx:26
DimInfoHandler
Definition:
dic.hxx:23
FloatInfo::initialize
void initialize()
Definition:
Markus.cxx:68
FloatInfo::m_dns
DnsInfo * m_dns
Definition:
Markus.cxx:11
dim
src
examples
Markus.cxx
Generated on Sun Sep 18 2016 20:50:18 for FACT++ by
1.8.11