00001
00002
00003
00004
00005
00006
00007
00008 #ifndef _KEY_DRIVER_IN
00009 #define _KEY_DRIVER_IN
00010 #ifdef __GNUG__
00011 #pragma interface
00012 #endif
00013
00014 #include <string.h>
00015
00017
00018 #include "misc.h"
00019 #include "gdserr.h"
00020
00021 #include "lsetup.h"
00022 #include "alias.h"
00023 #include "_lnk_itr.h"
00024 #include "cparser.h"
00025
00026 class Arcseg;
00027 class ArrayReference;
00028 class Boundary;
00029 class Box;
00030 class SLine;
00031 class Circle;
00032 class Element;
00033 class ElementList;
00034 class ColumnsRows;
00035 class Elflags;
00036 class GdsII;
00037 class Header;
00038 class Library;
00039 class Path;
00040 class Point;
00041 class Segment;
00042 class Shape;
00043 class G_Polygon;
00044 class G_Polyline;
00045 class Presentation;
00046 class Reference;
00047 class Strans;
00048 class StructureReference;
00049
00050 class Structure;
00051 class Text;
00052 class Units;
00053 class Image;
00054
00056
00064 class KEY_parser
00065 {
00066 public:
00069 KEY_parser();
00071 virtual ~KEY_parser();
00072
00074 void Read(GdsII*);
00075
00076 protected:
00077
00079 virtual bool ReadItem(const wxString& type)=0;
00081 bool SkipXYData();
00082
00083 bool ReadGdsHeader(GdsII* _GdsII);
00084 bool ReadBgnlib(GdsII* _GdsII);
00085 bool ReadBgnstr(Structure* _structure);
00086 bool ReadLibrarySettings(GdsII* _GdsII);
00087 bool ReadLibraryName(Library* _library);
00088 bool ReadUnits(Library* _library);
00089 bool ReadStructure(GdsII* _structurelist);
00090 bool ReadElement(Structure* _structure);
00091
00093 bool ReadBoundary(Structure* _structure);
00095 bool ReadPath(Structure* _structure);
00097 bool ReadText(Structure* _structure);
00099 bool ReadArrayReference(Structure* _structure);
00101 bool ReadStructureReference(Structure* _structure);
00103 bool ReadArc(Structure* _structure);
00105 bool ReadCircle(Structure* _structure);
00107 bool ReadNode(Structure* _structure);
00109 bool ReadBox(Structure* _structure);
00111 bool ReadImage(Structure* _structure);
00113 bool ReadLine(Structure* _structure);
00114
00115 bool ReadElflags(Element* _element);
00116 bool ReadLayer(Shape* _shape);
00117 bool ReadDataType(Boundary* _boundary);
00118 bool ReadDataType(Path* _path);
00119 bool ReadDataType(Arcseg* _arcseg);
00120 bool ReadDataType(Circle* _circle);
00121 bool ReadBoxType(Box* _box);
00122 bool Read(G_Polygon* _polygon);
00123 bool ReadWidth(Shape* _shape);
00124 bool Read(G_Polyline* _polyline);
00125 bool ReadTextBody(Text* _text);
00126 bool ReadPresentation(Text* _text);
00127 bool ReadStrans(Strans* _strans);
00128 bool Read(Point* _point);
00129 bool ReadRefLibs(Library* _library);
00130 bool ReadFonts(Library* _library);
00131 bool ReadAttrtable(Library* _library);
00132 bool ReadGenerations(Library* _library);
00133 bool ReadFormatType(Library* _library);
00134 bool ReadColRow(ArrayReference* _aref);
00135 bool ReadProperties(Element* _element);
00136
00138 wxString _keyword;
00140 wxString _value;
00141
00143 int _recordtype;
00144
00146 long _linenumber;
00147
00149 double _factor;
00150
00152 bool _back;
00153
00154
00156 int _mapping_in[1000];
00157 };
00158
00160 class KEY_driver_in : public KEY_parser, public CommandParser , public ifstream
00161 {
00162 public:
00164 KEY_driver_in(const wxString& filename,double factor = 1);
00166 ~KEY_driver_in();
00167
00168 protected:
00169 bool ReadItem(const wxString& type);
00170
00172 void IncC();
00174 char PeekNextC();
00175
00177 wxString KEY_filename;
00178
00180 GdsII* m_cur_gdsii;
00181 };
00182
00183
00185
00193 class KEY_string_in : public KEY_parser, public CommandParser , public ostrstream
00194 {
00195 public:
00197 KEY_string_in(AliasList* aliaslist, double factor);
00199 ~KEY_string_in();
00200
00202 bool Insert(GdsII* _GdsII,const wxString& string);
00204 bool ReadStructureReference(Structure* _structure,GdsII* _GdsII);
00205 bool ReadArrayReference(Structure* _structure,GdsII* _GdsII);
00206
00207 protected:
00208
00209 bool ReadItem(const wxString& type);
00210
00212 void IncC();
00213
00215 char PeekNextC();
00216
00218 char* _commands;
00219
00221 char* _c;
00222
00223 };
00224
00225 #endif _KEY_DRIVER_IN
00226
00227
00228
keydrin.h Source File -- Thu Nov 28 21:24:56 2002 -- 28 Nov 2002 -- 1.2.18 -- -- . --