
/*
 * This file was generated by the SOM Compiler.
 * FileName: po.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_SOMPPersistentObject_xh
#define SOM_SOMPPersistentObject_xh

class SOMPPersistentObject;

/*
 *                    PERSISTENT OBJECT METACLASS
 * 
 */

#define SOMPPersistentObject_MajorVersion 2
#define SOMPPersistentObject_MinorVersion 1

/* C++ SOM defs */
#include <somcls.xh>
#include <somcm.xh>

/* C++ parent defs */
#ifndef SOM_SOMObject_xh
#include <somobj.xh>
#endif

#ifndef SOMPPersistentObject_API
#define SOMPPersistentObject_API
/*
 * -- The Class API
 */

/*
 * Start of bindings for IDL types
 */

class SOMClass;
class SOMObject;
class SOMPIdAssigner;
class SOMPEncoderDecoderAbstract;
class SOMPIOGroup;
class SOMPPersistentId;
class M_SOMPPersistentObject;
#define SOMPPersistentObject_SOMP_STATE_UNDEFINED 32768 /* 0x8000 */
#define SOMPPersistentObject_SOMP_STATE_UNSTABLE 16384 /* 0x4000 */
#define SOMPPersistentObject_SOMP_STATE_STABLE 4096 /* 0x1000 */
#define SOMPPersistentObject_SOMP_STATE_DIRTY 2048 /* 0x0800 */
#define SOMPPersistentObject_SOMP_STATE_COMPACT 1024 /* 0x0400 */

#ifndef SOM_DONT_USE_SHORT_NAMES
#ifndef SOMTGD_SOMP_STATE_UNDEFINED
    #ifdef SOMP_STATE_UNDEFINED
        #undef SOMP_STATE_UNDEFINED
        #define SOMTGD_SOMP_STATE_UNDEFINED 1
    #else
        #define SOMP_STATE_UNDEFINED SOMPPersistentObject_SOMP_STATE_UNDEFINED
    #endif /* SOMP_STATE_UNDEFINED */
#endif /* SOMTGD_SOMP_STATE_UNDEFINED */
#ifndef SOMTGD_SOMP_STATE_UNSTABLE
    #ifdef SOMP_STATE_UNSTABLE
        #undef SOMP_STATE_UNSTABLE
        #define SOMTGD_SOMP_STATE_UNSTABLE 1
    #else
        #define SOMP_STATE_UNSTABLE SOMPPersistentObject_SOMP_STATE_UNSTABLE
    #endif /* SOMP_STATE_UNSTABLE */
#endif /* SOMTGD_SOMP_STATE_UNSTABLE */
#ifndef SOMTGD_SOMP_STATE_STABLE
    #ifdef SOMP_STATE_STABLE
        #undef SOMP_STATE_STABLE
        #define SOMTGD_SOMP_STATE_STABLE 1
    #else
        #define SOMP_STATE_STABLE SOMPPersistentObject_SOMP_STATE_STABLE
    #endif /* SOMP_STATE_STABLE */
#endif /* SOMTGD_SOMP_STATE_STABLE */
#ifndef SOMTGD_SOMP_STATE_DIRTY
    #ifdef SOMP_STATE_DIRTY
        #undef SOMP_STATE_DIRTY
        #define SOMTGD_SOMP_STATE_DIRTY 1
    #else
        #define SOMP_STATE_DIRTY SOMPPersistentObject_SOMP_STATE_DIRTY
    #endif /* SOMP_STATE_DIRTY */
#endif /* SOMTGD_SOMP_STATE_DIRTY */
#ifndef SOMTGD_SOMP_STATE_COMPACT
    #ifdef SOMP_STATE_COMPACT
        #undef SOMP_STATE_COMPACT
        #define SOMTGD_SOMP_STATE_COMPACT 1
    #else
        #define SOMP_STATE_COMPACT SOMPPersistentObject_SOMP_STATE_COMPACT
    #endif /* SOMP_STATE_COMPACT */
#endif /* SOMTGD_SOMP_STATE_COMPACT */
#endif /* SOM_DONT_USE_SHORT_NAMES */

/*
 * End of bindings for IDL types.
 */

/* A procedure to create the SOMPPersistentObject Class */
class M_SOMPPersistentObject;
SOMEXTERN M_SOMPPersistentObject * SOMLINK SOMPPersistentObjectNewClass(
		integer4 majorVersion,
		integer4 minorVersion);

/* The API to the SOMPPersistentObject class object, and the methods it introduces. */
SOMEXTERN struct SOMPPersistentObjectClassDataStructure {
	M_SOMPPersistentObject *classObject;
	somMToken sompInitNextAvail;
	somMToken sompInitNearObject;
	somMToken sompInitGivenId;
	somMToken sompGetPersistentId;
	somMToken sompGetPersistentIdString;
	somMToken sompSetEncoderDecoderName;
	somMToken sompGetEncoderDecoderName;
	somMToken sompRegisterPersistentPointer;
	somMToken sompUnRegisterPersistentPointer;
	somMToken sompPersistentPointerCount;
	somMToken sompGetNthPersistentPointer;
	somMToken sompEquals;
	somMToken sompPassivate;
	somMToken sompActivated;
	somMToken sompGetRelativeIdString;
	somMToken sompUnInitIOGroup;
	somMToken sompSetDirty;
	somMToken sompMarkForCompaction;
	somMToken sompSetState;
	somMToken sompCheckState;
	somMToken sompClearState;
	somMToken sompInitIOGroup;
	somMToken sompGetEncoderDecoder;
	somMToken sompFreeEncoderDecoder;
	somMToken sompGetIOGroup;
	somMToken sompSetIOGroup;
	somMToken sompGetStoredLength;
	somMToken sompSetStoredLength;
	somMToken sompGetMIOffset;
	somMToken sompSetMIOffset;
	somMToken sompIsDirty;
	somMToken sompGetDirty;
} SOMDLINK SOMPPersistentObjectClassData;
#define _SOMPPersistentObject SOMPPersistentObjectClassData.classObject

/* The API to parentMtabs for SOMPPersistentObject, and the instance data it introduces. */
SOMEXTERN struct SOMPPersistentObjectCClassDataStructure {
	somMethodTabs parentMtab;
	somDToken              instanceDataToken;
} SOMDLINK SOMPPersistentObjectCClassData;

/*
 * -- Typedefs for SOMPPersistentObject Method Procedures
 */
SOMEXTERN {
typedef void   SOMLINK somTP_SOMPPersistentObject_sompInitNextAvail(SOMPPersistentObject *somSelf, Environment *ev, 
		SOMPIdAssigner* thisAssigner);
typedef somTP_SOMPPersistentObject_sompInitNextAvail *somTD_SOMPPersistentObject_sompInitNextAvail;
typedef void   SOMLINK somTP_SOMPPersistentObject_sompInitNearObject(SOMPPersistentObject *somSelf, Environment *ev, 
		SOMPPersistentObject* nearObject);
typedef somTP_SOMPPersistentObject_sompInitNearObject *somTD_SOMPPersistentObject_sompInitNearObject;
typedef void   SOMLINK somTP_SOMPPersistentObject_sompInitGivenId(SOMPPersistentObject *somSelf, Environment *ev, 
		SOMPPersistentId* thisId);
typedef somTP_SOMPPersistentObject_sompInitGivenId *somTD_SOMPPersistentObject_sompInitGivenId;
typedef SOMPPersistentId*   SOMLINK somTP_SOMPPersistentObject_sompGetPersistentId(SOMPPersistentObject *somSelf, Environment *ev);
typedef somTP_SOMPPersistentObject_sompGetPersistentId *somTD_SOMPPersistentObject_sompGetPersistentId;
typedef string   SOMLINK somTP_SOMPPersistentObject_sompGetPersistentIdString(SOMPPersistentObject *somSelf, Environment *ev, 
		string outBuff);
typedef somTP_SOMPPersistentObject_sompGetPersistentIdString *somTD_SOMPPersistentObject_sompGetPersistentIdString;
typedef void   SOMLINK somTP_SOMPPersistentObject_sompSetEncoderDecoderName(SOMPPersistentObject *somSelf, Environment *ev, 
		string myName);
typedef somTP_SOMPPersistentObject_sompSetEncoderDecoderName *somTD_SOMPPersistentObject_sompSetEncoderDecoderName;
typedef string   SOMLINK somTP_SOMPPersistentObject_sompGetEncoderDecoderName(SOMPPersistentObject *somSelf, Environment *ev);
typedef somTP_SOMPPersistentObject_sompGetEncoderDecoderName *somTD_SOMPPersistentObject_sompGetEncoderDecoderName;
typedef boolean   SOMLINK somTP_SOMPPersistentObject_sompEquals(SOMPPersistentObject *somSelf, Environment *ev, 
		SOMPPersistentId* otherId);
typedef somTP_SOMPPersistentObject_sompEquals *somTD_SOMPPersistentObject_sompEquals;
typedef void   SOMLINK somTP_SOMPPersistentObject_sompPassivate(SOMPPersistentObject *somSelf, Environment *ev);
typedef somTP_SOMPPersistentObject_sompPassivate *somTD_SOMPPersistentObject_sompPassivate;
typedef void   SOMLINK somTP_SOMPPersistentObject_sompActivated(SOMPPersistentObject *somSelf, Environment *ev);
typedef somTP_SOMPPersistentObject_sompActivated *somTD_SOMPPersistentObject_sompActivated;
typedef string   SOMLINK somTP_SOMPPersistentObject_sompGetRelativeIdString(SOMPPersistentObject *somSelf, Environment *ev, 
		SOMObject* ifNearThisObject, 
		string relativeIdString);
typedef somTP_SOMPPersistentObject_sompGetRelativeIdString *somTD_SOMPPersistentObject_sompGetRelativeIdString;
typedef SOMPIOGroup*   SOMLINK somTP_SOMPPersistentObject_sompInitIOGroup(SOMPPersistentObject *somSelf, Environment *ev, 
		SOMObject* nearPersistentObj);
typedef somTP_SOMPPersistentObject_sompInitIOGroup *somTD_SOMPPersistentObject_sompInitIOGroup;
typedef void   SOMLINK somTP_SOMPPersistentObject_sompSetDirty(SOMPPersistentObject *somSelf, Environment *ev);
typedef somTP_SOMPPersistentObject_sompSetDirty *somTD_SOMPPersistentObject_sompSetDirty;
typedef boolean   SOMLINK somTP_SOMPPersistentObject_sompIsDirty(SOMPPersistentObject *somSelf, Environment *ev);
typedef somTP_SOMPPersistentObject_sompIsDirty *somTD_SOMPPersistentObject_sompIsDirty;
typedef boolean   SOMLINK somTP_SOMPPersistentObject_sompGetDirty(SOMPPersistentObject *somSelf, Environment *ev);
typedef somTP_SOMPPersistentObject_sompGetDirty *somTD_SOMPPersistentObject_sompGetDirty;
typedef void   SOMLINK somTP_SOMPPersistentObject_sompMarkForCompaction(SOMPPersistentObject *somSelf, Environment *ev);
typedef somTP_SOMPPersistentObject_sompMarkForCompaction *somTD_SOMPPersistentObject_sompMarkForCompaction;
typedef void   SOMLINK somTP_SOMPPersistentObject_sompSetState(SOMPPersistentObject *somSelf, Environment *ev, 
		unsigned short state);
typedef somTP_SOMPPersistentObject_sompSetState *somTD_SOMPPersistentObject_sompSetState;
typedef boolean   SOMLINK somTP_SOMPPersistentObject_sompCheckState(SOMPPersistentObject *somSelf, Environment *ev, 
		unsigned short state);
typedef somTP_SOMPPersistentObject_sompCheckState *somTD_SOMPPersistentObject_sompCheckState;
typedef void   SOMLINK somTP_SOMPPersistentObject_sompClearState(SOMPPersistentObject *somSelf, Environment *ev, 
		unsigned short state);
typedef somTP_SOMPPersistentObject_sompClearState *somTD_SOMPPersistentObject_sompClearState;
typedef SOMPEncoderDecoderAbstract*   SOMLINK somTP_SOMPPersistentObject_sompGetEncoderDecoder(SOMPPersistentObject *somSelf, Environment *ev);
typedef somTP_SOMPPersistentObject_sompGetEncoderDecoder *somTD_SOMPPersistentObject_sompGetEncoderDecoder;
typedef void   SOMLINK somTP_SOMPPersistentObject_sompFreeEncoderDecoder(SOMPPersistentObject *somSelf, Environment *ev);
typedef somTP_SOMPPersistentObject_sompFreeEncoderDecoder *somTD_SOMPPersistentObject_sompFreeEncoderDecoder;
typedef SOMPIOGroup*   SOMLINK somTP_SOMPPersistentObject_sompGetIOGroup(SOMPPersistentObject *somSelf, Environment *ev);
typedef somTP_SOMPPersistentObject_sompGetIOGroup *somTD_SOMPPersistentObject_sompGetIOGroup;

/*
 * -- Typedefs for Reintroduced Wrapper Methods
 */
typedef void   SOMLINK somTP_SOMPPersistentObject_somDefaultInit(SOMPPersistentObject *somSelf, 
		som3InitCtrl* ctrl);
typedef somTP_SOMPPersistentObject_somDefaultInit *somTD_SOMPPersistentObject_somDefaultInit;
typedef void   SOMLINK somTP_SOMPPersistentObject_somDestruct(SOMPPersistentObject *somSelf, 
		octet doFree, 
		som3DestructCtrl* ctrl);
typedef somTP_SOMPPersistentObject_somDestruct *somTD_SOMPPersistentObject_somDestruct;
typedef void   SOMLINK somTP_SOMPPersistentObject_somDefaultCopyInit(SOMPPersistentObject *somSelf, 
		som3InitCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_SOMPPersistentObject_somDefaultCopyInit *somTD_SOMPPersistentObject_somDefaultCopyInit;
typedef SOMPPersistentObject*   SOMLINK somTP_SOMPPersistentObject_somDefaultAssign(SOMPPersistentObject *somSelf, 
		som3AssignCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_SOMPPersistentObject_somDefaultAssign *somTD_SOMPPersistentObject_somDefaultAssign;
typedef void   SOMLINK somTP_SOMPPersistentObject_somDefaultConstCopyInit(SOMPPersistentObject *somSelf, 
		som3InitCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_SOMPPersistentObject_somDefaultConstCopyInit *somTD_SOMPPersistentObject_somDefaultConstCopyInit;
typedef void   SOMLINK somTP_SOMPPersistentObject_somDefaultVCopyInit(SOMPPersistentObject *somSelf, 
		som3InitCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_SOMPPersistentObject_somDefaultVCopyInit *somTD_SOMPPersistentObject_somDefaultVCopyInit;
typedef void   SOMLINK somTP_SOMPPersistentObject_somDefaultConstVCopyInit(SOMPPersistentObject *somSelf, 
		som3InitCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_SOMPPersistentObject_somDefaultConstVCopyInit *somTD_SOMPPersistentObject_somDefaultConstVCopyInit;
typedef SOMPPersistentObject*   SOMLINK somTP_SOMPPersistentObject_somDefaultConstAssign(SOMPPersistentObject *somSelf, 
		som3AssignCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_SOMPPersistentObject_somDefaultConstAssign *somTD_SOMPPersistentObject_somDefaultConstAssign;
typedef SOMPPersistentObject*   SOMLINK somTP_SOMPPersistentObject_somDefaultVAssign(SOMPPersistentObject *somSelf, 
		som3AssignCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_SOMPPersistentObject_somDefaultVAssign *somTD_SOMPPersistentObject_somDefaultVAssign;
typedef SOMPPersistentObject*   SOMLINK somTP_SOMPPersistentObject_somDefaultConstVAssign(SOMPPersistentObject *somSelf, 
		som3AssignCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_SOMPPersistentObject_somDefaultConstVAssign *somTD_SOMPPersistentObject_somDefaultConstVAssign;
typedef void   SOMLINK somTP_SOMPPersistentObject_somInit(SOMPPersistentObject *somSelf);
typedef somTP_SOMPPersistentObject_somInit *somTD_SOMPPersistentObject_somInit;
typedef void   SOMLINK somTP_SOMPPersistentObject_somFree(SOMPPersistentObject *somSelf);
typedef somTP_SOMPPersistentObject_somFree *somTD_SOMPPersistentObject_somFree;
typedef void   SOMLINK somTP_SOMPPersistentObject_somUninit(SOMPPersistentObject *somSelf);
typedef somTP_SOMPPersistentObject_somUninit *somTD_SOMPPersistentObject_somUninit;
typedef M_SOMPPersistentObject*   SOMLINK somTP_SOMPPersistentObject_somGetClass(SOMPPersistentObject *somSelf);
typedef somTP_SOMPPersistentObject_somGetClass *somTD_SOMPPersistentObject_somGetClass;
typedef string   SOMLINK somTP_SOMPPersistentObject_somGetClassName(SOMPPersistentObject *somSelf);
typedef somTP_SOMPPersistentObject_somGetClassName *somTD_SOMPPersistentObject_somGetClassName;
typedef long   SOMLINK somTP_SOMPPersistentObject_somGetSize(SOMPPersistentObject *somSelf);
typedef somTP_SOMPPersistentObject_somGetSize *somTD_SOMPPersistentObject_somGetSize;
typedef boolean   SOMLINK somTP_SOMPPersistentObject_somIsA(SOMPPersistentObject *somSelf, 
		SOMClass* aClassObj);
typedef somTP_SOMPPersistentObject_somIsA *somTD_SOMPPersistentObject_somIsA;
typedef boolean   SOMLINK somTP_SOMPPersistentObject_somIsInstanceOf(SOMPPersistentObject *somSelf, 
		SOMClass* aClassObj);
typedef somTP_SOMPPersistentObject_somIsInstanceOf *somTD_SOMPPersistentObject_somIsInstanceOf;
typedef boolean   SOMLINK somTP_SOMPPersistentObject_somRespondsTo(SOMPPersistentObject *somSelf, 
		somId mId);
typedef somTP_SOMPPersistentObject_somRespondsTo *somTD_SOMPPersistentObject_somRespondsTo;
typedef boolean   SOMLINK somTP_SOMPPersistentObject_somDispatch(SOMPPersistentObject *somSelf, 
		somToken* retValue, 
		somId methodId, 
		va_list ap);
typedef somTP_SOMPPersistentObject_somDispatch *somTD_SOMPPersistentObject_somDispatch;
typedef boolean   SOMLINK somTP_SOMPPersistentObject_somClassDispatch(SOMPPersistentObject *somSelf, 
		SOMClass* clsObj, 
		somToken* retValue, 
		somId methodId, 
		va_list ap);
typedef somTP_SOMPPersistentObject_somClassDispatch *somTD_SOMPPersistentObject_somClassDispatch;
typedef boolean   SOMLINK somTP_SOMPPersistentObject_somCastObj(SOMPPersistentObject *somSelf, 
		SOMClass* cls);
typedef somTP_SOMPPersistentObject_somCastObj *somTD_SOMPPersistentObject_somCastObj;
typedef boolean   SOMLINK somTP_SOMPPersistentObject_somResetObj(SOMPPersistentObject *somSelf);
typedef somTP_SOMPPersistentObject_somResetObj *somTD_SOMPPersistentObject_somResetObj;
typedef void   SOMLINK somTP_SOMPPersistentObject_somDispatchV(SOMPPersistentObject *somSelf, 
		somId methodId, 
		somId descriptor, 
		va_list ap);
typedef somTP_SOMPPersistentObject_somDispatchV *somTD_SOMPPersistentObject_somDispatchV;
typedef long   SOMLINK somTP_SOMPPersistentObject_somDispatchL(SOMPPersistentObject *somSelf, 
		somId methodId, 
		somId descriptor, 
		va_list ap);
typedef somTP_SOMPPersistentObject_somDispatchL *somTD_SOMPPersistentObject_somDispatchL;
typedef void*   SOMLINK somTP_SOMPPersistentObject_somDispatchA(SOMPPersistentObject *somSelf, 
		somId methodId, 
		somId descriptor, 
		va_list ap);
typedef somTP_SOMPPersistentObject_somDispatchA *somTD_SOMPPersistentObject_somDispatchA;
typedef double   SOMLINK somTP_SOMPPersistentObject_somDispatchD(SOMPPersistentObject *somSelf, 
		somId methodId, 
		somId descriptor, 
		va_list ap);
typedef somTP_SOMPPersistentObject_somDispatchD *somTD_SOMPPersistentObject_somDispatchD;
typedef SOMObject*   SOMLINK somTP_SOMPPersistentObject_somPrintSelf(SOMPPersistentObject *somSelf);
typedef somTP_SOMPPersistentObject_somPrintSelf *somTD_SOMPPersistentObject_somPrintSelf;
typedef void   SOMLINK somTP_SOMPPersistentObject_somDumpSelf(SOMPPersistentObject *somSelf, 
		long level);
typedef somTP_SOMPPersistentObject_somDumpSelf *somTD_SOMPPersistentObject_somDumpSelf;
typedef void   SOMLINK somTP_SOMPPersistentObject_somDumpSelfInt(SOMPPersistentObject *somSelf, 
		long level);
typedef somTP_SOMPPersistentObject_somDumpSelfInt *somTD_SOMPPersistentObject_somDumpSelfInt;
}

#endif /* SOMPPersistentObject_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 SOMPPersistentObject
 */
class SOMPPersistentObject : public SOMObject
{
/*
 *                    PERSISTENT OBJECT METACLASS
 * 
 */
public:

// SOMPPersistentObject::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 (!_SOMPPersistentObject) SOMPPersistentObjectNewClass(SOMPPersistentObject_MajorVersion,SOMPPersistentObject_MinorVersion);
   return (void*)
      SOM_Resolve(_SOMPPersistentObject,SOMClass,somNewNoInit)
         ((SOMClass *)((void*)_SOMPPersistentObject));
}

// SOMPPersistentObject::delete uses somDestruct.
void operator delete(void * obj)
{
   if (obj && *(void**)obj) {
      SOM_Resolve(obj,SOMObject,somFree)
         ((SOMObject*)obj);
   }
}

SOMPPersistentObject& operator=(SOMPPersistentObject& fromObj)
{
   this->somDefaultAssign(0,(SOMObject*)((void*)&fromObj));
   return *this;
}

SOMPPersistentObject()
{
   if (*(void**)this != 
       ((somParentMtabStructPtr)
        (SOMPPersistentObjectCClassData.parentMtab))->mtab)
      return;
   ((SOMObject*)((void*)this))->somDefaultInit(0);
}

SOMPPersistentObject(SOMPPersistentObject* fromObj)
{
   if (*(void**)this != 
       ((somParentMtabStructPtr)
        (SOMPPersistentObjectCClassData.parentMtab))->mtab)
      return;
   ((SOMObject*)((void*)this))->somDefaultCopyInit(0,((SOMObject*)((void*)fromObj)));
}

#ifdef __IBMCPP__
#pragma info(nocnv,nopar)
#endif
SOMPPersistentObject(const SOMPPersistentObject* fromObj)
{
   if (*(void**)this != 
       ((somParentMtabStructPtr)
        (SOMPPersistentObjectCClassData.parentMtab))->mtab)
      return;
   ((SOMObject*)((void*)this))->somDefaultConstCopyInit(0,((SOMObject*)((void*)fromObj)));
}
#ifdef __IBMCPP__
#pragma info(restore)
#endif


/* method: sompInitNextAvail */
void   sompInitNextAvail(Environment *ev, 
		SOMPIdAssigner* thisAssigner)
{
   SOM_ResolveD(this,SOMPPersistentObject,SOMPPersistentObject,sompInitNextAvail)
	(this, ev,thisAssigner);
}


/* method: sompInitNearObject */
void   sompInitNearObject(Environment *ev, 
		SOMPPersistentObject* nearObject)
{
   SOM_ResolveD(this,SOMPPersistentObject,SOMPPersistentObject,sompInitNearObject)
	(this, ev,nearObject);
}


/* method: sompInitGivenId */
void   sompInitGivenId(Environment *ev, 
		SOMPPersistentId* thisId)
{
   SOM_ResolveD(this,SOMPPersistentObject,SOMPPersistentObject,sompInitGivenId)
	(this, ev,thisId);
}


/* method: sompGetPersistentId */
SOMPPersistentId*   sompGetPersistentId(Environment *ev)
{
   return SOM_ResolveD(this,SOMPPersistentObject,SOMPPersistentObject,sompGetPersistentId)
	(this, ev);
}


/* method: sompGetPersistentIdString */
string   sompGetPersistentIdString(Environment *ev, 
		string outBuff)
{
/*
 *  Get persistent ID. Returns string representation of persistent ID.
 *  Puts the fully-qualified persistent object ID in the caller-supplied
 *  buffer.  (The caller must allocate the memory for the buffer, and
 *  is also responsible for freeing it when appropriate.)
 */
   return SOM_ResolveD(this,SOMPPersistentObject,SOMPPersistentObject,sompGetPersistentIdString)
	(this, ev,outBuff);
}


/* method: sompSetEncoderDecoderName */
void   sompSetEncoderDecoderName(Environment *ev, 
		string myName)
{
/*
 *  Set the class name of the EncoderDecoder.
 *  If this method is not called, the encoder/decoder class name is the
 *  one returned by the class object.
 */
   SOM_ResolveD(this,SOMPPersistentObject,SOMPPersistentObject,sompSetEncoderDecoderName)
	(this, ev,myName);
}


/* method: sompGetEncoderDecoderName */
string   sompGetEncoderDecoderName(Environment *ev)
{
/*
 *  Get the class name of the EncoderDecoder
 */
   return SOM_ResolveD(this,SOMPPersistentObject,SOMPPersistentObject,sompGetEncoderDecoderName)
	(this, ev);
}


/* method: sompEquals */
boolean   sompEquals(Environment *ev, 
		SOMPPersistentId* otherId)
{
/*
 *  Checks to see if this object's ID is equivalent to the given ID.
 *  Returns TRUE if the ID's are equivalent, FALSE otherwise.
 */
   return SOM_ResolveD(this,SOMPPersistentObject,SOMPPersistentObject,sompEquals)
	(this, ev,otherId);
}


/* method: sompPassivate */
void   sompPassivate(Environment *ev)
{
/*
 *  This method is called by the persistence framework just prior
 *  to saving a persistent object.  It provides a means for a
 *  client to tidy up any data necessary in the persistent object
 *  (or its embedded objects) before the save operation is
 *  completed.  This method does nothing if not overridden by the
 *  client.
 */
   SOM_ResolveD(this,SOMPPersistentObject,SOMPPersistentObject,sompPassivate)
	(this, ev);
}


/* method: sompActivated */
void   sompActivated(Environment *ev)
{
/*
 *  This method is called by the persistence framework after a
 *  persistent object is restored.  It provides a means for a client
 *  to perform any initializations prior to the use of the persistent
 *  object. That is, make the object useable. If not overridden, this
 *  method sets the state of the object to POSTATE_STABLE.
 */
   SOM_ResolveD(this,SOMPPersistentObject,SOMPPersistentObject,sompActivated)
	(this, ev);
}


/* method: sompGetRelativeIdString */
string   sompGetRelativeIdString(Environment *ev, 
		SOMObject* ifNearThisObject, 
		string relativeIdString)
{
/*
 *  if the persistent object is in the same IOGroup as <ifNearThisObject>,
 *  places an Id string of the form:
 * 
 *             <IOGroupMgrClassName>:$RELATIVE:<offset>
 * 
 *  in relativeIdString, else places a fully-qualified Id of the form:
 * 
 *             <IOGroupMgrClassName>:<path/filename>:<offset>
 * 
 *  in relativeIdString.  Returns pointer to relativeIdString through the
 *  operation name.  Note: the caller must allocate relativeIdString prior
 *  to invoking the operation.
 */
   return SOM_ResolveD(this,SOMPPersistentObject,SOMPPersistentObject,sompGetRelativeIdString)
	(this, ev,ifNearThisObject,relativeIdString);
}


/* method: sompInitIOGroup */
SOMPIOGroup*   sompInitIOGroup(Environment *ev, 
		SOMObject* nearPersistentObj)
{
/*
 *  Initialize the IO group for this object. (Used at InitPersistentID time)
 *  Each persistent object is a member of an I/O Group. An I/O Group
 *  can consist of one or more persistent objects.
 * 
 *  The I/O Group in which this persistent object is a member is
 *  determined by the "nearPersistentObj" argument.
 *  If given nearPersistentObj is NULL, a new IOGroup may be instantiated.
 *  Otherwise, nearPersistentObj is expected to be a persistent object with
 *  an existing IOGroup. This object is made a member of the
 *  nearPersistentObj I/O Group.
 * 
 *  An I/O Group offset is assigned by this method. This offset may
 *  be returned via sompGetPersistentOffset on the ID of this object.
 */
   return SOM_ResolveD(this,SOMPPersistentObject,SOMPPersistentObject,sompInitIOGroup)
	(this, ev,nearPersistentObj);
}


/* method: sompSetDirty */
void   sompSetDirty(Environment *ev)
{
/*
 *  Sets the state of an object to dirty.  Front method for SetState.
 */
   SOM_ResolveD(this,SOMPPersistentObject,SOMPPersistentObject,sompSetDirty)
	(this, ev);
}


/* method: sompIsDirty */
boolean   sompIsDirty(Environment *ev)
{
/*
 *  This is used for optimization.  The default always returns TRUE.  Optimized
 *  persistent objects can override this to return sompGetDirty(), and then
 *  be sure to invoke sompSetDirty() whenever the object is updated.
 */
   return SOM_ResolveD(this,SOMPPersistentObject,SOMPPersistentObject,sompIsDirty)
	(this, ev);
}


/* method: sompGetDirty */
boolean   sompGetDirty(Environment *ev)
{
/*
 *  This returns TRUE if the dirty bit is set, FALSE otherwise.
 */
   return SOM_ResolveD(this,SOMPPersistentObject,SOMPPersistentObject,sompGetDirty)
	(this, ev);
}


/* method: sompMarkForCompaction */
void   sompMarkForCompaction(Environment *ev)
{
/*
 *  Note to the Persistence Framework that the next time this object is
 *  saved, the entire IO Group should be compacted, if possible.
 */
   SOM_ResolveD(this,SOMPPersistentObject,SOMPPersistentObject,sompMarkForCompaction)
	(this, ev);
}


/* method: sompSetState */
void   sompSetState(Environment *ev, 
		unsigned short state)
{
/*
 *  Sets specified state.
 *  See po.csc for a description of the possible states.
 */
   SOM_ResolveD(this,SOMPPersistentObject,SOMPPersistentObject,sompSetState)
	(this, ev,state);
}


/* method: sompCheckState */
boolean   sompCheckState(Environment *ev, 
		unsigned short state)
{
/*
 *  Returns TRUE if given state is true for this object.
 *  See po.csc for a description of the possible states.
 */
   return SOM_ResolveD(this,SOMPPersistentObject,SOMPPersistentObject,sompCheckState)
	(this, ev,state);
}


/* method: sompClearState */
void   sompClearState(Environment *ev, 
		unsigned short state)
{
/*
 *  Clears specified state.
 */
   SOM_ResolveD(this,SOMPPersistentObject,SOMPPersistentObject,sompClearState)
	(this, ev,state);
}


/* method: sompGetEncoderDecoder */
SOMPEncoderDecoderAbstract*   sompGetEncoderDecoder(Environment *ev)
{
/*
 *  If an Encoder/Decoder has not already been instantiated, one
 *  is instantiated. A pointer to the encoder/decoder is
 *  returned. NULL is returned if this object's encoder/decoder
 *  cannot be instantiated.  This method should only be used by the IO Group
 *  Mgr class.
 */
   return SOM_ResolveD(this,SOMPPersistentObject,SOMPPersistentObject,sompGetEncoderDecoder)
	(this, ev);
}


/* method: sompFreeEncoderDecoder */
void   sompFreeEncoderDecoder(Environment *ev)
{
/*
 *  Free this object's encoder/decoder. This method should only be used
 *  by the IO Group Manager class.
 */
   SOM_ResolveD(this,SOMPPersistentObject,SOMPPersistentObject,sompFreeEncoderDecoder)
	(this, ev);
}


/* method: sompGetIOGroup */
SOMPIOGroup*   sompGetIOGroup(Environment *ev)
{
/*
 *  Get a pointer to the IOGroup collection object for this object.
 *  Within the returned collection are this object and any objects
 *  initialized near it (with sompInitNearObject). This method is intended
 *  to be use by IO Group Mgr implementors.
 */
   return SOM_ResolveD(this,SOMPPersistentObject,SOMPPersistentObject,sompGetIOGroup)
	(this, ev);
}


/*
 * 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,SOMPPersistentObject,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,SOMPPersistentObject,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,SOMPPersistentObject,SOMObject,somDefaultCopyInit)
	(this,ctrl,fromObj);
}


/* method: somDefaultAssign */
SOMPPersistentObject*  somDefaultAssign(som3AssignCtrl* ctrl, 
		SOMObject* fromObj)
{
/*
 *  A default assignment operator. Use this to "assign" the state of one
 *  object to another.
 */
   return SOM_ResolveD(this,SOMPPersistentObject,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,SOMPPersistentObject,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,SOMPPersistentObject,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,SOMPPersistentObject,SOMObject,somDefaultConstVCopyInit)
	(this,ctrl,fromObj);
}


/* method: somDefaultConstAssign */
SOMPPersistentObject*  somDefaultConstAssign(som3AssignCtrl* ctrl, 
		SOMObject* fromObj)
{
/*
 *  A default assignment operator that uses a const fromObj.
 */
   return SOM_ResolveD(this,SOMPPersistentObject,SOMObject,somDefaultConstAssign)
	(this,ctrl,fromObj);
}


/* method: somDefaultVAssign */
SOMPPersistentObject*  somDefaultVAssign(som3AssignCtrl* ctrl, 
		SOMObject* fromObj)
{
/*
 *  A default assignment operator that uses a volatile fromObj.
 */
   return SOM_ResolveD(this,SOMPPersistentObject,SOMObject,somDefaultVAssign)
	(this,ctrl,fromObj);
}


/* method: somDefaultConstVAssign */
SOMPPersistentObject*  somDefaultConstVAssign(som3AssignCtrl* ctrl, 
		SOMObject* fromObj)
{
/*
 *  A default assignment operator that uses a const volatile fromObj.
 */
   return SOM_ResolveD(this,SOMPPersistentObject,SOMObject,somDefaultConstVAssign)
	(this,ctrl,fromObj);
}


/* method: somInit */
void   somInit()
{
/*
 *  Obsolete but still supported. Override somDefaultInit instead of somInit.
 */
   SOM_ResolveD(this,SOMPPersistentObject,SOMObject,somInit)
	(this);
}


/* method: somFree */
void   somFree()
{
/*
 *  Use as directed by framework implementations.
 */
   SOM_ResolveD(this,SOMPPersistentObject,SOMObject,somFree)
	(this);
}


/* method: somUninit */
void   somUninit()
{
/*
 *  Obsolete but still supported. Override somDestruct instead of somUninit.
 */
   SOM_ResolveD(this,SOMPPersistentObject,SOMObject,somUninit)
	(this);
}


/* method: somGetClass */
M_SOMPPersistentObject*  somGetClass()
{
/*
 *  Return the receiver's class.
 */
   return SOM_ResolveD(this,SOMPPersistentObject,SOMObject,somGetClass)
	(this);
}


/* method: somGetClassName */
string   somGetClassName()
{
/*
 *  Return the name of the receiver's class.
 */
   return SOM_ResolveD(this,SOMPPersistentObject,SOMObject,somGetClassName)
	(this);
}


/* method: somGetSize */
long   somGetSize()
{
/*
 *  Return the size of the receiver.
 */
   return SOM_ResolveD(this,SOMPPersistentObject,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,SOMPPersistentObject,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,SOMPPersistentObject,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,SOMPPersistentObject,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   SOMPPersistentObject_somDispatch(somToken* retValue, 
		somId methodId, 
		va_list ap)
{return SOM_ResolveD(this,SOMPPersistentObject,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,SOMPPersistentObject,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   SOMPPersistentObject_somClassDispatch(SOMClass* clsObj, 
		somToken* retValue, 
		somId methodId, 
		va_list ap)
{return SOM_ResolveD(this,SOMPPersistentObject,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,SOMPPersistentObject,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,SOMPPersistentObject,SOMObject,somCastObj)
	(this,cls);
}


/* method: somResetObj */
boolean   somResetObj()
{
/*
 *  reset an object to its true class. Returns true always.
 */
   return SOM_ResolveD(this,SOMPPersistentObject,SOMObject,somResetObj)
	(this);
}


/* va_list method: somDispatchV */

/*
 *  Obsolete. Use somDispatch instead.
 */
/* the va_list invocation form */
void   SOMPPersistentObject_somDispatchV(somId methodId, 
		somId descriptor, 
		va_list ap)
{   SOM_ResolveD(this,SOMPPersistentObject,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,SOMPPersistentObject,SOMObject,somDispatchV)
	(this,methodId,descriptor,ap);
   va_end(ap);
}


/* va_list method: somDispatchL */

/*
 *  Obsolete. Use somDispatch instead.
 */
/* the va_list invocation form */
long   SOMPPersistentObject_somDispatchL(somId methodId, 
		somId descriptor, 
		va_list ap)
{return SOM_ResolveD(this,SOMPPersistentObject,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,SOMPPersistentObject,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*   SOMPPersistentObject_somDispatchA(somId methodId, 
		somId descriptor, 
		va_list ap)
{return SOM_ResolveD(this,SOMPPersistentObject,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,SOMPPersistentObject,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   SOMPPersistentObject_somDispatchD(somId methodId, 
		somId descriptor, 
		va_list ap)
{return SOM_ResolveD(this,SOMPPersistentObject,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,SOMPPersistentObject,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,SOMPPersistentObject,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,SOMPPersistentObject,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,SOMPPersistentObject,SOMObject,somDumpSelfInt)
	(this,level);
}



};   /* SOMPPersistentObject */



#endif       /* SOM_SOMPPersistentObject_xh */

#ifndef SOM_M_SOMPPersistentObject_xh
#define SOM_M_SOMPPersistentObject_xh

class M_SOMPPersistentObject;

#define M_SOMPPersistentObject_MajorVersion 2
#define M_SOMPPersistentObject_MinorVersion 1

/* C++ SOM defs */
#include <somcls.xh>
#include <somcm.xh>

/* C++ parent defs */
#ifndef SOM_SOMClass_xh
#include <somcls.xh>
#endif

#ifndef M_SOMPPersistentObject_API
#define M_SOMPPersistentObject_API
/*
 * -- The Class API
 */

/*
 * Start of bindings for IDL types
 */


/*
 * End of bindings for IDL types.
 */

/*
 * -- M_SOMPPersistentObject is a metaclass for SOMPPersistentObject. Make sure SOMPPersistentObject is known.
 */
class SOMPPersistentObject;


/* A procedure to create the M_SOMPPersistentObject Class */
SOMEXTERN SOMClass * SOMLINK M_SOMPPersistentObjectNewClass(
		integer4 majorVersion,
		integer4 minorVersion);

/* The API to the M_SOMPPersistentObject class object, and the methods it introduces. */
SOMEXTERN struct M_SOMPPersistentObjectClassDataStructure {
	SOMClass *classObject;
	somMToken sompRegisterEDPair;
	somMToken sompGetTotalEDPairs;
	somMToken sompGetNthEDPair;
	somMToken sompGetNthEDPairObj;
	somMToken sompSetClassLevelEncoderDecoderName;
	somMToken sompGetClassLevelEncoderDecoderName;
} SOMDLINK M_SOMPPersistentObjectClassData;
#define _M_SOMPPersistentObject M_SOMPPersistentObjectClassData.classObject

/* The API to parentMtabs for M_SOMPPersistentObject, and the instance data it introduces. */
SOMEXTERN struct M_SOMPPersistentObjectCClassDataStructure {
	somMethodTabs parentMtab;
	somDToken              instanceDataToken;
} SOMDLINK M_SOMPPersistentObjectCClassData;

/*
 * -- Typedefs for M_SOMPPersistentObject Method Procedures
 */
SOMEXTERN {
typedef void   SOMLINK somTP_M_SOMPPersistentObject_sompSetClassLevelEncoderDecoderName(M_SOMPPersistentObject *somSelf, Environment *ev, 
		string myName);
typedef somTP_M_SOMPPersistentObject_sompSetClassLevelEncoderDecoderName *somTD_M_SOMPPersistentObject_sompSetClassLevelEncoderDecoderName;
typedef string   SOMLINK somTP_M_SOMPPersistentObject_sompGetClassLevelEncoderDecoderName(M_SOMPPersistentObject *somSelf, Environment *ev);
typedef somTP_M_SOMPPersistentObject_sompGetClassLevelEncoderDecoderName *somTD_M_SOMPPersistentObject_sompGetClassLevelEncoderDecoderName;

/*
 * -- Typedefs for Reintroduced Wrapper Methods
 */
typedef long   SOMLINK somTP_M_SOMPPersistentObject__get_somDataAlignment(M_SOMPPersistentObject *somSelf);
typedef somTP_M_SOMPPersistentObject__get_somDataAlignment *somTD_M_SOMPPersistentObject__get_somDataAlignment;
typedef SOMClass_somOffsets   SOMLINK somTP_M_SOMPPersistentObject__get_somInstanceDataOffsets(M_SOMPPersistentObject *somSelf);
typedef somTP_M_SOMPPersistentObject__get_somInstanceDataOffsets *somTD_M_SOMPPersistentObject__get_somInstanceDataOffsets;
typedef SOMClass_SOMClassSequence   SOMLINK somTP_M_SOMPPersistentObject__get_somDirectInitClasses(M_SOMPPersistentObject *somSelf);
typedef somTP_M_SOMPPersistentObject__get_somDirectInitClasses *somTD_M_SOMPPersistentObject__get_somDirectInitClasses;
typedef SOMPPersistentObject*   SOMLINK somTP_M_SOMPPersistentObject_somNew(M_SOMPPersistentObject *somSelf);
typedef somTP_M_SOMPPersistentObject_somNew *somTD_M_SOMPPersistentObject_somNew;
typedef SOMObject*   SOMLINK somTP_M_SOMPPersistentObject_somNewNoInit(M_SOMPPersistentObject *somSelf);
typedef somTP_M_SOMPPersistentObject_somNewNoInit *somTD_M_SOMPPersistentObject_somNewNoInit;
typedef SOMObject*   SOMLINK somTP_M_SOMPPersistentObject_somRenew(M_SOMPPersistentObject *somSelf, 
		void* obj);
typedef somTP_M_SOMPPersistentObject_somRenew *somTD_M_SOMPPersistentObject_somRenew;
typedef SOMObject*   SOMLINK somTP_M_SOMPPersistentObject_somRenewNoInit(M_SOMPPersistentObject *somSelf, 
		void* obj);
typedef somTP_M_SOMPPersistentObject_somRenewNoInit *somTD_M_SOMPPersistentObject_somRenewNoInit;
typedef SOMObject*   SOMLINK somTP_M_SOMPPersistentObject_somRenewNoZero(M_SOMPPersistentObject *somSelf, 
		void* obj);
typedef somTP_M_SOMPPersistentObject_somRenewNoZero *somTD_M_SOMPPersistentObject_somRenewNoZero;
typedef SOMObject*   SOMLINK somTP_M_SOMPPersistentObject_somRenewNoInitNoZero(M_SOMPPersistentObject *somSelf, 
		void* obj);
typedef somTP_M_SOMPPersistentObject_somRenewNoInitNoZero *somTD_M_SOMPPersistentObject_somRenewNoInitNoZero;
typedef somToken   SOMLINK somTP_M_SOMPPersistentObject_somAllocate(M_SOMPPersistentObject *somSelf, 
		long size);
typedef somTP_M_SOMPPersistentObject_somAllocate *somTD_M_SOMPPersistentObject_somAllocate;
typedef void   SOMLINK somTP_M_SOMPPersistentObject_somDeallocate(M_SOMPPersistentObject *somSelf, 
		somToken memptr);
typedef somTP_M_SOMPPersistentObject_somDeallocate *somTD_M_SOMPPersistentObject_somDeallocate;
typedef void   SOMLINK somTP_M_SOMPPersistentObject_somInitClass(M_SOMPPersistentObject *somSelf, 
		string className, 
		SOMClass* parentClass, 
		long dataSize, 
		long maxStaticMethods, 
		long majorVersion, 
		long minorVersion);
typedef somTP_M_SOMPPersistentObject_somInitClass *somTD_M_SOMPPersistentObject_somInitClass;
typedef void   SOMLINK somTP_M_SOMPPersistentObject_somInitMIClass(M_SOMPPersistentObject *somSelf, 
		long inherit_vars, 
		string className, 
		SOMClass_SOMClassSequence* parentClasses, 
		long dataSize, 
		long dataAlignment, 
		long maxStaticMethods, 
		long majorVersion, 
		long minorVersion);
typedef somTP_M_SOMPPersistentObject_somInitMIClass *somTD_M_SOMPPersistentObject_somInitMIClass;
typedef somMToken   SOMLINK somTP_M_SOMPPersistentObject_somAddStaticMethod(M_SOMPPersistentObject *somSelf, 
		somId methodId, 
		somId methodDescriptor, 
		somMethodPtr method, 
		somMethodPtr redispatchStub, 
		somMethodPtr applyStub);
typedef somTP_M_SOMPPersistentObject_somAddStaticMethod *somTD_M_SOMPPersistentObject_somAddStaticMethod;
typedef void   SOMLINK somTP_M_SOMPPersistentObject_somAddDynamicMethod(M_SOMPPersistentObject *somSelf, 
		somId methodId, 
		somId methodDescriptor, 
		somMethodPtr method, 
		somMethodPtr applyStub);
typedef somTP_M_SOMPPersistentObject_somAddDynamicMethod *somTD_M_SOMPPersistentObject_somAddDynamicMethod;
typedef void   SOMLINK somTP_M_SOMPPersistentObject_somOverrideSMethod(M_SOMPPersistentObject *somSelf, 
		somId methodId, 
		somMethodPtr method);
typedef somTP_M_SOMPPersistentObject_somOverrideSMethod *somTD_M_SOMPPersistentObject_somOverrideSMethod;
typedef void   SOMLINK somTP_M_SOMPPersistentObject_somClassReady(M_SOMPPersistentObject *somSelf);
typedef somTP_M_SOMPPersistentObject_somClassReady *somTD_M_SOMPPersistentObject_somClassReady;
typedef somMethodPtr   SOMLINK somTP_M_SOMPPersistentObject_somGetApplyStub(M_SOMPPersistentObject *somSelf, 
		somId methodId);
typedef somTP_M_SOMPPersistentObject_somGetApplyStub *somTD_M_SOMPPersistentObject_somGetApplyStub;
typedef somClassDataStructure*   SOMLINK somTP_M_SOMPPersistentObject_somGetClassData(M_SOMPPersistentObject *somSelf);
typedef somTP_M_SOMPPersistentObject_somGetClassData *somTD_M_SOMPPersistentObject_somGetClassData;
typedef void   SOMLINK somTP_M_SOMPPersistentObject_somSetClassData(M_SOMPPersistentObject *somSelf, 
		somClassDataStructure* cds);
typedef somTP_M_SOMPPersistentObject_somSetClassData *somTD_M_SOMPPersistentObject_somSetClassData;
typedef somMethodTab*   SOMLINK somTP_M_SOMPPersistentObject_somGetClassMtab(M_SOMPPersistentObject *somSelf);
typedef somTP_M_SOMPPersistentObject_somGetClassMtab *somTD_M_SOMPPersistentObject_somGetClassMtab;
typedef long   SOMLINK somTP_M_SOMPPersistentObject_somGetInstanceOffset(M_SOMPPersistentObject *somSelf);
typedef somTP_M_SOMPPersistentObject_somGetInstanceOffset *somTD_M_SOMPPersistentObject_somGetInstanceOffset;
typedef long   SOMLINK somTP_M_SOMPPersistentObject_somGetInstancePartSize(M_SOMPPersistentObject *somSelf);
typedef somTP_M_SOMPPersistentObject_somGetInstancePartSize *somTD_M_SOMPPersistentObject_somGetInstancePartSize;
typedef long   SOMLINK somTP_M_SOMPPersistentObject_somGetInstanceSize(M_SOMPPersistentObject *somSelf);
typedef somTP_M_SOMPPersistentObject_somGetInstanceSize *somTD_M_SOMPPersistentObject_somGetInstanceSize;
typedef somDToken   SOMLINK somTP_M_SOMPPersistentObject_somGetInstanceToken(M_SOMPPersistentObject *somSelf);
typedef somTP_M_SOMPPersistentObject_somGetInstanceToken *somTD_M_SOMPPersistentObject_somGetInstanceToken;
typedef somDToken   SOMLINK somTP_M_SOMPPersistentObject_somGetMemberToken(M_SOMPPersistentObject *somSelf, 
		long memberOffset, 
		somDToken instanceToken);
typedef somTP_M_SOMPPersistentObject_somGetMemberToken *somTD_M_SOMPPersistentObject_somGetMemberToken;
typedef boolean   SOMLINK somTP_M_SOMPPersistentObject_somGetMethodData(M_SOMPPersistentObject *somSelf, 
		somId methodId, 
		somMethodData* md);
typedef somTP_M_SOMPPersistentObject_somGetMethodData *somTD_M_SOMPPersistentObject_somGetMethodData;
typedef somMethodProc*   SOMLINK somTP_M_SOMPPersistentObject_somGetRdStub(M_SOMPPersistentObject *somSelf, 
		somId methodId);
typedef somTP_M_SOMPPersistentObject_somGetRdStub *somTD_M_SOMPPersistentObject_somGetRdStub;
typedef somId   SOMLINK somTP_M_SOMPPersistentObject_somGetMethodDescriptor(M_SOMPPersistentObject *somSelf, 
		somId methodId);
typedef somTP_M_SOMPPersistentObject_somGetMethodDescriptor *somTD_M_SOMPPersistentObject_somGetMethodDescriptor;
typedef long   SOMLINK somTP_M_SOMPPersistentObject_somGetMethodIndex(M_SOMPPersistentObject *somSelf, 
		somId id);
typedef somTP_M_SOMPPersistentObject_somGetMethodIndex *somTD_M_SOMPPersistentObject_somGetMethodIndex;
typedef somMToken   SOMLINK somTP_M_SOMPPersistentObject_somGetMethodToken(M_SOMPPersistentObject *somSelf, 
		somId methodId);
typedef somTP_M_SOMPPersistentObject_somGetMethodToken *somTD_M_SOMPPersistentObject_somGetMethodToken;
typedef string   SOMLINK somTP_M_SOMPPersistentObject_somGetName(M_SOMPPersistentObject *somSelf);
typedef somTP_M_SOMPPersistentObject_somGetName *somTD_M_SOMPPersistentObject_somGetName;
typedef boolean   SOMLINK somTP_M_SOMPPersistentObject_somGetNthMethodData(M_SOMPPersistentObject *somSelf, 
		long n, 
		somMethodData* md);
typedef somTP_M_SOMPPersistentObject_somGetNthMethodData *somTD_M_SOMPPersistentObject_somGetNthMethodData;
typedef somId   SOMLINK somTP_M_SOMPPersistentObject_somGetNthMethodInfo(M_SOMPPersistentObject *somSelf, 
		long n, 
		somId* descriptor);
typedef somTP_M_SOMPPersistentObject_somGetNthMethodInfo *somTD_M_SOMPPersistentObject_somGetNthMethodInfo;
typedef long   SOMLINK somTP_M_SOMPPersistentObject_somGetNumMethods(M_SOMPPersistentObject *somSelf);
typedef somTP_M_SOMPPersistentObject_somGetNumMethods *somTD_M_SOMPPersistentObject_somGetNumMethods;
typedef long   SOMLINK somTP_M_SOMPPersistentObject_somGetNumStaticMethods(M_SOMPPersistentObject *somSelf);
typedef somTP_M_SOMPPersistentObject_somGetNumStaticMethods *somTD_M_SOMPPersistentObject_somGetNumStaticMethods;
typedef SOMClass*   SOMLINK somTP_M_SOMPPersistentObject_somGetParent(M_SOMPPersistentObject *somSelf);
typedef somTP_M_SOMPPersistentObject_somGetParent *somTD_M_SOMPPersistentObject_somGetParent;
typedef SOMClass_SOMClassSequence   SOMLINK somTP_M_SOMPPersistentObject_somGetParents(M_SOMPPersistentObject *somSelf);
typedef somTP_M_SOMPPersistentObject_somGetParents *somTD_M_SOMPPersistentObject_somGetParents;
typedef void   SOMLINK somTP_M_SOMPPersistentObject_somGetVersionNumbers(M_SOMPPersistentObject *somSelf, 
		long* majorVersion, 
		long* minorVersion);
typedef somTP_M_SOMPPersistentObject_somGetVersionNumbers *somTD_M_SOMPPersistentObject_somGetVersionNumbers;
typedef boolean   SOMLINK somTP_M_SOMPPersistentObject_somFindMethod(M_SOMPPersistentObject *somSelf, 
		somId methodId, 
		somMethodPtr* m);
typedef somTP_M_SOMPPersistentObject_somFindMethod *somTD_M_SOMPPersistentObject_somFindMethod;
typedef boolean   SOMLINK somTP_M_SOMPPersistentObject_somFindMethodOk(M_SOMPPersistentObject *somSelf, 
		somId methodId, 
		somMethodPtr* m);
typedef somTP_M_SOMPPersistentObject_somFindMethodOk *somTD_M_SOMPPersistentObject_somFindMethodOk;
typedef somMethodPtr   SOMLINK somTP_M_SOMPPersistentObject_somFindSMethod(M_SOMPPersistentObject *somSelf, 
		somId methodId);
typedef somTP_M_SOMPPersistentObject_somFindSMethod *somTD_M_SOMPPersistentObject_somFindSMethod;
typedef somMethodPtr   SOMLINK somTP_M_SOMPPersistentObject_somFindSMethodOk(M_SOMPPersistentObject *somSelf, 
		somId methodId);
typedef somTP_M_SOMPPersistentObject_somFindSMethodOk *somTD_M_SOMPPersistentObject_somFindSMethodOk;
typedef somMethodPtr   SOMLINK somTP_M_SOMPPersistentObject_somLookupMethod(M_SOMPPersistentObject *somSelf, 
		somId methodId);
typedef somTP_M_SOMPPersistentObject_somLookupMethod *somTD_M_SOMPPersistentObject_somLookupMethod;
typedef boolean   SOMLINK somTP_M_SOMPPersistentObject_somCheckVersion(M_SOMPPersistentObject *somSelf, 
		long majorVersion, 
		long minorVersion);
typedef somTP_M_SOMPPersistentObject_somCheckVersion *somTD_M_SOMPPersistentObject_somCheckVersion;
typedef boolean   SOMLINK somTP_M_SOMPPersistentObject_somDescendedFrom(M_SOMPPersistentObject *somSelf, 
		SOMClass* aClassObj);
typedef somTP_M_SOMPPersistentObject_somDescendedFrom *somTD_M_SOMPPersistentObject_somDescendedFrom;
typedef boolean   SOMLINK somTP_M_SOMPPersistentObject_somSupportsMethod(M_SOMPPersistentObject *somSelf, 
		somId mId);
typedef somTP_M_SOMPPersistentObject_somSupportsMethod *somTD_M_SOMPPersistentObject_somSupportsMethod;
typedef somMethodPtr   SOMLINK somTP_M_SOMPPersistentObject_somDefinedMethod(M_SOMPPersistentObject *somSelf, 
		somMToken method);
typedef somTP_M_SOMPPersistentObject_somDefinedMethod *somTD_M_SOMPPersistentObject_somDefinedMethod;
typedef void   SOMLINK somTP_M_SOMPPersistentObject_somOverrideMtab(M_SOMPPersistentObject *somSelf);
typedef somTP_M_SOMPPersistentObject_somOverrideMtab *somTD_M_SOMPPersistentObject_somOverrideMtab;
typedef void   SOMLINK somTP_M_SOMPPersistentObject_somDefaultInit(M_SOMPPersistentObject *somSelf, 
		som3InitCtrl* ctrl);
typedef somTP_M_SOMPPersistentObject_somDefaultInit *somTD_M_SOMPPersistentObject_somDefaultInit;
typedef void   SOMLINK somTP_M_SOMPPersistentObject_somDestruct(M_SOMPPersistentObject *somSelf, 
		octet doFree, 
		som3DestructCtrl* ctrl);
typedef somTP_M_SOMPPersistentObject_somDestruct *somTD_M_SOMPPersistentObject_somDestruct;
typedef void   SOMLINK somTP_M_SOMPPersistentObject_somDefaultCopyInit(M_SOMPPersistentObject *somSelf, 
		som3InitCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_M_SOMPPersistentObject_somDefaultCopyInit *somTD_M_SOMPPersistentObject_somDefaultCopyInit;
typedef M_SOMPPersistentObject*   SOMLINK somTP_M_SOMPPersistentObject_somDefaultAssign(M_SOMPPersistentObject *somSelf, 
		som3AssignCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_M_SOMPPersistentObject_somDefaultAssign *somTD_M_SOMPPersistentObject_somDefaultAssign;
typedef void   SOMLINK somTP_M_SOMPPersistentObject_somDefaultConstCopyInit(M_SOMPPersistentObject *somSelf, 
		som3InitCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_M_SOMPPersistentObject_somDefaultConstCopyInit *somTD_M_SOMPPersistentObject_somDefaultConstCopyInit;
typedef void   SOMLINK somTP_M_SOMPPersistentObject_somDefaultVCopyInit(M_SOMPPersistentObject *somSelf, 
		som3InitCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_M_SOMPPersistentObject_somDefaultVCopyInit *somTD_M_SOMPPersistentObject_somDefaultVCopyInit;
typedef void   SOMLINK somTP_M_SOMPPersistentObject_somDefaultConstVCopyInit(M_SOMPPersistentObject *somSelf, 
		som3InitCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_M_SOMPPersistentObject_somDefaultConstVCopyInit *somTD_M_SOMPPersistentObject_somDefaultConstVCopyInit;
typedef M_SOMPPersistentObject*   SOMLINK somTP_M_SOMPPersistentObject_somDefaultConstAssign(M_SOMPPersistentObject *somSelf, 
		som3AssignCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_M_SOMPPersistentObject_somDefaultConstAssign *somTD_M_SOMPPersistentObject_somDefaultConstAssign;
typedef M_SOMPPersistentObject*   SOMLINK somTP_M_SOMPPersistentObject_somDefaultVAssign(M_SOMPPersistentObject *somSelf, 
		som3AssignCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_M_SOMPPersistentObject_somDefaultVAssign *somTD_M_SOMPPersistentObject_somDefaultVAssign;
typedef M_SOMPPersistentObject*   SOMLINK somTP_M_SOMPPersistentObject_somDefaultConstVAssign(M_SOMPPersistentObject *somSelf, 
		som3AssignCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_M_SOMPPersistentObject_somDefaultConstVAssign *somTD_M_SOMPPersistentObject_somDefaultConstVAssign;
typedef void   SOMLINK somTP_M_SOMPPersistentObject_somInit(M_SOMPPersistentObject *somSelf);
typedef somTP_M_SOMPPersistentObject_somInit *somTD_M_SOMPPersistentObject_somInit;
typedef void   SOMLINK somTP_M_SOMPPersistentObject_somFree(M_SOMPPersistentObject *somSelf);
typedef somTP_M_SOMPPersistentObject_somFree *somTD_M_SOMPPersistentObject_somFree;
typedef void   SOMLINK somTP_M_SOMPPersistentObject_somUninit(M_SOMPPersistentObject *somSelf);
typedef somTP_M_SOMPPersistentObject_somUninit *somTD_M_SOMPPersistentObject_somUninit;
typedef SOMClass*   SOMLINK somTP_M_SOMPPersistentObject_somGetClass(M_SOMPPersistentObject *somSelf);
typedef somTP_M_SOMPPersistentObject_somGetClass *somTD_M_SOMPPersistentObject_somGetClass;
typedef string   SOMLINK somTP_M_SOMPPersistentObject_somGetClassName(M_SOMPPersistentObject *somSelf);
typedef somTP_M_SOMPPersistentObject_somGetClassName *somTD_M_SOMPPersistentObject_somGetClassName;
typedef long   SOMLINK somTP_M_SOMPPersistentObject_somGetSize(M_SOMPPersistentObject *somSelf);
typedef somTP_M_SOMPPersistentObject_somGetSize *somTD_M_SOMPPersistentObject_somGetSize;
typedef boolean   SOMLINK somTP_M_SOMPPersistentObject_somIsA(M_SOMPPersistentObject *somSelf, 
		SOMClass* aClassObj);
typedef somTP_M_SOMPPersistentObject_somIsA *somTD_M_SOMPPersistentObject_somIsA;
typedef boolean   SOMLINK somTP_M_SOMPPersistentObject_somIsInstanceOf(M_SOMPPersistentObject *somSelf, 
		SOMClass* aClassObj);
typedef somTP_M_SOMPPersistentObject_somIsInstanceOf *somTD_M_SOMPPersistentObject_somIsInstanceOf;
typedef boolean   SOMLINK somTP_M_SOMPPersistentObject_somRespondsTo(M_SOMPPersistentObject *somSelf, 
		somId mId);
typedef somTP_M_SOMPPersistentObject_somRespondsTo *somTD_M_SOMPPersistentObject_somRespondsTo;
typedef boolean   SOMLINK somTP_M_SOMPPersistentObject_somDispatch(M_SOMPPersistentObject *somSelf, 
		somToken* retValue, 
		somId methodId, 
		va_list ap);
typedef somTP_M_SOMPPersistentObject_somDispatch *somTD_M_SOMPPersistentObject_somDispatch;
typedef boolean   SOMLINK somTP_M_SOMPPersistentObject_somClassDispatch(M_SOMPPersistentObject *somSelf, 
		SOMClass* clsObj, 
		somToken* retValue, 
		somId methodId, 
		va_list ap);
typedef somTP_M_SOMPPersistentObject_somClassDispatch *somTD_M_SOMPPersistentObject_somClassDispatch;
typedef boolean   SOMLINK somTP_M_SOMPPersistentObject_somCastObj(M_SOMPPersistentObject *somSelf, 
		SOMClass* cls);
typedef somTP_M_SOMPPersistentObject_somCastObj *somTD_M_SOMPPersistentObject_somCastObj;
typedef boolean   SOMLINK somTP_M_SOMPPersistentObject_somResetObj(M_SOMPPersistentObject *somSelf);
typedef somTP_M_SOMPPersistentObject_somResetObj *somTD_M_SOMPPersistentObject_somResetObj;
typedef void   SOMLINK somTP_M_SOMPPersistentObject_somDispatchV(M_SOMPPersistentObject *somSelf, 
		somId methodId, 
		somId descriptor, 
		va_list ap);
typedef somTP_M_SOMPPersistentObject_somDispatchV *somTD_M_SOMPPersistentObject_somDispatchV;
typedef long   SOMLINK somTP_M_SOMPPersistentObject_somDispatchL(M_SOMPPersistentObject *somSelf, 
		somId methodId, 
		somId descriptor, 
		va_list ap);
typedef somTP_M_SOMPPersistentObject_somDispatchL *somTD_M_SOMPPersistentObject_somDispatchL;
typedef void*   SOMLINK somTP_M_SOMPPersistentObject_somDispatchA(M_SOMPPersistentObject *somSelf, 
		somId methodId, 
		somId descriptor, 
		va_list ap);
typedef somTP_M_SOMPPersistentObject_somDispatchA *somTD_M_SOMPPersistentObject_somDispatchA;
typedef double   SOMLINK somTP_M_SOMPPersistentObject_somDispatchD(M_SOMPPersistentObject *somSelf, 
		somId methodId, 
		somId descriptor, 
		va_list ap);
typedef somTP_M_SOMPPersistentObject_somDispatchD *somTD_M_SOMPPersistentObject_somDispatchD;
typedef SOMObject*   SOMLINK somTP_M_SOMPPersistentObject_somPrintSelf(M_SOMPPersistentObject *somSelf);
typedef somTP_M_SOMPPersistentObject_somPrintSelf *somTD_M_SOMPPersistentObject_somPrintSelf;
typedef void   SOMLINK somTP_M_SOMPPersistentObject_somDumpSelf(M_SOMPPersistentObject *somSelf, 
		long level);
typedef somTP_M_SOMPPersistentObject_somDumpSelf *somTD_M_SOMPPersistentObject_somDumpSelf;
typedef void   SOMLINK somTP_M_SOMPPersistentObject_somDumpSelfInt(M_SOMPPersistentObject *somSelf, 
		long level);
typedef somTP_M_SOMPPersistentObject_somDumpSelfInt *somTD_M_SOMPPersistentObject_somDumpSelfInt;
}

#endif /* M_SOMPPersistentObject_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 M_SOMPPersistentObject
 */
class M_SOMPPersistentObject : public SOMClass
{
public:

// M_SOMPPersistentObject::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 (!_M_SOMPPersistentObject) M_SOMPPersistentObjectNewClass(M_SOMPPersistentObject_MajorVersion,M_SOMPPersistentObject_MinorVersion);
   return (void*)
      SOM_Resolve(_M_SOMPPersistentObject,SOMClass,somNewNoInit)
         ((SOMClass *)((void*)_M_SOMPPersistentObject));
}

// M_SOMPPersistentObject::delete uses somDestruct.
void operator delete(void * obj)
{
   if (obj && *(void**)obj) {
      SOM_Resolve(obj,SOMObject,somFree)
         ((SOMObject*)obj);
   }
}

M_SOMPPersistentObject& operator=(M_SOMPPersistentObject& fromObj)
{
   this->somDefaultAssign(0,(SOMObject*)((void*)&fromObj));
   return *this;
}

M_SOMPPersistentObject()
{
   if (*(void**)this != 
       ((somParentMtabStructPtr)
        (M_SOMPPersistentObjectCClassData.parentMtab))->mtab)
      return;
   ((SOMObject*)((void*)this))->somDefaultInit(0);
}

M_SOMPPersistentObject(M_SOMPPersistentObject* fromObj)
{
   if (*(void**)this != 
       ((somParentMtabStructPtr)
        (M_SOMPPersistentObjectCClassData.parentMtab))->mtab)
      return;
   ((SOMObject*)((void*)this))->somDefaultCopyInit(0,((SOMObject*)((void*)fromObj)));
}

#ifdef __IBMCPP__
#pragma info(nocnv,nopar)
#endif
M_SOMPPersistentObject(const M_SOMPPersistentObject* fromObj)
{
   if (*(void**)this != 
       ((somParentMtabStructPtr)
        (M_SOMPPersistentObjectCClassData.parentMtab))->mtab)
      return;
   ((SOMObject*)((void*)this))->somDefaultConstCopyInit(0,((SOMObject*)((void*)fromObj)));
}
#ifdef __IBMCPP__
#pragma info(restore)
#endif


/* method: sompSetClassLevelEncoderDecoderName */
void   sompSetClassLevelEncoderDecoderName(Environment *ev, 
		string myName)
{
/*
 *  Set Encoder/Decoder name at the class level
 */
   SOM_ResolveD(this,M_SOMPPersistentObject,M_SOMPPersistentObject,sompSetClassLevelEncoderDecoderName)
	(this, ev,myName);
}


/* method: sompGetClassLevelEncoderDecoderName */
string   sompGetClassLevelEncoderDecoderName(Environment *ev)
{
/*
 *  Get class level Encoder/Decoder name.
 */
   return SOM_ResolveD(this,M_SOMPPersistentObject,M_SOMPPersistentObject,sompGetClassLevelEncoderDecoderName)
	(this, ev);
}


/*
 * Reintroduce inherited methods
 */

/* method: _get_somDataAlignment */
long   _get_somDataAlignment()
{
/*
 *  The alignment required for the instance data structure
 *  introduced by the receiving class.
 */
   return SOM_ResolveD(this,M_SOMPPersistentObject,SOMClass,_get_somDataAlignment)
	(this);
}


/* nonstatic method: _get_somInstanceDataOffsets */
SOMClass_somOffsets   _get_somInstanceDataOffsets()
{
/*
 *  A sequence of the instance data offsets for all classes used in
 *  the derivation of the receiving class (including the receiver).
 */
   return SOM_ResolveD(this,M_SOMPPersistentObject,SOMClass,_get_somInstanceDataOffsets)
	(this);
}


/* nonstatic method: _get_somDirectInitClasses */
SOMClass_SOMClassSequence   _get_somDirectInitClasses()
{
/*
 *  The ancestors whose initializers the receiving
 *  class wants to directly invoke.
 */
   return SOM_ResolveD(this,M_SOMPPersistentObject,SOMClass,_get_somDirectInitClasses)
	(this);
}


/* method: somNew */
SOMPPersistentObject*  somNew()
{
/*
 *  Uses SOMMalloc to allocate storage for a new instance of the
 *  receiving class, and then calls somRenewNoInitNoZero to load the
 *  new object's method table pointer. Then somDefaultInit is called to
 *  initialize the new object.  Note: If the instance is a class object,
 *  somInitMIClass must then be invoked to declare parents and
 *  initialize the class's instance method table. Upon failure, NULL
 *  is returned.
 */
   return SOM_ResolveD(this,M_SOMPPersistentObject,SOMClass,somNew)
	(this);
}


/* method: somNewNoInit */
SOMObject*   somNewNoInit()
{
/*
 *  Equivalent to somNew except that somDefaultInit is not called.
 */
   return SOM_ResolveD(this,M_SOMPPersistentObject,SOMClass,somNewNoInit)
	(this);
}


/* method: somRenew */
SOMObject*   somRenew(void* obj)
{
/*
 *  Equivalent to somNew except that storage is not allocated.
 *  <obj> is taken as the address of the new object.
 */
   return SOM_ResolveD(this,M_SOMPPersistentObject,SOMClass,somRenew)
	(this,obj);
}


/* method: somRenewNoInit */
SOMObject*   somRenewNoInit(void* obj)
{
/*
 *  Equivalent to somRenew except that somDefaultInit is not called.
 */
   return SOM_ResolveD(this,M_SOMPPersistentObject,SOMClass,somRenewNoInit)
	(this,obj);
}


/* method: somRenewNoZero */
SOMObject*   somRenewNoZero(void* obj)
{
/*
 *  Equivalent to somRenew except that memory is not zeroed out.
 */
   return SOM_ResolveD(this,M_SOMPPersistentObject,SOMClass,somRenewNoZero)
	(this,obj);
}


/* method: somRenewNoInitNoZero */
SOMObject*   somRenewNoInitNoZero(void* obj)
{
/*
 *  The purpose of this method is to load an object's method table.
 *  The SOM API requires that somRenewNoInitNoZero always be
 *  called when creating a new object whose metaclass is not SOMClass.
 *  This is because metaclasses must be guaranteed that they can use
 *  somRenewNoInitNoZero to track object creation if this is desired.
 */
   return SOM_ResolveD(this,M_SOMPPersistentObject,SOMClass,somRenewNoInitNoZero)
	(this,obj);
}


/* nonstatic method: somAllocate */
somToken   somAllocate(long size)
{
/*
 *  Allocates memory to hold an object and returns a pointer to this memory.
 *  This is a nonstatic method, and cannot be overridden. The default
 *  implementation calls SOMMalloc, but a class designer can specify a
 *  different implementation using the somallocate modifier in IDL. The
 *  allocator takes the same parameters as this method.
 */
   return SOM_ResolveD(this,M_SOMPPersistentObject,SOMClass,somAllocate)
	(this,size);
}


/* nonstatic method: somDeallocate */
void   somDeallocate(somToken memptr)
{
/*
 *  Zeros out the method table pointer stored in the word pointed to by
 *  memptr, and then deallocates the block of memory pointed to by memptr.
 *  This is a nonstatic method and cannot be overridden. The default
 *  deallocator called is SOMFree, but a class designer can specify a
 *  different deallocator using the somdeallocate modifier in IDL. The
 *  deallocator takes a char* (memptr) and a long (size) as arguments.
 */
   SOM_ResolveD(this,M_SOMPPersistentObject,SOMClass,somDeallocate)
	(this,memptr);
}


/* method: somInitClass */
void   somInitClass(string className, 
		SOMClass* parentClass, 
		long dataSize, 
		long maxStaticMethods, 
		long majorVersion, 
		long minorVersion)
{
/*
 *  somInitClass is obsolete, and should no longer be used. The SOM 2.0
 *  kernel provides special handling for redispatch stubs in the case
 *  of SOM 1.0 classes, and use of this method is what tells the kernel
 *  that old-style redispatch stubs will be registered.
 */
   SOM_ResolveD(this,M_SOMPPersistentObject,SOMClass,somInitClass)
	(this,className,parentClass,dataSize,maxStaticMethods,majorVersion,minorVersion);
}


/* method: somInitMIClass */
void   somInitMIClass(long inherit_vars, 
		string className, 
		SOMClass_SOMClassSequence* parentClasses, 
		long dataSize, 
		long dataAlignment, 
		long maxStaticMethods, 
		long majorVersion, 
		long minorVersion)
{
/*
 *  somInitMIClass implements the second phase of dynamic class creation:
 *  inheritance of interface and possibly implementation (instance
 *  variables) by suitable initialization of <self> (a class object).
 * 
 *  For somInitMIClass, the inherit_vars argument controls whether abstract
 *  or implementation inheritance is used. Inherit_vars is a 32 bit
 *  bit-vector. Implementation is inherited from parent i iff the bit
 *  1<<i is on, or i>=32.
 *  On a class-by-class basis, for each class ancestor, implementation
 *  inheritance always takes precidence over abstract inheritance. This is
 *  necessary to guarantee that procedures supporting parent method calls
 *  (available on non-abstract parents) are always supported by parent
 *  instance variables.
 * 
 *  <className> is a string containing the class name. A copy is made, so
 *  the string may be freed upon return to the caller if this is desired.
 * 
 *  <parentClasses> is a SOMClassSequence containing pointers to the
 *  parent classes. somInitMIClass makes a copy of this, so it may
 *  be freed upon return to the caller if this is desired.
 * 
 *  <dataSize> is the space needed for the instance variables
 *  introduced by this class.
 * 
 *  <dataAlignment> specifies the desired byte alignment for instance
 *  data introduced by this class. A value of 0 selects a system-wide default;
 *  any other argument is taken as the desired byte alignment multiple. Thus,
 *  for example, even if a byte multiple of 8 is needed for double precision
 *  values on a given system (so 8 is the default), a class whose instance data
 *  doesn't require this can indicate otherwise. If A is the next memory
 *  address available for holding instance data, the address that will be
 *  used is A + (A mod byte-alignment).
 * 
 *  <maxStaticMethods> is the maximum number of static methods that will be
 *  added to the initialized class using addStaticMethod.
 * 
 *  <majorVersion> indicates the major version number for this
 *  implementation of the class definition, and <minorVersion>
 *  indicates the minor version number.
 */
   SOM_ResolveD(this,M_SOMPPersistentObject,SOMClass,somInitMIClass)
	(this,inherit_vars,className,parentClasses,dataSize,dataAlignment,maxStaticMethods,majorVersion,minorVersion);
}


/* method: somAddStaticMethod */
somMToken   somAddStaticMethod(somId methodId, 
		somId methodDescriptor, 
		somMethodPtr method, 
		somMethodPtr redispatchStub, 
		somMethodPtr applyStub)
{
/*
 *  Adds the indicated method, creating and returning a new method token.
 * 
 *  <methodDescriptor> is the somId for an identifier that can be used
 *  to access signature information about the method from an interface
 *  repository.
 * 
 *  <method> is the actual method procedure for this method
 * 
 *  <redispatchStub> is a procedure with the same calling sequence as
 *  <method> that invokes somDispatch for the method.
 * 
 *  <applyStub> is a procedure used to support somApply.
 */
   return SOM_ResolveD(this,M_SOMPPersistentObject,SOMClass,somAddStaticMethod)
	(this,methodId,methodDescriptor,method,redispatchStub,applyStub);
}


/* method: somAddDynamicMethod */
void   somAddDynamicMethod(somId methodId, 
		somId methodDescriptor, 
		somMethodPtr method, 
		somMethodPtr applyStub)
{
/*
 *  Adds the indicated method to the class's name lookup list.
 *  If this happens to override a static method then this operation is
 *  equivalent to <somOverrideSMethod> and the <methodDescriptor> and
 *  <applyStub> arguments are ignored (the overridden method's values
 *  will be used).
 * 
 *  <methodDescriptor> is the somId for an identifier that can be used
 *  to access signature information about the method from an interface
 *  repository.
 * 
 *  <method> is the actual method procedure for this method
 * 
 *  <applyStub> is a procedure that takes a standard variable argument
 *  list data structure applies it to its target object by calling
 *  <method> with arguments derived from the data structure.  Its
 *  calling sequence is the same as the calling sequence of the
 *  dispatch methods defined in SOMObject.  This stub is used in the
 *  support of the dispatch methods used in some classes.  In classes
 *  where the dispatch functions do not need such a function this
 *  parameter may be null.
 */
   SOM_ResolveD(this,M_SOMPPersistentObject,SOMClass,somAddDynamicMethod)
	(this,methodId,methodDescriptor,method,applyStub);
}


/* method: somOverrideSMethod */
void   somOverrideSMethod(somId methodId, 
		somMethodPtr method)
{
/*
 *  This method can be used instead of <somAddStaticMethod> or
 *  <somAddDynamicMethod> when it is known that the class' parent
 *  class already supports this method.  This call does not require the
 *  method descriptor and stub methods that the others do.
 */
   SOM_ResolveD(this,M_SOMPPersistentObject,SOMClass,somOverrideSMethod)
	(this,methodId,method);
}


/* method: somClassReady */
void   somClassReady()
{
/*
 *  This method is invoked when all of the static initialization for
 *  the class has been finished.  The default implementation simply
 *  registers the newly constructed class with the SOMClassMgr.
 */
   SOM_ResolveD(this,M_SOMPPersistentObject,SOMClass,somClassReady)
	(this);
}


/* method: somGetApplyStub */
somMethodPtr   somGetApplyStub(somId methodId)
{
/*
 *  Returns the apply stub associated with the specified method,
 *  if one exists; otherwise NULL is returned. This method is obsolete,
 *  and retained for binary compatability. In SOMr2, users never access
 *  apply stubs directly; The function somApply is used to invoke apply
 *  stubs. See somApply documentation for further information on apply
 *  stubs, and see somAddStaticMethod documentation for information
 *  on how apply stubs are registered by class implementations.
 */
   return SOM_ResolveD(this,M_SOMPPersistentObject,SOMClass,somGetApplyStub)
	(this,methodId);
}


/* method: somGetClassData */
somClassDataStructure*   somGetClassData()
{
   return SOM_ResolveD(this,M_SOMPPersistentObject,SOMClass,somGetClassData)
	(this);
}


/* method: somSetClassData */
void   somSetClassData(somClassDataStructure* cds)
{
/*
 *  The class' pointer to the static <className>ClassData structure.
 */
   SOM_ResolveD(this,M_SOMPPersistentObject,SOMClass,somSetClassData)
	(this,cds);
}


/* method: somGetClassMtab */
somMethodTab*   somGetClassMtab()
{
/*
 *  A pointer to the method table used by instances of this class. This
 *  method was misnamed; it should have been called somGetInstanceMtab.
 */
   return SOM_ResolveD(this,M_SOMPPersistentObject,SOMClass,somGetClassMtab)
	(this);
}


/* method: somGetInstanceOffset */
long   somGetInstanceOffset()
{
/*
 *  Returns the offset of instance data introduced by the receiver in
 *  an instance of the receiver. This method is obsolete and not useful in
 *  multiple-inheritance situations. The attribute somInstanceDataOffsets
 *  replaces this method.
 */
   return SOM_ResolveD(this,M_SOMPPersistentObject,SOMClass,somGetInstanceOffset)
	(this);
}


/* method: somGetInstancePartSize */
long   somGetInstancePartSize()
{
/*
 *  The size in bytes of the instance data introduced by the receiving
 *  class.
 */
   return SOM_ResolveD(this,M_SOMPPersistentObject,SOMClass,somGetInstancePartSize)
	(this);
}


/* method: somGetInstanceSize */
long   somGetInstanceSize()
{
/*
 *  The total size of an instance of the receiving class.
 */
   return SOM_ResolveD(this,M_SOMPPersistentObject,SOMClass,somGetInstanceSize)
	(this);
}


/* method: somGetInstanceToken */
somDToken   somGetInstanceToken()
{
/*
 *  A data token that identifies the introduced portion of this class
 *  within itself or any derived class.  This token can be subsequently
 *  passed to the run-time somDataResolve function to locate the instance
 *  data introduced by this class in any object derived from this class.
 */
   return SOM_ResolveD(this,M_SOMPPersistentObject,SOMClass,somGetInstanceToken)
	(this);
}


/* method: somGetMemberToken */
somDToken   somGetMemberToken(long memberOffset, 
		somDToken instanceToken)
{
/*
 *  Returns a data token that for the data member at offset
 *  "memberOffset" within the introduced portion of the class identified
 *  by instanceToken.  The instance token must have been obtained from a
 *  previous invocation of somGetInstanceToken.  The returned member
 *  token can be subsequently passed to the run-time somDataResolve
 *  function to locate the data member.
 */
   return SOM_ResolveD(this,M_SOMPPersistentObject,SOMClass,somGetMemberToken)
	(this,memberOffset,instanceToken);
}


/* method: somGetMethodData */
boolean   somGetMethodData(somId methodId, 
		somMethodData* md)
{
/*
 *  If a method with id <methodId> is supported by the target class,
 *  the structure pointed to by <md> is loaded with method information
 *  and the value 1 is returned. In this case, if the method is not
 *  dynamic, md->method is loaded with the result of somClassResolve on
 *  the target class for the method. If the method is not supported,
 *  md->id is loaded with 0, and the value 0 is returned.
 */
   return SOM_ResolveD(this,M_SOMPPersistentObject,SOMClass,somGetMethodData)
	(this,methodId,md);
}


/* method: somGetRdStub */
somMethodProc*   somGetRdStub(somId methodId)
{
/*
 *  Returns a redispatch stub for the indicated method, if possible.
 *  If not possible (because a valid redispatch stub has not been
 *  registered, and there is insufficient information to dynamically
 *  construct one), then a NULL is returned.
 */
   return SOM_ResolveD(this,M_SOMPPersistentObject,SOMClass,somGetRdStub)
	(this,methodId);
}


/* method: somGetMethodDescriptor */
somId   somGetMethodDescriptor(somId methodId)
{
/*
 *  Returns the method descriptor for the indicated method.    If
 *  this object does not support the indicated method then NULL is
 *  returned.
 */
   return SOM_ResolveD(this,M_SOMPPersistentObject,SOMClass,somGetMethodDescriptor)
	(this,methodId);
}


/* method: somGetMethodIndex */
long   somGetMethodIndex(somId id)
{
/*
 *  Returns the index for the specified method. (A number that may
 *  change if any methods are added or deleted to this class object or
 *  any of its ancestors).  This number is the basis for other calls to
 *  get info about the method. Indexes start at 0. A -1 is returned if
 *  the method cannot be found.
 */
   return SOM_ResolveD(this,M_SOMPPersistentObject,SOMClass,somGetMethodIndex)
	(this,id);
}


/* method: somGetMethodToken */
somMToken   somGetMethodToken(somId methodId)
{
/*
 *  Returns the specified method's access token. This token can then
 *  be passed to method resolution routines, which use the token
 *  to select a method pointer from a method table.
 */
   return SOM_ResolveD(this,M_SOMPPersistentObject,SOMClass,somGetMethodToken)
	(this,methodId);
}


/* method: somGetName */
string   somGetName()
{
/*
 *  This object's class name as a NULL terminated string.
 */
   return SOM_ResolveD(this,M_SOMPPersistentObject,SOMClass,somGetName)
	(this);
}


/* method: somGetNthMethodData */
boolean   somGetNthMethodData(long n, 
		somMethodData* md)
{
/*
 *  loads *md with the method data associated with the the nth method,
 *  or NULL if there is no such method. Returns true is successful;
 *  false otherwise.
 */
   return SOM_ResolveD(this,M_SOMPPersistentObject,SOMClass,somGetNthMethodData)
	(this,n,md);
}


/* method: somGetNthMethodInfo */
somId   somGetNthMethodInfo(long n, 
		somId* descriptor)
{
/*
 *  Returns the id of the <n>th method if one exists and NULL
 *  otherwise.
 * 
 *  The ordering of the methods is unpredictable, but will not change
 *  unless some change is made to the class or one of its ancestor classes.
 * 
 *  See CORBA documentation for info on method descriptors.
 */
   return SOM_ResolveD(this,M_SOMPPersistentObject,SOMClass,somGetNthMethodInfo)
	(this,n,descriptor);
}


/* method: somGetNumMethods */
long   somGetNumMethods()
{
/*
 *  The number of methods currently supported by this class,
 *  including inherited methods (both static and dynamic).
 */
   return SOM_ResolveD(this,M_SOMPPersistentObject,SOMClass,somGetNumMethods)
	(this);
}


/* method: somGetNumStaticMethods */
long   somGetNumStaticMethods()
{
/*
 *  The number of static methods that this class has.  Can
 *  be used by a child class when initializing its method table.
 */
   return SOM_ResolveD(this,M_SOMPPersistentObject,SOMClass,somGetNumStaticMethods)
	(this);
}


/* method: somGetParent */
SOMClass*   somGetParent()
{
/*
 *  Returns the parent class of self (along its "left-hand" derivation
 *  path), if one exists and NULL otherwise.
 */
   return SOM_ResolveD(this,M_SOMPPersistentObject,SOMClass,somGetParent)
	(this);
}


/* method: somGetParents */
SOMClass_SOMClassSequence   somGetParents()
{
/*
 *  The parent classes of self.
 */
   return SOM_ResolveD(this,M_SOMPPersistentObject,SOMClass,somGetParents)
	(this);
}


/* method: somGetVersionNumbers */
void   somGetVersionNumbers(long* majorVersion, 
		long* minorVersion)
{
/*
 *  Returns the class' major and minor version numbers in the corresponding
 *  output parameters.
 */
   SOM_ResolveD(this,M_SOMPPersistentObject,SOMClass,somGetVersionNumbers)
	(this,majorVersion,minorVersion);
}


/* method: somFindMethod */
boolean   somFindMethod(somId methodId, 
		somMethodPtr* m)
{
/*
 *  Finds the method procedure associated with <methodId> for this
 *  class and sets <m> to it.  1 (true) is returned when the
 *  method procedure is a static method and 0 (false) is returned
 *  when the method procedure is dynamic method.
 * 
 *  If the class does not support the specified method then
 *  <m> is set to NULL and the return value is meaningless.
 * 
 */
   return SOM_ResolveD(this,M_SOMPPersistentObject,SOMClass,somFindMethod)
	(this,methodId,m);
}


/* method: somFindMethodOk */
boolean   somFindMethodOk(somId methodId, 
		somMethodPtr* m)
{
/*
 *  Just like <somFindMethod> except that if the method is not
 *  supported then an error is raised and execution is halted.
 */
   return SOM_ResolveD(this,M_SOMPPersistentObject,SOMClass,somFindMethodOk)
	(this,methodId,m);
}


/* method: somFindSMethod */
somMethodPtr   somFindSMethod(somId methodId)
{
/*
 *  Finds the indicated method, which must be a static method supported
 *  by this class, and returns a pointer to its method procedure.
 *  If the method is not supported by the receiver (as a static method
 *  or at all) then a NULL pointer is returned.
 */
   return SOM_ResolveD(this,M_SOMPPersistentObject,SOMClass,somFindSMethod)
	(this,methodId);
}


/* method: somFindSMethodOk */
somMethodPtr   somFindSMethodOk(somId methodId)
{
/*
 *  Uses <somFindSMethod>, and raises an error if the result is NULL.
 */
   return SOM_ResolveD(this,M_SOMPPersistentObject,SOMClass,somFindSMethodOk)
	(this,methodId);
}


/* method: somLookupMethod */
somMethodPtr   somLookupMethod(somId methodId)
{
/*
 *  Like <somFindSMethodOK>, but without restriction to static methods.
 */
   return SOM_ResolveD(this,M_SOMPPersistentObject,SOMClass,somLookupMethod)
	(this,methodId);
}


/* method: somCheckVersion */
boolean   somCheckVersion(long majorVersion, 
		long minorVersion)
{
/*
 *  Returns 1 (true) if the implementation of this class is
 *  compatible with the specified major and minor version number and
 *  false (0) otherwise.  An implementation is compatible with the
 *  specified version numbers if it has the same major version number
 *  and a minor version number that is equal to or greater than
 *  <minorVersion>.    The major, minor version number pair (0,0) is
 *  considered to match any version.  This method is usually called
 *  immediately after creating the class object to verify that a
 *  dynamically loaded class definition is compatible with a using
 *  application.
 */
   return SOM_ResolveD(this,M_SOMPPersistentObject,SOMClass,somCheckVersion)
	(this,majorVersion,minorVersion);
}


/* method: somDescendedFrom */
boolean   somDescendedFrom(SOMClass* aClassObj)
{
/*
 *  Returns 1 (true) if <self> is a descendent class of <aClassObj> and
 *  0 (false) otherwise.  Note: a class object is considered to be
 *  descended itself for the purposes of this method.
 */
   return SOM_ResolveD(this,M_SOMPPersistentObject,SOMClass,somDescendedFrom)
	(this,aClassObj);
}


/* method: somSupportsMethod */
boolean   somSupportsMethod(somId mId)
{
/*
 *  Returns 1 (true) if the indicated method is supported by this
 *  class and 0 (false) otherwise.
 */
   return SOM_ResolveD(this,M_SOMPPersistentObject,SOMClass,somSupportsMethod)
	(this,mId);
}


/* method: somDefinedMethod */
somMethodPtr   somDefinedMethod(somMToken method)
{
/*
 *  if the receiving class either introduces or overrides the
 *  indicated method, then its somMethodPtr is returned, otherwise
 *  NULL is returned.
 */
   return SOM_ResolveD(this,M_SOMPPersistentObject,SOMClass,somDefinedMethod)
	(this,method);
}


/* method: somOverrideMtab */
void   somOverrideMtab()
{
/*
 *  Overrides the method table pointers to point to the redispatch stubs.
 *  All the methods except somDispatch methods are overriden.
 */
   SOM_ResolveD(this,M_SOMPPersistentObject,SOMClass,somOverrideMtab)
	(this);
}


/* 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,M_SOMPPersistentObject,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,M_SOMPPersistentObject,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,M_SOMPPersistentObject,SOMObject,somDefaultCopyInit)
	(this,ctrl,fromObj);
}


/* method: somDefaultAssign */
M_SOMPPersistentObject*  somDefaultAssign(som3AssignCtrl* ctrl, 
		SOMObject* fromObj)
{
/*
 *  A default assignment operator. Use this to "assign" the state of one
 *  object to another.
 */
   return SOM_ResolveD(this,M_SOMPPersistentObject,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,M_SOMPPersistentObject,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,M_SOMPPersistentObject,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,M_SOMPPersistentObject,SOMObject,somDefaultConstVCopyInit)
	(this,ctrl,fromObj);
}


/* method: somDefaultConstAssign */
M_SOMPPersistentObject*  somDefaultConstAssign(som3AssignCtrl* ctrl, 
		SOMObject* fromObj)
{
/*
 *  A default assignment operator that uses a const fromObj.
 */
   return SOM_ResolveD(this,M_SOMPPersistentObject,SOMObject,somDefaultConstAssign)
	(this,ctrl,fromObj);
}


/* method: somDefaultVAssign */
M_SOMPPersistentObject*  somDefaultVAssign(som3AssignCtrl* ctrl, 
		SOMObject* fromObj)
{
/*
 *  A default assignment operator that uses a volatile fromObj.
 */
   return SOM_ResolveD(this,M_SOMPPersistentObject,SOMObject,somDefaultVAssign)
	(this,ctrl,fromObj);
}


/* method: somDefaultConstVAssign */
M_SOMPPersistentObject*  somDefaultConstVAssign(som3AssignCtrl* ctrl, 
		SOMObject* fromObj)
{
/*
 *  A default assignment operator that uses a const volatile fromObj.
 */
   return SOM_ResolveD(this,M_SOMPPersistentObject,SOMObject,somDefaultConstVAssign)
	(this,ctrl,fromObj);
}


/* method: somInit */
void   somInit()
{
/*
 *  Obsolete but still supported. Override somDefaultInit instead of somInit.
 */
   SOM_ResolveD(this,M_SOMPPersistentObject,SOMObject,somInit)
	(this);
}


/* method: somFree */
void   somFree()
{
/*
 *  Use as directed by framework implementations.
 */
   SOM_ResolveD(this,M_SOMPPersistentObject,SOMObject,somFree)
	(this);
}


/* method: somUninit */
void   somUninit()
{
/*
 *  Obsolete but still supported. Override somDestruct instead of somUninit.
 */
   SOM_ResolveD(this,M_SOMPPersistentObject,SOMObject,somUninit)
	(this);
}


/* method: somGetClass */
SOMClass*   somGetClass()
{
/*
 *  Return the receiver's class.
 */
   return SOM_ResolveD(this,M_SOMPPersistentObject,SOMObject,somGetClass)
	(this);
}


/* method: somGetClassName */
string   somGetClassName()
{
/*
 *  Return the name of the receiver's class.
 */
   return SOM_ResolveD(this,M_SOMPPersistentObject,SOMObject,somGetClassName)
	(this);
}


/* method: somGetSize */
long   somGetSize()
{
/*
 *  Return the size of the receiver.
 */
   return SOM_ResolveD(this,M_SOMPPersistentObject,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,M_SOMPPersistentObject,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,M_SOMPPersistentObject,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,M_SOMPPersistentObject,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   M_SOMPPersistentObject_somDispatch(somToken* retValue, 
		somId methodId, 
		va_list ap)
{return SOM_ResolveD(this,M_SOMPPersistentObject,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,M_SOMPPersistentObject,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   M_SOMPPersistentObject_somClassDispatch(SOMClass* clsObj, 
		somToken* retValue, 
		somId methodId, 
		va_list ap)
{return SOM_ResolveD(this,M_SOMPPersistentObject,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,M_SOMPPersistentObject,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,M_SOMPPersistentObject,SOMObject,somCastObj)
	(this,cls);
}


/* method: somResetObj */
boolean   somResetObj()
{
/*
 *  reset an object to its true class. Returns true always.
 */
   return SOM_ResolveD(this,M_SOMPPersistentObject,SOMObject,somResetObj)
	(this);
}


/* va_list method: somDispatchV */

/*
 *  Obsolete. Use somDispatch instead.
 */
/* the va_list invocation form */
void   M_SOMPPersistentObject_somDispatchV(somId methodId, 
		somId descriptor, 
		va_list ap)
{   SOM_ResolveD(this,M_SOMPPersistentObject,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,M_SOMPPersistentObject,SOMObject,somDispatchV)
	(this,methodId,descriptor,ap);
   va_end(ap);
}


/* va_list method: somDispatchL */

/*
 *  Obsolete. Use somDispatch instead.
 */
/* the va_list invocation form */
long   M_SOMPPersistentObject_somDispatchL(somId methodId, 
		somId descriptor, 
		va_list ap)
{return SOM_ResolveD(this,M_SOMPPersistentObject,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,M_SOMPPersistentObject,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*   M_SOMPPersistentObject_somDispatchA(somId methodId, 
		somId descriptor, 
		va_list ap)
{return SOM_ResolveD(this,M_SOMPPersistentObject,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,M_SOMPPersistentObject,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   M_SOMPPersistentObject_somDispatchD(somId methodId, 
		somId descriptor, 
		va_list ap)
{return SOM_ResolveD(this,M_SOMPPersistentObject,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,M_SOMPPersistentObject,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,M_SOMPPersistentObject,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,M_SOMPPersistentObject,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,M_SOMPPersistentObject,SOMObject,somDumpSelfInt)
	(this,level);
}



};   /* M_SOMPPersistentObject */



#endif       /* SOM_M_SOMPPersistentObject_xh */
