summaryrefslogtreecommitdiff
path: root/ddl/out/LambdaCube.TypeInfo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'ddl/out/LambdaCube.TypeInfo.cpp')
-rw-r--r--ddl/out/LambdaCube.TypeInfo.cpp36
1 files changed, 18 insertions, 18 deletions
diff --git a/ddl/out/LambdaCube.TypeInfo.cpp b/ddl/out/LambdaCube.TypeInfo.cpp
index ce2dcff..643afda 100644
--- a/ddl/out/LambdaCube.TypeInfo.cpp
+++ b/ddl/out/LambdaCube.TypeInfo.cpp
@@ -1,5 +1,5 @@
1// generated file, do not modify! 1// generated file, do not modify!
2// 2016-02-12T16:05:13.364534000000Z 2// 2016-02-26T10:42:57.376331000000Z
3 3
4#include "LambdaCube.TypeInfo.hpp" 4#include "LambdaCube.TypeInfo.hpp"
5template<> json toJSON<std::shared_ptr<TypeInfo>>(std::shared_ptr<TypeInfo> &v) { 5template<> json toJSON<std::shared_ptr<TypeInfo>>(std::shared_ptr<TypeInfo> &v) {
@@ -39,21 +39,21 @@ template<> std::shared_ptr<TypeInfo> fromJSON<std::shared_ptr<TypeInfo>>(W<std::
39 return o; 39 return o;
40} 40}
41 41
42template<> json toJSON<std::shared_ptr<MyEither>>(std::shared_ptr<MyEither> &v) { 42template<> json toJSON<std::shared_ptr<CompileResult>>(std::shared_ptr<CompileResult> &v) {
43 json obj({}); 43 json obj({});
44 switch (v->tag) { 44 switch (v->tag) {
45 case ::MyEither::tag::MyLeft: 45 case ::CompileResult::tag::CompileError:
46 obj["tag"] = "MyLeft"; 46 obj["tag"] = "CompileError";
47 { 47 {
48 std::shared_ptr<data::MyLeft> tv = std::static_pointer_cast<data::MyLeft>(v); 48 std::shared_ptr<data::CompileError> tv = std::static_pointer_cast<data::CompileError>(v);
49 obj["arg0"] = toJSON(tv->_0); 49 obj["arg0"] = toJSON(tv->_0);
50 obj["arg1"] = toJSON(tv->_1); 50 obj["arg1"] = toJSON(tv->_1);
51 } 51 }
52 break; 52 break;
53 case ::MyEither::tag::MyRight: 53 case ::CompileResult::tag::Compiled:
54 obj["tag"] = "MyRight"; 54 obj["tag"] = "Compiled";
55 { 55 {
56 std::shared_ptr<data::MyRight> tv = std::static_pointer_cast<data::MyRight>(v); 56 std::shared_ptr<data::Compiled> tv = std::static_pointer_cast<data::Compiled>(v);
57 obj["arg0"] = toJSON(tv->_0); 57 obj["arg0"] = toJSON(tv->_0);
58 obj["arg1"] = toJSON(tv->_1); 58 obj["arg1"] = toJSON(tv->_1);
59 obj["arg2"] = toJSON(tv->_2); 59 obj["arg2"] = toJSON(tv->_2);
@@ -63,26 +63,26 @@ template<> json toJSON<std::shared_ptr<MyEither>>(std::shared_ptr<MyEither> &v)
63 return obj; 63 return obj;
64} 64}
65 65
66template<> std::shared_ptr<MyEither> fromJSON<std::shared_ptr<MyEither>>(W<std::shared_ptr<MyEither>> v, json &obj) { 66template<> std::shared_ptr<CompileResult> fromJSON<std::shared_ptr<CompileResult>>(W<std::shared_ptr<CompileResult>> v, json &obj) {
67 enum ::MyEither::tag tagType; 67 enum ::CompileResult::tag tagType;
68 std::string tag = obj["tag"]; 68 std::string tag = obj["tag"];
69 if (tag == "MyLeft") { 69 if (tag == "CompileError") {
70 tagType = ::MyEither::tag::MyLeft; 70 tagType = ::CompileResult::tag::CompileError;
71 std::shared_ptr<data::MyLeft> tv(new data::MyLeft()); 71 std::shared_ptr<data::CompileError> tv(new data::CompileError());
72 tv->_0 = fromJSON(W<std::shared_ptr<::TypeInfo>>(), obj["arg0"]); 72 tv->_0 = fromJSON(W<std::vector<std::shared_ptr<::TypeInfo>>>(), obj["arg0"]);
73 tv->_1 = fromJSON(W<std::vector<std::shared_ptr<::TypeInfo>>>(), obj["arg1"]); 73 tv->_1 = fromJSON(W<std::vector<std::shared_ptr<::TypeInfo>>>(), obj["arg1"]);
74 return tv; 74 return tv;
75 } 75 }
76 else if (tag == "MyRight") { 76 else if (tag == "Compiled") {
77 tagType = ::MyEither::tag::MyRight; 77 tagType = ::CompileResult::tag::Compiled;
78 std::shared_ptr<data::MyRight> tv(new data::MyRight()); 78 std::shared_ptr<data::Compiled> tv(new data::Compiled());
79 tv->_0 = fromJSON(W<String>(), obj["arg0"]); 79 tv->_0 = fromJSON(W<String>(), obj["arg0"]);
80 tv->_1 = fromJSON(W<std::shared_ptr<::Pipeline>>(), obj["arg1"]); 80 tv->_1 = fromJSON(W<std::shared_ptr<::Pipeline>>(), obj["arg1"]);
81 tv->_2 = fromJSON(W<std::vector<std::shared_ptr<::TypeInfo>>>(), obj["arg2"]); 81 tv->_2 = fromJSON(W<std::vector<std::shared_ptr<::TypeInfo>>>(), obj["arg2"]);
82 return tv; 82 return tv;
83 } 83 }
84 else throw "unknown constructor: " + tag; 84 else throw "unknown constructor: " + tag;
85 std::shared_ptr<::MyEither> o(new ::MyEither()); 85 std::shared_ptr<::CompileResult> o(new ::CompileResult());
86 o->tag = tagType; 86 o->tag = tagType;
87 return o; 87 return o;
88} 88}