diff options
Diffstat (limited to 'test/idCpp.cpp')
-rw-r--r-- | test/idCpp.cpp | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/test/idCpp.cpp b/test/idCpp.cpp deleted file mode 100644 index 24894f4..0000000 --- a/test/idCpp.cpp +++ /dev/null | |||
@@ -1,31 +0,0 @@ | |||
1 | #include <string> | ||
2 | #include <iostream> | ||
3 | #include <istream> | ||
4 | #include <ostream> | ||
5 | #include <iterator> | ||
6 | |||
7 | #include "Mesh.hpp" | ||
8 | #include "IR.hpp" | ||
9 | #include "TypeInfo.hpp" | ||
10 | |||
11 | int main() { | ||
12 | // don't skip the whitespace while reading | ||
13 | std::cin >> std::noskipws; | ||
14 | |||
15 | // use stream iterators to copy the stream to a string | ||
16 | std::istream_iterator<char> it(std::cin); | ||
17 | std::istream_iterator<char> end; | ||
18 | std::string results(it, end); | ||
19 | |||
20 | try { | ||
21 | json jobjIn = json::parse(results); | ||
22 | std::shared_ptr<Pipeline> b = fromJSON(W<std::shared_ptr<Pipeline>>(),jobjIn); | ||
23 | std::shared_ptr<data::Pipeline> tv = std::static_pointer_cast<data::Pipeline>(b); | ||
24 | json jobjOut = toJSON(b); | ||
25 | std::cout << jobjOut; | ||
26 | } catch (std::string e) { | ||
27 | std::cout << "exception: " << e << "\n"; | ||
28 | } catch (...) { std::cout << "default exception\n"; } | ||
29 | |||
30 | return 0; | ||
31 | } | ||