pmm  1.0.0
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros
pmm_cfgparser.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2008-2010 Robert Higgins
3  Author: Robert Higgins <robert.higgins@ucd.ie>
4 
5  This file is part of PMM.
6 
7  PMM 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 3 of the License, or
10  (at your option) any later version.
11 
12  PMM is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  GNU General Public License for more details.
16 
17  You should have received a copy of the GNU General Public License
18  along with PMM. If not, see <http://www.gnu.org/licenses/>.
19 */
20 #ifndef PMM_CFGPARSER_H_
21 #define PMM_CFGPARSER_H_
22 
23 #if HAVE_CONFIG_H
24 #include "config.h"
25 #endif
26 
27 #include <libxml/xmlwriter.h>
28 #include "pmm_model.h"
29 #include "pmm_load.h"
30 #include "pmm_interval.h"
31 
32 int parse_config(struct pmm_config *cfg);
33 int parse_history(struct pmm_loadhistory *h);
34 int parse_model(struct pmm_model *m);
35 int parse_models(struct pmm_config *c);
36 
37 int write_loadhistory(struct pmm_loadhistory *h);
38 int write_loadhistory_xtwp(xmlTextWriterPtr writer, struct pmm_loadhistory *h);
39 int write_models(struct pmm_config *cfg);
40 int write_model(struct pmm_model *m);
41 int write_model_xtwp(xmlTextWriterPtr writer, struct pmm_model *m);
42 int write_bench_list_xtwp(xmlTextWriterPtr writer,
43  struct pmm_bench_list *bench_list);
44 int write_benchmark_xtwp(xmlTextWriterPtr writer, struct pmm_benchmark *b);
45 int
46 write_paramdef_set_xtwp(xmlTextWriterPtr writer,
47  struct pmm_paramdef_set *pd_set);
48 int
49 write_paramdef_xtwp(xmlTextWriterPtr writer, struct pmm_paramdef *pd);
50 
51 int
52 write_parameter_array_xtwp(xmlTextWriterPtr writer, int *p, int n);
53 int write_interval_xtwp(xmlTextWriterPtr writer, struct pmm_interval *i);
54 int write_timeval_xtwp(xmlTextWriterPtr writer, struct timeval *t);
55 
56 void xmlparser_init();
57 void xmlparser_cleanup();
58 
59 #endif /*PMM_CFGPARSER_H_*/