00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030 #ifndef DIME_LAYER_H
00031 #define DIME_LAYER_H
00032
00033 #include <dime/Basic.h>
00034
00035 class dimeLayer
00036 {
00037 public:
00038
00039 enum Flags {
00040 FROZEN = 0x1,
00041 FROZEN_NEW_VIEWPORTS = 0x2,
00042 LOCKED = 0x4
00043 };
00044
00045 const char *getLayerName() const;
00046 int getLayerNum() const;
00047
00048 int16 getColorNumber() const;
00049 void setColorNumber(const int16 num);
00050
00051 int16 getFlags() const;
00052 void setFlags(const int16 &flags);
00053
00054 bool isDefaultLayer() const;
00055
00056 static const dimeLayer *getDefaultLayer();
00057
00058 static void colorToRGB(const int colornum,
00059 dxfdouble &r, dxfdouble &g, dxfdouble &b);
00060
00061 private:
00062 friend class dimeModel;
00063
00064 dimeLayer();
00065 dimeLayer(const char * const name, const int num,
00066 const int16 colnum, const int16 flags);
00067 const char *layerName;
00068 int layerNum;
00069 int16 colorNum;
00070 int16 flags;
00071
00072 static dimeLayer defaultLayer;
00073
00074 };
00075
00076 inline const char *
00077 dimeLayer::getLayerName() const
00078 {
00079 return layerName;
00080 }
00081
00082 inline int
00083 dimeLayer::getLayerNum() const
00084 {
00085 return layerNum;
00086 }
00087
00088 inline int16
00089 dimeLayer::getColorNumber() const
00090 {
00091 return colorNum;
00092 }
00093
00094 inline void
00095 dimeLayer::setColorNumber(const int16 num)
00096 {
00097 this->colorNum = num;
00098 }
00099
00100 inline int16
00101 dimeLayer::getFlags() const
00102 {
00103 return this->flags;
00104 }
00105
00106 inline void
00107 dimeLayer::setFlags(const int16 &flags)
00108 {
00109 this->flags = flags;
00110 }
00111
00112 inline const dimeLayer *
00113 dimeLayer::getDefaultLayer()
00114 {
00115 return &defaultLayer;
00116 }
00117
00118 inline bool
00119 dimeLayer::isDefaultLayer() const
00120 {
00121 return this == &defaultLayer;
00122 }
00123
00124 #endif // ! DIME_LAYER_H
00125