Added quantiling UDAFs
[com/gs-lite.git] / src / ftacmp / xml_t.h
1 /* ------------------------------------------------\r
2 Copyright 2014 AT&T Intellectual Property\r
3    Licensed under the Apache License, Version 2.0 (the "License");\r
4    you may not use this file except in compliance with the License.\r
5    You may obtain a copy of the License at\r
6 \r
7      http://www.apache.org/licenses/LICENSE-2.0\r
8 \r
9    Unless required by applicable law or agreed to in writing, software\r
10    distributed under the License is distributed on an "AS IS" BASIS,\r
11    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
12    See the License for the specific language governing permissions and\r
13    limitations under the License.\r
14  ------------------------------------------- */\r
15 #ifndef __XML_T_DEFINED_\r
16 #define __XML_T_DEFINED_\r
17 \r
18 #include <stdio.h>\r
19 #include<vector>\r
20 #include<string>\r
21 #include<map>\r
22 #include<set>\r
23 #include<algorithm>\r
24 \r
25 \r
26 void xmlParser_setfileinput(FILE *f);\r
27 void xmlParser_setstringinput(char *s);\r
28 \r
29 \r
30 //                      Represent leaf-level xml nodes\r
31 class xml_leaf_t{\r
32 public:\r
33         std::string name;\r
34         std::vector<std::string> attrs;\r
35         std::vector<std::string> vals;\r
36 \r
37         xml_leaf_t(const char *n, std::vector<std::string> &a, std::vector<std::string> &v){\r
38                 name = n;\r
39                 attrs = a;\r
40                 vals = v;\r
41         }\r
42 };\r
43 \r
44 class xml_t{\r
45 public:\r
46         std::vector<xml_leaf_t *> leaves;\r
47 \r
48         xml_t(){}\r
49 \r
50         void add_leaf(xml_leaf_t *l){\r
51                 leaves.push_back(l);\r
52         }\r
53 };\r
54 \r
55 #endif\r
56 \r