Main Page   Class Hierarchy   Compound List   File List   Compound Members  

gdsii.h

00001 /*
00002 Program GDSII.H
00003 Purpose Definition of GDSII structure (Header)
00004 Programmer      N. Noorlander & R. Spekreijse
00005 Last Update     12-12-1995
00006 */
00007 
00008 #ifndef GDSII_H
00009 #define GDSII_H
00010 
00011 #ifdef __GNUG__
00012 #pragma interface
00013 #endif
00014 
00015 #include "misc.h"
00016 #include "bbox.h"
00017 #include "gdserr.h"
00018 #include "referenc.h"
00019 #include "elemlst.h"
00020 #include "group.h"
00021 #include "proper.h"
00022 
00023 class Structure;
00024 
00025 class ModeTime
00026 {
00027         public:
00028                 ModeTime();
00029                 int     GetLmtYear();
00030                 int     GetLmtMonth();
00031                 int     GetLmtDay();
00032                 int     GetLmtHour();
00033                 int     GetLmtMinute();
00034                 int     GetLmtSecond();
00035                 int     GetLatYear();
00036                 int     GetLatMonth();
00037                 int     GetLatDay();
00038                 int     GetLatHour();
00039                 int     GetLatMinute();
00040                 int     GetLatSecond();
00041                 void    SetLmtYear(int);
00042                 void    SetLmtMonth(int);
00043                 void    SetLmtDay(int);
00044                 void    SetLmtHour(int);
00045                 void    SetLmtMinute(int);
00046                 void    SetLmtSecond(int);
00047                 void    SetLatYear(int);
00048                 void    SetLatMonth(int);
00049                 void    SetLatDay(int);
00050                 void    SetLatHour(int);
00051                 void    SetLatMinute(int);
00052                 void    SetLatSecond(int);
00053                 ModeTime&       operator=(ModeTime& other);
00054 
00055         protected:
00056                 // lmt = last modification time
00057                 int     _lmt_year;
00058                 int     _lmt_month;
00059                 int     _lmt_day;
00060                 int     _lmt_hour;
00061                 int     _lmt_minute;
00062                 int     _lmt_second;
00063 
00064                 // lat = last access time
00065                 int     _lat_year;
00066                 int     _lat_month;
00067                 int     _lat_day;
00068                 int     _lat_hour;
00069                 int     _lat_minute;
00070                 int     _lat_second;
00071 };
00072 
00073 
00074 class Library
00075 {
00076         public:
00077                 // contructor & destructor
00078                 Library();
00079                 ~Library();
00080 
00081                 // public memberfunction
00082                 bool                                    FileOpen();
00083 
00084                 // get and set functions
00085                 void                            SetFilename(const wxString&);
00086                 void                            SetFontsname(const wxString&);
00087 
00088                 wxString       GetFilename();
00089                 wxString       GetFontsname();
00090 
00091                 void                            SetVersion(int nr);
00092                 int                             GetVersion();
00093 
00094                 wxString       GetLibraryName();
00095                 void                            SetLibraryName(const wxString&);
00096 
00097                 // assignment operator
00098                 Library&                                operator=(Library&);
00099 
00100                 double GetUserUnits();
00101                 double GetPhysicalUnits();
00102                 void     SetUserUnits(double);
00103                 void     SetPhysicalUnits(double);
00104 
00105         protected:
00106                 double            _userunits;
00107                 double            _physunits;
00108                 bool                      _fileopened;
00109                 int                       _filehandle;
00110                 int                       _version;
00111 
00112                 wxString          _filename;
00113                 wxString                  _fontsname;
00114                 wxString                  _libraryname;
00115 };
00116 
00117 class DrawDriver;
00118 class Driver_out;
00119 
00120 class GdsII :  public DL_List<void*>
00121 {
00122         public:
00123                 // constructors and destructors
00124                 GdsII();
00125                 ~GdsII();
00126       void Write(DrawDriver& dr);
00127 
00128                 double GetUserUnits();
00129                 double GetPhysicalUnits();
00130                 void     SetUserUnits(double);
00131                 void     SetPhysicalUnits(double);
00132                 int    GetVersion();
00133                 void     SetVersion(int);
00134 
00135                 //bool Recurse(wxPropertyValues* args);
00136                 void     Operation(OPS operation,EleFlags maskA,EleFlags maskB,int destination,bool m_destination_add);
00137       void       SetGroupFlags(group *a_group,EleFlags mask);
00138       void       SetGroupFlagsRefs(EleFlags mask,bool srefselected);
00139       void       ClearFlags(short int mask);
00140       void   SetFlags(EleFlags mask,bool selectedonly);
00141       void   SetAvailable();
00142                 void   Flatten(bool selected_only,bool deep);
00143       void   Transform(bool mirror_x,bool mirror_y,double move_h,double move_v,
00144                                                 double scale_h_ratio,double scale_v_ratio,double degr,
00145                         EleFlags mask);
00146       void   UndoTransform(EleFlags mask);
00147       void   Explode(bool selectedonly);
00148                 void   CalcArea(double* area,EleFlags mask);
00149                 bool   AddProperty(const wxString& name,const wxString& type,const wxString& value,bool _selectedonly);
00150                 bool     AddProperty(EleFlags mask,const wxString& name,const wxString& type,const wxString& value);
00151                 bool     Move(int destination,EleFlags mask);
00152                 bool     Copy(int destination,EleFlags mask);
00153                 bool     ToArcs(int destination,EleFlags mask);
00154                 bool     ToLines(int destination,EleFlags mask);
00155                 bool     Delete(EleFlags mask);
00156                 bool   Delete_A(EleFlags mask);
00157 
00158 
00159                 // get and set memberfunctions
00160                 int                                             LinkReferences();
00161                 BoundingBox&                    CalcBoundingBox();
00162                 BoundingBox&                    GetBoundingBox();
00163                 ModeTime*                               GetBgnlib();
00164                 Library*                                   GetLibrary();
00165                 Structure*                              GetTopStructure();
00166                 void                                            SetBgnlib(ModeTime*);
00167                 void                                            SetLibrary(Library*);
00168                 void                                            SetTopStructure(Structure*);
00169                 void                                            ShowInformation();
00170                 void                                            MakeStructure(wxString& Structure);
00171 
00172                 Structure*      GetStructure(const wxString&);
00173                 Structure*      SearchTopStructure();
00174                 void                    ResetReferencesNr();
00175                 void                    ResetBinHere();
00176                 void                    ResetExplodeReferencesNr();
00177                 void                    CheckEmpty(Structure* the_top);
00178                 void                    SortOnBoundingBox();
00179       void                      DeleteBin();
00180 
00181 
00182                 // Operations on GDS data
00183                 void                                                    SetReferenceNr();
00184 
00185                 // operator overloading
00186                 GdsII&                                                  operator=(GdsII&);
00187                 Structure*                              GetShowStructure();
00188                 void                                                  SetShowStructure(Structure*);
00189                 void                                                            Merge(GdsII* other_gdsii,double x,double y,double angle);
00190       void                       SetModTime();
00191       void                       ResetUnits(double);
00192                 void                                                            Replace(const wxString& to_replace,GdsII* other_gdsii);
00193       bool                       GetMultiple(){return m_multipletop;};
00194 
00195         protected:
00196                 int                                                             _version;
00197                 Structure*                                              _topstructure;
00198                 Structure*                                              _showstructure;
00199                 Library*                                                        _library;
00200                 ModeTime*                                               _bgnlib;
00201                 BoundingBox                                             _boundingbox;
00202       wxTransformMatrix*                        _trans_matrix;
00203       bool                       m_multipletop;
00204 };
00205 
00206 
00207 #endif
00208 
gdsii.h Source File -- Thu Nov 28 21:24:56 2002 -- 28 Nov 2002 -- 1.2.18 -- -- . -- Main Page