Main Page | Class Hierarchy | Class List | File List | Class Members

Class.h

00001 /**************************************************************************\ 00002 * 00003 * FILE: Class.h 00004 * 00005 * This source file is part of DIME. 00006 * Copyright (C) 1998-1999 by Systems In Motion. All rights reserved. 00007 * 00008 * This library is free software; you can redistribute it and/or modify it 00009 * under the terms of the GNU General Public License, version 2, as 00010 * published by the Free Software Foundation. 00011 * 00012 * This library is distributed in the hope that it will be useful, but 00013 * WITHOUT ANY WARRANTY; without even the implied warranty of 00014 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00015 * General Public License (the accompanying file named COPYING) for more 00016 * details. 00017 * 00018 ************************************************************************** 00019 * 00020 * If you need DIME for a non-GPL project, contact Systems In Motion 00021 * to acquire a Professional Edition License: 00022 * 00023 * Systems In Motion http://www.sim.no/ 00024 * Prof. Brochs gate 6 sales@sim.no 00025 * N-7030 Trondheim Voice: +47 22114160 00026 * NORWAY Fax: +47 67172912 00027 * 00028 \**************************************************************************/ 00029 00030 #ifndef DIME_CLASS_H 00031 #define DIME_CLASS_H 00032 00033 #include <dime/Base.h> 00034 #include <dime/Basic.h> 00035 #include <dime/util/Array.h> 00036 #include <dime/util/Linear.h> 00037 #include <dime/RecordHolder.h> 00038 00039 class dimeInput; 00040 class dimeMemHandler; 00041 class dimeOutput; 00042 00043 class DIME_DLL_API dimeClass : public dimeRecordHolder 00044 { 00045 friend class dimeClassesSection; 00046 friend class dimeModel; 00047 00048 public: 00049 dimeClass(); 00050 virtual ~dimeClass(); 00051 00052 virtual const char *getDxfClassName() const = 0; 00053 virtual dimeClass *copy(dimeModel * const model) const = 0; 00054 virtual bool read(dimeInput * const in); 00055 virtual bool write(dimeOutput * const out); 00056 virtual bool isOfType(const int thetypeid) const; 00057 virtual int countRecords() const; 00058 00059 const char *getClassName() const; 00060 const char *getApplicationName() const; 00061 int32 getVersionNumber() const; 00062 int8 getFlag280() const; 00063 int8 getFlag281() const; 00064 00065 void setClassName(const char * const classname, 00066 dimeMemHandler * const memhandler = NULL); 00067 void setApplicationName(const char * const appname, 00068 dimeMemHandler * const memhandler = NULL); 00069 void setVersionNumber(const int32 v); 00070 void setFlag280(const int8 flag); 00071 void setFlag281(const int8 flag); 00072 00073 protected: 00074 virtual bool handleRecord(const int groupcode, 00075 const dimeParam &param, 00076 dimeMemHandler * const memhandler); 00077 00078 public: 00079 static dimeClass *createClass(const char * const name, 00080 dimeMemHandler * const memhandler = NULL); 00081 protected: 00082 bool copyRecords(dimeClass * const newclass, dimeModel * const model) const; 00083 00084 private: 00085 char *className; 00086 char *appName; 00087 int32 versionNumber; 00088 int8 flag1; 00089 int8 flag2; 00090 00091 }; // class dimeClass 00092 00093 inline const char * 00094 dimeClass::getClassName() const 00095 { 00096 return this->className; 00097 } 00098 00099 inline const char * 00100 dimeClass::getApplicationName() const 00101 { 00102 return this->appName; 00103 } 00104 00105 inline int32 00106 dimeClass::getVersionNumber() const 00107 { 00108 return this->versionNumber; 00109 } 00110 00111 inline int8 00112 dimeClass::getFlag280() const 00113 { 00114 return this->flag1; 00115 } 00116 00117 inline int8 00118 dimeClass::getFlag281() const 00119 { 00120 return this->flag2; 00121 } 00122 00123 inline void 00124 dimeClass::setVersionNumber(const int32 v) 00125 { 00126 this->versionNumber = v; 00127 } 00128 00129 inline void 00130 dimeClass::setFlag280(const int8 flag) 00131 { 00132 this->flag1 = flag; 00133 } 00134 00135 inline void 00136 dimeClass::setFlag281(const int8 flag) 00137 { 00138 this->flag2 = flag; 00139 } 00140 00141 #endif // ! DIME_CLASS_H 00142

Copyright © 1998-1999, Systems In Motion <sales@sim.no>. All rights reserved.
System documentation was generated using doxygen.