home *** CD-ROM | disk | FTP | other *** search
- /*
- File: NamSpace.h
-
- Contains: XMPAbsNameSpace class definition.
-
- Written by: Nick Pilch
-
- Copyright: ⌐ 1993 by Apple Computer, Inc., all rights reserved.
-
- Change History (most recent first):
-
- <26> 2/7/94 JA Moved XMPFileRefNum type to PlfmType.h.
- <25> 1/29/94 NP Init changes.
- <24> 1/18/94 CG Added valueLen parameter to GetValue().
- <23> 1/14/94 CG Iterator and NameSpaceManager break out.
- <22> 12/15/93 Té more InitObject changes, remove
- Initialize() method
- <21> 11/15/93 NP Changed XMPSymbols to XMPNameSpaceManager.
- <20> 11/8/93 NP Added WriteToStorage and ReadFromStorage.
- <19> 11/8/93 NP Changed signature of WriteToFile and
- ReadFromFile and added type XMPFileRefNum.
- <18> 11/5/93 NP Added WriteToFile and ReadFromFile.
- <17> 10/28/93 NP Comment out obsoleted parts of API. Will
- remove later.
- <16> 10/22/93 NP Removed valueLength parameter for XMPSLong
- and XMPOSType methods-it was never used.
- <15> 10/5/93 CG Added Exists method to XMPAbsNameSpace.
- <14> 9/21/93 CG Added valuelength parameter to methods.
- <13> 7/21/93 NP Added documentation.
- <12> 7/2/93 NP Abstract/Concrete breakout.
- <11> 6/22/93 NP Reverted iterator semantics to orginal.
- Added comments.
- <10> 6/14/93 NP Implemented inheritance.
- <9> 6/4/93 NP Changed iterator semantics. Fixed comments.
- <8> 6/2/93 NP Interface and comment changes as per
- discussion with Kurt.
- <7> 5/18/93 NP Updated HasNameSpace.
- <6> 4/28/93 NP File name changes.
- <5> 4/28/93 NP Added Initialize and Purge.
- <4> 4/23/93 NP XMPHashTable -> XMPAEHashTable.
- <3> 4/23/93 NP Added Initialize and Purge.
- <2> 4/23/93 NP Changed XMPAbsValueIterator::IsComplete to
- XMPAbsValueIterator::IsNotComplete.
- <1> 4/13/93 NP first checked in
-
- To Do:
- */
-
- #ifndef _NAMSPACE_
- #define _NAMSPACE_
-
-
- #ifndef _XMPOBJ_
- #include "XMPObj.h"
- #endif
-
- //==============================================================================
- // Theory of Operation
- //==============================================================================
-
- /*
- This file contains an interface for creating name spaces and registering
- symbols within those spaces.
- */
-
- //==============================================================================
- // Scalar Types
- //==============================================================================
-
- enum XMPNSTypeSpec
- {
- kXMPNSTypeISOStr,
- kXMPNSTypeOSType,
- kXMPNSTypeSLong
- };
-
- //==============================================================================
- // Classes defined in this interface
- //==============================================================================
-
- class XMPAbsNameSpace;
- class XMPNameSpace;
- class XMPStorageUnitView;
-
-
- //==============================================================================
- // XMPAbsNameSpace
- //==============================================================================
-
- class XMPAbsNameSpace : public XMPObject
- {
- public:
-
- XMPVMethod XMPISOStr GetName()
- = 0;
-
- // Don't modify the return value. Copy instead if you need to modify.
-
- // kXMPErrWrongType is throw for any of the following nine functions if the
- // the parameter type does not match the type that the XMPAbsNameSpace was
- // initialized with.
-
- XMPVMethod void Register(XMPISOStr key, XMPPtr value, XMPULong valueLength)
- = 0;
- // XMPVMethod void Register(XMPOSType key, XMPPtr value)
- // = 0;
- // XMPVMethod void Register(XMPSLong key, XMPPtr value)
- // = 0;
-
- // register value under key
-
- XMPVMethod void Unregister(XMPISOStr key)
- = 0;
- // XMPVMethod void Unregister(XMPOSType key)
- // = 0;
- // XMPVMethod void Unregister(XMPSLong key)
- // = 0;
-
- // unregister value registered under key
-
- XMPVMethod XMPBoolean GetValue(XMPISOStr key, XMPPtr* value, XMPULong* valLen)
- = 0;
- // XMPVMethod XMPBoolean GetValue(XMPOSType key , XMPPtr* value)
- // = 0;
- // XMPVMethod XMPBoolean GetValue(XMPSLong key , XMPPtr* value)
- // = 0;
-
- // find value registered under key. kXMPErrKeyDoesNotExist is thrown if
- // key was never registered.
-
- XMPVMethod XMPBoolean Exists(XMPISOStr key)
- = 0;
- // XMPVMethod XMPBoolean Exists(XMPOSType key)
- // = 0;
- // XMPVMethod XMPBoolean Exists(XMPSLong key)
- // = 0;
-
- // check for existance of value registered under key.
-
- XMPVMethod void WriteToFile(XMPFileRefNum file)
- = 0;
-
- XMPVMethod void ReadFromFile(XMPFileRefNum file)
- = 0;
-
- XMPVMethod void WriteToStorage(XMPStorageUnitView* view)
- = 0;
-
- XMPVMethod void ReadFromStorage(XMPStorageUnitView* view)
- = 0;
-
- XMPVMethod XMPSize Purge(XMPSize size)
- = 0;
-
- public: // private by convention
-
- XMPAbsNameSpace() {}
- XMPVMethod ~XMPAbsNameSpace() {}
- };
-
- #ifndef _NAMSPACM_
- #include "NamSpacM.h"
- #endif
-
- #endif // _NAMSPACE_
-