]> Shamusworld >> Repos - architektonas/blobdiff - src/fileio.cpp
Initial work on bringing sanity to insane codebase.
[architektonas] / src / fileio.cpp
index 931c5131653b64b89069ec995d67e6305fc25345..27ed4f3c3ccec27eacee2403c6bc0b891863c5f3 100644 (file)
 #include <stdlib.h>
 #include <string.h>
 #include <vector>
-#include "arc.h"
-#include "circle.h"
-#include "container.h"
-#include "dimension.h"
-#include "line.h"
+//#include "arc.h"
+//#include "circle.h"
+//#include "container.h"
+//#include "dimension.h"
+//#include "line.h"
+#include "structs.h"
 
 /*
 How to handle connected objects
@@ -125,7 +126,7 @@ enum ObjectTypeFile { OTFContainer, OTFContainerEnd, OTFLine, OTFCircle, OTFArc,
           enumerates all objects within itself. */
 
        fprintf(file, "ARCHITEKTONAS DRAWING V1.0\n");
-#if 1
+#if 0
        object->Enumerate(file);
        fprintf(file, "END\n");
        return true;
@@ -149,7 +150,7 @@ enum ObjectTypeFile { OTFContainer, OTFContainerEnd, OTFLine, OTFCircle, OTFArc,
           add objects to it until an "endContainer" marker is found. This will require a
           stack to maintain the current Container. */
 
-#if 1
+#if 0
        std::vector<Container *> containerStack;
        Container * currentTopContainer = drawing;//new Container(Vector(0, 0));
        Object * object;
@@ -199,6 +200,7 @@ enum ObjectTypeFile { OTFContainer, OTFContainerEnd, OTFLine, OTFCircle, OTFArc,
 
 /*static*/ bool FileIO::GetObjectFromFile(FILE * file, Object * parent, Object ** object, int * objectType)
 {
+#if 0
        char buffer[256];
        int foundLayer = 0;
        int num = fscanf(file, "%s", buffer);
@@ -290,5 +292,8 @@ if (errno)
                (*object)->layer = foundLayer;
 
        return recognized;
+#else
+       return false;
+#endif
 }