1 /****************************************************************************** 2 ** libDXFrw - Library to read/write DXF files (ascii & binary) ** 3 ** ** 4 ** Copyright (C) 2011-2015 José F. Soriano, rallazz@gmail.com ** 5 ** ** 6 ** This library is free software, licensed under the terms of the GNU ** 7 ** General Public License as published by the Free Software Foundation, ** 8 ** either version 2 of the License, or (at your option) any later version. ** 9 ** You should have received a copy of the GNU General Public License ** 10 ** along with this program. If not, see <http://www.gnu.org/licenses/>. ** 11 ******************************************************************************/ 12 13 #ifndef DRW_CLASSES_H 14 #define DRW_CLASSES_H 15 16 17 #include "drw_base.h" 18 //#include "libdwgr.h" 19 20 class dxfReader; 21 class dxfWriter; 22 class dwgBuffer; 23 24 //! Class to handle classes entries 25 /*! 26 * Class to handle classes table entries 27 * TODO: verify the dxf read/write part 28 * @author Rallaz 29 */ 30 class DRW_Class { 31 public: DRW_Class()32 DRW_Class() { 33 } ~DRW_Class()34 ~DRW_Class() { 35 } 36 37 void parseCode(int code, dxfReader *reader); 38 void write(dxfWriter *writer, DRW::Version ver); 39 bool parseDwg(DRW::Version version, dwgBuffer *buf, dwgBuffer *strBuf); 40 41 private: 42 void toDwgType(); 43 public: 44 UTF8STRING recName; /*!< record name, code 1 */ 45 UTF8STRING className; /*!< C++ class name, code 2 */ 46 UTF8STRING appName; /*!< app name, code 3 */ 47 int proxyFlag; /*!< Proxy capabilities flag, code 90 */ 48 int instanceCount; /*!< number of instances for a custom class, code 91*/ 49 int wasaProxyFlag; /*!< proxy flag (app loaded on save), code 280 */ 50 int entityFlag; /*!< entity flag, code 281 (0 object, 1 entity)*/ 51 public: //only for read dwg 52 duint16 classNum; 53 int dwgType; 54 }; 55 56 #endif 57 58 // EOF 59 60