namesel.h

Go to the documentation of this file.
00001 /**********************************************************************
00002  *<
00003     FILE: namesel.h
00004 
00005     DESCRIPTION:  A named sel set class for sub-object named selections ets
00006 
00007     CREATED BY: Rolf Berteig
00008 
00009     HISTORY: 3/18/96
00010 
00011  *> Copyright (c) 1994, All Rights Reserved.
00012  **********************************************************************/
00013 
00014 #pragma once
00015 #include "maxheap.h"
00016 #include "tab.h"
00017 #include "strclass.h"
00018 #include "maxtypes.h"
00019 
00020 // forward declarations
00021 class BitArray;
00022 class ILoad;
00023 class ISave;
00024 
00025 #pragma warning(push)
00026 #pragma warning(disable:4239)
00027 
00042 class GenericNamedSelSetList: public MaxHeapOperators {
00043     public:
00044         Tab<MSTR*> names;
00045         Tab<BitArray*> sets;
00046         Tab<DWORD> ids;
00047 
00049         CoreExport ~GenericNamedSelSetList();
00055         CoreExport BitArray *GetSet(MSTR &name);
00061         CoreExport BitArray *GetSet(DWORD id);
00068         CoreExport BitArray *GetSetByIndex(int index);
00070         int Count() {return sets.Count();}
00080         CoreExport void AppendSet(BitArray &nset,DWORD id=0,MSTR &name=MSTR(""));
00093         CoreExport void InsertSet(int pos, BitArray &nset,DWORD id=0,MSTR &name=MSTR(""));
00106         CoreExport int InsertSet(BitArray &nset,DWORD id=0,MSTR &name=MSTR(""));
00112         CoreExport BOOL RemoveSet(MSTR &name);
00118         CoreExport BOOL RemoveSet(DWORD id);
00121         CoreExport IOResult Load(ILoad *iload);
00124         CoreExport IOResult Save(ISave *isave);
00130         CoreExport void SetSize(int size);
00136         CoreExport GenericNamedSelSetList& operator=(GenericNamedSelSetList& from);
00142         CoreExport void DeleteSetElements(BitArray &set,int m=1);
00148         CoreExport void DeleteSet(int i);
00158         CoreExport BOOL RenameSet(MSTR &oldName, MSTR &newName);
00160         CoreExport void Alphabetize (); // Bubble Sort!
00165         BitArray &operator[](int i) {return *sets[i];}
00166     };
00167 
00168 #pragma warning(pop)
00169