X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Ffileio.cpp;h=503ccc109322dcd41f68b6cc629ad38abc663484;hb=ea7712f342020baf61cf33ba98b12140da6aecf7;hp=931c5131653b64b89069ec995d67e6305fc25345;hpb=11cff81f10ccca1b31288fce04d696e715b922b0;p=architektonas diff --git a/src/fileio.cpp b/src/fileio.cpp index 931c513..503ccc1 100644 --- a/src/fileio.cpp +++ b/src/fileio.cpp @@ -19,11 +19,7 @@ #include #include #include -#include "arc.h" -#include "circle.h" -#include "container.h" -#include "dimension.h" -#include "line.h" +#include "structs.h" /* How to handle connected objects @@ -112,8 +108,8 @@ OTHER CONSIDERATIONS: */ -enum ObjectTypeFile { OTFContainer, OTFContainerEnd, OTFLine, OTFCircle, OTFArc, OTFDimension, - OTFPolygon, OTFText, OTFImage, OTFBlock, OTFEndOfFile }; +enum ObjectTypeFile { OTFContainer, OTFContainerEnd, OTFLine, OTFCircle, OTFArc, + OTFDimension, OTFPolygon, OTFText, OTFImage, OTFBlock, OTFEndOfFile }; /*static*/ bool FileIO::SaveAtnsFile(FILE * file, Container * object) @@ -125,7 +121,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 +145,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 containerStack; Container * currentTopContainer = drawing;//new Container(Vector(0, 0)); Object * object; @@ -199,6 +195,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 +287,8 @@ if (errno) (*object)->layer = foundLayer; return recognized; +#else + return false; +#endif }