00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014 #ifndef FLASHPRS_H
00015 #define FLASHPRS_H
00016
00017 #ifdef __GNUG__
00018 #pragma interface
00019 #endif
00020
00021 #define FLASH_BUFF_SIZE 2047 // must at the very least be 600.
00022
00023
00024 #include <ctype.h>
00025 #include <fstream.h>
00026 #include <iostream.h>
00027 #include <math.h>
00028 #include <stdio.h>
00029 #include <string.h>
00030 #include <stdlib.h>
00031 #include <time.h>
00032
00033 #include "misc.h"
00034
00035 #include "lsetup.h"
00036 #include "gdserr.h"
00037
00038
00039 class Arcseg;
00040 class ArrayReference;
00041 class Boundary;
00042 class Box;
00043 class Circle;
00044 class Element;
00045 class ElementList;
00046 class ColumnsRows;
00047 class GdsII;
00048 class Library;
00049 class Path;
00050 class Point;
00051 class Polygon;
00052 class Segment;
00053 class Shape;
00054 class G_Polygon;
00055 class G_Polyline;
00056 class Reference;
00057 class StructureReference;
00058 class Structure;
00059 class Text;
00060
00061
00063
00104 class FLASH_driver_in
00105 {
00106 public:
00108
00113 FLASH_driver_in(const wxString& filename, bool add, int layernr = 0);
00114
00116 ~FLASH_driver_in();
00117
00118 void Read(GdsII*);
00119 void SetDavidMannAdd(bool);
00120 protected:
00121
00123 bool Read_Command_From_FLASH_File ();
00125 void Strip_Nonsense();
00127 void Strip_Blanks();
00129 void Strip_BOF();
00131 void Strip_Comment();
00132
00133 void Strip_Item(int);
00134
00136 void Read_Items(int &teller);
00137 bool is_Keyword(char);
00138 char* ReadValue(int &teller);
00139
00141 int Read_XY();
00143 int Read_WH();
00145 int Read_A();
00146
00147 void Read_GDSII(GdsII*);
00148 void Read_Bgnlib(GdsII*);
00149 void Read_Library(GdsII*);
00150 void Read_Structure(GdsII*);
00151 void Read_Bgnstr(Structure*);
00152 void Read_StructureName(Structure*);
00153 void Read_Element(Structure* _structure);
00154 void Read_Box(Structure* _structure);
00155 void ReadLayer(Shape* _shape);
00156 void ReadBoxType(Box* _box);
00157 void ReadWidth(Shape* _shape);
00158
00159 void Read_Flash(Structure*);
00160
00162 double Deg2Rad(int);
00164 double Inch2Meter(int value);
00165
00166 int GetAddAtLayer();
00167 bool GetDavidMannAdd();
00168
00169 int Getlast_Xpos();
00170 int Getlast_Ypos();
00171 int Getlast_Height();
00172 int Getlast_Width();
00173 int Getlast_Angle();
00174
00175 void SetAddAtLayer(int);
00176
00177 void Setlast_Xpos(int);
00178 void Setlast_Ypos(int);
00179 void Setlast_Height(int);
00180 void Setlast_Width(int);
00181 void Setlast_Angle(int);
00182
00183
00184 private:
00185
00187 wxString FLASH_filename;
00188
00190 ifstream FLASH_file;
00191
00193 char command_buffer[FLASH_BUFF_SIZE];
00194
00196 int AddAtLayer;
00198 bool DavidMannAdd;
00199
00200
00202 int last_Xpos;
00204 int last_Ypos;
00206 int last_Height;
00208 int last_Width;
00210 int last_Angle;
00211 };
00212
00213 #endif
flashin.h Source File -- Thu Nov 28 21:24:56 2002 -- 28 Nov 2002 -- 1.2.18 -- -- . --