taskrambler
0.1.9
Web server and task management solution.
Main Page
Related Pages
Data Structures
Files
File List
Globals
configtest.c
Go to the documentation of this file.
1
#include <stdio.h>
2
3
#include "class.h"
4
#include "
commons.h
"
5
#include "
config/config.h
"
6
#include "
config/value.h
"
7
#include "
utils/memory.h
"
8
9
int
10
main
(
int
argc,
char
* argv[])
11
{
12
Config
config
=
new
(Config,
"./testconfig.cfg"
);
13
ConfigValue val;
14
15
val =
configGet
(config,
CSTRA
(
"dummy"
));
16
17
if
(NULL != val) {
18
switch
(val->type) {
19
case
CONFIG_VALUE_STRING
:
20
printf(
21
"Value for dummy: (STRING): %s\n"
,
22
(val->value).string);
23
break
;
24
25
case
CONFIG_VALUE_NUMERIC
:
26
printf(
27
"Value for dummy: (NUMERIC): %lld\n"
,
28
(val->value).number);
29
break
;
30
31
default
:
32
printf(
"Invalid config...that should never happen\n"
);
33
}
34
}
35
36
delete
(
config
);
37
memCleanup
();
38
39
return
0;
40
}
41
42
// vim: set et ts=4 sw=4:
configGet
ConfigValue configGet(Config, const char *, size_t)
Definition:
config/get.c:31
memory.h
CONFIG_VALUE_NUMERIC
Definition:
config/value.h:37
commons.h
value.h
config.h
CSTRA
#define CSTRA(val)
Const STRing Argument.
Definition:
memory.h:26
main
int main(int argc, char *argv[])
Definition:
configtest.c:10
config
Config config
Definition:
taskrambler.c:67
CONFIG_VALUE_STRING
Definition:
config/value.h:38
memCleanup
void memCleanup()
Definition:
memory.c:862
src
testers
configtest.c
Generated on Wed Apr 13 2016 23:19:31 for taskrambler by
1.8.10