37 cyclus::Institution::InitFrom(m);
38 int rawcycpp_shape_prototypes[2] = {-1, -1};
40 int rawcycpp_shape_build_times[2] = {-1, -1};
42 int rawcycpp_shape_n_build[2] = {-1, -1};
44 int rawcycpp_shape_lifetimes[2] = {-1, -1};
46 int rawcycpp_shape_latitude[1] = {-1};
48 int rawcycpp_shape_longitude[1] = {-1};
59 virtual void InitFrom(cyclus::QueryableBackend* b) {
60 cyclus::Institution::InitFrom(b);
61 int rawcycpp_shape_prototypes[2] = {-1, -1};
63 int rawcycpp_shape_build_times[2] = {-1, -1};
65 int rawcycpp_shape_n_build[2] = {-1, -1};
67 int rawcycpp_shape_lifetimes[2] = {-1, -1};
69 int rawcycpp_shape_latitude[1] = {-1};
71 int rawcycpp_shape_longitude[1] = {-1};
73 cyclus::QueryResult qr = b->Query(
"Info", NULL);
74 prototypes = qr.GetVal<std::vector< std::string > >(
"prototypes");
75 build_times = qr.GetVal<std::vector< int > >(
"build_times");
76 n_build = qr.GetVal<std::vector< int > >(
"n_build");
77 lifetimes = qr.GetVal<std::vector< int > >(
"lifetimes");
78 latitude = qr.GetVal<
double>(
"latitude");
79 longitude = qr.GetVal<
double>(
"longitude");
82 virtual void InfileToDb(cyclus::InfileTree* tree, cyclus::DbInit di) {
83 cyclus::Institution::InfileToDb(tree, di);
84 int rawcycpp_shape_prototypes[2] = {-1, -1};
86 int rawcycpp_shape_build_times[2] = {-1, -1};
88 int rawcycpp_shape_n_build[2] = {-1, -1};
90 int rawcycpp_shape_lifetimes[2] = {-1, -1};
92 int rawcycpp_shape_latitude[1] = {-1};
94 int rawcycpp_shape_longitude[1] = {-1};
96 cyclus::InfileTree* sub = tree->SubTree(
"config/*");
100 cyclus::InfileTree* bub = sub->SubTree(
"prototypes", 0);
101 cyclus::InfileTree* sub = bub;
102 int n1 = sub->NMatches(
"val");
103 std::vector< std::string > prototypes_val;
104 prototypes_val.resize(n1);
105 for (
int i1 = 0; i1 < n1; ++i1) {
108 std::string elem_in = cyclus::Query<std::string>(sub,
"val", i1);
111 prototypes_val[i1] = elem;
116 cyclus::InfileTree* bub = sub->SubTree(
"build_times", 0);
117 cyclus::InfileTree* sub = bub;
118 int n1 = sub->NMatches(
"val");
119 std::vector< int > build_times_val;
120 build_times_val.resize(n1);
121 for (
int i1 = 0; i1 < n1; ++i1) {
124 int elem_in = cyclus::Query<int>(sub,
"val", i1);
127 build_times_val[i1] = elem;
132 cyclus::InfileTree* bub = sub->SubTree(
"n_build", 0);
133 cyclus::InfileTree* sub = bub;
134 int n1 = sub->NMatches(
"val");
135 std::vector< int > n_build_val;
136 n_build_val.resize(n1);
137 for (
int i1 = 0; i1 < n1; ++i1) {
140 int elem_in = cyclus::Query<int>(sub,
"val", i1);
143 n_build_val[i1] = elem;
147 if (sub->NMatches(
"lifetimes") > 0) {
149 cyclus::InfileTree* bub = sub->SubTree(
"lifetimes", 0);
150 cyclus::InfileTree* sub = bub;
151 int n1 = sub->NMatches(
"val");
152 std::vector< int > lifetimes_val;
153 lifetimes_val.resize(n1);
154 for (
int i1 = 0; i1 < n1; ++i1) {
157 int elem_in = cyclus::Query<int>(sub,
"val", i1);
160 lifetimes_val[i1] = elem;
165 std::vector< int > lifetimes_tmp;
166 lifetimes_tmp.resize(0);
171 if (sub->NMatches(
"latitude") > 0) {
173 double latitude_val = cyclus::Query<double>(sub,
"latitude");
177 double latitude_tmp = 0.0;
180 if (sub->NMatches(
"longitude") > 0) {
182 double longitude_val = cyclus::Query<double>(sub,
"longitude");
186 double longitude_tmp = 0.0;