diff options
Diffstat (limited to 'ddl/out/LambdaCube.TypeInfo.cpp')
-rw-r--r-- | ddl/out/LambdaCube.TypeInfo.cpp | 72 |
1 files changed, 68 insertions, 4 deletions
diff --git a/ddl/out/LambdaCube.TypeInfo.cpp b/ddl/out/LambdaCube.TypeInfo.cpp index 51c897d..34aaf21 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-09-15T19:44:48.120020034Z | 2 | // 2016-11-10T15:07:11.972496000000Z |
3 | 3 | ||
4 | #include "LambdaCube.TypeInfo.hpp" | 4 | #include "LambdaCube.TypeInfo.hpp" |
5 | template<> json toJSON<std::shared_ptr<Range>>(std::shared_ptr<Range> &v) { | 5 | template<> json toJSON<std::shared_ptr<Range>>(std::shared_ptr<Range> &v) { |
@@ -68,6 +68,68 @@ template<> std::shared_ptr<TypeInfo> fromJSON<std::shared_ptr<TypeInfo>>(W<std:: | |||
68 | return o; | 68 | return o; |
69 | } | 69 | } |
70 | 70 | ||
71 | template<> json toJSON<std::shared_ptr<WarningInfo>>(std::shared_ptr<WarningInfo> &v) { | ||
72 | json obj({}); | ||
73 | switch (v->tag) { | ||
74 | case ::WarningInfo::tag::WarningInfo: | ||
75 | obj["tag"] = "WarningInfo"; | ||
76 | { | ||
77 | std::shared_ptr<data::WarningInfo> tv = std::static_pointer_cast<data::WarningInfo>(v); | ||
78 | obj["wRange"] = toJSON(tv->wRange); | ||
79 | obj["wText"] = toJSON(tv->wText); | ||
80 | } | ||
81 | break; | ||
82 | } | ||
83 | return obj; | ||
84 | } | ||
85 | |||
86 | template<> std::shared_ptr<WarningInfo> fromJSON<std::shared_ptr<WarningInfo>>(W<std::shared_ptr<WarningInfo>> v, json &obj) { | ||
87 | enum ::WarningInfo::tag tagType; | ||
88 | std::string tag = obj["tag"]; | ||
89 | if (tag == "WarningInfo") { | ||
90 | tagType = ::WarningInfo::tag::WarningInfo; | ||
91 | std::shared_ptr<data::WarningInfo> tv(new data::WarningInfo()); | ||
92 | tv->wRange = fromJSON(W<std::shared_ptr<::Range>>(), obj["wRange"]); | ||
93 | tv->wText = fromJSON(W<String>(), obj["wText"]); | ||
94 | return tv; | ||
95 | } | ||
96 | else throw "unknown constructor: " + tag; | ||
97 | std::shared_ptr<::WarningInfo> o(new ::WarningInfo()); | ||
98 | o->tag = tagType; | ||
99 | return o; | ||
100 | } | ||
101 | |||
102 | template<> json toJSON<std::shared_ptr<ErrorInfo>>(std::shared_ptr<ErrorInfo> &v) { | ||
103 | json obj({}); | ||
104 | switch (v->tag) { | ||
105 | case ::ErrorInfo::tag::ErrorInfo: | ||
106 | obj["tag"] = "ErrorInfo"; | ||
107 | { | ||
108 | std::shared_ptr<data::ErrorInfo> tv = std::static_pointer_cast<data::ErrorInfo>(v); | ||
109 | obj["eRange"] = toJSON(tv->eRange); | ||
110 | obj["eText"] = toJSON(tv->eText); | ||
111 | } | ||
112 | break; | ||
113 | } | ||
114 | return obj; | ||
115 | } | ||
116 | |||
117 | template<> std::shared_ptr<ErrorInfo> fromJSON<std::shared_ptr<ErrorInfo>>(W<std::shared_ptr<ErrorInfo>> v, json &obj) { | ||
118 | enum ::ErrorInfo::tag tagType; | ||
119 | std::string tag = obj["tag"]; | ||
120 | if (tag == "ErrorInfo") { | ||
121 | tagType = ::ErrorInfo::tag::ErrorInfo; | ||
122 | std::shared_ptr<data::ErrorInfo> tv(new data::ErrorInfo()); | ||
123 | tv->eRange = fromJSON(W<std::shared_ptr<::Range>>(), obj["eRange"]); | ||
124 | tv->eText = fromJSON(W<String>(), obj["eText"]); | ||
125 | return tv; | ||
126 | } | ||
127 | else throw "unknown constructor: " + tag; | ||
128 | std::shared_ptr<::ErrorInfo> o(new ::ErrorInfo()); | ||
129 | o->tag = tagType; | ||
130 | return o; | ||
131 | } | ||
132 | |||
71 | template<> json toJSON<std::shared_ptr<CompileResult>>(std::shared_ptr<CompileResult> &v) { | 133 | template<> json toJSON<std::shared_ptr<CompileResult>>(std::shared_ptr<CompileResult> &v) { |
72 | json obj({}); | 134 | json obj({}); |
73 | switch (v->tag) { | 135 | switch (v->tag) { |
@@ -88,6 +150,7 @@ template<> json toJSON<std::shared_ptr<CompileResult>>(std::shared_ptr<CompileRe | |||
88 | obj["arg1"] = toJSON(tv->_1); | 150 | obj["arg1"] = toJSON(tv->_1); |
89 | obj["arg2"] = toJSON(tv->_2); | 151 | obj["arg2"] = toJSON(tv->_2); |
90 | obj["arg3"] = toJSON(tv->_3); | 152 | obj["arg3"] = toJSON(tv->_3); |
153 | obj["arg4"] = toJSON(tv->_4); | ||
91 | } | 154 | } |
92 | break; | 155 | break; |
93 | } | 156 | } |
@@ -100,9 +163,9 @@ template<> std::shared_ptr<CompileResult> fromJSON<std::shared_ptr<CompileResult | |||
100 | if (tag == "CompileError") { | 163 | if (tag == "CompileError") { |
101 | tagType = ::CompileResult::tag::CompileError; | 164 | tagType = ::CompileResult::tag::CompileError; |
102 | std::shared_ptr<data::CompileError> tv(new data::CompileError()); | 165 | std::shared_ptr<data::CompileError> tv(new data::CompileError()); |
103 | tv->_0 = fromJSON(W<std::vector<std::shared_ptr<::Range>>>(), obj["arg0"]); | 166 | tv->_0 = fromJSON(W<std::vector<std::shared_ptr<::TypeInfo>>>(), obj["arg0"]); |
104 | tv->_1 = fromJSON(W<String>(), obj["arg1"]); | 167 | tv->_1 = fromJSON(W<std::vector<std::shared_ptr<::WarningInfo>>>(), obj["arg1"]); |
105 | tv->_2 = fromJSON(W<std::vector<std::shared_ptr<::TypeInfo>>>(), obj["arg2"]); | 168 | tv->_2 = fromJSON(W<std::vector<std::shared_ptr<::ErrorInfo>>>(), obj["arg2"]); |
106 | return tv; | 169 | return tv; |
107 | } | 170 | } |
108 | else if (tag == "Compiled") { | 171 | else if (tag == "Compiled") { |
@@ -112,6 +175,7 @@ template<> std::shared_ptr<CompileResult> fromJSON<std::shared_ptr<CompileResult | |||
112 | tv->_1 = fromJSON(W<String>(), obj["arg1"]); | 175 | tv->_1 = fromJSON(W<String>(), obj["arg1"]); |
113 | tv->_2 = fromJSON(W<std::shared_ptr<::Pipeline>>(), obj["arg2"]); | 176 | tv->_2 = fromJSON(W<std::shared_ptr<::Pipeline>>(), obj["arg2"]); |
114 | tv->_3 = fromJSON(W<std::vector<std::shared_ptr<::TypeInfo>>>(), obj["arg3"]); | 177 | tv->_3 = fromJSON(W<std::vector<std::shared_ptr<::TypeInfo>>>(), obj["arg3"]); |
178 | tv->_4 = fromJSON(W<std::vector<std::shared_ptr<::WarningInfo>>>(), obj["arg4"]); | ||
115 | return tv; | 179 | return tv; |
116 | } | 180 | } |
117 | else throw "unknown constructor: " + tag; | 181 | else throw "unknown constructor: " + tag; |