home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
tolkit45.zip
/
os2tk45
/
som
/
include
/
psma.xh
< prev
next >
Wrap
Text File
|
1999-02-22
|
35KB
|
1,031 lines
/*
* This file was generated by the SOM Compiler.
* FileName: psma.xh.
* Generated using:
* SOM Precompiler somipc: 2.29.1.17
* SOM Emitter emitxh: 2.47
*/
/*
* COMPONENT_NAME: somp
*
* ORIGINS: 27
*
*
* 25H7912 (C) COPYRIGHT International Business Machines Corp. 1992,1994,1996
* All Rights Reserved
* Licensed Materials - Property of IBM
* US Government Users Restricted Rights - Use, duplication or
* disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
*
*/
#ifndef SOM_SOMPPersistentStorageMgr_xh
#define SOM_SOMPPersistentStorageMgr_xh
class SOMPPersistentStorageMgr;
/*
* The Persistent Storage Manager is the primary interface for clients
* of the Persistence Framework to read and write persistent objects
* to/from storage.
*
* Only a single instance of this class exists in the Persistence Framework
* by virtue of the metaclass SOMMSingleInstance.
*/
#define SOMPPersistentStorageMgr_MajorVersion 2
#define SOMPPersistentStorageMgr_MinorVersion 1
/* C++ SOM defs */
#include <somcls.xh>
#include <somcm.xh>
/* C++ parent defs */
#ifndef SOM_SOMObject_xh
#include <somobj.xh>
#endif
/*
* C++ metaclass def
*/
#include <snglicls.xh>
#ifndef SOMPPersistentStorageMgr_API
#define SOMPPersistentStorageMgr_API
/*
* -- The Class API
*/
/*
* Start of bindings for IDL types
*/
class SOMClass;
class SOMObject;
class SOMPIOGroupMgrAbstract;
class SOMPIOGroup;
class SOMPNameSpaceMgr;
class SOMPAscii;
class SOMPKeyedSet;
class SOMPPersistentId;
class SOMPPersistentObject;
#define SOMPPersistentStorageMgr_SOMP_STORING_ON 3 /* 3 */
#define SOMPPersistentStorageMgr_SOMP_STORING_OFF 4 /* 4 */
#define SOMPPersistentStorageMgr_SOMP_RESTORING_ON 5 /* 5 */
#define SOMPPersistentStorageMgr_SOMP_RESTORING_OFF 6 /* 6 */
#ifndef SOM_DONT_USE_SHORT_NAMES
#ifndef SOMTGD_SOMP_STORING_ON
#ifdef SOMP_STORING_ON
#undef SOMP_STORING_ON
#define SOMTGD_SOMP_STORING_ON 1
#else
#define SOMP_STORING_ON SOMPPersistentStorageMgr_SOMP_STORING_ON
#endif /* SOMP_STORING_ON */
#endif /* SOMTGD_SOMP_STORING_ON */
#ifndef SOMTGD_SOMP_STORING_OFF
#ifdef SOMP_STORING_OFF
#undef SOMP_STORING_OFF
#define SOMTGD_SOMP_STORING_OFF 1
#else
#define SOMP_STORING_OFF SOMPPersistentStorageMgr_SOMP_STORING_OFF
#endif /* SOMP_STORING_OFF */
#endif /* SOMTGD_SOMP_STORING_OFF */
#ifndef SOMTGD_SOMP_RESTORING_ON
#ifdef SOMP_RESTORING_ON
#undef SOMP_RESTORING_ON
#define SOMTGD_SOMP_RESTORING_ON 1
#else
#define SOMP_RESTORING_ON SOMPPersistentStorageMgr_SOMP_RESTORING_ON
#endif /* SOMP_RESTORING_ON */
#endif /* SOMTGD_SOMP_RESTORING_ON */
#ifndef SOMTGD_SOMP_RESTORING_OFF
#ifdef SOMP_RESTORING_OFF
#undef SOMP_RESTORING_OFF
#define SOMTGD_SOMP_RESTORING_OFF 1
#else
#define SOMP_RESTORING_OFF SOMPPersistentStorageMgr_SOMP_RESTORING_OFF
#endif /* SOMP_RESTORING_OFF */
#endif /* SOMTGD_SOMP_RESTORING_OFF */
#endif /* SOM_DONT_USE_SHORT_NAMES */
/*
* End of bindings for IDL types.
*/
/* A procedure to create the SOMPPersistentStorageMgr Class */
class SOMMSingleInstance;
SOMEXTERN SOMMSingleInstance * SOMLINK SOMPPersistentStorageMgrNewClass(
integer4 majorVersion,
integer4 minorVersion);
/* The API to the SOMPPersistentStorageMgr class object, and the methods it introduces. */
SOMEXTERN struct SOMPPersistentStorageMgrClassDataStructure {
SOMMSingleInstance *classObject;
somMToken sompStoreObject;
somMToken sompRestoreObject;
somMToken sompStoreObjectWithoutChildren;
somMToken sompRestoreObjectWithoutChildren;
somMToken sompDeleteObject;
somMToken sompObjectExists;
somMToken sompAddObjectToWriteSet;
somMToken sompRestoreObjectToNameSpace;
somMToken sompAddIdToReadSet;
somMToken sompRestoreStableObject;
somMToken sompAddRegisteredChildrenToReadSet;
somMToken sompPrepareWriteSet;
somMToken sompStoreWriteSet;
somMToken sompAddChildIfNecessary;
somMToken sompRemoveIOGroupFromSet;
somMToken sompRestoreObjectFromIdString;
somMToken sompSetPSMFlags;
somMToken sompRemoveObjectFromSet;
somMToken sompNewGroupMgr;
somMToken sompPSMInitThreadData;
somMToken sompPSMUninitThreadData;
somMToken sompPSMGetThreadData;
} SOMDLINK SOMPPersistentStorageMgrClassData;
#define _SOMPPersistentStorageMgr SOMPPersistentStorageMgrClassData.classObject
/* The API to parentMtabs for SOMPPersistentStorageMgr, and the instance data it introduces. */
SOMEXTERN struct SOMPPersistentStorageMgrCClassDataStructure {
somMethodTabs parentMtab;
somDToken instanceDataToken;
} SOMDLINK SOMPPersistentStorageMgrCClassData;
/*
* -- Typedefs for SOMPPersistentStorageMgr Method Procedures
*/
SOMEXTERN {
typedef void SOMLINK somTP_SOMPPersistentStorageMgr_sompStoreObject(SOMPPersistentStorageMgr *somSelf, Environment *ev,
SOMPPersistentObject* thisObject);
typedef somTP_SOMPPersistentStorageMgr_sompStoreObject *somTD_SOMPPersistentStorageMgr_sompStoreObject;
typedef SOMObject* SOMLINK somTP_SOMPPersistentStorageMgr_sompRestoreObject(SOMPPersistentStorageMgr *somSelf, Environment *ev,
SOMPPersistentId* objectID);
typedef somTP_SOMPPersistentStorageMgr_sompRestoreObject *somTD_SOMPPersistentStorageMgr_sompRestoreObject;
typedef void SOMLINK somTP_SOMPPersistentStorageMgr_sompStoreObjectWithoutChildren(SOMPPersistentStorageMgr *somSelf, Environment *ev,
SOMPPersistentObject* thisObject);
typedef somTP_SOMPPersistentStorageMgr_sompStoreObjectWithoutChildren *somTD_SOMPPersistentStorageMgr_sompStoreObjectWithoutChildren;
typedef SOMObject* SOMLINK somTP_SOMPPersistentStorageMgr_sompRestoreObjectWithoutChildren(SOMPPersistentStorageMgr *somSelf, Environment *ev,
SOMPPersistentId* objectID);
typedef somTP_SOMPPersistentStorageMgr_sompRestoreObjectWithoutChildren *somTD_SOMPPersistentStorageMgr_sompRestoreObjectWithoutChildren;
typedef void SOMLINK somTP_SOMPPersistentStorageMgr_sompDeleteObject(SOMPPersistentStorageMgr *somSelf, Environment *ev,
SOMPPersistentId* objectID);
typedef somTP_SOMPPersistentStorageMgr_sompDeleteObject *somTD_SOMPPersistentStorageMgr_sompDeleteObject;
typedef boolean SOMLINK somTP_SOMPPersistentStorageMgr_sompObjectExists(SOMPPersistentStorageMgr *somSelf, Environment *ev,
SOMPPersistentId* objectID);
typedef somTP_SOMPPersistentStorageMgr_sompObjectExists *somTD_SOMPPersistentStorageMgr_sompObjectExists;
typedef void SOMLINK somTP_SOMPPersistentStorageMgr_sompAddObjectToWriteSet(SOMPPersistentStorageMgr *somSelf, Environment *ev,
SOMPPersistentObject* thisObject);
typedef somTP_SOMPPersistentStorageMgr_sompAddObjectToWriteSet *somTD_SOMPPersistentStorageMgr_sompAddObjectToWriteSet;
typedef void SOMLINK somTP_SOMPPersistentStorageMgr_sompAddIdToReadSet(SOMPPersistentStorageMgr *somSelf, Environment *ev,
SOMPPersistentId* objectID);
typedef somTP_SOMPPersistentStorageMgr_sompAddIdToReadSet *somTD_SOMPPersistentStorageMgr_sompAddIdToReadSet;
typedef SOMObject* SOMLINK somTP_SOMPPersistentStorageMgr_sompRestoreObjectFromIdString(SOMPPersistentStorageMgr *somSelf, Environment *ev,
string idString);
typedef somTP_SOMPPersistentStorageMgr_sompRestoreObjectFromIdString *somTD_SOMPPersistentStorageMgr_sompRestoreObjectFromIdString;
/*
* -- Typedefs for Reintroduced Wrapper Methods
*/
typedef void SOMLINK somTP_SOMPPersistentStorageMgr_somDefaultInit(SOMPPersistentStorageMgr *somSelf,
som3InitCtrl* ctrl);
typedef somTP_SOMPPersistentStorageMgr_somDefaultInit *somTD_SOMPPersistentStorageMgr_somDefaultInit;
typedef void SOMLINK somTP_SOMPPersistentStorageMgr_somDestruct(SOMPPersistentStorageMgr *somSelf,
octet doFree,
som3DestructCtrl* ctrl);
typedef somTP_SOMPPersistentStorageMgr_somDestruct *somTD_SOMPPersistentStorageMgr_somDestruct;
typedef void SOMLINK somTP_SOMPPersistentStorageMgr_somDefaultCopyInit(SOMPPersistentStorageMgr *somSelf,
som3InitCtrl* ctrl,
SOMObject* fromObj);
typedef somTP_SOMPPersistentStorageMgr_somDefaultCopyInit *somTD_SOMPPersistentStorageMgr_somDefaultCopyInit;
typedef SOMPPersistentStorageMgr* SOMLINK somTP_SOMPPersistentStorageMgr_somDefaultAssign(SOMPPersistentStorageMgr *somSelf,
som3AssignCtrl* ctrl,
SOMObject* fromObj);
typedef somTP_SOMPPersistentStorageMgr_somDefaultAssign *somTD_SOMPPersistentStorageMgr_somDefaultAssign;
typedef void SOMLINK somTP_SOMPPersistentStorageMgr_somDefaultConstCopyInit(SOMPPersistentStorageMgr *somSelf,
som3InitCtrl* ctrl,
SOMObject* fromObj);
typedef somTP_SOMPPersistentStorageMgr_somDefaultConstCopyInit *somTD_SOMPPersistentStorageMgr_somDefaultConstCopyInit;
typedef void SOMLINK somTP_SOMPPersistentStorageMgr_somDefaultVCopyInit(SOMPPersistentStorageMgr *somSelf,
som3InitCtrl* ctrl,
SOMObject* fromObj);
typedef somTP_SOMPPersistentStorageMgr_somDefaultVCopyInit *somTD_SOMPPersistentStorageMgr_somDefaultVCopyInit;
typedef void SOMLINK somTP_SOMPPersistentStorageMgr_somDefaultConstVCopyInit(SOMPPersistentStorageMgr *somSelf,
som3InitCtrl* ctrl,
SOMObject* fromObj);
typedef somTP_SOMPPersistentStorageMgr_somDefaultConstVCopyInit *somTD_SOMPPersistentStorageMgr_somDefaultConstVCopyInit;
typedef SOMPPersistentStorageMgr* SOMLINK somTP_SOMPPersistentStorageMgr_somDefaultConstAssign(SOMPPersistentStorageMgr *somSelf,
som3AssignCtrl* ctrl,
SOMObject* fromObj);
typedef somTP_SOMPPersistentStorageMgr_somDefaultConstAssign *somTD_SOMPPersistentStorageMgr_somDefaultConstAssign;
typedef SOMPPersistentStorageMgr* SOMLINK somTP_SOMPPersistentStorageMgr_somDefaultVAssign(SOMPPersistentStorageMgr *somSelf,
som3AssignCtrl* ctrl,
SOMObject* fromObj);
typedef somTP_SOMPPersistentStorageMgr_somDefaultVAssign *somTD_SOMPPersistentStorageMgr_somDefaultVAssign;
typedef SOMPPersistentStorageMgr* SOMLINK somTP_SOMPPersistentStorageMgr_somDefaultConstVAssign(SOMPPersistentStorageMgr *somSelf,
som3AssignCtrl* ctrl,
SOMObject* fromObj);
typedef somTP_SOMPPersistentStorageMgr_somDefaultConstVAssign *somTD_SOMPPersistentStorageMgr_somDefaultConstVAssign;
typedef void SOMLINK somTP_SOMPPersistentStorageMgr_somInit(SOMPPersistentStorageMgr *somSelf);
typedef somTP_SOMPPersistentStorageMgr_somInit *somTD_SOMPPersistentStorageMgr_somInit;
typedef void SOMLINK somTP_SOMPPersistentStorageMgr_somFree(SOMPPersistentStorageMgr *somSelf);
typedef somTP_SOMPPersistentStorageMgr_somFree *somTD_SOMPPersistentStorageMgr_somFree;
typedef void SOMLINK somTP_SOMPPersistentStorageMgr_somUninit(SOMPPersistentStorageMgr *somSelf);
typedef somTP_SOMPPersistentStorageMgr_somUninit *somTD_SOMPPersistentStorageMgr_somUninit;
typedef SOMMSingleInstance* SOMLINK somTP_SOMPPersistentStorageMgr_somGetClass(SOMPPersistentStorageMgr *somSelf);
typedef somTP_SOMPPersistentStorageMgr_somGetClass *somTD_SOMPPersistentStorageMgr_somGetClass;
typedef string SOMLINK somTP_SOMPPersistentStorageMgr_somGetClassName(SOMPPersistentStorageMgr *somSelf);
typedef somTP_SOMPPersistentStorageMgr_somGetClassName *somTD_SOMPPersistentStorageMgr_somGetClassName;
typedef long SOMLINK somTP_SOMPPersistentStorageMgr_somGetSize(SOMPPersistentStorageMgr *somSelf);
typedef somTP_SOMPPersistentStorageMgr_somGetSize *somTD_SOMPPersistentStorageMgr_somGetSize;
typedef boolean SOMLINK somTP_SOMPPersistentStorageMgr_somIsA(SOMPPersistentStorageMgr *somSelf,
SOMClass* aClassObj);
typedef somTP_SOMPPersistentStorageMgr_somIsA *somTD_SOMPPersistentStorageMgr_somIsA;
typedef boolean SOMLINK somTP_SOMPPersistentStorageMgr_somIsInstanceOf(SOMPPersistentStorageMgr *somSelf,
SOMClass* aClassObj);
typedef somTP_SOMPPersistentStorageMgr_somIsInstanceOf *somTD_SOMPPersistentStorageMgr_somIsInstanceOf;
typedef boolean SOMLINK somTP_SOMPPersistentStorageMgr_somRespondsTo(SOMPPersistentStorageMgr *somSelf,
somId mId);
typedef somTP_SOMPPersistentStorageMgr_somRespondsTo *somTD_SOMPPersistentStorageMgr_somRespondsTo;
typedef boolean SOMLINK somTP_SOMPPersistentStorageMgr_somDispatch(SOMPPersistentStorageMgr *somSelf,
somToken* retValue,
somId methodId,
va_list ap);
typedef somTP_SOMPPersistentStorageMgr_somDispatch *somTD_SOMPPersistentStorageMgr_somDispatch;
typedef boolean SOMLINK somTP_SOMPPersistentStorageMgr_somClassDispatch(SOMPPersistentStorageMgr *somSelf,
SOMClass* clsObj,
somToken* retValue,
somId methodId,
va_list ap);
typedef somTP_SOMPPersistentStorageMgr_somClassDispatch *somTD_SOMPPersistentStorageMgr_somClassDispatch;
typedef boolean SOMLINK somTP_SOMPPersistentStorageMgr_somCastObj(SOMPPersistentStorageMgr *somSelf,
SOMClass* cls);
typedef somTP_SOMPPersistentStorageMgr_somCastObj *somTD_SOMPPersistentStorageMgr_somCastObj;
typedef boolean SOMLINK somTP_SOMPPersistentStorageMgr_somResetObj(SOMPPersistentStorageMgr *somSelf);
typedef somTP_SOMPPersistentStorageMgr_somResetObj *somTD_SOMPPersistentStorageMgr_somResetObj;
typedef void SOMLINK somTP_SOMPPersistentStorageMgr_somDispatchV(SOMPPersistentStorageMgr *somSelf,
somId methodId,
somId descriptor,
va_list ap);
typedef somTP_SOMPPersistentStorageMgr_somDispatchV *somTD_SOMPPersistentStorageMgr_somDispatchV;
typedef long SOMLINK somTP_SOMPPersistentStorageMgr_somDispatchL(SOMPPersistentStorageMgr *somSelf,
somId methodId,
somId descriptor,
va_list ap);
typedef somTP_SOMPPersistentStorageMgr_somDispatchL *somTD_SOMPPersistentStorageMgr_somDispatchL;
typedef void* SOMLINK somTP_SOMPPersistentStorageMgr_somDispatchA(SOMPPersistentStorageMgr *somSelf,
somId methodId,
somId descriptor,
va_list ap);
typedef somTP_SOMPPersistentStorageMgr_somDispatchA *somTD_SOMPPersistentStorageMgr_somDispatchA;
typedef double SOMLINK somTP_SOMPPersistentStorageMgr_somDispatchD(SOMPPersistentStorageMgr *somSelf,
somId methodId,
somId descriptor,
va_list ap);
typedef somTP_SOMPPersistentStorageMgr_somDispatchD *somTD_SOMPPersistentStorageMgr_somDispatchD;
typedef SOMObject* SOMLINK somTP_SOMPPersistentStorageMgr_somPrintSelf(SOMPPersistentStorageMgr *somSelf);
typedef somTP_SOMPPersistentStorageMgr_somPrintSelf *somTD_SOMPPersistentStorageMgr_somPrintSelf;
typedef void SOMLINK somTP_SOMPPersistentStorageMgr_somDumpSelf(SOMPPersistentStorageMgr *somSelf,
long level);
typedef somTP_SOMPPersistentStorageMgr_somDumpSelf *somTD_SOMPPersistentStorageMgr_somDumpSelf;
typedef void SOMLINK somTP_SOMPPersistentStorageMgr_somDumpSelfInt(SOMPPersistentStorageMgr *somSelf,
long level);
typedef somTP_SOMPPersistentStorageMgr_somDumpSelfInt *somTD_SOMPPersistentStorageMgr_somDumpSelfInt;
}
#endif /* SOMPPersistentStorageMgr_API */
/*
* -- This emitter treats Method Tokens as Thunks by default.
* -- Use the sc modifier "nothunks" to change this default
*/
#undef somresolve_
#define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
/*
* -- The C++ Wrapper Class for SOMPPersistentStorageMgr
*/
class SOMPPersistentStorageMgr : public SOMObject
{
/*
* The Persistent Storage Manager is the primary interface for clients
* of the Persistence Framework to read and write persistent objects
* to/from storage.
*
* Only a single instance of this class exists in the Persistence Framework
* by virtue of the metaclass SOMMSingleInstance.
*/
public:
// SOMPPersistentStorageMgr::new creates the class object if necessary, and then uses somNewNoInit
// to allocate memory and create the object. Initialization is in ctors.
void *operator new(size_t)
{
if (!_SOMPPersistentStorageMgr) SOMPPersistentStorageMgrNewClass(SOMPPersistentStorageMgr_MajorVersion,SOMPPersistentStorageMgr_MinorVersion);
return (void*)
SOM_Resolve(_SOMPPersistentStorageMgr,SOMClass,somNewNoInit)
((SOMClass *)((void*)_SOMPPersistentStorageMgr));
}
// SOMPPersistentStorageMgr::delete uses somDestruct.
void operator delete(void * obj)
{
if (obj && *(void**)obj) {
SOM_Resolve(obj,SOMObject,somFree)
((SOMObject*)obj);
}
}
SOMPPersistentStorageMgr& operator=(SOMPPersistentStorageMgr& fromObj)
{
this->somDefaultAssign(0,(SOMObject*)((void*)&fromObj));
return *this;
}
SOMPPersistentStorageMgr()
{
if (*(void**)this !=
((somParentMtabStructPtr)
(SOMPPersistentStorageMgrCClassData.parentMtab))->mtab)
return;
((SOMObject*)((void*)this))->somDefaultInit(0);
}
SOMPPersistentStorageMgr(SOMPPersistentStorageMgr* fromObj)
{
if (*(void**)this !=
((somParentMtabStructPtr)
(SOMPPersistentStorageMgrCClassData.parentMtab))->mtab)
return;
((SOMObject*)((void*)this))->somDefaultCopyInit(0,((SOMObject*)((void*)fromObj)));
}
#ifdef __IBMCPP__
#pragma info(nocnv,nopar)
#endif
SOMPPersistentStorageMgr(const SOMPPersistentStorageMgr* fromObj)
{
if (*(void**)this !=
((somParentMtabStructPtr)
(SOMPPersistentStorageMgrCClassData.parentMtab))->mtab)
return;
((SOMObject*)((void*)this))->somDefaultConstCopyInit(0,((SOMObject*)((void*)fromObj)));
}
#ifdef __IBMCPP__
#pragma info(restore)
#endif
/* method: sompStoreObject */
void sompStoreObject(Environment *ev,
SOMPPersistentObject* thisObject)
{
/*
* Stores a persistent object and all its persistent children.
*/
SOM_ResolveD(this,SOMPPersistentStorageMgr,SOMPPersistentStorageMgr,sompStoreObject)
(this, ev,thisObject);
}
/* method: sompRestoreObject */
SOMObject* sompRestoreObject(Environment *ev,
SOMPPersistentId* objectID)
{
/*
* Restores an object and its children.
* If error, returns NULL.
*/
return SOM_ResolveD(this,SOMPPersistentStorageMgr,SOMPPersistentStorageMgr,sompRestoreObject)
(this, ev,objectID);
}
/* method: sompStoreObjectWithoutChildren */
void sompStoreObjectWithoutChildren(Environment *ev,
SOMPPersistentObject* thisObject)
{
/*
* Stores a persistent object.
*/
SOM_ResolveD(this,SOMPPersistentStorageMgr,SOMPPersistentStorageMgr,sompStoreObjectWithoutChildren)
(this, ev,thisObject);
}
/* method: sompRestoreObjectWithoutChildren */
SOMObject* sompRestoreObjectWithoutChildren(Environment *ev,
SOMPPersistentId* objectID)
{
/*
* Restores an object to a stable state.
* If error, returns NULL.
*/
return SOM_ResolveD(this,SOMPPersistentStorageMgr,SOMPPersistentStorageMgr,sompRestoreObjectWithoutChildren)
(this, ev,objectID);
}
/* method: sompDeleteObject */
void sompDeleteObject(Environment *ev,
SOMPPersistentId* objectID)
{
/*
* Delete the given persistent object.
*
* If the object is an in-memory object only, it is removed from the Name
* Space Mgr and its in-memory IO Group object and then freed. If the
* object also previously existed in a stored IO Group, then the stored
* IO Group is modified to indicate that the object has been removed.
*/
SOM_ResolveD(this,SOMPPersistentStorageMgr,SOMPPersistentStorageMgr,sompDeleteObject)
(this, ev,objectID);
}
/* method: sompObjectExists */
boolean sompObjectExists(Environment *ev,
SOMPPersistentId* objectID)
{
/*
* Checks to see if object exists. If so, returns TRUE otherwise
* returns FALSE.
*/
return SOM_ResolveD(this,SOMPPersistentStorageMgr,SOMPPersistentStorageMgr,sompObjectExists)
(this, ev,objectID);
}
/* method: sompAddObjectToWriteSet */
void sompAddObjectToWriteSet(Environment *ev,
SOMPPersistentObject* thisObject)
{
/*
* Adds the given object to the set of objects being written by
* sompStoreObject. An error occurs if this method is called
* before sompStoreObject is called.
*
* This method provides a way for an object's encoder/decoder to add
* a persistent object to the set to be written. This is useful for saving
* persistent child objects which were not "registered" with their
* parent object.
*/
SOM_ResolveD(this,SOMPPersistentStorageMgr,SOMPPersistentStorageMgr,sompAddObjectToWriteSet)
(this, ev,thisObject);
}
/* method: sompAddIdToReadSet */
void sompAddIdToReadSet(Environment *ev,
SOMPPersistentId* objectID)
{
/*
* This method adds the given persistent ID to the set of ID's which
* represent the persistent object's to be restored by
* sompRestoreObject. If an error occurs the ID is not added to the read set.
*
* ID's can only be added to the read set following a call to
* sompRestoreObject. It is expected that encoder/decoder
* writers will make use of this method when restoring child objects.
* For example:
* 1) decoder reads object ID in string form
* 2) decoder creates persistent ID object based on string
* 3) decoder calls sompAddIdToReadSet with the persistent ID.
*/
SOM_ResolveD(this,SOMPPersistentStorageMgr,SOMPPersistentStorageMgr,sompAddIdToReadSet)
(this, ev,objectID);
}
/* method: sompRestoreObjectFromIdString */
SOMObject* sompRestoreObjectFromIdString(Environment *ev,
string idString)
{
/*
* Instantiate a persistent ID from the given string and then restore
* the object and its children.
* If error, returns NULL.
*/
return SOM_ResolveD(this,SOMPPersistentStorageMgr,SOMPPersistentStorageMgr,sompRestoreObjectFromIdString)
(this, ev,idString);
}
/*
* Reintroduce inherited methods
*/
/* initializer method: somDefaultInit */
void somDefaultInit(som3InitCtrl* ctrl)
{
/*
* A default initializer for a SOM object. Passing a null ctrl
* indicates to the receiver that its class is the class of the
* object being initialized, whereby the initializer will determine
* an appropriate control structure.
*/
SOM_ResolveD(this,SOMPPersistentStorageMgr,SOMObject,somDefaultInit)
(this,ctrl);
}
/* method: somDestruct */
void somDestruct(octet doFree,
som3DestructCtrl* ctrl)
{
/*
* The default destructor for a SOM object. A nonzero <doFree>
* indicates that the object storage should be freed by the
* object's class (via somDeallocate) after uninitialization.
* As with somDefaultInit, a null ctrl can be passed.
*/
SOM_ResolveD(this,SOMPPersistentStorageMgr,SOMObject,somDestruct)
(this,doFree,ctrl);
}
/* initializer method: somDefaultCopyInit */
void somDefaultCopyInit(som3InitCtrl* ctrl,
SOMObject* fromObj)
{
/*
* A default copy constructor. Use this to make copies of objects for
* calling methods with "by-value" argument semantics.
*/
SOM_ResolveD(this,SOMPPersistentStorageMgr,SOMObject,somDefaultCopyInit)
(this,ctrl,fromObj);
}
/* method: somDefaultAssign */
SOMPPersistentStorageMgr* somDefaultAssign(som3AssignCtrl* ctrl,
SOMObject* fromObj)
{
/*
* A default assignment operator. Use this to "assign" the state of one
* object to another.
*/
return SOM_ResolveD(this,SOMPPersistentStorageMgr,SOMObject,somDefaultAssign)
(this,ctrl,fromObj);
}
/* initializer method: somDefaultConstCopyInit */
void somDefaultConstCopyInit(som3InitCtrl* ctrl,
SOMObject* fromObj)
{
/*
* A default copy constructor that uses a const fromObj.
*/
SOM_ResolveD(this,SOMPPersistentStorageMgr,SOMObject,somDefaultConstCopyInit)
(this,ctrl,fromObj);
}
/* initializer method: somDefaultVCopyInit */
void somDefaultVCopyInit(som3InitCtrl* ctrl,
SOMObject* fromObj)
{
/*
* A default copy constructor that uses a volatile fromObj.
*/
SOM_ResolveD(this,SOMPPersistentStorageMgr,SOMObject,somDefaultVCopyInit)
(this,ctrl,fromObj);
}
/* initializer method: somDefaultConstVCopyInit */
void somDefaultConstVCopyInit(som3InitCtrl* ctrl,
SOMObject* fromObj)
{
/*
* A default copy constructor that uses a const volatile fromObj.
*/
SOM_ResolveD(this,SOMPPersistentStorageMgr,SOMObject,somDefaultConstVCopyInit)
(this,ctrl,fromObj);
}
/* method: somDefaultConstAssign */
SOMPPersistentStorageMgr* somDefaultConstAssign(som3AssignCtrl* ctrl,
SOMObject* fromObj)
{
/*
* A default assignment operator that uses a const fromObj.
*/
return SOM_ResolveD(this,SOMPPersistentStorageMgr,SOMObject,somDefaultConstAssign)
(this,ctrl,fromObj);
}
/* method: somDefaultVAssign */
SOMPPersistentStorageMgr* somDefaultVAssign(som3AssignCtrl* ctrl,
SOMObject* fromObj)
{
/*
* A default assignment operator that uses a volatile fromObj.
*/
return SOM_ResolveD(this,SOMPPersistentStorageMgr,SOMObject,somDefaultVAssign)
(this,ctrl,fromObj);
}
/* method: somDefaultConstVAssign */
SOMPPersistentStorageMgr* somDefaultConstVAssign(som3AssignCtrl* ctrl,
SOMObject* fromObj)
{
/*
* A default assignment operator that uses a const volatile fromObj.
*/
return SOM_ResolveD(this,SOMPPersistentStorageMgr,SOMObject,somDefaultConstVAssign)
(this,ctrl,fromObj);
}
/* method: somInit */
void somInit()
{
/*
* Obsolete but still supported. Override somDefaultInit instead of somInit.
*/
SOM_ResolveD(this,SOMPPersistentStorageMgr,SOMObject,somInit)
(this);
}
/* method: somFree */
void somFree()
{
/*
* Use as directed by framework implementations.
*/
SOM_ResolveD(this,SOMPPersistentStorageMgr,SOMObject,somFree)
(this);
}
/* method: somUninit */
void somUninit()
{
/*
* Obsolete but still supported. Override somDestruct instead of somUninit.
*/
SOM_ResolveD(this,SOMPPersistentStorageMgr,SOMObject,somUninit)
(this);
}
/* method: somGetClass */
SOMMSingleInstance* somGetClass()
{
/*
* Return the receiver's class.
*/
return SOM_ResolveD(this,SOMPPersistentStorageMgr,SOMObject,somGetClass)
(this);
}
/* method: somGetClassName */
string somGetClassName()
{
/*
* Return the name of the receiver's class.
*/
return SOM_ResolveD(this,SOMPPersistentStorageMgr,SOMObject,somGetClassName)
(this);
}
/* method: somGetSize */
long somGetSize()
{
/*
* Return the size of the receiver.
*/
return SOM_ResolveD(this,SOMPPersistentStorageMgr,SOMObject,somGetSize)
(this);
}
/* method: somIsA */
boolean somIsA(SOMClass* aClassObj)
{
/*
* Returns 1 (true) if the receiver responds to methods
* introduced by <aClassObj>, and 0 (false) otherwise.
*/
return SOM_ResolveD(this,SOMPPersistentStorageMgr,SOMObject,somIsA)
(this,aClassObj);
}
/* method: somIsInstanceOf */
boolean somIsInstanceOf(SOMClass* aClassObj)
{
/*
* Returns 1 (true) if the receiver is an instance of
* <aClassObj> and 0 (false) otherwise.
*/
return SOM_ResolveD(this,SOMPPersistentStorageMgr,SOMObject,somIsInstanceOf)
(this,aClassObj);
}
/* method: somRespondsTo */
boolean somRespondsTo(somId mId)
{
/*
* Returns 1 (true) if the indicated method can be invoked
* on the receiver and 0 (false) otherwise.
*/
return SOM_ResolveD(this,SOMPPersistentStorageMgr,SOMObject,somRespondsTo)
(this,mId);
}
/* va_list method: somDispatch */
/*
* This method provides a generic, class-specific dispatch mechanism.
* It accepts as input <retValue> a pointer to the memory area to be
* loaded with the result of dispatching the method indicated by
* <methodId> using the arguments in <ap>. <ap> contains the object
* on which the method is to be invoked as the first argument.
*/
/* the va_list invocation form */
boolean SOMPPersistentStorageMgr_somDispatch(somToken* retValue,
somId methodId,
va_list ap)
{return SOM_ResolveD(this,SOMPPersistentStorageMgr,SOMObject,somDispatch)
(this,retValue,methodId,ap);
}
/* the varargs invocation form */
boolean somDispatch(somToken* retValue,
somId methodId,
...)
{
/*
* This method provides a generic, class-specific dispatch mechanism.
* It accepts as input <retValue> a pointer to the memory area to be
* loaded with the result of dispatching the method indicated by
* <methodId> using the arguments in <ap>. <ap> contains the object
* on which the method is to be invoked as the first argument.
*/
va_list ap;
va_start(ap, methodId);
boolean __somResult =
SOM_ResolveD(this,SOMPPersistentStorageMgr,SOMObject,somDispatch)
(this,retValue,methodId,ap);
va_end(ap);
return __somResult;
}
/* va_list method: somClassDispatch */
/*
* Like somDispatch, but method resolution for static methods is done
* according to the clsObj instance method table.
*/
/* the va_list invocation form */
boolean SOMPPersistentStorageMgr_somClassDispatch(SOMClass* clsObj,
somToken* retValue,
somId methodId,
va_list ap)
{return SOM_ResolveD(this,SOMPPersistentStorageMgr,SOMObject,somClassDispatch)
(this,clsObj,retValue,methodId,ap);
}
/* the varargs invocation form */
boolean somClassDispatch(SOMClass* clsObj,
somToken* retValue,
somId methodId,
...)
{
/*
* Like somDispatch, but method resolution for static methods is done
* according to the clsObj instance method table.
*/
va_list ap;
va_start(ap, methodId);
boolean __somResult =
SOM_ResolveD(this,SOMPPersistentStorageMgr,SOMObject,somClassDispatch)
(this,clsObj,retValue,methodId,ap);
va_end(ap);
return __somResult;
}
/* method: somCastObj */
boolean somCastObj(SOMClass* cls)
{
/*
* cast the receiving object to cls (which must be an ancestor of the
* objects true class. Returns true on success.
*/
return SOM_ResolveD(this,SOMPPersistentStorageMgr,SOMObject,somCastObj)
(this,cls);
}
/* method: somResetObj */
boolean somResetObj()
{
/*
* reset an object to its true class. Returns true always.
*/
return SOM_ResolveD(this,SOMPPersistentStorageMgr,SOMObject,somResetObj)
(this);
}
/* va_list method: somDispatchV */
/*
* Obsolete. Use somDispatch instead.
*/
/* the va_list invocation form */
void SOMPPersistentStorageMgr_somDispatchV(somId methodId,
somId descriptor,
va_list ap)
{ SOM_ResolveD(this,SOMPPersistentStorageMgr,SOMObject,somDispatchV)
(this,methodId,descriptor,ap);
}
/* the varargs invocation form */
void somDispatchV(somId methodId,
somId descriptor,
...)
{
/*
* Obsolete. Use somDispatch instead.
*/
va_list ap;
va_start(ap, descriptor);
SOM_ResolveD(this,SOMPPersistentStorageMgr,SOMObject,somDispatchV)
(this,methodId,descriptor,ap);
va_end(ap);
}
/* va_list method: somDispatchL */
/*
* Obsolete. Use somDispatch instead.
*/
/* the va_list invocation form */
long SOMPPersistentStorageMgr_somDispatchL(somId methodId,
somId descriptor,
va_list ap)
{return SOM_ResolveD(this,SOMPPersistentStorageMgr,SOMObject,somDispatchL)
(this,methodId,descriptor,ap);
}
/* the varargs invocation form */
long somDispatchL(somId methodId,
somId descriptor,
...)
{
/*
* Obsolete. Use somDispatch instead.
*/
va_list ap;
va_start(ap, descriptor);
long __somResult =
SOM_ResolveD(this,SOMPPersistentStorageMgr,SOMObject,somDispatchL)
(this,methodId,descriptor,ap);
va_end(ap);
return __somResult;
}
/* va_list method: somDispatchA */
/*
* Obsolete. Use somDispatch instead.
*/
/* the va_list invocation form */
void* SOMPPersistentStorageMgr_somDispatchA(somId methodId,
somId descriptor,
va_list ap)
{return SOM_ResolveD(this,SOMPPersistentStorageMgr,SOMObject,somDispatchA)
(this,methodId,descriptor,ap);
}
/* the varargs invocation form */
void* somDispatchA(somId methodId,
somId descriptor,
...)
{
/*
* Obsolete. Use somDispatch instead.
*/
va_list ap;
va_start(ap, descriptor);
void* __somResult =
SOM_ResolveD(this,SOMPPersistentStorageMgr,SOMObject,somDispatchA)
(this,methodId,descriptor,ap);
va_end(ap);
return __somResult;
}
/* va_list method: somDispatchD */
/*
* Obsolete. Use somDispatch instead.
*/
/* the va_list invocation form */
double SOMPPersistentStorageMgr_somDispatchD(somId methodId,
somId descriptor,
va_list ap)
{return SOM_ResolveD(this,SOMPPersistentStorageMgr,SOMObject,somDispatchD)
(this,methodId,descriptor,ap);
}
/* the varargs invocation form */
double somDispatchD(somId methodId,
somId descriptor,
...)
{
/*
* Obsolete. Use somDispatch instead.
*/
va_list ap;
va_start(ap, descriptor);
double __somResult =
SOM_ResolveD(this,SOMPPersistentStorageMgr,SOMObject,somDispatchD)
(this,methodId,descriptor,ap);
va_end(ap);
return __somResult;
}
/* method: somPrintSelf */
SOMObject* somPrintSelf()
{
/*
* Uses <SOMOutCharRoutine> to write a brief string with identifying
* information about this object. The default implementation just gives
* the object's class name and its address in memory.
* <self> is returned.
*/
return SOM_ResolveD(this,SOMPPersistentStorageMgr,SOMObject,somPrintSelf)
(this);
}
/* method: somDumpSelf */
void somDumpSelf(long level)
{
/*
* Uses <SOMOutCharRoutine> to write a detailed description of this object
* and its current state.
*
* <level> indicates the nesting level for describing compound objects
* it must be greater than or equal to zero. All lines in the
* description will be preceeded by <2*level> spaces.
*
* This routine only actually writes the data that concerns the object
* as a whole, such as class, and uses <somDumpSelfInt> to describe
* the object's current state. This approach allows readable
* descriptions of compound objects to be constructed.
*
* Generally it is not necessary to override this method, if it is
* overriden it generally must be completely replaced.
*/
SOM_ResolveD(this,SOMPPersistentStorageMgr,SOMObject,somDumpSelf)
(this,level);
}
/* method: somDumpSelfInt */
void somDumpSelfInt(long level)
{
/*
* Uses <SOMOutCharRoutine> to write in the current state of this object.
* Generally this method will need to be overridden. When overriding
* it, begin by calling the parent class form of this method and then
* write in a description of your class's instance data. This will
* result in a description of all the object's instance data going
* from its root ancestor class to its specific class.
*/
SOM_ResolveD(this,SOMPPersistentStorageMgr,SOMObject,somDumpSelfInt)
(this,level);
}
}; /* SOMPPersistentStorageMgr */
#endif /* SOM_SOMPPersistentStorageMgr_xh */