
/*
 * This file was generated by the SOM Compiler.
 * FileName: somap.xh.
 * Generated using:
 *     SOM Precompiler somipc: 2.29.1.19
 *     SOM Emitter emitxh.dll: 2.108
 */

#ifndef SOM_Module_somap_somAttributePersistence_defined
#define SOM_Module_somap_somAttributePersistence_defined 1
#include <som.xh>

/*
 * Start of bindings for IDL types
 */

class SOMClass;
class SOMObject;
class Container;
class ExtendedNaming_PropertyBindingIterator;
class ExtendedNaming_PropertyIterator;
class ExtendedNaming_IndexIterator;
class SOMDObject;
class Principal;
class ImplementationDef;
class InterfaceDef;
class NVList;
class Context;
class Request;
class CosObjectIdentity_IdentifiableObject;
class somAttributePersistence_Persist;
class somAttributePersistence_Persist;

/*
 * End of bindings for IDL types.
 */
#endif /* SOM_Module_somap_somAttributePersistence_defined */

#ifndef SOM_somAttributePersistence_Persist_xh
#define SOM_somAttributePersistence_Persist_xh


#define somAttributePersistence_Persist_MajorVersion 3
#define somAttributePersistence_Persist_MinorVersion 0
class somAttributePersistence_Persist;

/* Parents */
#ifndef SOM_TypecodeDataManipulator_xh
#ifdef SOMLOCALINCLUDES
#include "somtdm.xh"
#else
#include <somtdm.xh>
#endif
#endif
#ifndef SOM_somOS_ServiceBasePRef_xh
#ifdef SOMLOCALINCLUDES
#include "somos.xh"
#else
#include <somos.xh>
#endif
#endif

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

#ifndef somAttributePersistence_Persist_API
#define somAttributePersistence_Persist_API
/*
 * -- The Class API
 */
#ifndef SOM_IMPORTEXPORT_somos_somap
#ifdef SOM_DLL_somos
	/* export semantics */
	#if defined(SOM_DEFFILE_somos)\
	||(defined(SOM_DEFFILE_BY_DEFAULT)&&!defined(SOM_NODEFFILE_somos))\
	|| !defined(SOM_Module_somap_Source)
	#define SOM_IMPORTEXPORT_somos_somap
	#else
	#define SOM_IMPORTEXPORT_somos_somap SOMDLLEXPORT
	#endif
#else
	#define SOM_IMPORTEXPORT_somos_somap SOMDLLIMPORT
#endif
#endif

/*
 * Start of bindings for IDL types
 */


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

/*
 * A function to create the somAttributePersistence_Persist class object...
 */
SOMEXTERN SOM_IMPORTEXPORT_somos_somap SOMClass * SOMLINK somAttributePersistence_PersistNewClass(
		integer4 majorVersion,
		integer4 minorVersion);


/*
 * The API 2 ClassData Structures...
 */
SOMEXTERN struct somAttributePersistence_PersistClassDataStructure {
	SOMClass *classObject;
	somMToken load_attribute;
	somMToken store_attribute;
} SOMDLINK SOM_IMPORTEXPORT_somos_somap somAttributePersistence_PersistClassData;
SOMEXTERN struct somAttributePersistence_PersistCClassDataStructure {
	som3ClassDetailsPtr    parentMtab;
	somDToken              instanceDataToken;
} SOMDLINK SOM_IMPORTEXPORT_somos_somap somAttributePersistence_PersistCClassData;


/*
 * Class Object and Method Token Macros
 */
#define _SOMCLASS_somAttributePersistence_Persist (somAttributePersistence_PersistClassData.classObject)
#ifndef SOMGD_somAttributePersistence_Persist
    #if (defined(_somAttributePersistence_Persist) || defined(__somAttributePersistence_Persist))
        #undef _somAttributePersistence_Persist
        #undef __somAttributePersistence_Persist
        #define SOMGD_somAttributePersistence_Persist 1
    #else
        #define _somAttributePersistence_Persist _SOMCLASS_somAttributePersistence_Persist
    #endif /* _somAttributePersistence_Persist */
#endif /* SOMGD_somAttributePersistence_Persist */
#define somAttributePersistence_Persist_classObj _SOMCLASS_somAttributePersistence_Persist
#define _SOMMTOKEN_somAttributePersistence_Persist(method) ((somMToken)somAttributePersistence_PersistClassData.method)

/*
 * -- Typedefs for somAttributePersistence_Persist Method Procedures
 */
SOMEXTERN {
typedef void   SOMLINK somTP_somAttributePersistence_Persist_load_attribute(somAttributePersistence_Persist *somSelf, Environment *ev, 
		string attribute_name, 
		void** buffer, 
		TypeCode attribute_tc);
typedef somTP_somAttributePersistence_Persist_load_attribute *somTD_somAttributePersistence_Persist_load_attribute;
typedef void   SOMLINK somTP_somAttributePersistence_Persist_store_attribute(somAttributePersistence_Persist *somSelf, Environment *ev, 
		string attribute_name, 
		void* buffer, 
		TypeCode attribute_tc);
typedef somTP_somAttributePersistence_Persist_store_attribute *somTD_somAttributePersistence_Persist_store_attribute;

/*
 * -- Typedefs for Reintroduced Wrapper Methods
 */
typedef void   SOMLINK somTP_somAttributePersistence_Persist_somDefaultInit(somAttributePersistence_Persist *somSelf, 
		som3InitCtrl* ctrl);
typedef somTP_somAttributePersistence_Persist_somDefaultInit *somTD_somAttributePersistence_Persist_somDefaultInit;
typedef void   SOMLINK somTP_somAttributePersistence_Persist_somDestruct(somAttributePersistence_Persist *somSelf, 
		octet doFree, 
		som3DestructCtrl* ctrl);
typedef somTP_somAttributePersistence_Persist_somDestruct *somTD_somAttributePersistence_Persist_somDestruct;
typedef void   SOMLINK somTP_somAttributePersistence_Persist_somDefaultCopyInit(somAttributePersistence_Persist *somSelf, 
		som3InitCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_somAttributePersistence_Persist_somDefaultCopyInit *somTD_somAttributePersistence_Persist_somDefaultCopyInit;
typedef somAttributePersistence_Persist*   SOMLINK somTP_somAttributePersistence_Persist_somDefaultAssign(somAttributePersistence_Persist *somSelf, 
		som3AssignCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_somAttributePersistence_Persist_somDefaultAssign *somTD_somAttributePersistence_Persist_somDefaultAssign;
typedef void   SOMLINK somTP_somAttributePersistence_Persist_somDefaultConstCopyInit(somAttributePersistence_Persist *somSelf, 
		som3InitCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_somAttributePersistence_Persist_somDefaultConstCopyInit *somTD_somAttributePersistence_Persist_somDefaultConstCopyInit;
typedef void   SOMLINK somTP_somAttributePersistence_Persist_somDefaultVCopyInit(somAttributePersistence_Persist *somSelf, 
		som3InitCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_somAttributePersistence_Persist_somDefaultVCopyInit *somTD_somAttributePersistence_Persist_somDefaultVCopyInit;
typedef void   SOMLINK somTP_somAttributePersistence_Persist_somDefaultConstVCopyInit(somAttributePersistence_Persist *somSelf, 
		som3InitCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_somAttributePersistence_Persist_somDefaultConstVCopyInit *somTD_somAttributePersistence_Persist_somDefaultConstVCopyInit;
typedef somAttributePersistence_Persist*   SOMLINK somTP_somAttributePersistence_Persist_somDefaultConstAssign(somAttributePersistence_Persist *somSelf, 
		som3AssignCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_somAttributePersistence_Persist_somDefaultConstAssign *somTD_somAttributePersistence_Persist_somDefaultConstAssign;
typedef somAttributePersistence_Persist*   SOMLINK somTP_somAttributePersistence_Persist_somDefaultVAssign(somAttributePersistence_Persist *somSelf, 
		som3AssignCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_somAttributePersistence_Persist_somDefaultVAssign *somTD_somAttributePersistence_Persist_somDefaultVAssign;
typedef somAttributePersistence_Persist*   SOMLINK somTP_somAttributePersistence_Persist_somDefaultConstVAssign(somAttributePersistence_Persist *somSelf, 
		som3AssignCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_somAttributePersistence_Persist_somDefaultConstVAssign *somTD_somAttributePersistence_Persist_somDefaultConstVAssign;
typedef void   SOMLINK somTP_somAttributePersistence_Persist_somInit(somAttributePersistence_Persist *somSelf);
typedef somTP_somAttributePersistence_Persist_somInit *somTD_somAttributePersistence_Persist_somInit;
typedef void   SOMLINK somTP_somAttributePersistence_Persist_somUninit(somAttributePersistence_Persist *somSelf);
typedef somTP_somAttributePersistence_Persist_somUninit *somTD_somAttributePersistence_Persist_somUninit;
typedef void   SOMLINK somTP_somAttributePersistence_Persist_somFree(somAttributePersistence_Persist *somSelf);
typedef somTP_somAttributePersistence_Persist_somFree *somTD_somAttributePersistence_Persist_somFree;
typedef SOMClass*   SOMLINK somTP_somAttributePersistence_Persist_somGetClass(somAttributePersistence_Persist *somSelf);
typedef somTP_somAttributePersistence_Persist_somGetClass *somTD_somAttributePersistence_Persist_somGetClass;
typedef string   SOMLINK somTP_somAttributePersistence_Persist_somGetClassName(somAttributePersistence_Persist *somSelf);
typedef somTP_somAttributePersistence_Persist_somGetClassName *somTD_somAttributePersistence_Persist_somGetClassName;
typedef long   SOMLINK somTP_somAttributePersistence_Persist_somGetSize(somAttributePersistence_Persist *somSelf);
typedef somTP_somAttributePersistence_Persist_somGetSize *somTD_somAttributePersistence_Persist_somGetSize;
typedef boolean   SOMLINK somTP_somAttributePersistence_Persist_somIsA(somAttributePersistence_Persist *somSelf, 
		SOMClass* aClassObj);
typedef somTP_somAttributePersistence_Persist_somIsA *somTD_somAttributePersistence_Persist_somIsA;
typedef boolean   SOMLINK somTP_somAttributePersistence_Persist_somIsInstanceOf(somAttributePersistence_Persist *somSelf, 
		SOMClass* aClassObj);
typedef somTP_somAttributePersistence_Persist_somIsInstanceOf *somTD_somAttributePersistence_Persist_somIsInstanceOf;
typedef boolean   SOMLINK somTP_somAttributePersistence_Persist_somRespondsTo(somAttributePersistence_Persist *somSelf, 
		somId mId);
typedef somTP_somAttributePersistence_Persist_somRespondsTo *somTD_somAttributePersistence_Persist_somRespondsTo;
typedef boolean   SOMLINK somTP_somAttributePersistence_Persist_somDispatch(somAttributePersistence_Persist *somSelf, 
		somToken* retValue, 
		somId methodId, 
		va_list ap);
typedef somTP_somAttributePersistence_Persist_somDispatch *somTD_somAttributePersistence_Persist_somDispatch;
typedef boolean   SOMLINK somTP_somAttributePersistence_Persist_somClassDispatch(somAttributePersistence_Persist *somSelf, 
		SOMClass* clsObj, 
		somToken* retValue, 
		somId methodId, 
		va_list ap);
typedef somTP_somAttributePersistence_Persist_somClassDispatch *somTD_somAttributePersistence_Persist_somClassDispatch;
typedef boolean   SOMLINK somTP_somAttributePersistence_Persist_somCastObj(somAttributePersistence_Persist *somSelf, 
		SOMClass* castedCls);
typedef somTP_somAttributePersistence_Persist_somCastObj *somTD_somAttributePersistence_Persist_somCastObj;
typedef boolean   SOMLINK somTP_somAttributePersistence_Persist_somResetObj(somAttributePersistence_Persist *somSelf);
typedef somTP_somAttributePersistence_Persist_somResetObj *somTD_somAttributePersistence_Persist_somResetObj;
typedef somAttributePersistence_Persist*   SOMLINK somTP_somAttributePersistence_Persist_somPrintSelf(somAttributePersistence_Persist *somSelf);
typedef somTP_somAttributePersistence_Persist_somPrintSelf *somTD_somAttributePersistence_Persist_somPrintSelf;
typedef void   SOMLINK somTP_somAttributePersistence_Persist_somDumpSelf(somAttributePersistence_Persist *somSelf, 
		long level);
typedef somTP_somAttributePersistence_Persist_somDumpSelf *somTD_somAttributePersistence_Persist_somDumpSelf;
typedef void   SOMLINK somTP_somAttributePersistence_Persist_somDumpSelfInt(somAttributePersistence_Persist *somSelf, 
		long level);
typedef somTP_somAttributePersistence_Persist_somDumpSelfInt *somTD_somAttributePersistence_Persist_somDumpSelfInt;
typedef SOMObject*   SOMLINK somTP_somAttributePersistence_Persist_init_for_object_creation(somAttributePersistence_Persist *somSelf, Environment *ev);
typedef somTP_somAttributePersistence_Persist_init_for_object_creation *somTD_somAttributePersistence_Persist_init_for_object_creation;
typedef void   SOMLINK somTP_somAttributePersistence_Persist_uninit_for_object_destruction(somAttributePersistence_Persist *somSelf, Environment *ev);
typedef somTP_somAttributePersistence_Persist_uninit_for_object_destruction *somTD_somAttributePersistence_Persist_uninit_for_object_destruction;
typedef void   SOMLINK somTP_somAttributePersistence_Persist_reinit(somAttributePersistence_Persist *somSelf, Environment *ev, 
		somOS_ServiceBase_metastate_t* meta_data);
typedef somTP_somAttributePersistence_Persist_reinit *somTD_somAttributePersistence_Persist_reinit;
typedef void   SOMLINK somTP_somAttributePersistence_Persist_capture(somAttributePersistence_Persist *somSelf, Environment *ev, 
		somOS_ServiceBase_metastate_t* meta_data);
typedef somTP_somAttributePersistence_Persist_capture *somTD_somAttributePersistence_Persist_capture;
typedef SOMObject*   SOMLINK somTP_somAttributePersistence_Persist_GetInstanceManager(somAttributePersistence_Persist *somSelf, Environment *ev);
typedef somTP_somAttributePersistence_Persist_GetInstanceManager *somTD_somAttributePersistence_Persist_GetInstanceManager;
typedef SOMObject*   SOMLINK somTP_somAttributePersistence_Persist_init_for_object_reactivation(somAttributePersistence_Persist *somSelf, Environment *ev);
typedef somTP_somAttributePersistence_Persist_init_for_object_reactivation *somTD_somAttributePersistence_Persist_init_for_object_reactivation;
typedef SOMObject*   SOMLINK somTP_somAttributePersistence_Persist_init_for_object_copy(somAttributePersistence_Persist *somSelf, Environment *ev);
typedef somTP_somAttributePersistence_Persist_init_for_object_copy *somTD_somAttributePersistence_Persist_init_for_object_copy;
typedef void   SOMLINK somTP_somAttributePersistence_Persist_uninit_for_object_move(somAttributePersistence_Persist *somSelf, Environment *ev);
typedef somTP_somAttributePersistence_Persist_uninit_for_object_move *somTD_somAttributePersistence_Persist_uninit_for_object_move;
typedef void   SOMLINK somTP_somAttributePersistence_Persist_uninit_for_object_passivation(somAttributePersistence_Persist *somSelf, Environment *ev);
typedef somTP_somAttributePersistence_Persist_uninit_for_object_passivation *somTD_somAttributePersistence_Persist_uninit_for_object_passivation;
typedef boolean   SOMLINK somTP_somAttributePersistence_Persist_is_identical(somAttributePersistence_Persist *somSelf, Environment *ev, 
		CosObjectIdentity_IdentifiableObject* other_object);
typedef somTP_somAttributePersistence_Persist_is_identical *somTD_somAttributePersistence_Persist_is_identical;
typedef CosObjectIdentity_ObjectIdentifier   SOMLINK somTP_somAttributePersistence_Persist__get_constant_random_id(somAttributePersistence_Persist *somSelf, Environment *ev);
typedef somTP_somAttributePersistence_Persist__get_constant_random_id *somTD_somAttributePersistence_Persist__get_constant_random_id;
}

#endif /* somAttributePersistence_Persist_API */


/*
 * -- The C++ Wrapper Class for somAttributePersistence_Persist
 */
class somAttributePersistence_Persist : public TypecodeDataManipulator, public somOS_ServiceBasePRef
{
public:

// somAttributePersistence_Persist::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 (!_somAttributePersistence_Persist) somAttributePersistence_PersistNewClass(somAttributePersistence_Persist_MajorVersion,somAttributePersistence_Persist_MinorVersion);
   return (void*)
   (((somTD_SOMClass_somNewNoInit)(SOMClassClassData.somNewNoInit))
         ((SOMClass *)((void*)_somAttributePersistence_Persist)));
}

// somAttributePersistence_Persist::delete uses somFree.
void operator delete(void * obj)
{
   if (obj && *(void**)obj)
      ((SOMObject*)obj)->somFree();
}

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

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

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


/* method: load_attribute */
void   load_attribute(Environment *ev, 
		string attribute_name, 
		void** buffer, 
		TypeCode attribute_tc)
{
   	(
	 SOM_TestCls(this,_SOMCLASS_somAttributePersistence_Persist),
	 ((somTD_somAttributePersistence_Persist_load_attribute)(somAttributePersistence_PersistClassData.load_attribute))(((somAttributePersistence_Persist *)((void *)this)), ev,attribute_name,buffer,attribute_tc)
	);
}


/* method: store_attribute */
void   store_attribute(Environment *ev, 
		string attribute_name, 
		void* buffer, 
		TypeCode attribute_tc)
{
   	(
	 SOM_TestCls(this,_SOMCLASS_somAttributePersistence_Persist),
	 ((somTD_somAttributePersistence_Persist_store_attribute)(somAttributePersistence_PersistClassData.store_attribute))(((somAttributePersistence_Persist *)((void *)this)), ev,attribute_name,buffer,attribute_tc)
	);
}


/*
 * Reintroduce inherited methods
 */

/* method: somDefaultInit */
void   somDefaultInit(som3InitCtrl* ctrl)
{
   	(
	 SOM_TestCls(this,_SOMCLASS_SOMObject),
	 ((somTD_somAttributePersistence_Persist_somDefaultInit)(SOMObjectClassData.somDefaultInit))(((somAttributePersistence_Persist *)((void *)this)),ctrl)
	);
}


/* method: somDestruct */
void   somDestruct(octet doFree, 
		som3DestructCtrl* ctrl)
{
   	(
	 SOM_TestCls(this,_SOMCLASS_SOMObject),
	 ((somTD_somAttributePersistence_Persist_somDestruct)(SOMObjectClassData.somDestruct))(((somAttributePersistence_Persist *)((void *)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_TestCls(this,_SOMCLASS_SOMObject),
	 ((somTD_somAttributePersistence_Persist_somDefaultCopyInit)(SOMObjectClassData.somDefaultCopyInit))(((somAttributePersistence_Persist *)((void *)this)),ctrl,fromObj)
	);
}


/* method: somDefaultAssign */
somAttributePersistence_Persist*  somDefaultAssign(som3AssignCtrl* ctrl, 
		SOMObject* fromObj)
{
/*
 *  A default assignment operator. Use this to "assign" the state of one
 *  object to another.
 */
   return 	(
	 SOM_TestCls(this,_SOMCLASS_SOMObject),
	 ((somTD_somAttributePersistence_Persist_somDefaultAssign)(SOMObjectClassData.somDefaultAssign))(((somAttributePersistence_Persist *)((void *)this)),ctrl,fromObj)
	);
}


/* initializer method: somDefaultConstCopyInit */
void   somDefaultConstCopyInit(som3InitCtrl* ctrl, 
		SOMObject* fromObj)
{
/*
 *  A default copy constructor that uses a const fromObj.
 */
   	(
	 SOM_TestCls(this,_SOMCLASS_SOMObject),
	 ((somTD_somAttributePersistence_Persist_somDefaultConstCopyInit)(SOMObjectClassData.somDefaultConstCopyInit))(((somAttributePersistence_Persist *)((void *)this)),ctrl,fromObj)
	);
}


/* initializer method: somDefaultVCopyInit */
void   somDefaultVCopyInit(som3InitCtrl* ctrl, 
		SOMObject* fromObj)
{
/*
 *  A default copy constructor that uses a volatile fromObj.
 */
   	(
	 SOM_TestCls(this,_SOMCLASS_SOMObject),
	 ((somTD_somAttributePersistence_Persist_somDefaultVCopyInit)(SOMObjectClassData.somDefaultVCopyInit))(((somAttributePersistence_Persist *)((void *)this)),ctrl,fromObj)
	);
}


/* initializer method: somDefaultConstVCopyInit */
void   somDefaultConstVCopyInit(som3InitCtrl* ctrl, 
		SOMObject* fromObj)
{
/*
 *  A default copy constructor that uses a const volatile fromObj.
 */
   	(
	 SOM_TestCls(this,_SOMCLASS_SOMObject),
	 ((somTD_somAttributePersistence_Persist_somDefaultConstVCopyInit)(SOMObjectClassData.somDefaultConstVCopyInit))(((somAttributePersistence_Persist *)((void *)this)),ctrl,fromObj)
	);
}


/* method: somDefaultConstAssign */
somAttributePersistence_Persist*  somDefaultConstAssign(som3AssignCtrl* ctrl, 
		SOMObject* fromObj)
{
/*
 *  A default assignment operator that uses a const fromObj.
 */
   return 	(
	 SOM_TestCls(this,_SOMCLASS_SOMObject),
	 ((somTD_somAttributePersistence_Persist_somDefaultConstAssign)(SOMObjectClassData.somDefaultConstAssign))(((somAttributePersistence_Persist *)((void *)this)),ctrl,fromObj)
	);
}


/* method: somDefaultVAssign */
somAttributePersistence_Persist*  somDefaultVAssign(som3AssignCtrl* ctrl, 
		SOMObject* fromObj)
{
/*
 *  A default assignment operator that uses a volatile fromObj.
 */
   return 	(
	 SOM_TestCls(this,_SOMCLASS_SOMObject),
	 ((somTD_somAttributePersistence_Persist_somDefaultVAssign)(SOMObjectClassData.somDefaultVAssign))(((somAttributePersistence_Persist *)((void *)this)),ctrl,fromObj)
	);
}


/* method: somDefaultConstVAssign */
somAttributePersistence_Persist*  somDefaultConstVAssign(som3AssignCtrl* ctrl, 
		SOMObject* fromObj)
{
/*
 *  A default assignment operator that uses a const volatile fromObj.
 */
   return 	(
	 SOM_TestCls(this,_SOMCLASS_SOMObject),
	 ((somTD_somAttributePersistence_Persist_somDefaultConstVAssign)(SOMObjectClassData.somDefaultConstVAssign))(((somAttributePersistence_Persist *)((void *)this)),ctrl,fromObj)
	);
}


/* method: somInit */
void   somInit()
{
/*
 *  Obsolete but still supported. Override somDefaultInit instead of somInit.
 */
   	(
	 SOM_TestCls(this,_SOMCLASS_SOMObject),
	 ((somTD_somAttributePersistence_Persist_somInit)(SOMObjectClassData.somInit))(((somAttributePersistence_Persist *)((void *)this)))
	);
}


/* method: somUninit */
void   somUninit()
{
/*
 *  Obsolete but still supported. Override somDestruct instead of somUninit.
 */
   	(
	 SOM_TestCls(this,_SOMCLASS_SOMObject),
	 ((somTD_somAttributePersistence_Persist_somUninit)(SOMObjectClassData.somUninit))(((somAttributePersistence_Persist *)((void *)this)))
	);
}


/* method: somFree */
void   somFree()
{
/*
 *  The default implementation just calls somDestruct.
 */
   	(
	 SOM_TestCls(this,_SOMCLASS_SOMObject),
	 ((somTD_somAttributePersistence_Persist_somFree)(SOMObjectClassData.somFree))(((somAttributePersistence_Persist *)((void *)this)))
	);
}


/* method: somGetClass */
SOMClass*   somGetClass()
{
/*
 *  Return the receiver's class.
 */
   return 	(
	 SOM_TestCls(this,_SOMCLASS_SOMObject),
	 ((somTD_somAttributePersistence_Persist_somGetClass)(SOMObjectClassData.somGetClass))(((somAttributePersistence_Persist *)((void *)this)))
	);
}


/* method: somGetClassName */
string   somGetClassName()
{
/*
 *  Return the name of the receiver's class.
 */
   return 	(
	 SOM_TestCls(this,_SOMCLASS_SOMObject),
	 ((somTD_somAttributePersistence_Persist_somGetClassName)(SOMObjectClassData.somGetClassName))(((somAttributePersistence_Persist *)((void *)this)))
	);
}


/* method: somGetSize */
long   somGetSize()
{
/*
 *  Return the size of the receiver.
 */
   return 	(
	 SOM_TestCls(this,_SOMCLASS_SOMObject),
	 ((somTD_somAttributePersistence_Persist_somGetSize)(SOMObjectClassData.somGetSize))(((somAttributePersistence_Persist *)((void *)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_TestCls(this,_SOMCLASS_SOMObject),
	 ((somTD_somAttributePersistence_Persist_somIsA)(SOMObjectClassData.somIsA))(((somAttributePersistence_Persist *)((void *)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_TestCls(this,_SOMCLASS_SOMObject),
	 ((somTD_somAttributePersistence_Persist_somIsInstanceOf)(SOMObjectClassData.somIsInstanceOf))(((somAttributePersistence_Persist *)((void *)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_TestCls(this,_SOMCLASS_SOMObject),
	 ((somTD_somAttributePersistence_Persist_somRespondsTo)(SOMObjectClassData.somRespondsTo))(((somAttributePersistence_Persist *)((void *)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.
 * 
 *  Default redispatch stubs invoke this method.
 */
/* the va_list invocation form */
boolean   SOMObject_somDispatch(somToken* retValue, 
		somId methodId, 
		va_list ap)
{   return 	(
	 SOM_TestCls(this,_SOMCLASS_SOMObject),
	 ((somTD_somAttributePersistence_Persist_somDispatch)(SOMObjectClassData.somDispatch))(((somAttributePersistence_Persist *)((void *)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.
 * 
 *  Default redispatch stubs invoke this method.
 */
   va_list ap;
   va_start(ap, methodId);
   boolean __somResult = 
      	(
	 SOM_TestCls(this,_SOMCLASS_SOMObject),
	 ((somTD_somAttributePersistence_Persist_somDispatch)(SOMObjectClassData.somDispatch))(((somAttributePersistence_Persist *)((void *)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   SOMObject_somClassDispatch(SOMClass* clsObj, 
		somToken* retValue, 
		somId methodId, 
		va_list ap)
{   return 	(
	 SOM_TestCls(this,_SOMCLASS_SOMObject),
	 ((somTD_somAttributePersistence_Persist_somClassDispatch)(SOMObjectClassData.somClassDispatch))(((somAttributePersistence_Persist *)((void *)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_TestCls(this,_SOMCLASS_SOMObject),
	 ((somTD_somAttributePersistence_Persist_somClassDispatch)(SOMObjectClassData.somClassDispatch))(((somAttributePersistence_Persist *)((void *)this)),clsObj,retValue,methodId,ap)
	);
   va_end(ap);
   return __somResult;
}


/* method: somCastObj */
boolean   somCastObj(SOMClass* castedCls)
{
/*
 *  Changes the behavior of the target object to that implemented
 *  by castedCls. This is possible when all concrete data in castedCls
 *  is also concrete in the true class of the target object.
 *  Returns true (1) on success, and false (0) otherwise.
 */
   return 	(
	 SOM_TestCls(this,_SOMCLASS_SOMObject),
	 ((somTD_somAttributePersistence_Persist_somCastObj)(SOMObjectClassData.somCastObj))(((somAttributePersistence_Persist *)((void *)this)),castedCls)
	);
}


/* method: somResetObj */
boolean   somResetObj()
{
/*
 *  reset an object to its true class. Returns true always.
 */
   return 	(
	 SOM_TestCls(this,_SOMCLASS_SOMObject),
	 ((somTD_somAttributePersistence_Persist_somResetObj)(SOMObjectClassData.somResetObj))(((somAttributePersistence_Persist *)((void *)this)))
	);
}


/* method: somPrintSelf */
somAttributePersistence_Persist*  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_TestCls(this,_SOMCLASS_SOMObject),
	 ((somTD_somAttributePersistence_Persist_somPrintSelf)(SOMObjectClassData.somPrintSelf))(((somAttributePersistence_Persist *)((void *)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_TestCls(this,_SOMCLASS_SOMObject),
	 ((somTD_somAttributePersistence_Persist_somDumpSelf)(SOMObjectClassData.somDumpSelf))(((somAttributePersistence_Persist *)((void *)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_TestCls(this,_SOMCLASS_SOMObject),
	 ((somTD_somAttributePersistence_Persist_somDumpSelfInt)(SOMObjectClassData.somDumpSelfInt))(((somAttributePersistence_Persist *)((void *)this)),level)
	);
}


/* method: init_for_object_creation */
SOMObject*   init_for_object_creation(Environment *ev)
{
/*
 *  - somOS::Server calls this method from somdCreateObj().
 *  - Performs initilialization for persistent objects by calling
 *    init_for_object_creation() on parent and make_persistent_ref()
 *    on somOS::server.
 *  - Services should override this method to do proper
 *    initialization at the time of object creation. (if necessary)
 */
   return 	(
	 SOM_TestCls(this,_SOMCLASS_somOS_ServiceBase),
	 ((somTD_somAttributePersistence_Persist_init_for_object_creation)(somOS_ServiceBaseClassData.init_for_object_creation))(((somAttributePersistence_Persist *)((void *)this)), ev)
	);
}


/* method: uninit_for_object_destruction */
void   uninit_for_object_destruction(Environment *ev)
{
/*
 *  - somOS::Server calls this method when a properly initialized object
 *    is destroyed. In particular, from somdDeleteObj().
 *  - Performs uninitilialization for persistent objects by calling
 *    uninit_for_object_destruction() on parent and delete_ref()
 *    on somOS::server.
 */
   	(
	 SOM_TestCls(this,_SOMCLASS_somOS_ServiceBase),
	 ((somTD_somAttributePersistence_Persist_uninit_for_object_destruction)(somOS_ServiceBaseClassData.uninit_for_object_destruction))(((somAttributePersistence_Persist *)((void *)this)), ev)
	);
}


/* method: reinit */
void   reinit(Environment *ev, 
		somOS_ServiceBase_metastate_t* meta_data)
{
/*
 *  - somOS::Server calls this method when (1) an object is reactivated
 *    (in somdSOMObjFromRef()) and (2) somOS::Server is asked to
 *    restore_metastate().
 *  - Services should override it do reinitialization using meta_data.
 *  - reinitializes the identity metadata
 */
   	(
	 SOM_TestCls(this,_SOMCLASS_somOS_ServiceBase),
	 ((somTD_somAttributePersistence_Persist_reinit)(somOS_ServiceBaseClassData.reinit))(((somAttributePersistence_Persist *)((void *)this)), ev,meta_data)
	);
}


/* method: capture */
void   capture(Environment *ev, 
		somOS_ServiceBase_metastate_t* meta_data)
{
/*
 *  - somos::Server call this method from store_metastate().
 *  - Services should override this method to supply proper metadata.
 *  - Capture() must free typecode in
 *           meta_data._buffer[service_id].service_metastate._type
 *     and data in ...._buffer prior to filling it using SOMFree
 *  - Allocates memory to store metastate. It is somOS::Server's
 *    resposibility to free the metastate returned by services.
 *  - captures identity metadata
 */
   	(
	 SOM_TestCls(this,_SOMCLASS_somOS_ServiceBase),
	 ((somTD_somAttributePersistence_Persist_capture)(somOS_ServiceBaseClassData.capture))(((somAttributePersistence_Persist *)((void *)this)), ev,meta_data)
	);
}


/* method: GetInstanceManager */
SOMObject*   GetInstanceManager(Environment *ev)
{
/*
 *  - Returns the server object which is either
 *             an instance somOS::Server,
 *         OR  an instance of SOMDServer,
 *         OR  OBJECT_NIL
 *  This method is usually not overriden.
 *  This method allows clients to get a reference to the server
 *  object. It is introduced as somdFindServer... methods have been
 *  deprecated.
 */
   return 	(
	 SOM_TestCls(this,_SOMCLASS_somOS_ServiceBase),
	 ((somTD_somAttributePersistence_Persist_GetInstanceManager)(somOS_ServiceBaseClassData.GetInstanceManager))(((somAttributePersistence_Persist *)((void *)this)), ev)
	);
}


/* method: init_for_object_reactivation */
SOMObject*   init_for_object_reactivation(Environment *ev)
{
/*
 *  - somOS::Server calls this method when an object is reactivated
 *    in somdSOMObjFromRef() (but prior to calling reinit())
 *  - Services should override this method to do proper initialization
 *    at the time of object reactivation. (if necessary)
 */
   return 	(
	 SOM_TestCls(this,_SOMCLASS_somOS_ServiceBase),
	 ((somTD_somAttributePersistence_Persist_init_for_object_reactivation)(somOS_ServiceBaseClassData.init_for_object_reactivation))(((somAttributePersistence_Persist *)((void *)this)), ev)
	);
}


/* method: init_for_object_copy */
SOMObject*   init_for_object_copy(Environment *ev)
{
/*
 *  Abstract method.
 *  - Services should override this method to do proper initialization
 *    at the time of object copy. (if necessary)
 */
   return 	(
	 SOM_TestCls(this,_SOMCLASS_somOS_ServiceBase),
	 ((somTD_somAttributePersistence_Persist_init_for_object_copy)(somOS_ServiceBaseClassData.init_for_object_copy))(((somAttributePersistence_Persist *)((void *)this)), ev)
	);
}


/* method: uninit_for_object_move */
void   uninit_for_object_move(Environment *ev)
{
/*
 *  Abstract method.
 *  - Services should override this method to do proper uninitialization
 *    at the time of object move. (if necessary)
 */
   	(
	 SOM_TestCls(this,_SOMCLASS_somOS_ServiceBase),
	 ((somTD_somAttributePersistence_Persist_uninit_for_object_move)(somOS_ServiceBaseClassData.uninit_for_object_move))(((somAttributePersistence_Persist *)((void *)this)), ev)
	);
}


/* method: uninit_for_object_passivation */
void   uninit_for_object_passivation(Environment *ev)
{
/*
 *  - Asks somOS::Server to remove an entry from reference-data-table.
 *  - No exceptions are raised. If there is no entry in the
 *    reference-data-table then the operation is considered to be successful.
 *  - somOS::Server calls this method when an object is passivated
 *    (passivate_object()).
 *  - Services should override this method to do proper uninitialization
 *    at the time of object passivation. (if necessary)
 */
   	(
	 SOM_TestCls(this,_SOMCLASS_somOS_ServiceBase),
	 ((somTD_somAttributePersistence_Persist_uninit_for_object_passivation)(somOS_ServiceBaseClassData.uninit_for_object_passivation))(((somAttributePersistence_Persist *)((void *)this)), ev)
	);
}


/* method: is_identical */
boolean   is_identical(Environment *ev, 
		CosObjectIdentity_IdentifiableObject* other_object)
{
   return 	(
	 SOM_TestCls(this,_SOMCLASS_CosObjectIdentity_IdentifiableObject),
	 ((somTD_somAttributePersistence_Persist_is_identical)(CosObjectIdentity_IdentifiableObjectClassData.is_identical))(((somAttributePersistence_Persist *)((void *)this)), ev,other_object)
	);
}


/* method: _get_constant_random_id */
CosObjectIdentity_ObjectIdentifier   _get_constant_random_id(Environment *ev)
{
   return 	(
	 SOM_TestCls(this,_SOMCLASS_CosObjectIdentity_IdentifiableObject),
	 ((somTD_somAttributePersistence_Persist__get_constant_random_id)(CosObjectIdentity_IdentifiableObjectClassData._get_constant_random_id))(((somAttributePersistence_Persist *)((void *)this)), ev)
	);
}



};   /* somAttributePersistence_Persist */



#endif       /* SOM_somAttributePersistence_Persist_xh */
