CYCLUS
Loading...
Searching...
No Matches
query_backend.h
Go to the documentation of this file.
1#ifndef CYCLUS_SRC_QUERY_BACKEND_H_
2#define CYCLUS_SRC_QUERY_BACKEND_H_
3
4#include <limits>
5#include <list>
6#include <map>
7#include <set>
8#include <boost/version.hpp>
9
10#include <boost/uuid/detail/sha1.hpp>
11
12#include "blob.h"
13#include "rec_backend.h"
14#include "any.hpp"
15
16#define CYCLUS_SHA1_NINT 5
17using CYCLUS_SHA1_ELEM_TYPE = unsigned int;
18#define CYCLUS_SHA1_SIZE (sizeof(CYCLUS_SHA1_ELEM_TYPE) * CYCLUS_SHA1_NINT)
19#define CYCLUS_UUID_SIZE 16
20
21namespace cyclus {
22
23/// This is the primary list of all supported database types. All types must
24/// have a constant length unless they begin with the prefix VL_, which stands
25/// for "variable length" or are implicitly variable length, such as blob.
26/// Changing the order here may invalidate previously created databases.
27/// Thus only append to this enum if it is post-1.0.
28enum DbTypes {
29 // primitive types
30 BOOL = 0, // ["bool", 0, ["HDF5", "SQLite"], "BOOL", false]
31 INT, // ["int", 0, ["HDF5", "SQLite"], "INT", false]
32 FLOAT, // ["float", 0, ["HDF5", "SQLite"], "FLOAT", false]
33 DOUBLE, // ["double", 0, ["HDF5", "SQLite"], "DOUBLE", false]
34 STRING, // ["std::string", 1, ["HDF5", "SQLite"], "STRING", false]
35 VL_STRING, // ["std::string", 1, ["HDF5", "SQLite"], "VL_STRING", true]
36 BLOB, // ["cyclus::Blob", 0, ["HDF5", "SQLite"], "BLOB", true]
37 UUID, // ["boost::uuids::uuid", 0, ["HDF5", "SQLite"], "UUID", false]
38 // vector types
39 VECTOR_BOOL, // ["std::vector<bool>", 1, [], ["VECTOR", "BOOL"], false]
40 VL_VECTOR_BOOL, // ["std::vector<bool>", 1, [], ["VL_VECTOR", "BOOL"], true]
41 VECTOR_INT, // ["std::vector<int>", 1, ["HDF5", "SQLite"], ["VECTOR", "INT"], false]
42 VL_VECTOR_INT, // ["std::vector<int>", 1, ["HDF5", "SQLite"], ["VL_VECTOR", "INT"], true]
43 VECTOR_FLOAT, // ["std::vector<float>", 1, ["HDF5"], ["VECTOR", "FLOAT"], false]
44 VL_VECTOR_FLOAT, // ["std::vector<float>", 1, ["HDF5"], ["VL_VECTOR", "FLOAT"], true]
45 VECTOR_DOUBLE, // ["std::vector<double>", 1, ["HDF5", "SQLite"], ["VECTOR", "DOUBLE"], false]
46 VL_VECTOR_DOUBLE, // ["std::vector<double>", 1, ["HDF5", "SQLite"], ["VL_VECTOR", "DOUBLE"], true]
47 VECTOR_STRING, // ["std::vector<std::string>", 2, ["HDF5", "SQLite"], ["VECTOR", "STRING"], false]
48 VL_VECTOR_STRING, // ["std::vector<std::string>", 2, ["HDF5", "SQLite"], ["VL_VECTOR", "STRING"], true]
49 VECTOR_VL_STRING, // ["std::vector<std::string>", 2, ["HDF5", "SQLite"], ["VECTOR", "VL_STRING"], false]
50 VL_VECTOR_VL_STRING, // ["std::vector<std::string>", 2, ["HDF5", "SQLite"], ["VL_VECTOR", "VL_STRING"], true]
51 VECTOR_BLOB, // ["std::vector<cyclus::Blob>", 1, ["HDF5"], ["VECTOR", "BLOB"], false]
52 VL_VECTOR_BLOB, // ["std::vector<cyclus::Blob>", 1, ["HDF5"], ["VL_VECTOR", "BLOB"], true]
53 VECTOR_UUID, // ["std::vector<boost::uuids::uuid>", 1, ["HDF5"], ["VECTOR", "UUID"], false]
54 VL_VECTOR_UUID, // ["std::vector<boost::uuids::uuid>", 1, ["HDF5"], ["VL_VECTOR", "UUID"], true]
55 // set types
56 SET_BOOL, // ["std::set<bool>", 1, [], ["SET", "BOOL"], false]
57 VL_SET_BOOL, // ["std::set<bool>", 1, [], ["VL_SET", "BOOL"], true]
58 SET_INT, // ["std::set<int>", 1, ["HDF5", "SQLite"], ["SET", "INT"], false]
59 VL_SET_INT, // ["std::set<int>", 1, ["HDF5", "SQLite"], ["VL_SET", "INT"], true]
60 SET_FLOAT, // ["std::set<float>", 1, ["HDF5"], ["SET", "FLOAT"], false]
61 VL_SET_FLOAT, // ["std::set<float>", 1, ["HDF5"], ["VL_SET", "FLOAT"], true]
62 SET_DOUBLE, // ["std::set<double>", 1, ["HDF5"], ["SET", "DOUBLE"], false]
63 VL_SET_DOUBLE, // ["std::set<double>", 1, ["HDF5"], ["VL_SET", "DOUBLE"], true]
64 SET_STRING, // ["std::set<std::string>", 2, ["HDF5", "SQLite"], ["SET", "STRING"], false]
65 VL_SET_STRING, // ["std::set<std::string>", 2, ["HDF5", "SQLite"], ["VL_SET", "STRING"], true]
66 SET_VL_STRING, // ["std::set<std::string>", 2, ["HDF5", "SQLite"], ["SET", "VL_STRING"], false]
67 VL_SET_VL_STRING, // ["std::set<std::string>", 2, ["HDF5", "SQLite"], ["VL_SET", "VL_STRING"], true]
68 SET_BLOB, // ["std::set<cyclus::Blob>", 1, ["HDF5"], ["SET", "BLOB"], false]
69 VL_SET_BLOB, // ["std::set<cyclus::Blob>", 1, ["HDF5"], ["VL_SET", "BLOB"], true]
70 SET_UUID, // ["std::set<boost::uuids::uuid>", 1, ["HDF5"], ["SET", "UUID"], false]
71 VL_SET_UUID, // ["std::set<boost::uuids::uuid>", 1, ["HDF5"], ["VL_SET", "UUID"], true]
72 // list types
73 LIST_BOOL, // ["std::list<bool>", 1, ["HDF5"], ["LIST", "BOOL"], false]
74 VL_LIST_BOOL, // ["std::list<bool>", 1, ["HDF5"], ["VL_LIST", "BOOL"], true]
75 LIST_INT, // ["std::list<int>", 1, ["HDF5", "SQLite"], ["LIST", "INT"], false]
76 VL_LIST_INT, // ["std::list<int>", 1, ["HDF5", "SQLite"], ["VL_LIST", "INT"], true]
77 LIST_FLOAT, // ["std::list<float>", 1, ["HDF5"], ["LIST", "FLOAT"], false]
78 VL_LIST_FLOAT, // ["std::list<float>", 1, ["HDF5"], ["VL_LIST", "FLOAT"], true]
79 LIST_DOUBLE, // ["std::list<double>", 1, ["HDF5"], ["LIST", "DOUBLE"], false]
80 VL_LIST_DOUBLE, // ["std::list<double>", 1, ["HDF5"], ["VL_LIST", "DOUBLE"], true]
81 LIST_STRING, // ["std::list<std::string>", 2, ["HDF5", "SQLite"], ["LIST", "STRING"], false]
82 VL_LIST_STRING, // ["std::list<std::string>", 2, ["HDF5", "SQLite"], ["VL_LIST", "STRING"], true]
83 LIST_VL_STRING, // ["std::list<std::string>", 2, ["HDF5", "SQLite"], ["LIST", "VL_STRING"], false]
84 VL_LIST_VL_STRING, // ["std::list<std::string>", 2, ["HDF5", "SQLite"], ["VL_LIST", "VL_STRING"], true]
85 LIST_BLOB, // ["std::list<cyclus::Blob>", 1, ["HDF5"], ["LIST", "BLOB"], false]
86 VL_LIST_BLOB, // ["std::list<cyclus::Blob>", 1, ["HDF5"], ["VL_LIST", "BLOB"], true]
87 LIST_UUID, // ["std::list<boost::uuids::uuid>", 1, ["HDF5"], ["LIST", "UUID"], false]
88 VL_LIST_UUID, // ["std::list<boost::uuids::uuid>", 1, ["HDF5"], ["VL_LIST", "UUID"], true]
89 // pairs - not variable length
90 PAIR_INT_BOOL, // ["std::pair<int, bool>", 0, ["HDF5"], ["PAIR", "INT", "BOOL"], false]
91 PAIR_INT_INT, // ["std::pair<int, int>", 0, ["HDF5"], ["PAIR", "INT", "INT"], false]
92 PAIR_INT_FLOAT, // ["std::pair<int, float>", 0, ["HDF5"], ["PAIR", "INT", "FLOAT"], false]
93 PAIR_INT_DOUBLE, // ["std::pair<int, double>", 0, ["HDF5"], ["PAIR", "INT", "DOUBLE"], false]
94 PAIR_INT_STRING, // ["std::pair<int, std::string>", 1, ["HDF5"], ["PAIR", "INT", "STRING"], false]
95 PAIR_INT_VL_STRING, // ["std::pair<int, std::string>", 1, ["HDF5"], ["PAIR", "INT", "VL_STRING"], false]
96 PAIR_INT_BLOB, // ["std::pair<int, cyclus::Blob>", 0, ["HDF5"], ["PAIR", "INT", "BLOB"], false]
97 PAIR_INT_UUID, // ["std::pair<int, boost::uuids::uuid>", 0, ["HDF5"], ["PAIR", "INT", "UUID"], false]
98 PAIR_STRING_BOOL, // ["std::pair<std::string, bool>", 1, ["HDF5"], ["PAIR", "STRING", "BOOL"], false]
99 PAIR_STRING_INT, // ["std::pair<std::string, int>", 1, ["HDF5"], ["PAIR", "STRING", "INT"], false]
100 PAIR_STRING_FLOAT, // ["std::pair<std::string, float>", 1, ["HDF5"], ["PAIR", "STRING", "FLOAT"], false]
101 PAIR_STRING_DOUBLE, // ["std::pair<std::string, double>", 1, ["HDF5"], ["PAIR", "STRING", "DOUBLE"], false]
102 PAIR_STRING_STRING, // ["std::pair<std::string, std::string>", 2, ["HDF5"], ["PAIR", "STRING", "STRING"], false]
103 PAIR_STRING_VL_STRING, // ["std::pair<std::string, std::string>", 2, ["HDF5"], ["PAIR", "STRING", "VL_STRING"], false]
104 PAIR_STRING_BLOB, // ["std::pair<std::string, cyclus::Blob>", 1, ["HDF5"], ["PAIR", "STRING", "BLOB"], false]
105 PAIR_STRING_UUID, // ["std::pair<std::string, boost::uuids::uuid>", 1, ["HDF5"], ["PAIR", "STRING", "UUID"], false]
106 PAIR_VL_STRING_BOOL, // ["std::pair<std::string, bool>", 1, ["HDF5"], ["PAIR", "VL_STRING", "BOOL"], false]
107 PAIR_VL_STRING_INT, // ["std::pair<std::string, int>", 1, ["HDF5"], ["PAIR", "VL_STRING", "INT"], false]
108 PAIR_VL_STRING_FLOAT, // ["std::pair<std::string, float>", 1, ["HDF5"], ["PAIR", "VL_STRING", "FLOAT"], false]
109 PAIR_VL_STRING_DOUBLE, // ["std::pair<std::string, double>", 1, ["HDF5"], ["PAIR", "VL_STRING", "DOUBLE"], false]
110 PAIR_VL_STRING_STRING, // ["std::pair<std::string, std::string>", 2, ["HDF5"], ["PAIR", "VL_STRING", "STRING"], false]
111 PAIR_VL_STRING_VL_STRING, // ["std::pair<std::string, std::string>", 2, ["HDF5"], ["PAIR", "VL_STRING", "VL_STRING"], false]
112 PAIR_VL_STRING_BLOB, // ["std::pair<std::string, cyclus::Blob>", 1, ["HDF5"], ["PAIR", "VL_STRING", "BLOB"], false]
113 PAIR_VL_STRING_UUID, // ["std::pair<std::string, boost::uuids::uuid>", 1, ["HDF5"], ["PAIR", "VL_STRING", "UUID"], false]
114 // maps with int keys
115 MAP_INT_BOOL, // ["std::map<int, bool>", 1, ["HDF5"], ["MAP", "INT", "BOOL"], false]
116 VL_MAP_INT_BOOL, // ["std::map<int, bool>", 1, ["HDF5"], ["VL_MAP", "INT", "BOOL"], true]
117 MAP_INT_INT, // ["std::map<int, int>", 1, ["HDF5", "SQLite"], ["MAP", "INT", "INT"], false]
118 VL_MAP_INT_INT, // ["std::map<int, int>", 1, ["HDF5", "SQLite"], ["VL_MAP", "INT", "INT"], true]
119 MAP_INT_FLOAT, // ["std::map<int, float>", 1, ["HDF5"], ["MAP", "INT", "FLOAT"], false]
120 VL_MAP_INT_FLOAT, // ["std::map<int, float>", 1, ["HDF5"], ["VL_MAP", "INT", "FLOAT"], true]
121 MAP_INT_DOUBLE, // ["std::map<int, double>", 1, ["HDF5", "SQLite"], ["MAP", "INT", "DOUBLE"], false]
122 VL_MAP_INT_DOUBLE, // ["std::map<int, double>", 1, ["HDF5", "SQLite"], ["VL_MAP", "INT", "DOUBLE"], true]
123 MAP_INT_STRING, // ["std::map<int, std::string>", 2, ["HDF5", "SQLite"], ["MAP", "INT", "STRING"], false]
124 VL_MAP_INT_STRING, // ["std::map<int, std::string>", 2, ["HDF5", "SQLite"], ["VL_MAP", "INT", "STRING"], true]
125 MAP_INT_VL_STRING, // ["std::map<int, std::string>", 2, ["HDF5", "SQLite"], ["MAP", "INT", "VL_STRING"], false]
126 VL_MAP_INT_VL_STRING, // ["std::map<int, std::string>", 2, ["HDF5", "SQLite"], ["VL_MAP", "INT", "VL_STRING"], true]
127 MAP_INT_BLOB, // ["std::map<int, cyclus::Blob>", 1, ["HDF5"], ["MAP", "INT", "BLOB"], false]
128 VL_MAP_INT_BLOB, // ["std::map<int, cyclus::Blob>", 1, ["HDF5"], ["VL_MAP", "INT", "BLOB"], true]
129 MAP_INT_UUID, // ["std::map<int, boost::uuids::uuid>", 1, ["HDF5"], ["MAP", "INT", "UUID"], false]
130 VL_MAP_INT_UUID, // ["std::map<int, boost::uuids::uuid>", 1, ["HDF5"], ["VL_MAP", "INT", "UUID"], true]
131 // maps with fixed-length string keys
132 MAP_STRING_BOOL, // ["std::map<std::string, bool>", 2, ["HDF5"], ["MAP", "STRING", "BOOL"], false]
133 VL_MAP_STRING_BOOL, // ["std::map<std::string, bool>", 2, ["HDF5"], ["VL_MAP", "STRING", "BOOL"], true]
134 MAP_STRING_INT, // ["std::map<std::string, int>", 2, ["HDF5", "SQLite"], ["MAP", "STRING", "INT"], false]
135 VL_MAP_STRING_INT, // ["std::map<std::string, int>", 2, ["HDF5", "SQLite"], ["VL_MAP", "STRING", "INT"], true]
136 MAP_STRING_FLOAT, // ["std::map<std::string, float>", 2, ["HDF5"], ["MAP", "STRING", "FLOAT"], false]
137 VL_MAP_STRING_FLOAT, // ["std::map<std::string, float>", 2, ["HDF5"], ["VL_MAP", "STRING", "FLOAT"], true]
138 MAP_STRING_DOUBLE, // ["std::map<std::string, double>", 2, ["HDF5", "SQLite"], ["MAP", "STRING", "DOUBLE"], false]
139 VL_MAP_STRING_DOUBLE, // ["std::map<std::string, double>", 2, ["HDF5", "SQLite"], ["VL_MAP", "STRING", "DOUBLE"], true]
140 MAP_STRING_STRING, // ["std::map<std::string, std::string>", 3, ["HDF5", "SQLite"], ["MAP", "STRING", "STRING"], false]
141 VL_MAP_STRING_STRING, // ["std::map<std::string, std::string>", 3, ["HDF5", "SQLite"], ["VL_MAP", "STRING", "STRING"], true]
142 MAP_STRING_VL_STRING, // ["std::map<std::string, std::string>", 3, ["HDF5", "SQLite"], ["MAP", "STRING", "VL_STRING"], false]
143 VL_MAP_STRING_VL_STRING, // ["std::map<std::string, std::string>", 3, ["HDF5", "SQLite"], ["VL_MAP", "STRING", "VL_STRING"], true]
144 MAP_STRING_BLOB, // ["std::map<std::string, cyclus::Blob>", 2, ["HDF5"], ["MAP", "STRING", "BLOB"], false]
145 VL_MAP_STRING_BLOB, // ["std::map<std::string, cyclus::Blob>", 2, ["HDF5"], ["VL_MAP", "STRING", "BLOB"], true]
146 MAP_STRING_UUID, // ["std::map<std::string, boost::uuids::uuid>", 2, ["HDF5"], ["MAP", "STRING", "UUID"], false]
147 VL_MAP_STRING_UUID, // ["std::map<std::string, boost::uuids::uuid>", 2, ["HDF5"], ["VL_MAP", "STRING", "UUID"], true]
148 // maps with variable length string keys
149 MAP_VL_STRING_BOOL, // ["std::map<std::string, bool>", 2, ["HDF5"], ["MAP", "VL_STRING", "BOOL"], false]
150 VL_MAP_VL_STRING_BOOL, // ["std::map<std::string, bool>", 2, ["HDF5"], ["VL_MAP", "VL_STRING", "BOOL"], true]
151 MAP_VL_STRING_INT, // ["std::map<std::string, int>", 2, ["HDF5", "SQLite"], ["MAP", "VL_STRING", "INT"], false]
152 VL_MAP_VL_STRING_INT, // ["std::map<std::string, int>", 2, ["HDF5", "SQLite"], ["VL_MAP", "VL_STRING", "INT"], true]
153 MAP_VL_STRING_FLOAT, // ["std::map<std::string, float>", 2, ["HDF5"], ["MAP", "VL_STRING", "FLOAT"], false]
154 VL_MAP_VL_STRING_FLOAT, // ["std::map<std::string, float>", 2, ["HDF5"], ["VL_MAP", "VL_STRING", "FLOAT"], true]
155 MAP_VL_STRING_DOUBLE, // ["std::map<std::string, double>", 2, ["HDF5", "SQLite"], ["MAP", "VL_STRING", "DOUBLE"], false]
156 VL_MAP_VL_STRING_DOUBLE, // ["std::map<std::string, double>", 2, ["HDF5", "SQLite"], ["VL_MAP", "VL_STRING", "DOUBLE"], true]
157 MAP_VL_STRING_STRING, // ["std::map<std::string, std::string>", 3, ["HDF5", "SQLite"], ["MAP", "VL_STRING", "STRING"], false]
158 VL_MAP_VL_STRING_STRING, // ["std::map<std::string, std::string>", 3, ["HDF5", "SQLite"], ["VL_MAP", "VL_STRING", "STRING"], true]
159 MAP_VL_STRING_VL_STRING, // ["std::map<std::string, std::string>", 3, ["HDF5", "SQLite"], ["MAP", "VL_STRING", "VL_STRING"], false]
160 VL_MAP_VL_STRING_VL_STRING, // ["std::map<std::string, std::string>", 3, ["HDF5", "SQLite"], ["VL_MAP", "VL_STRING", "VL_STRING"], true]
161 MAP_VL_STRING_BLOB, // ["std::map<std::string, cyclus::Blob>", 2, ["HDF5"], ["MAP", "VL_STRING", "BLOB"], false]
162 VL_MAP_VL_STRING_BLOB, // ["std::map<std::string, cyclus::Blob>", 2, ["HDF5"], ["VL_MAP", "VL_STRING", "BLOB"], true]
163 MAP_VL_STRING_UUID, // ["std::map<std::string, boost::uuids::uuid>", 2, ["HDF5"], ["MAP", "VL_STRING", "UUID"], false]
164 VL_MAP_VL_STRING_UUID, // ["std::map<std::string, boost::uuids::uuid>", 2, ["HDF5"], ["VL_MAP", "VL_STRING", "UUID"], true]
165 // maps with pair<int, string> keys and double values
166 MAP_PAIR_INT_STRING_DOUBLE, // ["std::map<std::pair<int, std::string>, double>", 3, ["HDF5"], ["MAP", ["PAIR", "INT", "STRING"], "DOUBLE"], false]
167 VL_MAP_PAIR_INT_STRING_DOUBLE, // ["std::map<std::pair<int, std::string>, double>", 3, ["HDF5"], ["VL_MAP", ["PAIR", "INT", "STRING"], "DOUBLE"], true]
168 MAP_PAIR_INT_VL_STRING_DOUBLE, // ["std::map<std::pair<int, std::string>, double>", 3, ["HDF5"], ["MAP", ["PAIR", "INT", "VL_STRING"], "DOUBLE"], false]
169 VL_MAP_PAIR_INT_VL_STRING_DOUBLE, // ["std::map<std::pair<int, std::string>, double>", 3, ["HDF5"], ["VL_MAP", ["PAIR", "INT", "VL_STRING"], "DOUBLE"], true]
170
171 // map<string, vector<double> >
172 MAP_STRING_VECTOR_DOUBLE, // ["std::map<std::string, std::vector<double>>", 3, ["HDF5", "SQLite"], ["MAP", "STRING", ["VECTOR", "DOUBLE"]], false]
173 MAP_STRING_VL_VECTOR_DOUBLE, // ["std::map<std::string, std::vector<double>>", 3, ["HDF5", "SQLite"], ["MAP", "STRING", ["VL_VECTOR", "DOUBLE"]], false]
174 VL_MAP_STRING_VECTOR_DOUBLE, // ["std::map<std::string, std::vector<double>>", 3, ["HDF5", "SQLite"], ["VL_MAP", "STRING", ["VECTOR", "DOUBLE"]], true]
175 MAP_VL_STRING_VECTOR_DOUBLE, // ["std::map<std::string, std::vector<double>>", 3, ["HDF5", "SQLite"], ["MAP", "VL_STRING", ["VECTOR", "DOUBLE"]], false]
176 MAP_VL_STRING_VL_VECTOR_DOUBLE, // ["std::map<std::string, std::vector<double>>", 3, ["HDF5", "SQLite"], ["MAP", "VL_STRING", ["VL_VECTOR", "DOUBLE"]], false]
177 VL_MAP_STRING_VL_VECTOR_DOUBLE, // ["std::map<std::string, std::vector<double>>", 3, ["HDF5", "SQLite"], ["VL_MAP", "STRING", ["VL_VECTOR", "DOUBLE"]], true]
178 VL_MAP_VL_STRING_VECTOR_DOUBLE, // ["std::map<std::string, std::vector<double>>", 3, ["HDF5", "SQLite"], ["VL_MAP", "VL_STRING", ["VECTOR", "DOUBLE"]], true]
179 VL_MAP_VL_STRING_VL_VECTOR_DOUBLE, // ["std::map<std::string, std::vector<double>>", 3, ["HDF5", "SQLite"], ["VL_MAP", "VL_STRING", ["VL_VECTOR", "DOUBLE"]], true]
180
181 // map<string, map<int, double> >
182 MAP_STRING_MAP_INT_DOUBLE, // ["std::map<std::string, std::map<int, double>>", 3, ["HDF5", "SQLite"], ["MAP", "STRING", ["MAP", "INT", "DOUBLE"]], false]
183 MAP_STRING_VL_MAP_INT_DOUBLE, // ["std::map<std::string, std::map<int, double>>", 3, ["HDF5", "SQLite"], ["MAP", "STRING", ["VL_MAP", "INT", "DOUBLE"]], false]
184 VL_MAP_STRING_MAP_INT_DOUBLE, // ["std::map<std::string, std::map<int, double>>", 3, ["HDF5", "SQLite"], ["VL_MAP", "STRING", ["MAP", "INT", "DOUBLE"]], true]
185 MAP_VL_STRING_MAP_INT_DOUBLE, // ["std::map<std::string, std::map<int, double>>", 3, ["HDF5", "SQLite"], ["MAP", "VL_STRING", ["MAP", "INT", "DOUBLE"]], false]
186 MAP_VL_STRING_VL_MAP_INT_DOUBLE, // ["std::map<std::string, std::map<int, double>>", 3, ["HDF5", "SQLite"], ["MAP", "VL_STRING", ["VL_MAP", "INT", "DOUBLE"]], false]
187 VL_MAP_STRING_VL_MAP_INT_DOUBLE, // ["std::map<std::string, std::map<int, double>>", 3, ["HDF5", "SQLite"], ["VL_MAP", "STRING", ["VL_MAP", "INT", "DOUBLE"]], true]
188 VL_MAP_VL_STRING_MAP_INT_DOUBLE, // ["std::map<std::string, std::map<int, double>>", 3, ["HDF5", "SQLite"], ["VL_MAP", "VL_STRING", ["MAP", "INT", "DOUBLE"]], true]
189 VL_MAP_VL_STRING_VL_MAP_INT_DOUBLE, // ["std::map<std::string, std::map<int, double>>", 3, ["HDF5", "SQLite"], ["VL_MAP", "VL_STRING", ["VL_MAP", "INT", "DOUBLE"]], true]
190
191 // map<string, pair<double, map<int, double> > >
192 MAP_STRING_PAIR_DOUBLE_MAP_INT_DOUBLE, // ["std::map<std::string, std::pair<double, std::map<int, double>>>", 4, ["HDF5", "SQLite"], ["MAP", "STRING", ["PAIR", "DOUBLE", ["MAP", "INT", "DOUBLE"]]], false]
193 VL_MAP_STRING_PAIR_DOUBLE_MAP_INT_DOUBLE, // ["std::map<std::string, std::pair<double, std::map<int, double>>>", 4, ["HDF5", "SQLite"], ["VL_MAP", "STRING", ["PAIR", "DOUBLE", ["MAP", "INT", "DOUBLE"]]], true]
194 MAP_VL_STRING_PAIR_DOUBLE_MAP_INT_DOUBLE, // ["std::map<std::string, std::pair<double, std::map<int, double>>>", 4, ["HDF5", "SQLite"], ["MAP", "VL_STRING", ["PAIR", "DOUBLE", ["MAP", "INT", "DOUBLE"]]], false]
195 MAP_STRING_PAIR_DOUBLE_VL_MAP_INT_DOUBLE, // ["std::map<std::string, std::pair<double, std::map<int, double>>>", 4, ["HDF5", "SQLite"], ["MAP", "STRING", ["PAIR", "DOUBLE", ["VL_MAP", "INT", "DOUBLE"]]], false]
196 VL_MAP_VL_STRING_PAIR_DOUBLE_MAP_INT_DOUBLE, // ["std::map<std::string, std::pair<double, std::map<int, double>>>", 4, ["HDF5", "SQLite"], ["VL_MAP", "VL_STRING", ["PAIR", "DOUBLE", ["MAP", "INT", "DOUBLE"]]], true]
197 VL_MAP_STRING_PAIR_DOUBLE_VL_MAP_INT_DOUBLE, // ["std::map<std::string, std::pair<double, std::map<int, double>>>", 4, ["HDF5", "SQLite"], ["VL_MAP", "STRING", ["PAIR", "DOUBLE", ["VL_MAP", "INT", "DOUBLE"]]], true]
198 MAP_VL_STRING_PAIR_DOUBLE_VL_MAP_INT_DOUBLE, // ["std::map<std::string, std::pair<double, std::map<int, double>>>", 4, ["HDF5", "SQLite"], ["MAP", "VL_STRING", ["PAIR", "DOUBLE", ["VL_MAP", "INT", "DOUBLE"]]], false]
199 VL_MAP_VL_STRING_PAIR_DOUBLE_VL_MAP_INT_DOUBLE, // ["std::map<std::string, std::pair<double, std::map<int, double>>>", 4, ["HDF5", "SQLite"], ["VL_MAP", "VL_STRING", ["PAIR", "DOUBLE", ["VL_MAP", "INT", "DOUBLE"]]], true]
200
201 // map<map< string, double > >
202 MAP_INT_MAP_STRING_DOUBLE, // ["std::map<int, std::map<std::string, double>>", 3, ["HDF5", "SQLite"], ["MAP", "INT", ["MAP", "STRING", "DOUBLE"]], false]
203 MAP_INT_MAP_VL_STRING_DOUBLE, // ["std::map<int, std::map<std::string, double>>", 3, ["HDF5", "SQLite"], ["MAP", "INT", ["MAP", "VL_STRING", "DOUBLE"]], false]
204 VL_MAP_INT_MAP_STRING_DOUBLE, // ["std::map<int, std::map<std::string, double>>", 3, ["HDF5", "SQLite"], ["VL_MAP", "INT", ["MAP", "STRING", "DOUBLE"]], true]
205 VL_MAP_INT_MAP_VL_STRING_DOUBLE, // ["std::map<int, std::map<std::string, double>>", 3, ["HDF5", "SQLite"], ["VL_MAP", "INT", ["MAP", "VL_STRING", "DOUBLE"]], true]
206 MAP_INT_VL_MAP_STRING_DOUBLE, // ["std::map<int, std::map<std::string, double>>", 3, ["HDF5", "SQLite"], ["MAP", "INT", ["VL_MAP", "STRING", "DOUBLE"]], false]
207 MAP_INT_VL_MAP_VL_STRING_DOUBLE, // ["std::map<int, std::map<std::string, double>>", 3, ["HDF5", "SQLite"], ["MAP", "INT", ["VL_MAP", "VL_STRING", "DOUBLE"]], false]
208 VL_MAP_INT_VL_MAP_STRING_DOUBLE, // ["std::map<int, std::map<std::string, double>>", 3, ["HDF5", "SQLite"], ["VL_MAP", "INT", ["VL_MAP", "STRING", "DOUBLE"]], true]
209 VL_MAP_INT_VL_MAP_VL_STRING_DOUBLE, // ["std::map<int, std::map<std::string, double>>", 3, ["HDF5", "SQLite"], ["VL_MAP", "INT", ["VL_MAP", "VL_STRING", "DOUBLE"]], true]
210
211 // map< string, vector< pair<int, pair<string string> > > >
212 MAP_STRING_VECTOR_PAIR_INT_PAIR_STRING_STRING, // ["std::map<std::string, std::vector<std::pair<int, std::pair<std::string, std::string>>>>", 7, ["HDF5", "SQLite"], ["MAP", "STRING", ["VECTOR", ["PAIR", "INT", ["PAIR", "STRING", "STRING"]]]], false]
213 MAP_STRING_VECTOR_PAIR_INT_PAIR_STRING_VL_STRING, // ["std::map<std::string, std::vector<std::pair<int, std::pair<std::string, std::string>>>>", 7, ["HDF5", "SQLite"], ["MAP", "STRING", ["VECTOR", ["PAIR", "INT", ["PAIR", "STRING", "VL_STRING"]]]], false]
214 MAP_STRING_VECTOR_PAIR_INT_PAIR_VL_STRING_STRING, // ["std::map<std::string, std::vector<std::pair<int, std::pair<std::string, std::string>>>>", 7, ["HDF5", "SQLite"], ["MAP", "STRING", ["VECTOR", ["PAIR", "INT", ["PAIR", "VL_STRING", "STRING"]]]], false]
215 MAP_STRING_VECTOR_PAIR_INT_PAIR_VL_STRING_VL_STRING, // ["std::map<std::string, std::vector<std::pair<int, std::pair<std::string, std::string>>>>", 7, ["HDF5", "SQLite"], ["MAP", "STRING", ["VECTOR", ["PAIR", "INT", ["PAIR", "VL_STRING", "VL_STRING"]]]], false]
216 MAP_STRING_VL_VECTOR_PAIR_INT_PAIR_STRING_STRING, // ["std::map<std::string, std::vector<std::pair<int, std::pair<std::string, std::string>>>>", 7, ["HDF5", "SQLite"], ["MAP", "STRING", ["VL_VECTOR", ["PAIR", "INT", ["PAIR", "STRING", "STRING"]]]], false]
217 MAP_STRING_VL_VECTOR_PAIR_INT_PAIR_STRING_VL_STRING, // ["std::map<std::string, std::vector<std::pair<int, std::pair<std::string, std::string>>>>", 7, ["HDF5", "SQLite"], ["MAP", "STRING", ["VL_VECTOR", ["PAIR", "INT", ["PAIR", "STRING", "VL_STRING"]]]], false]
218 MAP_STRING_VL_VECTOR_PAIR_INT_PAIR_VL_STRING_STRING, // ["std::map<std::string, std::vector<std::pair<int, std::pair<std::string, std::string>>>>", 7, ["HDF5", "SQLite"], ["MAP", "STRING", ["VL_VECTOR", ["PAIR", "INT", ["PAIR", "VL_STRING", "STRING"]]]], false]
219 MAP_STRING_VL_VECTOR_PAIR_INT_PAIR_VL_STRING_VL_STRING, // ["std::map<std::string, std::vector<std::pair<int, std::pair<std::string, std::string>>>>", 7, ["HDF5", "SQLite"], ["MAP", "STRING", ["VL_VECTOR", ["PAIR", "INT", ["PAIR", "VL_STRING", "VL_STRING"]]]], false]
220 MAP_VL_STRING_VECTOR_PAIR_INT_PAIR_STRING_STRING, // ["std::map<std::string, std::vector<std::pair<int, std::pair<std::string, std::string>>>>", 7, ["HDF5", "SQLite"], ["MAP", "VL_STRING", ["VECTOR", ["PAIR", "INT", ["PAIR", "STRING", "STRING"]]]], false]
221 MAP_VL_STRING_VECTOR_PAIR_INT_PAIR_STRING_VL_STRING, // ["std::map<std::string, std::vector<std::pair<int, std::pair<std::string, std::string>>>>", 7, ["HDF5", "SQLite"], ["MAP", "VL_STRING", ["VECTOR", ["PAIR", "INT", ["PAIR", "STRING", "VL_STRING"]]]], false]
222 MAP_VL_STRING_VECTOR_PAIR_INT_PAIR_VL_STRING_STRING, // ["std::map<std::string, std::vector<std::pair<int, std::pair<std::string, std::string>>>>", 7, ["HDF5", "SQLite"], ["MAP", "VL_STRING", ["VECTOR", ["PAIR", "INT", ["PAIR", "VL_STRING", "STRING"]]]], false]
223 MAP_VL_STRING_VECTOR_PAIR_INT_PAIR_VL_STRING_VL_STRING, // ["std::map<std::string, std::vector<std::pair<int, std::pair<std::string, std::string>>>>", 7, ["HDF5", "SQLite"], ["MAP", "VL_STRING", ["VECTOR", ["PAIR", "INT", ["PAIR", "VL_STRING", "VL_STRING"]]]], false]
224 MAP_VL_STRING_VL_VECTOR_PAIR_INT_PAIR_STRING_STRING, // ["std::map<std::string, std::vector<std::pair<int, std::pair<std::string, std::string>>>>", 7, ["HDF5", "SQLite"], ["MAP", "VL_STRING", ["VL_VECTOR", ["PAIR", "INT", ["PAIR", "STRING", "STRING"]]]], false]
225 MAP_VL_STRING_VL_VECTOR_PAIR_INT_PAIR_STRING_VL_STRING, // ["std::map<std::string, std::vector<std::pair<int, std::pair<std::string, std::string>>>>", 7, ["HDF5", "SQLite"], ["MAP", "VL_STRING", ["VL_VECTOR", ["PAIR", "INT", ["PAIR", "STRING", "VL_STRING"]]]], false]
226 MAP_VL_STRING_VL_VECTOR_PAIR_INT_PAIR_VL_STRING_STRING, // ["std::map<std::string, std::vector<std::pair<int, std::pair<std::string, std::string>>>>", 7, ["HDF5", "SQLite"], ["MAP", "VL_STRING", ["VL_VECTOR", ["PAIR", "INT", ["PAIR", "VL_STRING", "STRING"]]]], false]
227 MAP_VL_STRING_VL_VECTOR_PAIR_INT_PAIR_VL_STRING_VL_STRING, // ["std::map<std::string, std::vector<std::pair<int, std::pair<std::string, std::string>>>>", 7, ["HDF5", "SQLite"], ["MAP", "VL_STRING", ["VL_VECTOR", ["PAIR", "INT", ["PAIR", "VL_STRING", "VL_STRING"]]]], false]
228 VL_MAP_STRING_VECTOR_PAIR_INT_PAIR_STRING_STRING, // ["std::map<std::string, std::vector<std::pair<int, std::pair<std::string, std::string>>>>", 7, ["HDF5", "SQLite"], ["VL_MAP", "STRING", ["VECTOR", ["PAIR", "INT", ["PAIR", "STRING", "STRING"]]]], true]
229 VL_MAP_STRING_VECTOR_PAIR_INT_PAIR_STRING_VL_STRING, // ["std::map<std::string, std::vector<std::pair<int, std::pair<std::string, std::string>>>>", 7, ["HDF5", "SQLite"], ["VL_MAP", "STRING", ["VECTOR", ["PAIR", "INT", ["PAIR", "STRING", "VL_STRING"]]]], true]
230 VL_MAP_STRING_VECTOR_PAIR_INT_PAIR_VL_STRING_STRING, // ["std::map<std::string, std::vector<std::pair<int, std::pair<std::string, std::string>>>>", 7, ["HDF5", "SQLite"], ["VL_MAP", "STRING", ["VECTOR", ["PAIR", "INT", ["PAIR", "VL_STRING", "STRING"]]]], true]
231 VL_MAP_STRING_VECTOR_PAIR_INT_PAIR_VL_STRING_VL_STRING, // ["std::map<std::string, std::vector<std::pair<int, std::pair<std::string, std::string>>>>", 7, ["HDF5", "SQLite"], ["VL_MAP", "STRING", ["VECTOR", ["PAIR", "INT", ["PAIR", "VL_STRING", "VL_STRING"]]]], true]
232 VL_MAP_STRING_VL_VECTOR_PAIR_INT_PAIR_STRING_STRING, // ["std::map<std::string, std::vector<std::pair<int, std::pair<std::string, std::string>>>>", 7, ["HDF5", "SQLite"], ["VL_MAP", "STRING", ["VL_VECTOR", ["PAIR", "INT", ["PAIR", "STRING", "STRING"]]]], true]
233 VL_MAP_STRING_VL_VECTOR_PAIR_INT_PAIR_STRING_VL_STRING, // ["std::map<std::string, std::vector<std::pair<int, std::pair<std::string, std::string>>>>", 7, ["HDF5", "SQLite"], ["VL_MAP", "STRING", ["VL_VECTOR", ["PAIR", "INT", ["PAIR", "STRING", "VL_STRING"]]]], true]
234 VL_MAP_STRING_VL_VECTOR_PAIR_INT_PAIR_VL_STRING_STRING, // ["std::map<std::string, std::vector<std::pair<int, std::pair<std::string, std::string>>>>", 7, ["HDF5", "SQLite"], ["VL_MAP", "STRING", ["VL_VECTOR", ["PAIR", "INT", ["PAIR", "VL_STRING", "STRING"]]]], true]
235 VL_MAP_STRING_VL_VECTOR_PAIR_INT_PAIR_VL_STRING_VL_STRING, // ["std::map<std::string, std::vector<std::pair<int, std::pair<std::string, std::string>>>>", 7, ["HDF5", "SQLite"], ["VL_MAP", "STRING", ["VL_VECTOR", ["PAIR", "INT", ["PAIR", "VL_STRING", "VL_STRING"]]]], true]
236 VL_MAP_VL_STRING_VECTOR_PAIR_INT_PAIR_STRING_STRING, // ["std::map<std::string, std::vector<std::pair<int, std::pair<std::string, std::string>>>>", 7, ["HDF5", "SQLite"], ["VL_MAP", "VL_STRING", ["VECTOR", ["PAIR", "INT", ["PAIR", "STRING", "STRING"]]]], true]
237 VL_MAP_VL_STRING_VECTOR_PAIR_INT_PAIR_STRING_VL_STRING, // ["std::map<std::string, std::vector<std::pair<int, std::pair<std::string, std::string>>>>", 7, ["HDF5", "SQLite"], ["VL_MAP", "VL_STRING", ["VECTOR", ["PAIR", "INT", ["PAIR", "STRING", "VL_STRING"]]]], true]
238 VL_MAP_VL_STRING_VECTOR_PAIR_INT_PAIR_VL_STRING_STRING, // ["std::map<std::string, std::vector<std::pair<int, std::pair<std::string, std::string>>>>", 7, ["HDF5", "SQLite"], ["VL_MAP", "VL_STRING", ["VECTOR", ["PAIR", "INT", ["PAIR", "VL_STRING", "STRING"]]]], true]
239 VL_MAP_VL_STRING_VECTOR_PAIR_INT_PAIR_VL_STRING_VL_STRING, // ["std::map<std::string, std::vector<std::pair<int, std::pair<std::string, std::string>>>>", 7, ["HDF5", "SQLite"], ["VL_MAP", "VL_STRING", ["VECTOR", ["PAIR", "INT", ["PAIR", "VL_STRING", "VL_STRING"]]]], true]
240 VL_MAP_VL_STRING_VL_VECTOR_PAIR_INT_PAIR_STRING_STRING, // ["std::map<std::string, std::vector<std::pair<int, std::pair<std::string, std::string>>>>", 7, ["HDF5", "SQLite"], ["VL_MAP", "VL_STRING", ["VL_VECTOR", ["PAIR", "INT", ["PAIR", "STRING", "STRING"]]]], true]
241 VL_MAP_VL_STRING_VL_VECTOR_PAIR_INT_PAIR_STRING_VL_STRING, // ["std::map<std::string, std::vector<std::pair<int, std::pair<std::string, std::string>>>>", 7, ["HDF5", "SQLite"], ["VL_MAP", "VL_STRING", ["VL_VECTOR", ["PAIR", "INT", ["PAIR", "STRING", "VL_STRING"]]]], true]
242 VL_MAP_VL_STRING_VL_VECTOR_PAIR_INT_PAIR_VL_STRING_STRING, // ["std::map<std::string, std::vector<std::pair<int, std::pair<std::string, std::string>>>>", 7, ["HDF5", "SQLite"], ["VL_MAP", "VL_STRING", ["VL_VECTOR", ["PAIR", "INT", ["PAIR", "VL_STRING", "STRING"]]]], true]
243 VL_MAP_VL_STRING_VL_VECTOR_PAIR_INT_PAIR_VL_STRING_VL_STRING, // ["std::map<std::string, std::vector<std::pair<int, std::pair<std::string, std::string>>>>", 7, ["HDF5", "SQLite"], ["VL_MAP", "VL_STRING", ["VL_VECTOR", ["PAIR", "INT", ["PAIR", "VL_STRING", "VL_STRING"]]]], true]
244
245 // list< pair<int, int>
246 LIST_PAIR_INT_INT, // ["std::list<std::pair<int, int>>", 2, ["HDF5", "SQLite"], ["LIST", ["PAIR", "INT", "INT"]], false]
247 VL_LIST_PAIR_INT_INT, // ["std::list<std::pair<int, int>>", 2, ["HDF5", "SQLite"], ["VL_LIST", ["PAIR", "INT", "INT"]], true]
248
249 // map< string, pair< string, vector<double> > > >
250 MAP_STRING_PAIR_STRING_VECTOR_DOUBLE, // ["std::map<std::string, std::pair<std::string, std::vector<double>>>", 5, ["HDF5", "SQLite"], ["MAP", "STRING", ["PAIR", "STRING", ["VECTOR", "DOUBLE"]]], false]
251 MAP_STRING_PAIR_STRING_VL_VECTOR_DOUBLE, // ["std::map<std::string, std::pair<std::string, std::vector<double>>>", 5, ["HDF5", "SQLite"], ["MAP", "STRING", ["PAIR", "STRING", ["VL_VECTOR", "DOUBLE"]]], false]
252 MAP_STRING_PAIR_VL_STRING_VECTOR_DOUBLE, // ["std::map<std::string, std::pair<std::string, std::vector<double>>>", 5, ["HDF5", "SQLite"], ["MAP", "STRING", ["PAIR", "VL_STRING", ["VECTOR", "DOUBLE"]]], false]
253 MAP_STRING_PAIR_VL_STRING_VL_VECTOR_DOUBLE, // ["std::map<std::string, std::pair<std::string, std::vector<double>>>", 5, ["HDF5", "SQLite"], ["MAP", "STRING", ["PAIR", "VL_STRING", ["VL_VECTOR", "DOUBLE"]]], false]
254 MAP_VL_STRING_PAIR_STRING_VECTOR_DOUBLE, // ["std::map<std::string, std::pair<std::string, std::vector<double>>>", 5, ["HDF5", "SQLite"], ["MAP", "VL_STRING", ["PAIR", "STRING", ["VECTOR", "DOUBLE"]]], false]
255 MAP_VL_STRING_PAIR_VL_STRING_VECTOR_DOUBLE, // ["std::map<std::string, std::pair<std::string, std::vector<double>>>", 5, ["HDF5", "SQLite"], ["MAP", "VL_STRING", ["PAIR", "VL_STRING", ["VECTOR", "DOUBLE"]]], false]
256 MAP_VL_STRING_PAIR_STRING_VL_VECTOR_DOUBLE, // ["std::map<std::string, std::pair<std::string, std::vector<double>>>", 5, ["HDF5", "SQLite"], ["MAP", "VL_STRING", ["PAIR", "STRING", ["VL_VECTOR", "DOUBLE"]]], false]
257 MAP_VL_STRING_PAIR_VL_STRING_VL_VECTOR_DOUBLE, // ["std::map<std::string, std::pair<std::string, std::vector<double>>>", 5, ["HDF5", "SQLite"], ["MAP", "VL_STRING", ["PAIR", "VL_STRING", ["VL_VECTOR", "DOUBLE"]]], false]
258 VL_MAP_STRING_PAIR_STRING_VECTOR_DOUBLE, // ["std::map<std::string, std::pair<std::string, std::vector<double>>>", 5, ["HDF5", "SQLite"], ["VL_MAP", "STRING", ["PAIR", "STRING", ["VECTOR", "DOUBLE"]]], true]
259 VL_MAP_VL_STRING_PAIR_STRING_VECTOR_DOUBLE, // ["std::map<std::string, std::pair<std::string, std::vector<double>>>", 5, ["HDF5", "SQLite"], ["VL_MAP", "VL_STRING", ["PAIR", "STRING", ["VECTOR", "DOUBLE"]]], true]
260 VL_MAP_STRING_PAIR_VL_STRING_VECTOR_DOUBLE, // ["std::map<std::string, std::pair<std::string, std::vector<double>>>", 5, ["HDF5", "SQLite"], ["VL_MAP", "STRING", ["PAIR", "VL_STRING", ["VECTOR", "DOUBLE"]]], true]
261 VL_MAP_STRING_PAIR_STRING_VL_VECTOR_DOUBLE, // ["std::map<std::string, std::pair<std::string, std::vector<double>>>", 5, ["HDF5", "SQLite"], ["VL_MAP", "STRING", ["PAIR", "STRING", ["VL_VECTOR", "DOUBLE"]]], true]
262 VL_MAP_VL_STRING_PAIR_VL_STRING_VECTOR_DOUBLE, // ["std::map<std::string, std::pair<std::string, std::vector<double>>>", 5, ["HDF5", "SQLite"], ["VL_MAP", "VL_STRING", ["PAIR", "VL_STRING", ["VECTOR", "DOUBLE"]]], true]
263 VL_MAP_VL_STRING_PAIR_STRING_VL_VECTOR_DOUBLE, // ["std::map<std::string, std::pair<std::string, std::vector<double>>>", 5, ["HDF5", "SQLite"], ["VL_MAP", "VL_STRING", ["PAIR", "STRING", ["VL_VECTOR", "DOUBLE"]]], true]
264 VL_MAP_STRING_PAIR_VL_STRING_VL_VECTOR_DOUBLE, // ["std::map<std::string, std::pair<std::string, std::vector<double>>>", 5, ["HDF5", "SQLite"], ["VL_MAP", "STRING", ["PAIR", "VL_STRING", ["VL_VECTOR", "DOUBLE"]]], true]
265 VL_MAP_VL_STRING_PAIR_VL_STRING_VL_VECTOR_DOUBLE, // ["std::map<std::string, std::pair<std::string, std::vector<double>>>", 5, ["HDF5", "SQLite"], ["VL_MAP", "VL_STRING", ["PAIR", "VL_STRING", ["VL_VECTOR", "DOUBLE"]]], true]
266
267 // map<string, map<string, int> >
268 MAP_STRING_MAP_STRING_INT, // ["std::map<std::string, std::map<std::string, int>>", 3, ["HDF5", "SQLite"], ["MAP", "STRING", ["MAP", "STRING", "INT"]], false]
269 MAP_STRING_MAP_VL_STRING_INT, // ["std::map<std::string, std::map<std::string, int>>", 3, ["HDF5", "SQLite"], ["MAP", "STRING", ["MAP", "VL_STRING", "INT"]], false]
270 MAP_STRING_VL_MAP_STRING_INT, // ["std::map<std::string, std::map<std::string, int>>", 3, ["HDF5", "SQLite"], ["MAP", "STRING", ["VL_MAP", "STRING", "INT"]], false]
271 MAP_STRING_VL_MAP_VL_STRING_INT, // ["std::map<std::string, std::map<std::string, int>>", 3, ["HDF5", "SQLite"], ["MAP", "STRING", ["VL_MAP", "VL_STRING", "INT"]], false]
272 MAP_VL_STRING_MAP_STRING_INT, // ["std::map<std::string, std::map<std::string, int>>", 3, ["HDF5", "SQLite"], ["MAP", "VL_STRING", ["MAP", "STRING", "INT"]], false]
273 MAP_VL_STRING_VL_MAP_STRING_INT, // ["std::map<std::string, std::map<std::string, int>>", 3, ["HDF5", "SQLite"], ["MAP", "VL_STRING", ["VL_MAP", "STRING", "INT"]], false]
274 MAP_VL_STRING_MAP_VL_STRING_INT, // ["std::map<std::string, std::map<std::string, int>>", 3, ["HDF5", "SQLite"], ["MAP", "VL_STRING", ["MAP", "VL_STRING", "INT"]], false]
275 MAP_VL_STRING_VL_MAP_VL_STRING_INT, // ["std::map<std::string, std::map<std::string, int>>", 3, ["HDF5", "SQLite"], ["MAP", "VL_STRING", ["VL_MAP", "VL_STRING", "INT"]], false]
276 VL_MAP_STRING_MAP_STRING_INT, // ["std::map<std::string, std::map<std::string, int>>", 3, ["HDF5", "SQLite"], ["VL_MAP", "STRING", ["MAP", "STRING", "INT"]], true]
277 VL_MAP_VL_STRING_MAP_STRING_INT, // ["std::map<std::string, std::map<std::string, int>>", 3, ["HDF5", "SQLite"], ["VL_MAP", "VL_STRING", ["MAP", "STRING", "INT"]], true]
278 VL_MAP_STRING_VL_MAP_STRING_INT, // ["std::map<std::string, std::map<std::string, int>>", 3, ["HDF5", "SQLite"], ["VL_MAP", "STRING", ["VL_MAP", "STRING", "INT"]], true]
279 VL_MAP_STRING_MAP_VL_STRING_INT, // ["std::map<std::string, std::map<std::string, int>>", 3, ["HDF5", "SQLite"], ["VL_MAP", "STRING", ["MAP", "VL_STRING", "INT"]], true]
280 VL_MAP_STRING_VL_MAP_VL_STRING_INT, // ["std::map<std::string, std::map<std::string, int>>", 3, ["HDF5", "SQLite"], ["VL_MAP", "STRING", ["VL_MAP", "VL_STRING", "INT"]], true]
281 VL_MAP_VL_STRING_MAP_VL_STRING_INT, // ["std::map<std::string, std::map<std::string, int>>", 3, ["HDF5", "SQLite"], ["VL_MAP", "VL_STRING", ["MAP", "VL_STRING", "INT"]], true]
282 VL_MAP_VL_STRING_VL_MAP_STRING_INT, // ["std::map<std::string, std::map<std::string, int>>", 3, ["HDF5", "SQLite"], ["VL_MAP", "VL_STRING", ["VL_MAP", "STRING", "INT"]], true]
283 VL_MAP_VL_STRING_VL_MAP_VL_STRING_INT, // ["std::map<std::string, std::map<std::string, int>>", 3, ["HDF5", "SQLite"], ["VL_MAP", "VL_STRING", ["VL_MAP", "VL_STRING", "INT"]], true]
284
285 // vector<pair<pair<double, double>, map<string, double>>>
286 VECTOR_PAIR_PAIR_DOUBLE_DOUBLE_MAP_STRING_DOUBLE, // ["std::vector<std::pair<std::pair<double, double>, std::map<std::string, double>>>", 5, ["HDF5", "SQLite"], ["VECTOR", ["PAIR", ["PAIR", "DOUBLE", "DOUBLE"], ["MAP", "STRING", "DOUBLE"]]], false]
287 VECTOR_PAIR_PAIR_DOUBLE_DOUBLE_MAP_VL_STRING_DOUBLE, // ["std::vector<std::pair<std::pair<double, double>, std::map<std::string, double>>>", 5, ["HDF5", "SQLite"], ["VECTOR", ["PAIR", ["PAIR", "DOUBLE", "DOUBLE"], ["MAP", "VL_STRING", "DOUBLE"]]], false]
288 VECTOR_PAIR_PAIR_DOUBLE_DOUBLE_VL_MAP_STRING_DOUBLE, // ["std::vector<std::pair<std::pair<double, double>, std::map<std::string, double>>>", 5, ["HDF5", "SQLite"], ["VECTOR", ["PAIR", ["PAIR", "DOUBLE", "DOUBLE"], ["VL_MAP", "STRING", "DOUBLE"]]], false]
289 VECTOR_PAIR_PAIR_DOUBLE_DOUBLE_VL_MAP_VL_STRING_DOUBLE, // ["std::vector<std::pair<std::pair<double, double>, std::map<std::string, double>>>", 5, ["HDF5", "SQLite"], ["VECTOR", ["PAIR", ["PAIR", "DOUBLE", "DOUBLE"], ["VL_MAP", "VL_STRING", "DOUBLE"]]], false]
290 VL_VECTOR_PAIR_PAIR_DOUBLE_DOUBLE_MAP_STRING_DOUBLE, // ["std::vector<std::pair<std::pair<double, double>, std::map<std::string, double>>>", 5, ["HDF5", "SQLite"], ["VL_VECTOR", ["PAIR", ["PAIR", "DOUBLE", "DOUBLE"], ["MAP", "STRING", "DOUBLE"]]], true]
291 VL_VECTOR_PAIR_PAIR_DOUBLE_DOUBLE_MAP_VL_STRING_DOUBLE, // ["std::vector<std::pair<std::pair<double, double>, std::map<std::string, double>>>", 5, ["HDF5", "SQLite"], ["VL_VECTOR", ["PAIR", ["PAIR", "DOUBLE", "DOUBLE"], ["MAP", "VL_STRING", "DOUBLE"]]], true]
292 VL_VECTOR_PAIR_PAIR_DOUBLE_DOUBLE_VL_MAP_STRING_DOUBLE, // ["std::vector<std::pair<std::pair<double, double>, std::map<std::string, double>>>", 5, ["HDF5", "SQLite"], ["VL_VECTOR", ["PAIR", ["PAIR", "DOUBLE", "DOUBLE"], ["VL_MAP", "STRING", "DOUBLE"]]], true]
293 VL_VECTOR_PAIR_PAIR_DOUBLE_DOUBLE_VL_MAP_VL_STRING_DOUBLE, // ["std::vector<std::pair<std::pair<double, double>, std::map<std::string, double>>>", 5, ["HDF5", "SQLite"], ["VL_VECTOR", ["PAIR", ["PAIR", "DOUBLE", "DOUBLE"], ["VL_MAP", "VL_STRING", "DOUBLE"]]], true]
294
295 // pair<int, pair<string, string>>
296 PAIR_INT_PAIR_STRING_STRING, // ["std::pair<int, std::pair<std::string, std::string>>", 2, ["HDF5"], ["PAIR", "INT", ["PAIR", "STRING", "STRING"]], false]
297 PAIR_INT_PAIR_VL_STRING_STRING, // ["std::pair<int, std::pair<std::string, std::string>>", 2, ["HDF5"], ["PAIR", "INT", ["PAIR", "VL_STRING", "STRING"]], false]
298 PAIR_INT_PAIR_STRING_VL_STRING, // ["std::pair<int, std::pair<std::string, std::string>>", 2, ["HDF5"], ["PAIR", "INT", ["PAIR", "STRING", "VL_STRING"]], false]
299 PAIR_INT_PAIR_VL_STRING_VL_STRING, // ["std::pair<int, std::pair<std::string, std::string>>", 2, ["HDF5"], ["PAIR", "INT", ["PAIR", "VL_STRING", "VL_STRING"]], false]
300
301 // pair<double, double>
302 PAIR_DOUBLE_DOUBLE, // ["std::pair<double, double>", 0, ["HDF5"], ["PAIR", "DOUBLE", "DOUBLE"], false]
303
304 // pair<pair<double, double>, map<string, double>>
305 PAIR_PAIR_DOUBLE_DOUBLE_MAP_STRING_DOUBLE, // ["std::pair<std::pair<double, double>, std::map<std::string, double>>", 4, ["HDF5"], ["PAIR", ["PAIR", "DOUBLE", "DOUBLE"], ["MAP", "STRING", "DOUBLE"]], false]
306 PAIR_PAIR_DOUBLE_DOUBLE_MAP_VL_STRING_DOUBLE, // ["std::pair<std::pair<double, double>, std::map<std::string, double>>", 4, ["HDF5"], ["PAIR", ["PAIR", "DOUBLE", "DOUBLE"], ["MAP", "VL_STRING", "DOUBLE"]], false]
307 PAIR_PAIR_DOUBLE_DOUBLE_VL_MAP_STRING_DOUBLE, // ["std::pair<std::pair<double, double>, std::map<std::string, double>>", 4, ["HDF5"], ["PAIR", ["PAIR", "DOUBLE", "DOUBLE"], ["VL_MAP", "STRING", "DOUBLE"]], false]
308 PAIR_PAIR_DOUBLE_DOUBLE_VL_MAP_VL_STRING_DOUBLE, // ["std::pair<std::pair<double, double>, std::map<std::string, double>>", 4, ["HDF5"], ["PAIR", ["PAIR", "DOUBLE", "DOUBLE"], ["VL_MAP", "VL_STRING", "DOUBLE"]], false]
309
310 // Resource Tools
311 MATERIAL, // ["cyclus::Material", 0, [], "MATERIAL", false]
312 PRODUCT, // ["cyclus::Product", 0, [], "PRODUCT", false]
313 RES_BUF_MATERIAL, // ["cyclus::toolkit::ResBuf<cyclus::Material>", 1, [], ["RES_BUF", "MATERIAL"], false]
314 RES_BUF_PRODUCT, // ["cyclus::toolkit::ResBuf<cyclus::Product>", 1, [], ["RES_BUF", "PRODUCT"], false]
315 RES_MAP_INT_MATERIAL, // ["cyclus::toolkit::ResMap<int, cyclus::Material>", 2, [], ["RES_MAP", "INT", "MATERIAL"], false]
316 RES_MAP_INT_PRODUCT, // ["cyclus::toolkit::ResMap<int, cyclus::Product>", 2, [], ["RES_MAP", "INT", "PRODUCT"], false]
317 RES_MAP_STRING_MATERIAL, // ["cyclus::toolkit::ResMap<std::string, cyclus::Material>", 2, [], ["RES_MAP", "STRING", "MATERIAL"], false]
318 RES_MAP_STRING_PRODUCT, // ["cyclus::toolkit::ResMap<std::string, cyclus::Product>", 2, [], ["RES_MAP", "STRING", "PRODUCT"], false]
319 RES_MAP_VL_STRING_MATERIAL, // ["cyclus::toolkit::ResMap<std::string, cyclus::Material>", 2, [], ["RES_MAP", "VL_STRING", "MATERIAL"], false]
320 RES_MAP_VL_STRING_PRODUCT, // ["cyclus::toolkit::ResMap<std::string, cyclus::Product>", 2, [], ["RES_MAP", "VL_STRING", "PRODUCT"], false]
321
322 // pair<double, map<int, double>>
323 PAIR_DOUBLE_MAP_INT_DOUBLE, // ["std::pair<double, std::map<int, double>>", 2, ["HDF5"], ["PAIR", "DOUBLE", ["MAP", "INT", "DOUBLE"]], false]
324 PAIR_DOUBLE_VL_MAP_INT_DOUBLE, // ["std::pair<double, std::map<int, double>>", 2, ["HDF5"], ["PAIR", "DOUBLE", ["VL_MAP", "INT", "DOUBLE"]], false]
325
326 // vector<pair<int, pair<string, string>>>
327 VECTOR_PAIR_INT_PAIR_STRING_STRING, // ["std::vector<std::pair<int, std::pair<std::string, std::string>>>", 1, ["HDF5"], ["VECTOR", ["PAIR", "INT", ["PAIR", "STRING", "STRING"]]], false]
328 VECTOR_PAIR_INT_PAIR_VL_STRING_STRING, // ["std::vector<std::pair<int, std::pair<std::string, std::string>>>", 1, ["HDF5"], ["VECTOR", ["PAIR", "INT", ["PAIR", "VL_STRING", "STRING"]]], false]
329 VECTOR_PAIR_INT_PAIR_STRING_VL_STRING, // ["std::vector<std::pair<int, std::pair<std::string, std::string>>>", 1, ["HDF5"], ["VECTOR", ["PAIR", "INT", ["PAIR", "STRING", "VL_STRING"]]], false]
330 VECTOR_PAIR_INT_PAIR_VL_STRING_VL_STRING, // ["std::vector<std::pair<int, std::pair<std::string, std::string>>>", 1, ["HDF5"], ["VECTOR", ["PAIR", "INT", ["PAIR", "VL_STRING", "VL_STRING"]]], false]
331 VL_VECTOR_PAIR_INT_PAIR_STRING_STRING, // ["std::vector<std::pair<int, std::pair<std::string, std::string>>>", 1, ["HDF5"], ["VL_VECTOR", ["PAIR", "INT", ["PAIR", "STRING", "STRING"]]], true]
332 VL_VECTOR_PAIR_INT_PAIR_VL_STRING_STRING, // ["std::vector<std::pair<int, std::pair<std::string, std::string>>>", 1, ["HDF5"], ["VL_VECTOR", ["PAIR", "INT", ["PAIR", "VL_STRING", "STRING"]]], true]
333 VL_VECTOR_PAIR_INT_PAIR_STRING_VL_STRING, // ["std::vector<std::pair<int, std::pair<std::string, std::string>>>", 1, ["HDF5"], ["VL_VECTOR", ["PAIR", "INT", ["PAIR", "STRING", "VL_STRING"]]], true]
334 VL_VECTOR_PAIR_INT_PAIR_VL_STRING_VL_STRING, // ["std::vector<std::pair<int, std::pair<std::string, std::string>>>", 1, ["HDF5"], ["VL_VECTOR", ["PAIR", "INT", ["PAIR", "VL_STRING", "VL_STRING"]]], true]
335
336 PAIR_STRING_VECTOR_DOUBLE, // ["std::pair<std::string, std::vector<double>>", 1, ["HDF5"], ["PAIR", "STRING", ["VECTOR", "DOUBLE"]], false]
337 PAIR_VL_STRING_VECTOR_DOUBLE, // ["std::pair<std::string, std::vector<double>>", 1, ["HDF5"], ["PAIR", "VL_STRING", ["VECTOR", "DOUBLE"]], false]
338 PAIR_STRING_VL_VECTOR_DOUBLE, // ["std::pair<std::string, std::vector<double>>", 1, ["HDF5"], ["PAIR", "STRING", ["VL_VECTOR", "DOUBLE"]], false]
339 PAIR_VL_STRING_VL_VECTOR_DOUBLE, // ["std::pair<std::string, std::vector<double>>", 1, ["HDF5"], ["PAIR", "VL_STRING", ["VL_VECTOR", "DOUBLE"]], false]
340
341 //map<pair<string, string>, int>
342 MAP_PAIR_STRING_STRING_INT, // ["std::map<std::pair<std::string, std::string>, int>", 4, ["HDF5","SQLite"], ["MAP", ["PAIR", "STRING", "STRING"], "INT"], false]
343 MAP_PAIR_STRING_VL_STRING_INT, // ["std::map<std::pair<std::string, std::string>, int>", 4, ["HDF5","SQLite"], ["MAP", ["PAIR", "STRING", "VL_STRING"], "INT"], false]
344 MAP_PAIR_VL_STRING_STRING_INT, // ["std::map<std::pair<std::string, std::string>, int>", 4, ["HDF5","SQLite"], ["MAP", ["PAIR", "VL_STRING", "STRING"], "INT"], false]
345 MAP_PAIR_VL_STRING_VL_STRING_INT, // ["std::map<std::pair<std::string, std::string>, int>", 4, ["HDF5","SQLite"], ["MAP", ["PAIR", "VL_STRING", "VL_STRING"], "INT"], false]
346 VL_MAP_PAIR_STRING_STRING_INT, // ["std::map<std::pair<std::string, std::string>, int>", 4, ["HDF5","SQLite"], ["VL_MAP", ["PAIR", "STRING", "STRING"], "INT"], true]
347 VL_MAP_PAIR_STRING_VL_STRING_INT, // ["std::map<std::pair<std::string, std::string>, int>", 4, ["HDF5","SQLite"], ["VL_MAP", ["PAIR", "STRING", "VL_STRING"], "INT"], true]
348 VL_MAP_PAIR_VL_STRING_STRING_INT, // ["std::map<std::pair<std::string, std::string>, int>", 4, ["HDF5","SQLite"], ["VL_MAP", ["PAIR", "VL_STRING", "STRING"], "INT"], true]
349 VL_MAP_PAIR_VL_STRING_VL_STRING_INT, // ["std::map<std::pair<std::string, std::string>, int>", 4, ["HDF5","SQLite"], ["VL_MAP", ["PAIR", "VL_STRING", "VL_STRING"], "INT"], true]
350
351 // map<string, map<string, double> >
352 MAP_STRING_MAP_STRING_DOUBLE, // ["std::map<std::string, std::map<std::string, double>>", 4, ["HDF5", "SQLite"], ["MAP", "STRING", ["MAP", "STRING", "DOUBLE"]], false]
353 MAP_STRING_MAP_VL_STRING_DOUBLE, // ["std::map<std::string, std::map<std::string, double>>", 4, ["HDF5", "SQLite"], ["MAP", "STRING", ["MAP", "VL_STRING", "DOUBLE"]], false]
354 MAP_STRING_VL_MAP_STRING_DOUBLE, // ["std::map<std::string, std::map<std::string, double>>", 4, ["HDF5", "SQLite"], ["MAP", "STRING", ["VL_MAP", "STRING", "DOUBLE"]], false]
355 MAP_STRING_VL_MAP_VL_STRING_DOUBLE, // ["std::map<std::string, std::map<std::string, double>>", 4, ["HDF5", "SQLite"], ["MAP", "STRING", ["VL_MAP", "VL_STRING", "DOUBLE"]], false]
356 MAP_VL_STRING_MAP_STRING_DOUBLE, // ["std::map<std::string, std::map<std::string, double>>", 4, ["HDF5", "SQLite"], ["MAP", "VL_STRING", ["MAP", "STRING", "DOUBLE"]], false]
357 MAP_VL_STRING_VL_MAP_STRING_DOUBLE, // ["std::map<std::string, std::map<std::string, double>>", 4, ["HDF5", "SQLite"], ["MAP", "VL_STRING", ["VL_MAP", "STRING", "DOUBLE"]], false]
358 MAP_VL_STRING_MAP_VL_STRING_DOUBLE, // ["std::map<std::string, std::map<std::string, double>>", 4, ["HDF5", "SQLite"], ["MAP", "VL_STRING", ["MAP", "VL_STRING", "DOUBLE"]], false]
359 MAP_VL_STRING_VL_MAP_VL_STRING_DOUBLE, // ["std::map<std::string, std::map<std::string, double>>", 4, ["HDF5", "SQLite"], ["MAP", "VL_STRING", ["VL_MAP", "VL_STRING", "DOUBLE"]], false]
360 VL_MAP_STRING_MAP_STRING_DOUBLE, // ["std::map<std::string, std::map<std::string, double>>", 4, ["HDF5", "SQLite"], ["VL_MAP", "STRING", ["MAP", "STRING", "DOUBLE"]], true]
361 VL_MAP_VL_STRING_MAP_STRING_DOUBLE, // ["std::map<std::string, std::map<std::string, double>>", 4, ["HDF5", "SQLite"], ["VL_MAP", "VL_STRING", ["MAP", "STRING", "DOUBLE"]], true]
362 VL_MAP_STRING_VL_MAP_STRING_DOUBLE, // ["std::map<std::string, std::map<std::string, double>>", 4, ["HDF5", "SQLite"], ["VL_MAP", "STRING", ["VL_MAP", "STRING", "DOUBLE"]], true]
363 VL_MAP_STRING_MAP_VL_STRING_DOUBLE, // ["std::map<std::string, std::map<std::string, double>>", 4, ["HDF5", "SQLite"], ["VL_MAP", "STRING", ["MAP", "VL_STRING", "DOUBLE"]], true]
364 VL_MAP_STRING_VL_MAP_VL_STRING_DOUBLE, // ["std::map<std::string, std::map<std::string, double>>", 4, ["HDF5", "SQLite"], ["VL_MAP", "STRING", ["VL_MAP", "VL_STRING", "DOUBLE"]], true]
365 VL_MAP_VL_STRING_MAP_VL_STRING_DOUBLE, // ["std::map<std::string, std::map<std::string, double>>", 4, ["HDF5", "SQLite"], ["VL_MAP", "VL_STRING", ["MAP", "VL_STRING", "DOUBLE"]], true]
366 VL_MAP_VL_STRING_VL_MAP_STRING_DOUBLE, // ["std::map<std::string, std::map<std::string, double>>", 4, ["HDF5", "SQLite"], ["VL_MAP", "VL_STRING", ["VL_MAP", "STRING", "DOUBLE"]], true]
367 VL_MAP_VL_STRING_VL_MAP_VL_STRING_DOUBLE, // ["std::map<std::string, std::map<std::string, double>>", 4, ["HDF5", "SQLite"], ["VL_MAP", "VL_STRING", ["VL_MAP", "VL_STRING", "DOUBLE"]], true]
368 // append new types only:
369};
370
371/// Represents operation codes for condition checking.
380
381/// Represents a condition used to filter rows returned by a query.
382class Cond {
383 public:
384 Cond() {}
385
386 Cond(std::string field, std::string op, boost::spirit::hold_any val)
387 : field(field),
388 op(op),
389 val(val) {
390 if (op == "<")
391 opcode = LT;
392 else if (op == ">")
393 opcode = GT;
394 else if (op == "<=")
395 opcode = LE;
396 else if (op == ">=")
397 opcode = GE;
398 else if (op == "==")
399 opcode = EQ;
400 else if (op == "!=")
401 opcode = NE;
402 else
403 throw ValueError("operation '" + op + "' not valid for field '" + \
404 field + "'.");
405 }
406
407 /// table column name
408 std::string field;
409
410 /// One of: "<", ">", "<=", ">=", "==", "!="
411 std::string op;
412
413 /// The CmpOpCode cooresponding to op.
415
416 /// value supported by backend(s) in use
418};
419
420typedef std::vector<boost::spirit::hold_any> QueryRow;
421
422/// Meta data and results of a query.
424 public:
425 /// names of each field returned by a query
426 std::vector<std::string> fields;
427
428 /// types of each field returned by a query.
429 std::vector<DbTypes> types;
430
431 /// ordered results of a query
432 std::vector<QueryRow> rows;
433
434 void Reset() {
435 fields.clear();
436 types.clear();
437 rows.clear();
438 }
439
440 /// Convenience method for retrieving a value from a specific row and named
441 /// field (column). The caller is responsible for specifying a valid templated
442 /// type to cast to. Example use:
443 ///
444 /// @code
445 ///
446 /// QueryResult qr = ...
447 ///
448 /// for (int i = 0; i < qr.rows.size(); ++i) {
449 /// std::cout << qr.GetVal<int>("field1", i) << "\n";
450 /// std::cout << qr.GetVal<double>("field2", i) << "\n";
451 /// std::cout << qr.GetVal<std::string>("field3", i) << "\n";
452 /// }
453 ///
454 /// @endcode
455 template <class T>
456 T GetVal(std::string field, int row = 0) {
457 if (rows.empty())
458 throw StateError("No rows found during query for field " + field);
459
460 if (row >= rows.size()) {
461 throw KeyError("index larger than number of query rows for field "
462 + field);
463 }
464
465 int field_idx = -1;
466 for (int i = 0; i < fields.size(); ++i) {
467 if (fields[i] == field) {
468 field_idx = i;
469 break;
470 }
471 }
472 if (field_idx == -1) {
473 throw KeyError("query result has no such field " + field);
474 }
475
476 return rows[row][field_idx].cast<T>();
477 }
478};
479
480/// Represents column information.
483 ColumnInfo(std::string default_table, std::string default_col, int default_index,
484 DbTypes default_dbtype, std::vector<int> default_shape) :
485 table(default_table), col(default_col), index(default_index), dbtype(default_dbtype),
486 shape(default_shape) {};
487 std::string table;
488 std::string col;
489 int index;
491 std::vector<int> shape;
492};
493
494/// Interface implemented by backends that support rudimentary querying.
496 public:
497 virtual ~QueryableBackend() {}
498
499 /// Return a set of rows from the specificed table that match all given
500 /// conditions. Conditions are AND'd together. conds may be NULL.
501 virtual QueryResult Query(std::string table, std::vector<Cond>* conds) = 0;
502
503 /// Return a map of column names of the specified table to the associated
504 /// database type.
505 virtual std::map<std::string, DbTypes> ColumnTypes(std::string table) = 0;
506
507 /// Return information about all columns of a table.
508 virtual std::list<ColumnInfo> Schema(std::string table) = 0;
509
510 /// Return a set of all table names currently in the database.
511 virtual std::set<std::string> Tables() = 0;
512};
513
514/// Interface implemented by backends that support recording and querying.
516 public:
517 virtual ~FullBackend() {}
518};
519
520/// Wrapper class for QueryableBackends that injects a set of Cond's into every
521/// query before being executed.
523 public:
524 CondInjector(QueryableBackend* b, std::vector<Cond> to_inject)
525 : b_(b),
526 to_inject_(to_inject) {}
527
528 virtual QueryResult Query(std::string table, std::vector<Cond>* conds) {
529 if (conds == NULL) {
530 return b_->Query(table, &to_inject_);
531 }
532
533 std::vector<Cond> c = *conds;
534 for (int i = 0; i < to_inject_.size(); ++i) {
535 c.push_back(to_inject_[i]);
536 }
537 return b_->Query(table, &c);
538 }
539
540 virtual std::map<std::string, DbTypes> ColumnTypes(std::string table) {
541 return b_->ColumnTypes(table);
542 }
543
544 virtual std::list<ColumnInfo> Schema(std::string table) {
545 return b_->Schema(table);
546 }
547
548 virtual std::set<std::string> Tables() { return b_->Tables(); }
549
550 private:
552 std::vector<Cond> to_inject_;
553};
554
555/// Wrapper class for QueryableBackends that injects prefix in front of the
556/// title/table for every query before being executed. A query to the
557/// "MyAgentTable" table will actually be passed to the wrapped backend as
558/// [prefix] + "MyAgentTable".
560 public:
561 PrefixInjector(QueryableBackend* b, std::string prefix)
562 : b_(b),
563 prefix_(prefix) {}
564
565 virtual QueryResult Query(std::string table, std::vector<Cond>* conds) {
566 return b_->Query(prefix_ + table, conds);
567 }
568
569 virtual std::map<std::string, DbTypes> ColumnTypes(std::string table) {
570 return b_->ColumnTypes(table);
571 }
572
573 virtual std::list<ColumnInfo> Schema(std::string table) {
574 return b_->Schema(table);
575 }
576
577 virtual std::set<std::string> Tables() { return b_->Tables(); }
578
579 private:
581 std::string prefix_;
582};
583
584/// Compares a condiontion for a single value
585template <typename T>
586inline bool CmpCond(T* x, Cond* cond) {
587 bool rtn;
588 switch (cond->opcode) {
589 case LT: {
590 rtn = (*x) < cond->val.cast<T>();
591 break;
592 }
593 case GT: {
594 rtn = (*x) > cond->val.cast<T>();
595 break;
596 }
597 case LE: {
598 rtn = (*x) <= cond->val.cast<T>();
599 break;
600 }
601 case GE: {
602 rtn = (*x) >= cond->val.cast<T>();
603 break;
604 }
605 case EQ: {
606 rtn = (*x) == cond->val.cast<T>();
607 break;
608 }
609 case NE: {
610 rtn = (*x) != cond->val.cast<T>();
611 break;
612 }
613 }
614 return rtn;
615}
616
617/// Compares all condiontions for a value
618template <typename T>
619inline bool CmpConds(T* x, std::vector<Cond*>* conds) {
620 int i;
621 for (i = 0; i < conds->size(); ++i)
622 if (!CmpCond<T>(&(*x), (*conds)[i]))
623 return false;
624 return true;
625}
626
627/// The digest type for SHA1s.
628using Digest = std::array<CYCLUS_SHA1_ELEM_TYPE, CYCLUS_SHA1_NINT>;
629
630class Sha1 {
631 public:
632 Sha1() { hash_ = boost::uuids::detail::sha1(); }
633
634 /// Clears the current hash value to its default state.
635 inline void Clear() { hash_.reset(); }
636
637 /// Updates the hash value in-place.
638 /// \{
639 inline void Update(const std::string& s) {
640 hash_.process_bytes(s.c_str(), s.size());
641 }
642
643 inline void Update(const Blob& b) { Update(b.str()); }
644
645 inline void Update(const std::vector<int>& x) {
646 hash_.process_bytes(&x[0], x.size() * sizeof(int));
647 }
648
649 inline void Update(const std::vector<float>& x) {
650 hash_.process_bytes(&x[0], x.size() * sizeof(float));
651 }
652
653 inline void Update(const std::vector<double>& x) {
654 hash_.process_bytes(&x[0], x.size() * sizeof(double));
655 }
656
657 inline void Update(const std::vector<std::string>& x) {
658 for (unsigned int i = 0; i < x.size(); ++i)
659 hash_.process_bytes(x[i].c_str(), x[i].size());
660 }
661
662 inline void Update(const std::vector<cyclus::Blob>& x) {
663 for (unsigned int i = 0; i < x.size(); ++i)
664 hash_.process_bytes(x[i].str().c_str(), x[i].str().size());
665 }
666
667 inline void Update(const std::vector<boost::uuids::uuid>& x) {
668 std::vector<boost::uuids::uuid>::const_iterator it = x.begin();
669 for (; it != x.end(); ++it)
670 hash_.process_bytes(&(*it), CYCLUS_UUID_SIZE);
671 }
672
673 inline void Update(const std::set<int>& x) {
674 std::set<int>::iterator it = x.begin();
675 for (; it != x.end(); ++it)
676 hash_.process_bytes(&(*it), sizeof(int));
677 }
678
679 inline void Update(const std::set<bool>& x) {
680 std::set<bool>::iterator it = x.begin();
681 for (; it != x.end(); ++it)
682 hash_.process_bytes(&(*it), sizeof(bool));
683 }
684
685 inline void Update(const std::set<double>& x) {
686 std::set<double>::iterator it = x.begin();
687 for (; it != x.end(); ++it)
688 hash_.process_bytes(&(*it), sizeof(double));
689 }
690
691 inline void Update(const std::set<float>& x) {
692 std::set<float>::iterator it = x.begin();
693 for (; it != x.end(); ++it)
694 hash_.process_bytes(&(*it), sizeof(float));
695 }
696
697 inline void Update(const std::set<cyclus::Blob>& x) {
698 std::set<cyclus::Blob>::iterator it = x.begin();
699 for (; it != x.end(); ++it)
700 hash_.process_bytes(it->str().c_str(), it->str().size());
701 }
702
703 inline void Update(const std::set<boost::uuids::uuid>& x) {
704 std::set<boost::uuids::uuid>::iterator it = x.begin();
705 for (; it != x.end(); ++it)
706 hash_.process_bytes(&(*it), CYCLUS_UUID_SIZE);
707 }
708
709 inline void Update(const std::set<std::string>& x) {
710 std::set<std::string>::iterator it = x.begin();
711 for (; it != x.end(); ++it)
712 hash_.process_bytes(it->c_str(), it->size());
713 }
714
715 inline void Update(const std::list<int>& x) {
716 std::list<int>::const_iterator it = x.begin();
717 for (; it != x.end(); ++it)
718 hash_.process_bytes(&(*it), sizeof(int));
719 }
720
721 inline void Update(const std::list<bool>& x) {
722 std::list<bool>::const_iterator it = x.begin();
723 for (; it != x.end(); ++it)
724 hash_.process_bytes(&(*it), sizeof(bool));
725 }
726
727 inline void Update(const std::list<double>& x) {
728 std::list<double>::const_iterator it = x.begin();
729 for (; it != x.end(); ++it)
730 hash_.process_bytes(&(*it), sizeof(double));
731 }
732
733 inline void Update(const std::list<float>& x) {
734 std::list<float>::const_iterator it = x.begin();
735 for (; it != x.end(); ++it)
736 hash_.process_bytes(&(*it), sizeof(float));
737 }
738
739 inline void Update(const std::list<std::string>& x) {
740 std::list<std::string>::const_iterator it = x.begin();
741 for (; it != x.end(); ++it)
742 hash_.process_bytes(it->c_str(), it->size());
743 }
744
745 inline void Update(const std::list<cyclus::Blob>& x) {
746 std::list<cyclus::Blob>::const_iterator it = x.begin();
747 for (; it != x.end(); ++it)
748 hash_.process_bytes(it->str().c_str(), it->str().size());
749 }
750
751 inline void Update(const std::list<boost::uuids::uuid>& x) {
752 std::list<boost::uuids::uuid>::const_iterator it = x.begin();
753 for (; it != x.end(); ++it)
754 hash_.process_bytes(&(*it), CYCLUS_UUID_SIZE);
755 }
756
757 inline void Update(const std::pair<int, int>& x) {
758 hash_.process_bytes(&(x.first), sizeof(int));
759 hash_.process_bytes(&(x.second), sizeof(int));
760 }
761
762 inline void Update(const std::pair<int, std::string>& x) {
763 hash_.process_bytes(&(x.first), sizeof(int));
764 hash_.process_bytes(x.second.c_str(), x.second.size());
765 }
766
767 inline void Update(const std::map<int, int>& x) {
768 std::map<int, int>::const_iterator it = x.begin();
769 for (; it != x.end(); ++it) {
770 hash_.process_bytes(&(it->first), sizeof(int));
771 hash_.process_bytes(&(it->second), sizeof(int));
772 }
773 }
774
775 inline void Update(const std::map<int, bool>& x) {
776 std::map<int, bool>::const_iterator it = x.begin();
777 for (; it != x.end(); ++it) {
778 hash_.process_bytes(&(it->first), sizeof(int));
779 hash_.process_bytes(&(it->second), sizeof(bool));
780 }
781 }
782
783 inline void Update(const std::map<int, double>& x) {
784 std::map<int, double>::const_iterator it = x.begin();
785 for (; it != x.end(); ++it) {
786 hash_.process_bytes(&(it->first), sizeof(int));
787 hash_.process_bytes(&(it->second), sizeof(double));
788 }
789 }
790
791 inline void Update(const std::map<int, float>& x) {
792 std::map<int, float>::const_iterator it = x.begin();
793 for (; it != x.end(); ++it) {
794 hash_.process_bytes(&(it->first), sizeof(int));
795 hash_.process_bytes(&(it->second), sizeof(float));
796 }
797 }
798
799 inline void Update(const std::map<int, cyclus::Blob>& x) {
800 std::map<int, cyclus::Blob>::const_iterator it = x.begin();
801 for (; it != x.end(); ++it) {
802 hash_.process_bytes(&(it->first), sizeof(int));
803 hash_.process_bytes(it->second.str().c_str(), it->second.str().size());
804 }
805 }
806
807 inline void Update(const std::map<int, boost::uuids::uuid>& x) {
808 std::map<int, boost::uuids::uuid>::const_iterator it = x.begin();
809 for (; it != x.end(); ++it) {
810 hash_.process_bytes(&(it->first), sizeof(int));
811 hash_.process_bytes(&(it->second), CYCLUS_UUID_SIZE);
812 }
813 }
814
815 inline void Update(const std::map<int, std::string>& x) {
816 std::map<int, std::string>::const_iterator it = x.begin();
817 for (; it != x.end(); ++it) {
818 hash_.process_bytes(&(it->first), sizeof(int));
819 hash_.process_bytes(it->second.c_str(), it->second.size());
820 }
821 }
822
823 inline void Update(const std::map<std::string, int>& x) {
824 std::map<std::string, int>::const_iterator it = x.begin();
825 for (; it != x.end(); ++it) {
826 hash_.process_bytes(it->first.c_str(), it->first.size());
827 hash_.process_bytes(&(it->second), sizeof(int));
828 }
829 }
830
831 inline void Update(const std::map<std::string, double>& x) {
832 std::map<std::string, double>::const_iterator it = x.begin();
833 for (; it != x.end(); ++it) {
834 hash_.process_bytes(it->first.c_str(), it->first.size());
835 hash_.process_bytes(&(it->second), sizeof(double));
836 }
837 }
838
839 inline void Update(const std::map<std::string, float>& x) {
840 std::map<std::string, float>::const_iterator it = x.begin();
841 for (; it != x.end(); ++it) {
842 hash_.process_bytes(it->first.c_str(), it->first.size());
843 hash_.process_bytes(&(it->second), sizeof(float));
844 }
845 }
846
847 inline void Update(const std::map<std::string, bool>& x) {
848 std::map<std::string, bool>::const_iterator it = x.begin();
849 for (; it != x.end(); ++it) {
850 hash_.process_bytes(it->first.c_str(), it->first.size());
851 hash_.process_bytes(&(it->second), sizeof(bool));
852 }
853 }
854
855 inline void Update(const std::map<std::string, cyclus::Blob>& x) {
856 std::map<std::string, cyclus::Blob>::const_iterator it = x.begin();
857 for (; it != x.end(); ++it) {
858 hash_.process_bytes(it->first.c_str(), it->first.size());
859 hash_.process_bytes(it->second.str().c_str(), it->second.str().size());
860 }
861 }
862
863 inline void Update(const std::map<std::string, boost::uuids::uuid>& x) {
864 std::map<std::string, boost::uuids::uuid>::const_iterator it = x.begin();
865 for (; it != x.end(); ++it) {
866 hash_.process_bytes(it->first.c_str(), it->first.size());
867 hash_.process_bytes(&(it->second), CYCLUS_UUID_SIZE);
868 }
869 }
870
871 inline void Update(const std::map<std::string, std::string>& x) {
872 std::map<std::string, std::string>::const_iterator it = x.begin();
873 for (; it != x.end(); ++it) {
874 hash_.process_bytes(it->first.c_str(), it->first.size());
875 hash_.process_bytes(it->second.c_str(), it->second.size());
876 }
877 }
878
879 inline void Update(const std::map<std::pair<int, std::string>, double>& x) {
880 std::map<std::pair<int, std::string>, double>::const_iterator it = x.begin();
881 for (; it != x.end(); ++it) {
882 hash_.process_bytes(&(it->first.first), sizeof(int));
883 hash_.process_bytes(it->first.second.c_str(), it->first.second.size());
884 hash_.process_bytes(&(it->second), sizeof(double));
885 }
886 }
887
888 inline void Update(const std::map<std::pair<std::string, std::string>, int>& x) {
889 std::map<std::pair<std::string, std::string>, int>::const_iterator it = x.begin();
890 for (; it != x.end(); ++it) {
891 hash_.process_bytes(it->first.first.c_str(), it->first.first.size());
892 hash_.process_bytes(it->first.second.c_str(), it->first.second.size());
893 hash_.process_bytes(&(it->second), sizeof(int));
894 }
895 }
896
897 inline void Update(const std::map<std::string, std::vector<double>>& x) {
898 std::map<std::string, std::vector<double>>::const_iterator it = x.begin();
899 for (; it != x.end(); ++it) {
900 hash_.process_bytes(it->first.c_str(), it->first.size());
901 Update(it->second);
902 }
903 }
904
905 inline void Update(const std::map<std::string, std::map<int, double>>& x) {
906 std::map<std::string, std::map<int, double>>::const_iterator it = x.begin();
907 for (; it != x.end(); ++it) {
908 hash_.process_bytes(it->first.c_str(), it->first.size());
909 Update(it->second);
910 }
911 }
912
913 inline void Update(const std::map<int, std::map<std::string, double>>& x) {
914 std::map<int, std::map<std::string, double>>::const_iterator it = x.begin();
915 for (; it != x.end(); ++it) {
916 hash_.process_bytes(&(it->first), sizeof(int));
917 Update(it->second);
918 }
919 }
920
921 inline void Update(const std::pair<double, std::map<int, double>>& x) {
922 hash_.process_bytes(&(x.first), sizeof(double));
923 Update(x.second);
924 }
925
926 inline void Update(const std::map<std::string, std::pair<double, std::map<int, double>>>& x) {
927 std::map<std::string, std::pair<double, std::map<int, double>>>::const_iterator it = x.begin();
928 for (; it != x.end(); ++it) {
929 hash_.process_bytes(&(it->first), it->first.size());
930 Update(it->second);
931 }
932 }
933
934 inline void Update(const std::pair<int, std::pair<std::string, std::string>>& x) {
935 hash_.process_bytes(&(x.first), sizeof(int));
936 hash_.process_bytes(x.second.first.c_str(), x.second.first.size());
937 hash_.process_bytes(x.second.second.c_str(), x.second.second.size());
938 }
939
940 inline void Update(const std::vector<std::pair<int, std::pair<std::string, std::string>>>& x) {
941 std::vector<std::pair<int, std::pair<std::string, std::string>>>::const_iterator it = x.begin();
942 for (; it != x.end(); ++it) {
943 Update(*it);
944 }
945 }
946
947 inline void Update(const std::map<std::string, std::vector<std::pair<int, std::pair<std::string, std::string>>>>& x) {
948 std::map<std::string, std::vector<std::pair<int, std::pair<std::string, std::string>>>>::const_iterator it = x.begin();
949 for (; it != x.end(); ++it) {
950 hash_.process_bytes(it->first.c_str(), it->first.size());
951 Update(it->second);
952 }
953 }
954
955 inline void Update(const std::list<std::pair<int, int>>& x){
956 std::list<std::pair<int, int>>::const_iterator it = x.begin();
957 for (; it != x.end(); ++it) {
958 Update(*it);
959 }
960 }
961
962 inline void Update(const std::pair<std::string, std::vector<double>>& x) {
963 hash_.process_bytes(x.first.c_str(), x.first.size());
964 Update(x.second);
965 }
966
967 inline void Update(const std::map<std::string, std::pair<std::string, std::vector<double>>>& x) {
968 std::map<std::string, std::pair<std::string, std::vector<double>>>::const_iterator it = x.begin();
969 for(; it != x.end(); ++it) {
970 hash_.process_bytes(it->first.c_str(), it->first.size());
971 Update(it->second);
972 }
973 }
974
975 inline void Update(const std::map<std::string, std::map<std::string, int>>& x) {
976 std::map<std::string, std::map<std::string, int>>::const_iterator it = x.begin();
977 for(; it != x.end(); ++it) {
978 hash_.process_bytes(it->first.c_str(), it->first.size());
979 Update(it->second);
980 }
981 }
982
983 inline void Update(const std::pair<double, double>& x) {
984 hash_.process_bytes(&(x.first), sizeof(double));
985 hash_.process_bytes(&(x.second), sizeof(double));
986 }
987
988 inline void Update(const std::pair<std::pair<double, double>, std::map<std::string, double>>& x) {
989 Update(x.first);
990 Update(x.second);
991 }
992
993 inline void Update(const std::vector<std::pair<std::pair<double, double>, std::map<std::string, double>>>& x) {
994 std::vector<std::pair<std::pair<double, double>, std::map<std::string, double>>>::const_iterator it = x.begin();
995 for(; it != x.end(); ++it) {
996 Update(*it);
997 }
998 }
999
1000 inline void Update(const std::map<std::string, std::map<std::string, double>>& x) {
1001 std::map<std::string, std::map<std::string, double>>::const_iterator it = x.begin();
1002 for(; it != x.end(); ++it) {
1003 hash_.process_bytes(it->first.c_str(), it->first.size());
1004 Update(it->second);
1005 }
1006 }
1007
1008
1010 Digest d;
1011 const unsigned int block_size = sizeof(CYCLUS_SHA1_ELEM_TYPE);
1012 const unsigned int bits_per_byte = std::numeric_limits<unsigned char>::digits;
1013 #if BOOST_VERSION_MINOR < 86
1014 unsigned int tmp[CYCLUS_SHA1_NINT];
1015 #else
1016 unsigned char tmp[CYCLUS_SHA1_NINT * block_size];
1017 #endif
1018 hash_.get_digest(tmp);
1019
1020 for (int i = 0; i < CYCLUS_SHA1_NINT; ++i) {
1021 #if BOOST_VERSION_MINOR < 86
1022 d[i] = tmp[i];
1023 #else
1024 CYCLUS_SHA1_ELEM_TYPE elem = 0;
1025 unsigned int shift_amount;
1026 for (size_t byte = 0; byte < block_size; ++byte) {
1027 #if defined(__BYTE_ORDER__) && __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
1028 shift_amount = byte * bits_per_byte;
1029 #else
1030 shift_amount = (block_size - byte - 1) * bits_per_byte;
1031 #endif
1032 elem |= tmp[i*block_size + byte] << shift_amount;
1033 }
1034 d[i] = elem;
1035 #endif
1036 }
1037 return d;
1038 }
1039
1040 private:
1041 boost::uuids::detail::sha1 hash_;
1042};
1043
1044} // namespace cyclus
1045
1046#endif // CYCLUS_SRC_QUERY_BACKEND_H_
T const & cast() const
Definition any.hpp:310
A type to represent variable-length array of bytes for dumping to a cyclus output database.
Definition blob.h:9
Wrapper class for QueryableBackends that injects a set of Cond's into every query before being execut...
virtual std::set< std::string > Tables()
Return a set of all table names currently in the database.
virtual std::map< std::string, DbTypes > ColumnTypes(std::string table)
Return a map of column names of the specified table to the associated database type.
CondInjector(QueryableBackend *b, std::vector< Cond > to_inject)
virtual QueryResult Query(std::string table, std::vector< Cond > *conds)
Return a set of rows from the specificed table that match all given conditions.
virtual std::list< ColumnInfo > Schema(std::string table)
Return information about all columns of a table.
Represents a condition used to filter rows returned by a query.
std::string op
One of: "<", ">", "<=", ">=", "==", "!=".
Cond(std::string field, std::string op, boost::spirit::hold_any val)
boost::spirit::hold_any val
value supported by backend(s) in use
CmpOpCode opcode
The CmpOpCode cooresponding to op.
std::string field
table column name
Interface implemented by backends that support recording and querying.
For failed retrieval/insertion of key-based data into/from data structures.
Definition error.h:47
Wrapper class for QueryableBackends that injects prefix in front of the title/table for every query b...
virtual std::list< ColumnInfo > Schema(std::string table)
Return information about all columns of a table.
virtual QueryResult Query(std::string table, std::vector< Cond > *conds)
Return a set of rows from the specificed table that match all given conditions.
virtual std::map< std::string, DbTypes > ColumnTypes(std::string table)
Return a map of column names of the specified table to the associated database type.
PrefixInjector(QueryableBackend *b, std::string prefix)
virtual std::set< std::string > Tables()
Return a set of all table names currently in the database.
Meta data and results of a query.
std::vector< QueryRow > rows
ordered results of a query
std::vector< DbTypes > types
types of each field returned by a query.
std::vector< std::string > fields
names of each field returned by a query
T GetVal(std::string field, int row=0)
Convenience method for retrieving a value from a specific row and named field (column).
Interface implemented by backends that support rudimentary querying.
virtual std::map< std::string, DbTypes > ColumnTypes(std::string table)=0
Return a map of column names of the specified table to the associated database type.
virtual std::list< ColumnInfo > Schema(std::string table)=0
Return information about all columns of a table.
virtual QueryResult Query(std::string table, std::vector< Cond > *conds)=0
Return a set of rows from the specificed table that match all given conditions.
virtual std::set< std::string > Tables()=0
Return a set of all table names currently in the database.
An abstract base class for listeners (e.g.
Definition rec_backend.h:16
void Update(const std::pair< std::string, std::vector< double > > &x)
void Update(const std::map< std::pair< std::string, std::string >, int > &x)
void Update(const std::map< int, std::map< std::string, double > > &x)
void Update(const std::map< std::string, cyclus::Blob > &x)
void Update(const std::map< std::string, double > &x)
void Update(const std::pair< double, std::map< int, double > > &x)
void Update(const Blob &b)
void Update(const std::set< std::string > &x)
void Update(const std::set< int > &x)
void Update(const std::list< cyclus::Blob > &x)
void Update(const std::set< double > &x)
void Update(const std::pair< double, double > &x)
void Update(const std::vector< int > &x)
void Update(const std::map< int, int > &x)
void Update(const std::list< std::pair< int, int > > &x)
void Update(const std::map< std::string, bool > &x)
void Update(const std::map< int, boost::uuids::uuid > &x)
void Update(const std::map< std::string, std::vector< std::pair< int, std::pair< std::string, std::string > > > > &x)
void Update(const std::pair< int, int > &x)
void Update(const std::pair< int, std::string > &x)
void Update(const std::set< float > &x)
void Update(const std::map< std::string, std::map< std::string, int > > &x)
void Update(const std::list< bool > &x)
void Update(const std::vector< double > &x)
void Update(const std::map< int, double > &x)
void Update(const std::map< int, float > &x)
void Update(const std::list< float > &x)
void Update(const std::vector< std::string > &x)
void Clear()
Clears the current hash value to its default state.
void Update(const std::map< std::string, float > &x)
void Update(const std::map< std::pair< int, std::string >, double > &x)
void Update(const std::map< std::string, std::map< int, double > > &x)
void Update(const std::list< std::string > &x)
void Update(const std::map< int, std::string > &x)
void Update(const std::list< boost::uuids::uuid > &x)
void Update(const std::map< std::string, std::vector< double > > &x)
void Update(const std::list< double > &x)
void Update(const std::map< int, bool > &x)
void Update(const std::list< int > &x)
void Update(const std::vector< boost::uuids::uuid > &x)
void Update(const std::pair< int, std::pair< std::string, std::string > > &x)
void Update(const std::vector< std::pair< std::pair< double, double >, std::map< std::string, double > > > &x)
void Update(const std::pair< std::pair< double, double >, std::map< std::string, double > > &x)
void Update(const std::vector< float > &x)
void Update(const std::set< cyclus::Blob > &x)
void Update(const std::map< std::string, std::map< std::string, double > > &x)
void Update(const std::map< std::string, int > &x)
void Update(const std::vector< cyclus::Blob > &x)
void Update(const std::set< bool > &x)
void Update(const std::map< int, cyclus::Blob > &x)
void Update(const std::set< boost::uuids::uuid > &x)
void Update(const std::map< std::string, std::pair< double, std::map< int, double > > > &x)
void Update(const std::map< std::string, std::pair< std::string, std::vector< double > > > &x)
void Update(const std::vector< std::pair< int, std::pair< std::string, std::string > > > &x)
void Update(const std::map< std::string, std::string > &x)
void Update(const std::string &s)
Updates the hash value in-place.
void Update(const std::map< std::string, boost::uuids::uuid > &x)
For failed object state expectations.
Definition error.h:53
For values that are too big, too small, etc.
Definition error.h:41
taken directly from OsiSolverInterface.cpp on 2/17/14 from https://projects.coin-or....
Definition agent.cc:14
CmpOpCode
Represents operation codes for condition checking.
DbTypes
This is the primary list of all supported database types.
@ VL_SET_DOUBLE
@ PAIR_VL_STRING_VL_STRING
@ VL_MAP_STRING_VL_MAP_VL_STRING_DOUBLE
@ VL_LIST_STRING
@ VL_MAP_VL_STRING_MAP_STRING_INT
@ MAP_VL_STRING_PAIR_DOUBLE_MAP_INT_DOUBLE
@ MAP_VL_STRING_INT
@ VL_MAP_STRING_MAP_INT_DOUBLE
@ VL_MAP_STRING_VECTOR_PAIR_INT_PAIR_VL_STRING_VL_STRING
@ VL_MAP_STRING_VECTOR_DOUBLE
@ VL_MAP_STRING_PAIR_DOUBLE_VL_MAP_INT_DOUBLE
@ PAIR_STRING_VECTOR_DOUBLE
@ PAIR_STRING_VL_VECTOR_DOUBLE
@ VL_MAP_VL_STRING_MAP_VL_STRING_DOUBLE
@ VECTOR_PAIR_PAIR_DOUBLE_DOUBLE_MAP_STRING_DOUBLE
@ VL_MAP_STRING_FLOAT
@ MAP_STRING_PAIR_VL_STRING_VECTOR_DOUBLE
@ MAP_VL_STRING_PAIR_STRING_VECTOR_DOUBLE
@ MAP_STRING_VECTOR_PAIR_INT_PAIR_STRING_VL_STRING
@ RES_BUF_MATERIAL
@ MAP_VL_STRING_DOUBLE
@ VECTOR_PAIR_PAIR_DOUBLE_DOUBLE_VL_MAP_VL_STRING_DOUBLE
@ MAP_STRING_UUID
@ MAP_VL_STRING_VL_STRING
@ VL_MAP_VL_STRING_MAP_STRING_DOUBLE
@ VL_MAP_VL_STRING_VL_STRING
@ VL_MAP_STRING_VL_MAP_INT_DOUBLE
@ MAP_STRING_VECTOR_PAIR_INT_PAIR_VL_STRING_STRING
@ VL_MAP_VL_STRING_VECTOR_PAIR_INT_PAIR_VL_STRING_STRING
@ MAP_STRING_FLOAT
@ PAIR_INT_VL_STRING
@ PAIR_PAIR_DOUBLE_DOUBLE_VL_MAP_STRING_DOUBLE
@ VL_MAP_STRING_VL_VECTOR_DOUBLE
@ VL_MAP_VL_STRING_PAIR_VL_STRING_VECTOR_DOUBLE
@ PAIR_VL_STRING_VECTOR_DOUBLE
@ VECTOR_PAIR_INT_PAIR_VL_STRING_STRING
@ PAIR_INT_FLOAT
@ MAP_STRING_STRING
@ RES_BUF_PRODUCT
@ VL_MAP_INT_BLOB
@ PAIR_DOUBLE_VL_MAP_INT_DOUBLE
@ MAP_STRING_MAP_STRING_DOUBLE
@ PAIR_STRING_STRING
@ VL_LIST_PAIR_INT_INT
@ VL_MAP_STRING_PAIR_VL_STRING_VECTOR_DOUBLE
@ VL_MAP_STRING_MAP_STRING_INT
@ MAP_STRING_VECTOR_PAIR_INT_PAIR_VL_STRING_VL_STRING
@ MAP_VL_STRING_VL_VECTOR_PAIR_INT_PAIR_VL_STRING_STRING
@ MAP_VL_STRING_BLOB
@ VL_VECTOR_PAIR_PAIR_DOUBLE_DOUBLE_VL_MAP_STRING_DOUBLE
@ MAP_INT_VL_MAP_STRING_DOUBLE
@ VL_MAP_STRING_STRING
@ MAP_INT_MAP_STRING_DOUBLE
@ MAP_VL_STRING_PAIR_VL_STRING_VL_VECTOR_DOUBLE
@ PAIR_INT_STRING
@ MAP_VL_STRING_STRING
@ VL_MAP_VL_STRING_VECTOR_DOUBLE
@ MAP_VL_STRING_UUID
@ MAP_STRING_BLOB
@ MAP_STRING_VECTOR_DOUBLE
@ RES_MAP_STRING_PRODUCT
@ PAIR_INT_PAIR_STRING_STRING
@ MAP_VL_STRING_FLOAT
@ VL_VECTOR_BOOL
@ MAP_PAIR_STRING_VL_STRING_INT
@ VECTOR_PAIR_PAIR_DOUBLE_DOUBLE_VL_MAP_STRING_DOUBLE
@ VL_MAP_VL_STRING_VL_MAP_VL_STRING_INT
@ VL_MAP_VL_STRING_VECTOR_PAIR_INT_PAIR_STRING_STRING
@ VL_VECTOR_PAIR_INT_PAIR_VL_STRING_VL_STRING
@ VL_MAP_STRING_PAIR_STRING_VL_VECTOR_DOUBLE
@ VECTOR_PAIR_INT_PAIR_STRING_STRING
@ MAP_VL_STRING_PAIR_DOUBLE_VL_MAP_INT_DOUBLE
@ MAP_STRING_PAIR_DOUBLE_VL_MAP_INT_DOUBLE
@ VL_MAP_VL_STRING_VECTOR_PAIR_INT_PAIR_STRING_VL_STRING
@ MAP_STRING_VL_MAP_STRING_INT
@ VL_MAP_INT_MAP_VL_STRING_DOUBLE
@ VL_VECTOR_FLOAT
@ MAP_STRING_VECTOR_PAIR_INT_PAIR_STRING_STRING
@ LIST_VL_STRING
@ PAIR_VL_STRING_BOOL
@ PAIR_VL_STRING_FLOAT
@ MAP_VL_STRING_VECTOR_DOUBLE
@ VL_MAP_VL_STRING_PAIR_STRING_VECTOR_DOUBLE
@ MAP_VL_STRING_VECTOR_PAIR_INT_PAIR_VL_STRING_STRING
@ MAP_VL_STRING_MAP_VL_STRING_INT
@ VL_MAP_STRING_INT
@ VL_MAP_STRING_VL_MAP_STRING_INT
@ VL_MAP_STRING_VL_VECTOR_PAIR_INT_PAIR_VL_STRING_STRING
@ RES_MAP_INT_PRODUCT
@ VL_LIST_FLOAT
@ VL_MAP_PAIR_STRING_VL_STRING_INT
@ VL_MAP_STRING_MAP_VL_STRING_INT
@ VL_MAP_STRING_MAP_VL_STRING_DOUBLE
@ VL_MAP_VL_STRING_VL_VECTOR_PAIR_INT_PAIR_STRING_VL_STRING
@ VL_MAP_STRING_VL_VECTOR_PAIR_INT_PAIR_STRING_STRING
@ VL_VECTOR_BLOB
@ MAP_VL_STRING_VECTOR_PAIR_INT_PAIR_VL_STRING_VL_STRING
@ VL_SET_STRING
@ VL_MAP_INT_FLOAT
@ VL_MAP_PAIR_VL_STRING_STRING_INT
@ VL_MAP_STRING_MAP_STRING_DOUBLE
@ SET_VL_STRING
@ PAIR_VL_STRING_BLOB
@ VECTOR_PAIR_PAIR_DOUBLE_DOUBLE_MAP_VL_STRING_DOUBLE
@ VL_MAP_INT_BOOL
@ MAP_STRING_MAP_STRING_INT
@ VL_MAP_INT_VL_MAP_VL_STRING_DOUBLE
@ VL_VECTOR_PAIR_INT_PAIR_VL_STRING_STRING
@ MAP_VL_STRING_VL_MAP_VL_STRING_DOUBLE
@ MAP_PAIR_INT_STRING_DOUBLE
@ PAIR_STRING_FLOAT
@ PAIR_STRING_DOUBLE
@ PAIR_VL_STRING_DOUBLE
@ VL_MAP_INT_MAP_STRING_DOUBLE
@ VL_VECTOR_DOUBLE
@ VL_VECTOR_PAIR_PAIR_DOUBLE_DOUBLE_MAP_STRING_DOUBLE
@ PAIR_VL_STRING_INT
@ PAIR_INT_PAIR_VL_STRING_VL_STRING
@ MAP_STRING_VL_MAP_VL_STRING_INT
@ LIST_PAIR_INT_INT
@ VL_MAP_VL_STRING_BLOB
@ VL_MAP_VL_STRING_UUID
@ MAP_VL_STRING_PAIR_STRING_VL_VECTOR_DOUBLE
@ PAIR_PAIR_DOUBLE_DOUBLE_VL_MAP_VL_STRING_DOUBLE
@ MAP_VL_STRING_BOOL
@ VL_MAP_VL_STRING_PAIR_VL_STRING_VL_VECTOR_DOUBLE
@ VL_MAP_STRING_PAIR_DOUBLE_MAP_INT_DOUBLE
@ MAP_VL_STRING_VL_MAP_VL_STRING_INT
@ MAP_VL_STRING_VL_MAP_STRING_INT
@ MAP_STRING_MAP_VL_STRING_DOUBLE
@ VL_MAP_STRING_VL_STRING
@ VL_MAP_STRING_VL_VECTOR_PAIR_INT_PAIR_VL_STRING_VL_STRING
@ PAIR_DOUBLE_DOUBLE
@ PAIR_INT_BOOL
@ MAP_VL_STRING_VL_VECTOR_PAIR_INT_PAIR_STRING_VL_STRING
@ VL_MAP_INT_DOUBLE
@ MAP_STRING_DOUBLE
@ PAIR_VL_STRING_UUID
@ VL_MAP_INT_STRING
@ PAIR_STRING_BOOL
@ VECTOR_PAIR_INT_PAIR_STRING_VL_STRING
@ VL_MAP_STRING_VECTOR_PAIR_INT_PAIR_STRING_STRING
@ VL_MAP_STRING_BLOB
@ VL_MAP_INT_UUID
@ MAP_PAIR_STRING_STRING_INT
@ VL_VECTOR_UUID
@ MAP_PAIR_VL_STRING_VL_STRING_INT
@ MAP_VL_STRING_VECTOR_PAIR_INT_PAIR_STRING_STRING
@ MAP_VL_STRING_MAP_VL_STRING_DOUBLE
@ MAP_STRING_VL_MAP_INT_DOUBLE
@ MAP_STRING_BOOL
@ PAIR_INT_PAIR_VL_STRING_STRING
@ VL_MAP_VL_STRING_VECTOR_PAIR_INT_PAIR_VL_STRING_VL_STRING
@ VL_MAP_INT_VL_STRING
@ VL_LIST_VL_STRING
@ VL_MAP_STRING_VL_MAP_STRING_DOUBLE
@ PAIR_STRING_BLOB
@ MAP_VL_STRING_VL_MAP_STRING_DOUBLE
@ VL_MAP_PAIR_INT_STRING_DOUBLE
@ VL_MAP_STRING_PAIR_VL_STRING_VL_VECTOR_DOUBLE
@ VL_MAP_VL_STRING_VL_VECTOR_PAIR_INT_PAIR_STRING_STRING
@ MAP_INT_MAP_VL_STRING_DOUBLE
@ VL_VECTOR_VL_STRING
@ PAIR_STRING_VL_STRING
@ PAIR_INT_DOUBLE
@ VL_MAP_STRING_VECTOR_PAIR_INT_PAIR_VL_STRING_STRING
@ RES_MAP_VL_STRING_PRODUCT
@ VL_MAP_STRING_PAIR_STRING_VECTOR_DOUBLE
@ MAP_STRING_PAIR_DOUBLE_MAP_INT_DOUBLE
@ RES_MAP_INT_MATERIAL
@ MAP_VL_STRING_MAP_STRING_DOUBLE
@ MAP_VL_STRING_VL_MAP_INT_DOUBLE
@ MAP_VL_STRING_PAIR_VL_STRING_VECTOR_DOUBLE
@ MAP_STRING_PAIR_STRING_VECTOR_DOUBLE
@ VL_MAP_VL_STRING_PAIR_STRING_VL_VECTOR_DOUBLE
@ MAP_STRING_VL_MAP_VL_STRING_DOUBLE
@ VL_MAP_VL_STRING_VL_VECTOR_PAIR_INT_PAIR_VL_STRING_VL_STRING
@ VL_MAP_STRING_BOOL
@ MAP_STRING_PAIR_STRING_VL_VECTOR_DOUBLE
@ PAIR_STRING_UUID
@ MAP_PAIR_INT_VL_STRING_DOUBLE
@ VL_MAP_STRING_UUID
@ MAP_STRING_PAIR_VL_STRING_VL_VECTOR_DOUBLE
@ MAP_STRING_VL_VECTOR_PAIR_INT_PAIR_VL_STRING_STRING
@ MAP_VL_STRING_VL_VECTOR_PAIR_INT_PAIR_VL_STRING_VL_STRING
@ VL_VECTOR_PAIR_INT_PAIR_STRING_STRING
@ PAIR_INT_BLOB
@ VL_VECTOR_PAIR_PAIR_DOUBLE_DOUBLE_VL_MAP_VL_STRING_DOUBLE
@ VL_MAP_VL_STRING_STRING
@ VECTOR_PAIR_INT_PAIR_VL_STRING_VL_STRING
@ VL_MAP_VL_STRING_INT
@ VECTOR_STRING
@ VL_VECTOR_INT
@ VL_MAP_VL_STRING_PAIR_DOUBLE_MAP_INT_DOUBLE
@ VL_MAP_VL_STRING_MAP_VL_STRING_INT
@ VL_MAP_STRING_DOUBLE
@ VL_MAP_STRING_VL_VECTOR_PAIR_INT_PAIR_STRING_VL_STRING
@ PAIR_VL_STRING_STRING
@ VL_MAP_VL_STRING_VL_MAP_STRING_DOUBLE
@ VL_MAP_VL_STRING_PAIR_DOUBLE_VL_MAP_INT_DOUBLE
@ VECTOR_DOUBLE
@ MAP_STRING_MAP_INT_DOUBLE
@ MAP_STRING_VL_VECTOR_PAIR_INT_PAIR_VL_STRING_VL_STRING
@ VL_MAP_VL_STRING_VL_MAP_INT_DOUBLE
@ VL_MAP_VL_STRING_VL_VECTOR_PAIR_INT_PAIR_VL_STRING_STRING
@ VL_MAP_INT_VL_MAP_STRING_DOUBLE
@ VL_MAP_STRING_VL_MAP_VL_STRING_INT
@ VL_MAP_PAIR_VL_STRING_VL_STRING_INT
@ VL_MAP_VL_STRING_DOUBLE
@ VL_MAP_PAIR_INT_VL_STRING_DOUBLE
@ VL_MAP_VL_STRING_VL_VECTOR_DOUBLE
@ MAP_VL_STRING_MAP_STRING_INT
@ MAP_INT_VL_MAP_VL_STRING_DOUBLE
@ VL_LIST_DOUBLE
@ MAP_VL_STRING_VECTOR_PAIR_INT_PAIR_STRING_VL_STRING
@ RES_MAP_STRING_MATERIAL
@ VL_MAP_VL_STRING_FLOAT
@ VECTOR_VL_STRING
@ VL_VECTOR_PAIR_PAIR_DOUBLE_DOUBLE_MAP_VL_STRING_DOUBLE
@ MAP_STRING_VL_MAP_STRING_DOUBLE
@ VL_MAP_VL_STRING_BOOL
@ MAP_VL_STRING_VL_VECTOR_DOUBLE
@ VL_VECTOR_PAIR_INT_PAIR_STRING_VL_STRING
@ MAP_PAIR_VL_STRING_STRING_INT
@ PAIR_INT_PAIR_STRING_VL_STRING
@ VL_MAP_VL_STRING_VL_MAP_STRING_INT
@ MAP_STRING_VL_VECTOR_DOUBLE
@ PAIR_DOUBLE_MAP_INT_DOUBLE
@ MAP_STRING_MAP_VL_STRING_INT
@ VL_MAP_VL_STRING_MAP_INT_DOUBLE
@ VL_SET_VL_STRING
@ VL_VECTOR_STRING
@ MAP_STRING_VL_STRING
@ MAP_STRING_VL_VECTOR_PAIR_INT_PAIR_STRING_VL_STRING
@ PAIR_PAIR_DOUBLE_DOUBLE_MAP_VL_STRING_DOUBLE
@ VL_MAP_VL_STRING_VL_MAP_VL_STRING_DOUBLE
@ PAIR_INT_UUID
@ VL_MAP_STRING_VECTOR_PAIR_INT_PAIR_STRING_VL_STRING
@ MAP_STRING_VL_VECTOR_PAIR_INT_PAIR_STRING_STRING
@ MAP_VL_STRING_MAP_INT_DOUBLE
@ MAP_VL_STRING_VL_VECTOR_PAIR_INT_PAIR_STRING_STRING
@ PAIR_STRING_INT
@ RES_MAP_VL_STRING_MATERIAL
@ PAIR_PAIR_DOUBLE_DOUBLE_MAP_STRING_DOUBLE
@ VL_MAP_PAIR_STRING_STRING_INT
@ MAP_INT_VL_STRING
@ PAIR_VL_STRING_VL_VECTOR_DOUBLE
std::vector< boost::spirit::hold_any > QueryRow
bool CmpCond(T *x, Cond *cond)
Compares a condiontion for a single value.
std::array< CYCLUS_SHA1_ELEM_TYPE, CYCLUS_SHA1_NINT > Digest
The digest type for SHA1s.
bool CmpConds(T *x, std::vector< Cond * > *conds)
Compares all condiontions for a value.
#define CYCLUS_UUID_SIZE
#define CYCLUS_SHA1_NINT
unsigned int CYCLUS_SHA1_ELEM_TYPE
Represents column information.
ColumnInfo(std::string default_table, std::string default_col, int default_index, DbTypes default_dbtype, std::vector< int > default_shape)
std::vector< int > shape