DEADSOFTWARE

Almost-correct toPlainText
[odcread.git] / odcread.cc
index 77a26947c5da21f3617a32dd341ff50dd68c2009..151c86181db470156f3c31c3154bafc0255d8941 100644 (file)
@@ -1,5 +1,6 @@
 #include <iostream>
 #include <fstream>
+#include <string>
 
 #include <oberon.h>
 #include <reader.h>
@@ -24,8 +25,19 @@ namespace odc {
 }
 
 int main(int argc, char *argv[]) {
+       if (argc < 2) {
+               return 1;
+       }
        std::ifstream in(argv[1], std::ios::in | std::ios::binary);
        odc::Store* s = odc::importDocument(in);
-       std::cout << s << std::endl;
+//     std::cout << s->toPlainText() << std::endl;
+//     std::cout << std::endl << std::endl;
+
+       std::cout << s->toString() << std::endl;
+//     std::cout << in.tellg() << " " << in.eof() << std::endl;
+
+//     odc::TypePath path;
+//     odc::ContainerModel(0).getTypePath(&path);
+//     std::cout << path.toString() << std::endl;
        return 0;
 }