segment.h Source File

Main Page Class Hierarchy Compound List File List Compound Members

# segment.h

    00001
    00002
    00003 /*
    00004 Program POINT.H
    00005 Purpose Definition of GDSII double structure
    00006 Last Update     12-12-1995
    00007 */
    00008
    00009 #ifndef SEGMENT_H
    00010 #define SEGMENT_H
    00011
    00012 #ifdef __GNUG__
    00013 #pragma interface
    00014 #endif
    00015
    00016 #include "gdserr.h"
    00017 #include "misc.h"
    00018 #include "point.h"
    00019
    00020 enum SEGTYPE {LINE,ARC};
    00021 enum HOLEFLAGS {NORMAL_SEG,LINK_SEG,HOLE_SEG};
    00022
    00024
    00032 class Segment
    00033 {
    00034         public:
    00035                 Segment();
    00036                 virtual ~Segment();
    00037                 virtual double  GetX()=0;
    00038                 virtual double  GetY()=0;
    00039                 virtual void            SetX(double)=0;
    00040                 virtual void            SetY(double)=0;
    00041                 virtual SEGTYPE   GetType()=0;
    00042       inline HOLEFLAGS GetHoleType() {return m_holetype;};
    00043       inline bool      GetBin()      {return m_bin;};
    00044       inline void SetHoleType(HOLEFLAGS a) {m_holetype=a;};
    00045       inline void SetBin(bool bin) {m_bin=bin;};
    00046
    00047    protected:
    00048                 bool    m_bin           : 1;                            // Marker for walking over the graph
    00049                 HOLEFLAGS  m_holetype : 2;                              // Is this a part of hole ?
    00050 };
    00051
    00052
    00054
    00061 class Line_Seg : public Segment
    00062 {
    00063         public:
    00064
    00065                 Line_Seg();
    00066                 ~Line_Seg();
    00067                 Line_Seg(double const X, double const Y);
    00068                 Line_Seg(Point* const);
    00069       Line_Seg(Line_Seg* other);
    00070
    00071 //         void*                                operator new(size_t size);
    00072 //              void                            operator delete(void* segmentptr);
    00073
    00074                 void                    Set(const double,const double);
    00075
    00076                 double  GetX();
    00077                 double  GetY();
    00078                 void            SetX(double);
    00079                 void                    SetY(double);
    00080                                  SEGTYPE        GetType();
    00081                 Line_Seg&                       operator=(Line_Seg&);
    00082
    00083         protected:
    00084                 Point   _point;
    00085 };
    00086
    00088
    00095 class Arc_Seg : public Segment
    00096 {
    00097         public:
    00098
    00099                 Arc_Seg();
    00100                 ~Arc_Seg();
    00101                 Arc_Seg(double const X, double const Y,double const AX, double const AY, double const OX, double const OY);
    00102                 Arc_Seg(Point* const, Point* const, Point* const);
    00103       Arc_Seg(Arc_Seg* other);
    00104
    00105 //      void*                           operator new(size_t size);
    00106 //              void                                    operator delete(void* segmentptr);
    00107
    00108                 void                    Set(const double,const double,double const AX, double const AY, double const OX, double const OY);
    00109
    00110                 double  GetX();
    00111                 double  GetY();
    00112                 double  GetAX();
    00113                 double  GetAY();
    00114                 double  GetOX();
    00115                 double  GetOY();
    00116                 void               SetX(double);
    00117                 void                    SetY(double);
    00118                 void               SetAX(double);
    00119                 void                    SetAY(double);
    00120                 void               SetOX(double);
    00121                 void                    SetOY(double);
    00122       SEGTYPE      GetType();
    00123       Arc_Seg&    operator=(Arc_Seg &other);
    00124
    00125         protected:
    00126                 Point   _point;
    00127                 Point   _Apoint;
    00128                 Point   _Opoint;
    00129 };
    00130
    00131 #endif

segment.h Source File -- Thu Nov 28 21:24:56 2002 -- 28 Nov 2002 -- 1.2.18 -- -- . -- Main Page