00001 /* 00002 * PROPRIETARY INFORMATION. This software is proprietary to 00003 * Side Effects Software Inc., and is not to be reproduced, 00004 * transmitted, or disclosed in any way without written permission. 00005 * 00006 * Produced by: 00007 * Ondrej Kos 00008 * Side Effects Software, Inc. 00009 * 477 Richmond Street West 00010 * Toronto, Ontario 00011 * Canada M5V 3E7 00012 * 416-504-9876 00013 * 00014 * NAME: GB_AttributeHandleBase.h (C++) 00015 * 00016 * COMMENTS: A base class for both GB_AttributeHandle and 00017 * GB_AttributeListHandle. 00018 * 00019 */ 00020 #ifndef __GB_AttributeHandleBase_h__ 00021 #define __GB_AttributeHandleBase_h__ 00022 00023 #include "GB_API.h" 00024 #include "GB_AttributeDefines.h" 00025 00026 class GB_Detail; 00027 00028 class GB_API GB_AttributeHandleBase 00029 { 00030 public: 00031 /// Note the virtual destructor 00032 virtual ~GB_AttributeHandleBase(); 00033 00034 /// Invalidates the handle (gets rid of references to details) 00035 virtual void invalidate(); 00036 00037 protected: 00038 /// The basic constructor 00039 GB_AttributeHandleBase(const GB_Detail *gdp); 00040 00041 /// The copy constructor 00042 GB_AttributeHandleBase(const GB_AttributeHandleBase &src); 00043 00044 GB_AttributeHandleBase &operator=(const GB_AttributeHandleBase &gah); 00045 00046 void setDetail(const GB_Detail *gdp); 00047 const GB_Detail *getDetail() const { return myDetail; } 00048 00049 00050 /// Some convenient lookup tables 00051 static const GB_AttributeStorage theAttribTypeToStorage[]; 00052 static const int theAttribTypeToBytes[]; 00053 00054 private: 00055 const GB_Detail *myDetail; 00056 }; 00057 00058 #endif
1.5.9