home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Source Code / C++ / Applications / Nuntius 1.2 / src / Nuntius / UGroupList.h < prev    next >
Encoding:
Text File  |  1994-02-20  |  1.3 KB  |  46 lines  |  [TEXT/MPS ]

  1. // Copyright © 1992 Peter Speck, speck@dat.ruc.dk. All rights reserved.
  2. // UGroupList.h
  3.  
  4. #define __UGROUPLIST__
  5.  
  6. enum NewArticleStat {kUnknown, kNoNew, kHasNew};
  7.  
  8. struct GroupEntry;
  9.  
  10. class TGroupList : public TDynamicArray
  11. {
  12.     public:
  13.         void GetGroupAt(ArrayIndex index, CStr255 &name);
  14.         Boolean HasGroup(const CStr255 &name);
  15.         ArrayIndex FindIndexFromName(const CStr255 &name);
  16.  
  17.         NewArticleStat GetNewArticleStat(ArrayIndex index);
  18.         void SetNewArticleStat(ArrayIndex index, NewArticleStat newStat);
  19.         
  20.         Boolean InsertGroupBefore(ArrayIndex index, const CStr255 &name); // false if existed
  21.         Boolean AppendGroup(const CStr255 &name);
  22.         
  23.         ArrayIndex AddGroupsFromListBefore(ArrayIndex beforeIndex, TGroupList *groupList);
  24.         // AddGroupsFromListBefore returns number of groups inserted
  25.         Boolean HasOneOfTheGroupsInList(TGroupList *groupList);
  26.  
  27.         void DeleteGroupAt(ArrayIndex index);
  28.         void DeleteGroup(const CStr255 &name);
  29.  
  30.         GroupEntry *ComputeGroupEntryAddress(ArrayIndex index);
  31.  
  32.         void DoRead(TStream *aStream);
  33.         void DoIronAgeFormatRead(TStream *aStream);
  34.         void DoWrite(TStream *aStream);
  35.         void DoNeedDiskSpace(long &dataForkBytes);
  36.  
  37.         TGroupList();
  38.         pascal void Initialize();
  39.         void IGroupList(TDocument *doc); // may be nil
  40.         pascal void Free();
  41.     protected:
  42.         TDocument *fDoc;
  43.         
  44.         void DoPostRead();
  45. };
  46.