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 * Mark Elendt 00008 * Side Effects 00009 * 477 Richmond Street West 00010 * Toronto, Ontario 00011 * Canada M5V 3E7 00012 * 416-504-9876 00013 * 00014 * NAME: Base class for all geometry elements (C++) 00015 * 00016 * COMMENTS: This is a common base class which allows points & primitives 00017 * to be reference in the same way 00018 * 00019 */ 00020 00021 #ifndef __GB_Element_h__ 00022 #define __GB_Element_h__ 00023 00024 #include "GB_API.h" 00025 #include "GB_BitArray.h" 00026 00027 class GB_API GB_Element 00028 { 00029 public: 00030 GB_Element(int groupSize = 0); 00031 virtual ~GB_Element(); 00032 00033 int getNum() const { return myNum; } 00034 00035 const GB_BitArray &getGroups() const { return myGroups; } 00036 GB_BitArray &getGroups() { return myGroups; } 00037 00038 virtual int isPrimary(void) const = 0; 00039 virtual GB_Element *getSecondary(int ); 00040 virtual unsigned numSecondary(void); 00041 00042 protected: 00043 GB_BitArray myGroups; 00044 int myNum; // Only the detail can set this... 00045 00046 void setNum(int num) { myNum = num; } 00047 00048 private: 00049 friend class GB_Detail; 00050 }; 00051 00052 #endif
1.5.9