home *** CD-ROM | disk | FTP | other *** search
- /*
- File: TypeSet.h
-
- Contains: Class definition for TypeSet.
-
- Written by: Vincent Lo
-
- Copyright: ⌐ 1993 by Apple Computer, Inc., all rights reserved.
-
- Change History (most recent first):
-
- <4> 2/15/94 CG #1143680 - changed fSet from a LinkList* to
- an OrderedCollection* which can be
- allocated on a specified heap.
- <3> 2/15/94 CC Bug #1142945 - Standardize method names.
- <2> 2/9/94 Té made destructor explicitly virtual to
- pacify ASLM
- <1> 2/4/94 VL first checked in
-
- To Do:
-
- */
-
- #ifndef _TYPESET_
- #define _TYPESET_
-
- #ifndef _XMPTYPES_
- #include "XMPTypes.h"
- #endif
-
- //=====================================================================================
- // Classes defined in this interface
- //=====================================================================================
- class XMPTypeSet;
-
- //=====================================================================================
- // Classes used by this interface
- //=====================================================================================
- //class LinkedList;
- class OrderedCollection;
-
- //=====================================================================================
- // Class XMPTypeSet
- //=====================================================================================
-
- #define kXMPTypeSetID "appl:xmptypeset$class,1.0.0"
-
- class XMPTypeSet
- {
- friend class XMPTypeSetIterator;
-
- public:
-
- XMPTypeSet();
- XMPTypeSet(XMPHeap where);
-
- virtual ~XMPTypeSet();
-
- XMPMethod void Add(XMPType type);
-
- // Adds a type to the end of the set, creating a copy of the argument in the set.
-
- XMPMethod void Remove(XMPType type);
-
- // Removes a type from a set. Does nothing if the argument type is not present.
-
- XMPMethod XMPBoolean Contains(XMPType type);
-
- // Returns true if the set contains the specified type.
- // Otherwise, returns false.
-
- XMPMethod XMPULong Count();
-
- XMPVMethod XMPTypeSetIterator* CreateTypeSetIterator();
-
- // Returns an iterator for the set, which can be used to retrieve types
- // from the set in order.
-
- private:
-
- OrderedCollection* fSet;
- XMPHeap fHeap;
- };
-
- #endif // _TYPESET_
-