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

#ifndef SOM_Module_somos_somOS_defined
#define SOM_Module_somos_somOS_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;
typedef unsigned long somOS_service_id;
#define somOS_somOSNaming 1UL
#define somOS_somOSEvents 2UL
#define somOS_somOSLifeCycle 3UL
#define somOS_somOSPersistence 4UL
#define somOS_somOSSecurity 5UL
#define somOS_somOSObjectIdentity 6UL
#define somOS_somOSTransactions 7UL
#define somOS_somOSConcurrecny 8UL
#define somOS_somOSExternalization 9UL
#define somOS_somOSAttributePersistence 10UL
#define somOS_somOSLastEnum 11UL
typedef somOS_service_id somOS_service_id_e;
typedef
struct somOS_metastate_struct {
somOS_service_id_e svc_id;
unsigned short  version_major;
unsigned short  version_minor;
any  service_metastate;
} somOS_metastate_struct, somOS_metastate_struct_t;

#ifndef SOM_DONT_USE_SHORT_NAMES
#ifndef SOMTGD_service_id
    #ifdef service_id
        #undef service_id
        #define SOMTGD_service_id 1
    #else
        #define service_id somOS_service_id
    #endif /* service_id */
#endif /* SOMTGD_service_id */

#ifndef SOM_DONT_USE_SHORT_NAMES
#ifndef SOMTGD_service_id_e
    #ifdef service_id_e
        #undef service_id_e
        #define SOMTGD_service_id_e 1
    #else
        #define service_id_e somOS_service_id_e
    #endif /* service_id_e */
#endif /* SOMTGD_service_id_e */
#endif /* SOM_DONT_USE_SHORT_NAMES */

#ifndef SOM_DONT_USE_SHORT_NAMES
#ifndef SOMTGD_metastate_struct_t
    #ifdef metastate_struct_t
        #undef metastate_struct_t
        #define SOMTGD_metastate_struct_t 1
    #else
        #define metastate_struct_t somOS_metastate_struct_t
    #endif /* metastate_struct_t */
#endif /* SOMTGD_metastate_struct_t */
#endif /* SOM_DONT_USE_SHORT_NAMES */
#endif /* SOM_DONT_USE_SHORT_NAMES */

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

#ifndef SOM_somOS_Server_xh
#define SOM_somOS_Server_xh


#define somOS_Server_MajorVersion 3
#define somOS_Server_MinorVersion 0
class somOS_Server;

/* Parents */
#ifndef SOM_SOMDServer_xh
#ifdef SOMLOCALINCLUDES
#include "somdserv.xh"
#else
#include <somdserv.xh>
#endif
#endif

/* Metaclass */
#ifndef SOM_SOMMSingleInstance_xh
#ifdef SOMLOCALINCLUDES
#include "snglicls.xh"
#else
#include <snglicls.xh>
#endif
#endif

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

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

/*
 * Start of bindings for IDL types
 */


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

/*
 * A function to create the somOS_Server class object...
 */
SOMEXTERN SOM_IMPORTEXPORT_somos_somos SOMMSingleInstance * SOMLINK somOS_ServerNewClass(
		integer4 majorVersion,
		integer4 minorVersion);


/*
 * The API 2 ClassData Structures...
 */
class SOMMSingleInstance;
SOMEXTERN struct somOS_ServerClassDataStructure {
	SOMMSingleInstance *classObject;
	somMToken make_persistent_ref;
	somMToken delete_ref;
	somMToken passivate_object;
	somMToken passivate_all_objects;
	somMToken store_metastate;
	somMToken restore_metastate;
	somMToken has_persistent_ref;
	somMToken store_service_metastate;
	somMToken private1;
	somMToken private2;
} SOMDLINK SOM_IMPORTEXPORT_somos_somos somOS_ServerClassData;
SOMEXTERN struct somOS_ServerCClassDataStructure {
	som3ClassDetailsPtr    parentMtab;
	somDToken              instanceDataToken;
} SOMDLINK SOM_IMPORTEXPORT_somos_somos somOS_ServerCClassData;


/*
 * Class Object and Method Token Macros
 */
#define _SOMCLASS_somOS_Server (somOS_ServerClassData.classObject)
#ifndef SOMGD_somOS_Server
    #if (defined(_somOS_Server) || defined(__somOS_Server))
        #undef _somOS_Server
        #undef __somOS_Server
        #define SOMGD_somOS_Server 1
    #else
        #define _somOS_Server _SOMCLASS_somOS_Server
    #endif /* _somOS_Server */
#endif /* SOMGD_somOS_Server */
#define somOS_Server_classObj _SOMCLASS_somOS_Server
#define _SOMMTOKEN_somOS_Server(method) ((somMToken)somOS_ServerClassData.method)

/*
 * -- Typedefs for somOS_Server Method Procedures
 */
SOMEXTERN {
typedef SOMObject*   SOMLINK somTP_somOS_Server_make_persistent_ref(somOS_Server *somSelf, Environment *ev, 
		SOMObject* referenced_object);
typedef somTP_somOS_Server_make_persistent_ref *somTD_somOS_Server_make_persistent_ref;
typedef void   SOMLINK somTP_somOS_Server_delete_ref(somOS_Server *somSelf, Environment *ev, 
		SOMObject* referenced_object);
typedef somTP_somOS_Server_delete_ref *somTD_somOS_Server_delete_ref;
typedef boolean   SOMLINK somTP_somOS_Server_has_persistent_ref(somOS_Server *somSelf, Environment *ev, 
		SOMObject* referenced_object);
typedef somTP_somOS_Server_has_persistent_ref *somTD_somOS_Server_has_persistent_ref;
typedef void   SOMLINK somTP_somOS_Server_passivate_object(somOS_Server *somSelf, Environment *ev, 
		SOMObject* referenced_object);
typedef somTP_somOS_Server_passivate_object *somTD_somOS_Server_passivate_object;
typedef void   SOMLINK somTP_somOS_Server_passivate_all_objects(somOS_Server *somSelf, Environment *ev);
typedef somTP_somOS_Server_passivate_all_objects *somTD_somOS_Server_passivate_all_objects;
typedef void   SOMLINK somTP_somOS_Server_store_service_metastate(somOS_Server *somSelf, Environment *ev, 
		SOMObject* referenced_object, 
		somOS_service_id_e somos_service_id, 
		any* service_metadata);
typedef somTP_somOS_Server_store_service_metastate *somTD_somOS_Server_store_service_metastate;
typedef void   SOMLINK somTP_somOS_Server_store_metastate(somOS_Server *somSelf, Environment *ev, 
		SOMObject* referenced_object);
typedef somTP_somOS_Server_store_metastate *somTD_somOS_Server_store_metastate;
typedef void   SOMLINK somTP_somOS_Server_restore_metastate(somOS_Server *somSelf, Environment *ev, 
		SOMObject* referenced_object);
typedef somTP_somOS_Server_restore_metastate *somTD_somOS_Server_restore_metastate;

/*
 * -- Typedefs for Reintroduced Wrapper Methods
 */
typedef SOMDObject*   SOMLINK somTP_somOS_Server_somdRefFromSOMObj(somOS_Server *somSelf, Environment *ev, 
		SOMObject* somobj);
typedef somTP_somOS_Server_somdRefFromSOMObj *somTD_somOS_Server_somdRefFromSOMObj;
typedef SOMObject*   SOMLINK somTP_somOS_Server_somdSOMObjFromRef(somOS_Server *somSelf, Environment *ev, 
		SOMDObject* objref);
typedef somTP_somOS_Server_somdSOMObjFromRef *somTD_somOS_Server_somdSOMObjFromRef;
typedef void   SOMLINK somTP_somOS_Server_somdDispatchMethod(somOS_Server *somSelf, Environment *ev, 
		SOMObject* somobj, 
		somToken* retValue, 
		somId methodId, 
		va_list ap);
typedef somTP_somOS_Server_somdDispatchMethod *somTD_somOS_Server_somdDispatchMethod;
typedef SOMObject*   SOMLINK somTP_somOS_Server_somdCreateObj(somOS_Server *somSelf, Environment *ev, 
		Identifier objclass, 
		string hints);
typedef somTP_somOS_Server_somdCreateObj *somTD_somOS_Server_somdCreateObj;
typedef void   SOMLINK somTP_somOS_Server_somdDeleteObj(somOS_Server *somSelf, Environment *ev, 
		SOMObject* somobj);
typedef somTP_somOS_Server_somdDeleteObj *somTD_somOS_Server_somdDeleteObj;
typedef SOMClass*   SOMLINK somTP_somOS_Server_somdGetClassObj(somOS_Server *somSelf, Environment *ev, 
		Identifier objclass);
typedef somTP_somOS_Server_somdGetClassObj *somTD_somOS_Server_somdGetClassObj;
typedef boolean   SOMLINK somTP_somOS_Server_somdObjReferencesCached(somOS_Server *somSelf, Environment *ev);
typedef somTP_somOS_Server_somdObjReferencesCached *somTD_somOS_Server_somdObjReferencesCached;
typedef SOMObject*   SOMLINK somTP_somOS_Server_somdCreateFactory(somOS_Server *somSelf, Environment *ev, 
		string className, 
		ExtendedNaming_PropertyList* props);
typedef somTP_somOS_Server_somdCreateFactory *somTD_somOS_Server_somdCreateFactory;
typedef void   SOMLINK somTP_somOS_Server_somDefaultInit(somOS_Server *somSelf, 
		som3InitCtrl* ctrl);
typedef somTP_somOS_Server_somDefaultInit *somTD_somOS_Server_somDefaultInit;
typedef void   SOMLINK somTP_somOS_Server_somDestruct(somOS_Server *somSelf, 
		octet doFree, 
		som3DestructCtrl* ctrl);
typedef somTP_somOS_Server_somDestruct *somTD_somOS_Server_somDestruct;
typedef void   SOMLINK somTP_somOS_Server_somDefaultCopyInit(somOS_Server *somSelf, 
		som3InitCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_somOS_Server_somDefaultCopyInit *somTD_somOS_Server_somDefaultCopyInit;
typedef somOS_Server*   SOMLINK somTP_somOS_Server_somDefaultAssign(somOS_Server *somSelf, 
		som3AssignCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_somOS_Server_somDefaultAssign *somTD_somOS_Server_somDefaultAssign;
typedef void   SOMLINK somTP_somOS_Server_somDefaultConstCopyInit(somOS_Server *somSelf, 
		som3InitCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_somOS_Server_somDefaultConstCopyInit *somTD_somOS_Server_somDefaultConstCopyInit;
typedef void   SOMLINK somTP_somOS_Server_somDefaultVCopyInit(somOS_Server *somSelf, 
		som3InitCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_somOS_Server_somDefaultVCopyInit *somTD_somOS_Server_somDefaultVCopyInit;
typedef void   SOMLINK somTP_somOS_Server_somDefaultConstVCopyInit(somOS_Server *somSelf, 
		som3InitCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_somOS_Server_somDefaultConstVCopyInit *somTD_somOS_Server_somDefaultConstVCopyInit;
typedef somOS_Server*   SOMLINK somTP_somOS_Server_somDefaultConstAssign(somOS_Server *somSelf, 
		som3AssignCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_somOS_Server_somDefaultConstAssign *somTD_somOS_Server_somDefaultConstAssign;
typedef somOS_Server*   SOMLINK somTP_somOS_Server_somDefaultVAssign(somOS_Server *somSelf, 
		som3AssignCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_somOS_Server_somDefaultVAssign *somTD_somOS_Server_somDefaultVAssign;
typedef somOS_Server*   SOMLINK somTP_somOS_Server_somDefaultConstVAssign(somOS_Server *somSelf, 
		som3AssignCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_somOS_Server_somDefaultConstVAssign *somTD_somOS_Server_somDefaultConstVAssign;
typedef void   SOMLINK somTP_somOS_Server_somInit(somOS_Server *somSelf);
typedef somTP_somOS_Server_somInit *somTD_somOS_Server_somInit;
typedef void   SOMLINK somTP_somOS_Server_somUninit(somOS_Server *somSelf);
typedef somTP_somOS_Server_somUninit *somTD_somOS_Server_somUninit;
typedef void   SOMLINK somTP_somOS_Server_somFree(somOS_Server *somSelf);
typedef somTP_somOS_Server_somFree *somTD_somOS_Server_somFree;
typedef SOMMSingleInstance*   SOMLINK somTP_somOS_Server_somGetClass(somOS_Server *somSelf);
typedef somTP_somOS_Server_somGetClass *somTD_somOS_Server_somGetClass;
typedef string   SOMLINK somTP_somOS_Server_somGetClassName(somOS_Server *somSelf);
typedef somTP_somOS_Server_somGetClassName *somTD_somOS_Server_somGetClassName;
typedef long   SOMLINK somTP_somOS_Server_somGetSize(somOS_Server *somSelf);
typedef somTP_somOS_Server_somGetSize *somTD_somOS_Server_somGetSize;
typedef boolean   SOMLINK somTP_somOS_Server_somIsA(somOS_Server *somSelf, 
		SOMClass* aClassObj);
typedef somTP_somOS_Server_somIsA *somTD_somOS_Server_somIsA;
typedef boolean   SOMLINK somTP_somOS_Server_somIsInstanceOf(somOS_Server *somSelf, 
		SOMClass* aClassObj);
typedef somTP_somOS_Server_somIsInstanceOf *somTD_somOS_Server_somIsInstanceOf;
typedef boolean   SOMLINK somTP_somOS_Server_somRespondsTo(somOS_Server *somSelf, 
		somId mId);
typedef somTP_somOS_Server_somRespondsTo *somTD_somOS_Server_somRespondsTo;
typedef boolean   SOMLINK somTP_somOS_Server_somDispatch(somOS_Server *somSelf, 
		somToken* retValue, 
		somId methodId, 
		va_list ap);
typedef somTP_somOS_Server_somDispatch *somTD_somOS_Server_somDispatch;
typedef boolean   SOMLINK somTP_somOS_Server_somClassDispatch(somOS_Server *somSelf, 
		SOMClass* clsObj, 
		somToken* retValue, 
		somId methodId, 
		va_list ap);
typedef somTP_somOS_Server_somClassDispatch *somTD_somOS_Server_somClassDispatch;
typedef boolean   SOMLINK somTP_somOS_Server_somCastObj(somOS_Server *somSelf, 
		SOMClass* castedCls);
typedef somTP_somOS_Server_somCastObj *somTD_somOS_Server_somCastObj;
typedef boolean   SOMLINK somTP_somOS_Server_somResetObj(somOS_Server *somSelf);
typedef somTP_somOS_Server_somResetObj *somTD_somOS_Server_somResetObj;
typedef somOS_Server*   SOMLINK somTP_somOS_Server_somPrintSelf(somOS_Server *somSelf);
typedef somTP_somOS_Server_somPrintSelf *somTD_somOS_Server_somPrintSelf;
typedef void   SOMLINK somTP_somOS_Server_somDumpSelf(somOS_Server *somSelf, 
		long level);
typedef somTP_somOS_Server_somDumpSelf *somTD_somOS_Server_somDumpSelf;
typedef void   SOMLINK somTP_somOS_Server_somDumpSelfInt(somOS_Server *somSelf, 
		long level);
typedef somTP_somOS_Server_somDumpSelfInt *somTD_somOS_Server_somDumpSelfInt;
}

#endif /* somOS_Server_API */


/*
 * -- The C++ Wrapper Class for somOS_Server
 */
class somOS_Server : public SOMDServer
{
public:

// somOS_Server::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 (!_somOS_Server) somOS_ServerNewClass(somOS_Server_MajorVersion,somOS_Server_MinorVersion);
   return (void*)
   (((somTD_SOMClass_somNewNoInit)(SOMClassClassData.somNewNoInit))
         ((SOMClass *)((void*)_somOS_Server)));
}

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

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

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

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


/* method: make_persistent_ref */
SOMObject*   make_persistent_ref(Environment *ev, 
		SOMObject* referenced_object)
{
/*
 *  - Make an entry in the reference-data-table and persistent storage.
 *    An empty metadata (place holder) is stored in the persistent storage.
 *  - If an entry already exists then no action is taken and the operation
 *    is considered successful but the exception
 *    SysAdminException::ExExists is returned (see RETURN value below).
 *  - RETURNS OBJECT_NIL              if unsuccessful
 *            referenced_object        if successful
 */
   return 	(
	 SOM_TestCls(this,_SOMCLASS_somOS_Server),
	 ((somTD_somOS_Server_make_persistent_ref)(somOS_ServerClassData.make_persistent_ref))(((somOS_Server *)((void *)this)), ev,referenced_object)
	);
}


/* method: delete_ref */
void   delete_ref(Environment *ev, 
		SOMObject* referenced_object)
{
/*
 *  Remove its entry in the persistent storage.
 *  It does not delete the in-memory object or the entry in reference-data-table.
 */
   	(
	 SOM_TestCls(this,_SOMCLASS_somOS_Server),
	 ((somTD_somOS_Server_delete_ref)(somOS_ServerClassData.delete_ref))(((somOS_Server *)((void *)this)), ev,referenced_object)
	);
}


/* method: has_persistent_ref */
boolean   has_persistent_ref(Environment *ev, 
		SOMObject* referenced_object)
{
/*
 *  Indicate whether the specified object has a persistent reference.
 *  RETURNS TRUE iff an entry exists in reference-data-table or in the
 *                   persistent storage, or it is a transaction ref.
 */
   return 	(
	 SOM_TestCls(this,_SOMCLASS_somOS_Server),
	 ((somTD_somOS_Server_has_persistent_ref)(somOS_ServerClassData.has_persistent_ref))(((somOS_Server *)((void *)this)), ev,referenced_object)
	);
}


/* method: passivate_object */
void   passivate_object(Environment *ev, 
		SOMObject* referenced_object)
{
/*
 *  Capture and store the metastate,
 *  uninit_for_object_passivation (removes entries from reference table),
 *  and somdestruct
 *  It DOES NOT delete references on persistent storage.
 */
   	(
	 SOM_TestCls(this,_SOMCLASS_somOS_Server),
	 ((somTD_somOS_Server_passivate_object)(somOS_ServerClassData.passivate_object))(((somOS_Server *)((void *)this)), ev,referenced_object)
	);
}


/* method: passivate_all_objects */
void   passivate_all_objects(Environment *ev)
{
/*
 *  passivate all active objects.
 */
   	(
	 SOM_TestCls(this,_SOMCLASS_somOS_Server),
	 ((somTD_somOS_Server_passivate_all_objects)(somOS_ServerClassData.passivate_all_objects))(((somOS_Server *)((void *)this)), ev)
	);
}


/* method: store_service_metastate */
void   store_service_metastate(Environment *ev, 
		SOMObject* referenced_object, 
		somOS_service_id_e somos_service_id, 
		any* service_metadata)
{
/*
 *  Store the metastate (service_metadata) of a service (somos_service_id)
 *  for the specified object (referenced_object).
 */
   	(
	 SOM_TestCls(this,_SOMCLASS_somOS_Server),
	 ((somTD_somOS_Server_store_service_metastate)(somOS_ServerClassData.store_service_metastate))(((somOS_Server *)((void *)this)), ev,referenced_object,somos_service_id,service_metadata)
	);
}


/* method: store_metastate */
void   store_metastate(Environment *ev, 
		SOMObject* referenced_object)
{
/*
 *  Call capture on the specified object and put it in persistent storage.
 *  Stores metadata of all services.
 */
   	(
	 SOM_TestCls(this,_SOMCLASS_somOS_Server),
	 ((somTD_somOS_Server_store_metastate)(somOS_ServerClassData.store_metastate))(((somOS_Server *)((void *)this)), ev,referenced_object)
	);
}


/* method: restore_metastate */
void   restore_metastate(Environment *ev, 
		SOMObject* referenced_object)
{
/*
 *  Get metadata from persistent storage and call reinit() on
 *  referenced_object
 */
   	(
	 SOM_TestCls(this,_SOMCLASS_somOS_Server),
	 ((somTD_somOS_Server_restore_metastate)(somOS_ServerClassData.restore_metastate))(((somOS_Server *)((void *)this)), ev,referenced_object)
	);
}


/*
 * Reintroduce inherited methods
 */

/* method: somdRefFromSOMObj */
SOMDObject*   somdRefFromSOMObj(Environment *ev, 
		SOMObject* somobj)
{
/*
 *  This method returns a DSOM object reference for a SOM object in this server
 *  process.  SOMOA will call this method whenever it returns a result from a
 *  method call which includes a pointer to a SOMObject (versus a pointer to a
 *  SOMDObject).  OWNERSHIP of the returned object reference is passed to the
 *  caller EXCEPT when the somdObjReferencesCached method returns TRUE.  When the
 *  input (somobj) is already an object reference, the default implementation
 *  simply returns somobj, rather than creating a new reference.  (Subclasses
 *  might override this method to duplicate the input reference, however.)
 *  Hence, callers should note when the returned value is the same as
 *  the input (somobj) when determining whether or not to free the result.
 */
   return 	(
	 SOM_TestCls(this,_SOMCLASS_SOMDServer),
	 ((somTD_somOS_Server_somdRefFromSOMObj)(SOMDServerClassData.somdRefFromSOMObj))(((somOS_Server *)((void *)this)), ev,somobj)
	);
}


/* method: somdSOMObjFromRef */
SOMObject*   somdSOMObjFromRef(Environment *ev, 
		SOMDObject* objref)
{
/*
 *  This method maps a DSOM object reference into a SOM object.
 *  This can be done in whatever way is appropriate for the application.
 *  This method is called by SOMOA in order to translate any method call
 *  parameters which are object references (created from somdRefFromSOMObj
 *  above) into SOM objects.
 */
   return 	(
	 SOM_TestCls(this,_SOMCLASS_SOMDServer),
	 ((somTD_somOS_Server_somdSOMObjFromRef)(SOMDServerClassData.somdSOMObjFromRef))(((somOS_Server *)((void *)this)), ev,objref)
	);
}


/* va_list method: somdDispatchMethod */

/*
 *  This method is called by SOMOA to dispatch a method on a SOM object.
 *  The intention is to give the Server object an opportunity to intercept
 *  method calls, if desired.  The parameters to this method are the same
 *  as the parameters passed to SOMObject::somDispatch.
 * 
 *  The default implementation invokes SOMObject::somDispatch on the
 *  specified target object, "somobj", with the supplied arguments.
 */
/* the va_list invocation form */
void   SOMDServer_somdDispatchMethod(Environment *ev, 
		SOMObject* somobj, 
		somToken* retValue, 
		somId methodId, 
		va_list ap)
{   	(
	 SOM_TestCls(this,_SOMCLASS_SOMDServer),
	 ((somTD_somOS_Server_somdDispatchMethod)(SOMDServerClassData.somdDispatchMethod))(((somOS_Server *)((void *)this)), ev,somobj,retValue,methodId,ap)
	);
}

/* the varargs invocation form */
void   somdDispatchMethod(Environment *ev, 
		SOMObject* somobj, 
		somToken* retValue, 
		somId methodId, 
		...)
{
/*
 *  This method is called by SOMOA to dispatch a method on a SOM object.
 *  The intention is to give the Server object an opportunity to intercept
 *  method calls, if desired.  The parameters to this method are the same
 *  as the parameters passed to SOMObject::somDispatch.
 * 
 *  The default implementation invokes SOMObject::somDispatch on the
 *  specified target object, "somobj", with the supplied arguments.
 */
   va_list ap;
   va_start(ap, methodId);
   	(
	 SOM_TestCls(this,_SOMCLASS_SOMDServer),
	 ((somTD_somOS_Server_somdDispatchMethod)(SOMDServerClassData.somdDispatchMethod))(((somOS_Server *)((void *)this)), ev,somobj,retValue,methodId,ap)
	);
   va_end(ap);
}


/* method: somdCreateObj */
SOMObject*   somdCreateObj(Environment *ev, 
		Identifier objclass, 
		string hints)
{
/*
 *  Creates an object of the specified class.  This method (if overridden)
 *  may optionally define creation "hints" which the client may specify in
 *  this call.
 * 
 *  Called indirectly by SOMDObjectMgr::somdNewObject.
 * 
 *  The default implementation calls somdGetClassObj to get the specified
 *  SOMClass object, and invokes "somNew".  The "hints" argument is ignored.
 */
   return 	(
	 SOM_TestCls(this,_SOMCLASS_SOMDServer),
	 ((somTD_somOS_Server_somdCreateObj)(SOMDServerClassData.somdCreateObj))(((somOS_Server *)((void *)this)), ev,objclass,hints)
	);
}


/* method: somdDeleteObj */
void   somdDeleteObj(Environment *ev, 
		SOMObject* somobj)
{
/*
 *  Deletes a SOM object.  By default, simply calls somFree on the object.
 * 
 *  Called indirectly by SOMDObjectMgr::somdDestroyObject.
 */
   	(
	 SOM_TestCls(this,_SOMCLASS_SOMDServer),
	 ((somTD_somOS_Server_somdDeleteObj)(SOMDServerClassData.somdDeleteObj))(((somOS_Server *)((void *)this)), ev,somobj)
	);
}


/* method: somdGetClassObj */
SOMClass*   somdGetClassObj(Environment *ev, 
		Identifier objclass)
{
/*
 *  Creates/returns a class object for the specified class.  May result in
 *  loading of a DLL for the class.  This method can be used by a client to
 *  get a proxy to a class object on the server so that methods introduced
 *  in the metaclass (e.g., class-specific constructors, etc.) may be invoked
 *  directly.
 */
   return 	(
	 SOM_TestCls(this,_SOMCLASS_SOMDServer),
	 ((somTD_somOS_Server_somdGetClassObj)(SOMDServerClassData.somdGetClassObj))(((somOS_Server *)((void *)this)), ev,objclass)
	);
}


/* method: somdObjReferencesCached */
boolean   somdObjReferencesCached(Environment *ev)
{
/*
 *  Whether the server retains ownership of the object references
 *  it creates via the somdRefFromSOMObj method.
 */
   return 	(
	 SOM_TestCls(this,_SOMCLASS_SOMDServer),
	 ((somTD_somOS_Server_somdObjReferencesCached)(SOMDServerClassData.somdObjReferencesCached))(((somOS_Server *)((void *)this)), ev)
	);
}


/* method: somdCreateFactory */
SOMObject*   somdCreateFactory(Environment *ev, 
		string className, 
		ExtendedNaming_PropertyList* props)
{
/*
 *  To be called from DSOM Factory Finder Service, a FactoryENC object.
 *  Will return a factory specified in idl by the idl modifier "factory",
 *  or if this doesn't exist will return a SOMClass for the object to be
 *  used as the generic factory.  PropertyList is not used.
 */
   return 	(
	 SOM_TestCls(this,_SOMCLASS_SOMDServer),
	 ((somTD_somOS_Server_somdCreateFactory)(SOMDServerClassData.somdCreateFactory))(((somOS_Server *)((void *)this)), ev,className,props)
	);
}


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


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


/* method: somDefaultAssign */
somOS_Server*  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_somOS_Server_somDefaultAssign)(SOMObjectClassData.somDefaultAssign))(((somOS_Server *)((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_somOS_Server_somDefaultConstCopyInit)(SOMObjectClassData.somDefaultConstCopyInit))(((somOS_Server *)((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_somOS_Server_somDefaultVCopyInit)(SOMObjectClassData.somDefaultVCopyInit))(((somOS_Server *)((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_somOS_Server_somDefaultConstVCopyInit)(SOMObjectClassData.somDefaultConstVCopyInit))(((somOS_Server *)((void *)this)),ctrl,fromObj)
	);
}


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


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


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


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


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


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


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


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


/* method: somGetSize */
long   somGetSize()
{
/*
 *  Return the size of the receiver.
 */
   return 	(
	 SOM_TestCls(this,_SOMCLASS_SOMObject),
	 ((somTD_somOS_Server_somGetSize)(SOMObjectClassData.somGetSize))(((somOS_Server *)((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_somOS_Server_somIsA)(SOMObjectClassData.somIsA))(((somOS_Server *)((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_somOS_Server_somIsInstanceOf)(SOMObjectClassData.somIsInstanceOf))(((somOS_Server *)((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_somOS_Server_somRespondsTo)(SOMObjectClassData.somRespondsTo))(((somOS_Server *)((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_somOS_Server_somDispatch)(SOMObjectClassData.somDispatch))(((somOS_Server *)((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_somOS_Server_somDispatch)(SOMObjectClassData.somDispatch))(((somOS_Server *)((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_somOS_Server_somClassDispatch)(SOMObjectClassData.somClassDispatch))(((somOS_Server *)((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_somOS_Server_somClassDispatch)(SOMObjectClassData.somClassDispatch))(((somOS_Server *)((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_somOS_Server_somCastObj)(SOMObjectClassData.somCastObj))(((somOS_Server *)((void *)this)),castedCls)
	);
}


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


/* method: somPrintSelf */
somOS_Server*  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_somOS_Server_somPrintSelf)(SOMObjectClassData.somPrintSelf))(((somOS_Server *)((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_somOS_Server_somDumpSelf)(SOMObjectClassData.somDumpSelf))(((somOS_Server *)((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_somOS_Server_somDumpSelfInt)(SOMObjectClassData.somDumpSelfInt))(((somOS_Server *)((void *)this)),level)
	);
}



};   /* somOS_Server */



#endif       /* SOM_somOS_Server_xh */

#ifndef SOM_somOS_ServiceBase_xh
#define SOM_somOS_ServiceBase_xh


#define somOS_ServiceBase_MajorVersion 3
#define somOS_ServiceBase_MinorVersion 0
class somOS_ServiceBase;

/*
 * Passthru lines: File: "C.xh", "before"
 */

#include <omgidobj.xh>


/* Parents */
#ifndef SOM_CosObjectIdentity_IdentifiableObject_xh
#ifdef SOMLOCALINCLUDES
#include "omgidobj.xh"
#else
#include <omgidobj.xh>
#endif
#endif

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

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

/*
 * Start of bindings for IDL types
 */

#ifndef _IDL_SEQUENCE_somOS_metastate_struct_defined
#define _IDL_SEQUENCE_somOS_metastate_struct_defined
typedef struct {
    unsigned long _maximum;
    unsigned long _length;
    somOS_metastate_struct *_buffer;
} _IDL_SEQUENCE_somOS_metastate_struct;
#endif /* _IDL_SEQUENCE_somOS_metastate_struct_defined */ 
typedef
_IDL_SEQUENCE_somOS_metastate_struct somOS_ServiceBase_metastate_t;

#ifndef SOM_DONT_USE_SHORT_NAMES
#ifndef SOMTGD__IDL_SEQUENCE_metastate_struct
    #ifdef _IDL_SEQUENCE_metastate_struct
        #undef _IDL_SEQUENCE_metastate_struct
        #define SOMTGD__IDL_SEQUENCE_metastate_struct 1
    #else
        #define _IDL_SEQUENCE_metastate_struct _IDL_SEQUENCE_somOS_metastate_struct
    #endif /* _IDL_SEQUENCE_metastate_struct */
#endif /* SOMTGD__IDL_SEQUENCE_metastate_struct */

#ifndef SOM_DONT_USE_SHORT_NAMES
#ifndef SOMTGD_metastate_t
    #ifdef metastate_t
        #undef metastate_t
        #define SOMTGD_metastate_t 1
    #else
        #define metastate_t somOS_ServiceBase_metastate_t
    #endif /* metastate_t */
#endif /* SOMTGD_metastate_t */
#endif /* SOM_DONT_USE_SHORT_NAMES */
#endif /* SOM_DONT_USE_SHORT_NAMES */

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

/*
 * A function to create the somOS_ServiceBase class object...
 */
SOMEXTERN SOM_IMPORTEXPORT_somos_somos SOMClass * SOMLINK somOS_ServiceBaseNewClass(
		integer4 majorVersion,
		integer4 minorVersion);


/*
 * The API 2 ClassData Structures...
 */
SOMEXTERN struct somOS_ServiceBaseClassDataStructure {
	SOMClass *classObject;
	somMToken reinit;
	somMToken capture;
	somMToken init_for_object_creation;
	somMToken init_for_object_reactivation;
	somMToken init_for_object_copy;
	somMToken uninit_for_object_move;
	somMToken uninit_for_object_passivation;
	somMToken uninit_for_object_destruction;
	somMToken private1;
	somMToken GetInstanceManager;
} SOMDLINK SOM_IMPORTEXPORT_somos_somos somOS_ServiceBaseClassData;
SOMEXTERN struct somOS_ServiceBaseCClassDataStructure {
	som3ClassDetailsPtr    parentMtab;
	somDToken              instanceDataToken;
} SOMDLINK SOM_IMPORTEXPORT_somos_somos somOS_ServiceBaseCClassData;


/*
 * Class Object and Method Token Macros
 */
#define _SOMCLASS_somOS_ServiceBase (somOS_ServiceBaseClassData.classObject)
#ifndef SOMGD_somOS_ServiceBase
    #if (defined(_somOS_ServiceBase) || defined(__somOS_ServiceBase))
        #undef _somOS_ServiceBase
        #undef __somOS_ServiceBase
        #define SOMGD_somOS_ServiceBase 1
    #else
        #define _somOS_ServiceBase _SOMCLASS_somOS_ServiceBase
    #endif /* _somOS_ServiceBase */
#endif /* SOMGD_somOS_ServiceBase */
#define somOS_ServiceBase_classObj _SOMCLASS_somOS_ServiceBase
#define _SOMMTOKEN_somOS_ServiceBase(method) ((somMToken)somOS_ServiceBaseClassData.method)

/*
 * -- Typedefs for somOS_ServiceBase Method Procedures
 */
SOMEXTERN {
typedef void   SOMLINK somTP_somOS_ServiceBase_reinit(somOS_ServiceBase *somSelf, Environment *ev, 
		somOS_ServiceBase_metastate_t* meta_data);
typedef somTP_somOS_ServiceBase_reinit *somTD_somOS_ServiceBase_reinit;
typedef void   SOMLINK somTP_somOS_ServiceBase_capture(somOS_ServiceBase *somSelf, Environment *ev, 
		somOS_ServiceBase_metastate_t* meta_data);
typedef somTP_somOS_ServiceBase_capture *somTD_somOS_ServiceBase_capture;
typedef SOMObject*   SOMLINK somTP_somOS_ServiceBase_GetInstanceManager(somOS_ServiceBase *somSelf, Environment *ev);
typedef somTP_somOS_ServiceBase_GetInstanceManager *somTD_somOS_ServiceBase_GetInstanceManager;
typedef SOMObject*   SOMLINK somTP_somOS_ServiceBase_init_for_object_creation(somOS_ServiceBase *somSelf, Environment *ev);
typedef somTP_somOS_ServiceBase_init_for_object_creation *somTD_somOS_ServiceBase_init_for_object_creation;
typedef SOMObject*   SOMLINK somTP_somOS_ServiceBase_init_for_object_reactivation(somOS_ServiceBase *somSelf, Environment *ev);
typedef somTP_somOS_ServiceBase_init_for_object_reactivation *somTD_somOS_ServiceBase_init_for_object_reactivation;
typedef SOMObject*   SOMLINK somTP_somOS_ServiceBase_init_for_object_copy(somOS_ServiceBase *somSelf, Environment *ev);
typedef somTP_somOS_ServiceBase_init_for_object_copy *somTD_somOS_ServiceBase_init_for_object_copy;
typedef void   SOMLINK somTP_somOS_ServiceBase_uninit_for_object_move(somOS_ServiceBase *somSelf, Environment *ev);
typedef somTP_somOS_ServiceBase_uninit_for_object_move *somTD_somOS_ServiceBase_uninit_for_object_move;
typedef void   SOMLINK somTP_somOS_ServiceBase_uninit_for_object_passivation(somOS_ServiceBase *somSelf, Environment *ev);
typedef somTP_somOS_ServiceBase_uninit_for_object_passivation *somTD_somOS_ServiceBase_uninit_for_object_passivation;
typedef void   SOMLINK somTP_somOS_ServiceBase_uninit_for_object_destruction(somOS_ServiceBase *somSelf, Environment *ev);
typedef somTP_somOS_ServiceBase_uninit_for_object_destruction *somTD_somOS_ServiceBase_uninit_for_object_destruction;

/*
 * -- Typedefs for Reintroduced Wrapper Methods
 */
typedef CosObjectIdentity_ObjectIdentifier   SOMLINK somTP_somOS_ServiceBase__get_constant_random_id(somOS_ServiceBase *somSelf, Environment *ev);
typedef somTP_somOS_ServiceBase__get_constant_random_id *somTD_somOS_ServiceBase__get_constant_random_id;
typedef boolean   SOMLINK somTP_somOS_ServiceBase_is_identical(somOS_ServiceBase *somSelf, Environment *ev, 
		CosObjectIdentity_IdentifiableObject* other_object);
typedef somTP_somOS_ServiceBase_is_identical *somTD_somOS_ServiceBase_is_identical;
typedef void   SOMLINK somTP_somOS_ServiceBase_somDefaultInit(somOS_ServiceBase *somSelf, 
		som3InitCtrl* ctrl);
typedef somTP_somOS_ServiceBase_somDefaultInit *somTD_somOS_ServiceBase_somDefaultInit;
typedef void   SOMLINK somTP_somOS_ServiceBase_somDestruct(somOS_ServiceBase *somSelf, 
		octet doFree, 
		som3DestructCtrl* ctrl);
typedef somTP_somOS_ServiceBase_somDestruct *somTD_somOS_ServiceBase_somDestruct;
typedef void   SOMLINK somTP_somOS_ServiceBase_somDefaultCopyInit(somOS_ServiceBase *somSelf, 
		som3InitCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_somOS_ServiceBase_somDefaultCopyInit *somTD_somOS_ServiceBase_somDefaultCopyInit;
typedef somOS_ServiceBase*   SOMLINK somTP_somOS_ServiceBase_somDefaultAssign(somOS_ServiceBase *somSelf, 
		som3AssignCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_somOS_ServiceBase_somDefaultAssign *somTD_somOS_ServiceBase_somDefaultAssign;
typedef void   SOMLINK somTP_somOS_ServiceBase_somDefaultConstCopyInit(somOS_ServiceBase *somSelf, 
		som3InitCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_somOS_ServiceBase_somDefaultConstCopyInit *somTD_somOS_ServiceBase_somDefaultConstCopyInit;
typedef void   SOMLINK somTP_somOS_ServiceBase_somDefaultVCopyInit(somOS_ServiceBase *somSelf, 
		som3InitCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_somOS_ServiceBase_somDefaultVCopyInit *somTD_somOS_ServiceBase_somDefaultVCopyInit;
typedef void   SOMLINK somTP_somOS_ServiceBase_somDefaultConstVCopyInit(somOS_ServiceBase *somSelf, 
		som3InitCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_somOS_ServiceBase_somDefaultConstVCopyInit *somTD_somOS_ServiceBase_somDefaultConstVCopyInit;
typedef somOS_ServiceBase*   SOMLINK somTP_somOS_ServiceBase_somDefaultConstAssign(somOS_ServiceBase *somSelf, 
		som3AssignCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_somOS_ServiceBase_somDefaultConstAssign *somTD_somOS_ServiceBase_somDefaultConstAssign;
typedef somOS_ServiceBase*   SOMLINK somTP_somOS_ServiceBase_somDefaultVAssign(somOS_ServiceBase *somSelf, 
		som3AssignCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_somOS_ServiceBase_somDefaultVAssign *somTD_somOS_ServiceBase_somDefaultVAssign;
typedef somOS_ServiceBase*   SOMLINK somTP_somOS_ServiceBase_somDefaultConstVAssign(somOS_ServiceBase *somSelf, 
		som3AssignCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_somOS_ServiceBase_somDefaultConstVAssign *somTD_somOS_ServiceBase_somDefaultConstVAssign;
typedef void   SOMLINK somTP_somOS_ServiceBase_somInit(somOS_ServiceBase *somSelf);
typedef somTP_somOS_ServiceBase_somInit *somTD_somOS_ServiceBase_somInit;
typedef void   SOMLINK somTP_somOS_ServiceBase_somUninit(somOS_ServiceBase *somSelf);
typedef somTP_somOS_ServiceBase_somUninit *somTD_somOS_ServiceBase_somUninit;
typedef void   SOMLINK somTP_somOS_ServiceBase_somFree(somOS_ServiceBase *somSelf);
typedef somTP_somOS_ServiceBase_somFree *somTD_somOS_ServiceBase_somFree;
typedef SOMClass*   SOMLINK somTP_somOS_ServiceBase_somGetClass(somOS_ServiceBase *somSelf);
typedef somTP_somOS_ServiceBase_somGetClass *somTD_somOS_ServiceBase_somGetClass;
typedef string   SOMLINK somTP_somOS_ServiceBase_somGetClassName(somOS_ServiceBase *somSelf);
typedef somTP_somOS_ServiceBase_somGetClassName *somTD_somOS_ServiceBase_somGetClassName;
typedef long   SOMLINK somTP_somOS_ServiceBase_somGetSize(somOS_ServiceBase *somSelf);
typedef somTP_somOS_ServiceBase_somGetSize *somTD_somOS_ServiceBase_somGetSize;
typedef boolean   SOMLINK somTP_somOS_ServiceBase_somIsA(somOS_ServiceBase *somSelf, 
		SOMClass* aClassObj);
typedef somTP_somOS_ServiceBase_somIsA *somTD_somOS_ServiceBase_somIsA;
typedef boolean   SOMLINK somTP_somOS_ServiceBase_somIsInstanceOf(somOS_ServiceBase *somSelf, 
		SOMClass* aClassObj);
typedef somTP_somOS_ServiceBase_somIsInstanceOf *somTD_somOS_ServiceBase_somIsInstanceOf;
typedef boolean   SOMLINK somTP_somOS_ServiceBase_somRespondsTo(somOS_ServiceBase *somSelf, 
		somId mId);
typedef somTP_somOS_ServiceBase_somRespondsTo *somTD_somOS_ServiceBase_somRespondsTo;
typedef boolean   SOMLINK somTP_somOS_ServiceBase_somDispatch(somOS_ServiceBase *somSelf, 
		somToken* retValue, 
		somId methodId, 
		va_list ap);
typedef somTP_somOS_ServiceBase_somDispatch *somTD_somOS_ServiceBase_somDispatch;
typedef boolean   SOMLINK somTP_somOS_ServiceBase_somClassDispatch(somOS_ServiceBase *somSelf, 
		SOMClass* clsObj, 
		somToken* retValue, 
		somId methodId, 
		va_list ap);
typedef somTP_somOS_ServiceBase_somClassDispatch *somTD_somOS_ServiceBase_somClassDispatch;
typedef boolean   SOMLINK somTP_somOS_ServiceBase_somCastObj(somOS_ServiceBase *somSelf, 
		SOMClass* castedCls);
typedef somTP_somOS_ServiceBase_somCastObj *somTD_somOS_ServiceBase_somCastObj;
typedef boolean   SOMLINK somTP_somOS_ServiceBase_somResetObj(somOS_ServiceBase *somSelf);
typedef somTP_somOS_ServiceBase_somResetObj *somTD_somOS_ServiceBase_somResetObj;
typedef somOS_ServiceBase*   SOMLINK somTP_somOS_ServiceBase_somPrintSelf(somOS_ServiceBase *somSelf);
typedef somTP_somOS_ServiceBase_somPrintSelf *somTD_somOS_ServiceBase_somPrintSelf;
typedef void   SOMLINK somTP_somOS_ServiceBase_somDumpSelf(somOS_ServiceBase *somSelf, 
		long level);
typedef somTP_somOS_ServiceBase_somDumpSelf *somTD_somOS_ServiceBase_somDumpSelf;
typedef void   SOMLINK somTP_somOS_ServiceBase_somDumpSelfInt(somOS_ServiceBase *somSelf, 
		long level);
typedef somTP_somOS_ServiceBase_somDumpSelfInt *somTD_somOS_ServiceBase_somDumpSelfInt;
}

#endif /* somOS_ServiceBase_API */


/*
 * -- The C++ Wrapper Class for somOS_ServiceBase
 */
class somOS_ServiceBase : public CosObjectIdentity_IdentifiableObject
{
public:

// somOS_ServiceBase::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 (!_somOS_ServiceBase) somOS_ServiceBaseNewClass(somOS_ServiceBase_MajorVersion,somOS_ServiceBase_MinorVersion);
   return (void*)
   (((somTD_SOMClass_somNewNoInit)(SOMClassClassData.somNewNoInit))
         ((SOMClass *)((void*)_somOS_ServiceBase)));
}

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

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

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

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


/* 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_somOS_ServiceBase_reinit)(somOS_ServiceBaseClassData.reinit))(((somOS_ServiceBase *)((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_somOS_ServiceBase_capture)(somOS_ServiceBaseClassData.capture))(((somOS_ServiceBase *)((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_somOS_ServiceBase_GetInstanceManager)(somOS_ServiceBaseClassData.GetInstanceManager))(((somOS_ServiceBase *)((void *)this)), ev)
	);
}


/* method: init_for_object_creation */
SOMObject*   init_for_object_creation(Environment *ev)
{
/*
 *  somOS::somOS::Server calls this method from somdCreateObj().
 *  - Services should override this method to do proper initialization
 *    at the time of object creation. (if necessary)
 *  - it initializes the data for CosObjectIdentity
 */
   return 	(
	 SOM_TestCls(this,_SOMCLASS_somOS_ServiceBase),
	 ((somTD_somOS_ServiceBase_init_for_object_creation)(somOS_ServiceBaseClassData.init_for_object_creation))(((somOS_ServiceBase *)((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_somOS_ServiceBase_init_for_object_reactivation)(somOS_ServiceBaseClassData.init_for_object_reactivation))(((somOS_ServiceBase *)((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_somOS_ServiceBase_init_for_object_copy)(somOS_ServiceBaseClassData.init_for_object_copy))(((somOS_ServiceBase *)((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_somOS_ServiceBase_uninit_for_object_move)(somOS_ServiceBaseClassData.uninit_for_object_move))(((somOS_ServiceBase *)((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_somOS_ServiceBase_uninit_for_object_passivation)(somOS_ServiceBaseClassData.uninit_for_object_passivation))(((somOS_ServiceBase *)((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().
 *  - Services should override this method to do proper uninitialization
 *    at the time of object destruction. (if necessary)
 */
   	(
	 SOM_TestCls(this,_SOMCLASS_somOS_ServiceBase),
	 ((somTD_somOS_ServiceBase_uninit_for_object_destruction)(somOS_ServiceBaseClassData.uninit_for_object_destruction))(((somOS_ServiceBase *)((void *)this)), ev)
	);
}


/*
 * Reintroduce inherited methods
 */

/* method: _get_constant_random_id */
CosObjectIdentity_ObjectIdentifier   _get_constant_random_id(Environment *ev)
{
/*
 * Method from the IDL attribute statement:
 * "readonly attribute CosObjectIdentity_ObjectIdentifier constant_random_id"
 */
   return 	(
	 SOM_TestCls(this,_SOMCLASS_CosObjectIdentity_IdentifiableObject),
	 ((somTD_somOS_ServiceBase__get_constant_random_id)(CosObjectIdentity_IdentifiableObjectClassData._get_constant_random_id))(((somOS_ServiceBase *)((void *)this)), ev)
	);
}


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


/* initializer method: somDefaultInit */
void   somDefaultInit(som3InitCtrl* ctrl)
{
   	(
	 SOM_TestCls(this,_SOMCLASS_SOMObject),
	 ((somTD_somOS_ServiceBase_somDefaultInit)(SOMObjectClassData.somDefaultInit))(((somOS_ServiceBase *)((void *)this)),ctrl)
	);
}


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


/* method: somDefaultAssign */
somOS_ServiceBase*  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_somOS_ServiceBase_somDefaultAssign)(SOMObjectClassData.somDefaultAssign))(((somOS_ServiceBase *)((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_somOS_ServiceBase_somDefaultConstCopyInit)(SOMObjectClassData.somDefaultConstCopyInit))(((somOS_ServiceBase *)((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_somOS_ServiceBase_somDefaultVCopyInit)(SOMObjectClassData.somDefaultVCopyInit))(((somOS_ServiceBase *)((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_somOS_ServiceBase_somDefaultConstVCopyInit)(SOMObjectClassData.somDefaultConstVCopyInit))(((somOS_ServiceBase *)((void *)this)),ctrl,fromObj)
	);
}


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


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


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


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


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


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


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


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


/* method: somGetSize */
long   somGetSize()
{
/*
 *  Return the size of the receiver.
 */
   return 	(
	 SOM_TestCls(this,_SOMCLASS_SOMObject),
	 ((somTD_somOS_ServiceBase_somGetSize)(SOMObjectClassData.somGetSize))(((somOS_ServiceBase *)((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_somOS_ServiceBase_somIsA)(SOMObjectClassData.somIsA))(((somOS_ServiceBase *)((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_somOS_ServiceBase_somIsInstanceOf)(SOMObjectClassData.somIsInstanceOf))(((somOS_ServiceBase *)((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_somOS_ServiceBase_somRespondsTo)(SOMObjectClassData.somRespondsTo))(((somOS_ServiceBase *)((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_somOS_ServiceBase_somDispatch)(SOMObjectClassData.somDispatch))(((somOS_ServiceBase *)((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_somOS_ServiceBase_somDispatch)(SOMObjectClassData.somDispatch))(((somOS_ServiceBase *)((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_somOS_ServiceBase_somClassDispatch)(SOMObjectClassData.somClassDispatch))(((somOS_ServiceBase *)((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_somOS_ServiceBase_somClassDispatch)(SOMObjectClassData.somClassDispatch))(((somOS_ServiceBase *)((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_somOS_ServiceBase_somCastObj)(SOMObjectClassData.somCastObj))(((somOS_ServiceBase *)((void *)this)),castedCls)
	);
}


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


/* method: somPrintSelf */
somOS_ServiceBase*  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_somOS_ServiceBase_somPrintSelf)(SOMObjectClassData.somPrintSelf))(((somOS_ServiceBase *)((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_somOS_ServiceBase_somDumpSelf)(SOMObjectClassData.somDumpSelf))(((somOS_ServiceBase *)((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_somOS_ServiceBase_somDumpSelfInt)(SOMObjectClassData.somDumpSelfInt))(((somOS_ServiceBase *)((void *)this)),level)
	);
}



};   /* somOS_ServiceBase */



#endif       /* SOM_somOS_ServiceBase_xh */

#ifndef SOM_somOS_ServiceBasePRef_xh
#define SOM_somOS_ServiceBasePRef_xh


#define somOS_ServiceBasePRef_MajorVersion 3
#define somOS_ServiceBasePRef_MinorVersion 0
class somOS_ServiceBasePRef;

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

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

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

/*
 * Start of bindings for IDL types
 */


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

/*
 * A function to create the somOS_ServiceBasePRef class object...
 */
SOMEXTERN SOM_IMPORTEXPORT_somos_somos SOMClass * SOMLINK somOS_ServiceBasePRefNewClass(
		integer4 majorVersion,
		integer4 minorVersion);


/*
 * The API 2 ClassData Structures...
 */
SOMEXTERN struct somOS_ServiceBasePRefClassDataStructure {
	SOMClass *classObject;
} SOMDLINK SOM_IMPORTEXPORT_somos_somos somOS_ServiceBasePRefClassData;
SOMEXTERN struct somOS_ServiceBasePRefCClassDataStructure {
	som3ClassDetailsPtr    parentMtab;
	somDToken              instanceDataToken;
} SOMDLINK SOM_IMPORTEXPORT_somos_somos somOS_ServiceBasePRefCClassData;


/*
 * Class Object and Method Token Macros
 */
#define _SOMCLASS_somOS_ServiceBasePRef (somOS_ServiceBasePRefClassData.classObject)
#ifndef SOMGD_somOS_ServiceBasePRef
    #if (defined(_somOS_ServiceBasePRef) || defined(__somOS_ServiceBasePRef))
        #undef _somOS_ServiceBasePRef
        #undef __somOS_ServiceBasePRef
        #define SOMGD_somOS_ServiceBasePRef 1
    #else
        #define _somOS_ServiceBasePRef _SOMCLASS_somOS_ServiceBasePRef
    #endif /* _somOS_ServiceBasePRef */
#endif /* SOMGD_somOS_ServiceBasePRef */
#define somOS_ServiceBasePRef_classObj _SOMCLASS_somOS_ServiceBasePRef
#define _SOMMTOKEN_somOS_ServiceBasePRef(method) ((somMToken)somOS_ServiceBasePRefClassData.method)

/*
 * -- Typedefs for somOS_ServiceBasePRef Method Procedures
 */
SOMEXTERN {

/*
 * -- Typedefs for Reintroduced Wrapper Methods
 */
typedef void   SOMLINK somTP_somOS_ServiceBasePRef_reinit(somOS_ServiceBasePRef *somSelf, Environment *ev, 
		somOS_ServiceBase_metastate_t* meta_data);
typedef somTP_somOS_ServiceBasePRef_reinit *somTD_somOS_ServiceBasePRef_reinit;
typedef void   SOMLINK somTP_somOS_ServiceBasePRef_capture(somOS_ServiceBasePRef *somSelf, Environment *ev, 
		somOS_ServiceBase_metastate_t* meta_data);
typedef somTP_somOS_ServiceBasePRef_capture *somTD_somOS_ServiceBasePRef_capture;
typedef SOMObject*   SOMLINK somTP_somOS_ServiceBasePRef_GetInstanceManager(somOS_ServiceBasePRef *somSelf, Environment *ev);
typedef somTP_somOS_ServiceBasePRef_GetInstanceManager *somTD_somOS_ServiceBasePRef_GetInstanceManager;
typedef SOMObject*   SOMLINK somTP_somOS_ServiceBasePRef_init_for_object_creation(somOS_ServiceBasePRef *somSelf, Environment *ev);
typedef somTP_somOS_ServiceBasePRef_init_for_object_creation *somTD_somOS_ServiceBasePRef_init_for_object_creation;
typedef SOMObject*   SOMLINK somTP_somOS_ServiceBasePRef_init_for_object_reactivation(somOS_ServiceBasePRef *somSelf, Environment *ev);
typedef somTP_somOS_ServiceBasePRef_init_for_object_reactivation *somTD_somOS_ServiceBasePRef_init_for_object_reactivation;
typedef SOMObject*   SOMLINK somTP_somOS_ServiceBasePRef_init_for_object_copy(somOS_ServiceBasePRef *somSelf, Environment *ev);
typedef somTP_somOS_ServiceBasePRef_init_for_object_copy *somTD_somOS_ServiceBasePRef_init_for_object_copy;
typedef void   SOMLINK somTP_somOS_ServiceBasePRef_uninit_for_object_move(somOS_ServiceBasePRef *somSelf, Environment *ev);
typedef somTP_somOS_ServiceBasePRef_uninit_for_object_move *somTD_somOS_ServiceBasePRef_uninit_for_object_move;
typedef void   SOMLINK somTP_somOS_ServiceBasePRef_uninit_for_object_passivation(somOS_ServiceBasePRef *somSelf, Environment *ev);
typedef somTP_somOS_ServiceBasePRef_uninit_for_object_passivation *somTD_somOS_ServiceBasePRef_uninit_for_object_passivation;
typedef void   SOMLINK somTP_somOS_ServiceBasePRef_uninit_for_object_destruction(somOS_ServiceBasePRef *somSelf, Environment *ev);
typedef somTP_somOS_ServiceBasePRef_uninit_for_object_destruction *somTD_somOS_ServiceBasePRef_uninit_for_object_destruction;
typedef void   SOMLINK somTP_somOS_ServiceBasePRef_somDefaultInit(somOS_ServiceBasePRef *somSelf, 
		som3InitCtrl* ctrl);
typedef somTP_somOS_ServiceBasePRef_somDefaultInit *somTD_somOS_ServiceBasePRef_somDefaultInit;
typedef void   SOMLINK somTP_somOS_ServiceBasePRef_somDestruct(somOS_ServiceBasePRef *somSelf, 
		octet doFree, 
		som3DestructCtrl* ctrl);
typedef somTP_somOS_ServiceBasePRef_somDestruct *somTD_somOS_ServiceBasePRef_somDestruct;
typedef boolean   SOMLINK somTP_somOS_ServiceBasePRef_is_identical(somOS_ServiceBasePRef *somSelf, Environment *ev, 
		CosObjectIdentity_IdentifiableObject* other_object);
typedef somTP_somOS_ServiceBasePRef_is_identical *somTD_somOS_ServiceBasePRef_is_identical;
typedef CosObjectIdentity_ObjectIdentifier   SOMLINK somTP_somOS_ServiceBasePRef__get_constant_random_id(somOS_ServiceBasePRef *somSelf, Environment *ev);
typedef somTP_somOS_ServiceBasePRef__get_constant_random_id *somTD_somOS_ServiceBasePRef__get_constant_random_id;
typedef void   SOMLINK somTP_somOS_ServiceBasePRef_somDefaultCopyInit(somOS_ServiceBasePRef *somSelf, 
		som3InitCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_somOS_ServiceBasePRef_somDefaultCopyInit *somTD_somOS_ServiceBasePRef_somDefaultCopyInit;
typedef somOS_ServiceBasePRef*   SOMLINK somTP_somOS_ServiceBasePRef_somDefaultAssign(somOS_ServiceBasePRef *somSelf, 
		som3AssignCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_somOS_ServiceBasePRef_somDefaultAssign *somTD_somOS_ServiceBasePRef_somDefaultAssign;
typedef void   SOMLINK somTP_somOS_ServiceBasePRef_somDefaultConstCopyInit(somOS_ServiceBasePRef *somSelf, 
		som3InitCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_somOS_ServiceBasePRef_somDefaultConstCopyInit *somTD_somOS_ServiceBasePRef_somDefaultConstCopyInit;
typedef void   SOMLINK somTP_somOS_ServiceBasePRef_somDefaultVCopyInit(somOS_ServiceBasePRef *somSelf, 
		som3InitCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_somOS_ServiceBasePRef_somDefaultVCopyInit *somTD_somOS_ServiceBasePRef_somDefaultVCopyInit;
typedef void   SOMLINK somTP_somOS_ServiceBasePRef_somDefaultConstVCopyInit(somOS_ServiceBasePRef *somSelf, 
		som3InitCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_somOS_ServiceBasePRef_somDefaultConstVCopyInit *somTD_somOS_ServiceBasePRef_somDefaultConstVCopyInit;
typedef somOS_ServiceBasePRef*   SOMLINK somTP_somOS_ServiceBasePRef_somDefaultConstAssign(somOS_ServiceBasePRef *somSelf, 
		som3AssignCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_somOS_ServiceBasePRef_somDefaultConstAssign *somTD_somOS_ServiceBasePRef_somDefaultConstAssign;
typedef somOS_ServiceBasePRef*   SOMLINK somTP_somOS_ServiceBasePRef_somDefaultVAssign(somOS_ServiceBasePRef *somSelf, 
		som3AssignCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_somOS_ServiceBasePRef_somDefaultVAssign *somTD_somOS_ServiceBasePRef_somDefaultVAssign;
typedef somOS_ServiceBasePRef*   SOMLINK somTP_somOS_ServiceBasePRef_somDefaultConstVAssign(somOS_ServiceBasePRef *somSelf, 
		som3AssignCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_somOS_ServiceBasePRef_somDefaultConstVAssign *somTD_somOS_ServiceBasePRef_somDefaultConstVAssign;
typedef void   SOMLINK somTP_somOS_ServiceBasePRef_somInit(somOS_ServiceBasePRef *somSelf);
typedef somTP_somOS_ServiceBasePRef_somInit *somTD_somOS_ServiceBasePRef_somInit;
typedef void   SOMLINK somTP_somOS_ServiceBasePRef_somUninit(somOS_ServiceBasePRef *somSelf);
typedef somTP_somOS_ServiceBasePRef_somUninit *somTD_somOS_ServiceBasePRef_somUninit;
typedef void   SOMLINK somTP_somOS_ServiceBasePRef_somFree(somOS_ServiceBasePRef *somSelf);
typedef somTP_somOS_ServiceBasePRef_somFree *somTD_somOS_ServiceBasePRef_somFree;
typedef SOMClass*   SOMLINK somTP_somOS_ServiceBasePRef_somGetClass(somOS_ServiceBasePRef *somSelf);
typedef somTP_somOS_ServiceBasePRef_somGetClass *somTD_somOS_ServiceBasePRef_somGetClass;
typedef string   SOMLINK somTP_somOS_ServiceBasePRef_somGetClassName(somOS_ServiceBasePRef *somSelf);
typedef somTP_somOS_ServiceBasePRef_somGetClassName *somTD_somOS_ServiceBasePRef_somGetClassName;
typedef long   SOMLINK somTP_somOS_ServiceBasePRef_somGetSize(somOS_ServiceBasePRef *somSelf);
typedef somTP_somOS_ServiceBasePRef_somGetSize *somTD_somOS_ServiceBasePRef_somGetSize;
typedef boolean   SOMLINK somTP_somOS_ServiceBasePRef_somIsA(somOS_ServiceBasePRef *somSelf, 
		SOMClass* aClassObj);
typedef somTP_somOS_ServiceBasePRef_somIsA *somTD_somOS_ServiceBasePRef_somIsA;
typedef boolean   SOMLINK somTP_somOS_ServiceBasePRef_somIsInstanceOf(somOS_ServiceBasePRef *somSelf, 
		SOMClass* aClassObj);
typedef somTP_somOS_ServiceBasePRef_somIsInstanceOf *somTD_somOS_ServiceBasePRef_somIsInstanceOf;
typedef boolean   SOMLINK somTP_somOS_ServiceBasePRef_somRespondsTo(somOS_ServiceBasePRef *somSelf, 
		somId mId);
typedef somTP_somOS_ServiceBasePRef_somRespondsTo *somTD_somOS_ServiceBasePRef_somRespondsTo;
typedef boolean   SOMLINK somTP_somOS_ServiceBasePRef_somDispatch(somOS_ServiceBasePRef *somSelf, 
		somToken* retValue, 
		somId methodId, 
		va_list ap);
typedef somTP_somOS_ServiceBasePRef_somDispatch *somTD_somOS_ServiceBasePRef_somDispatch;
typedef boolean   SOMLINK somTP_somOS_ServiceBasePRef_somClassDispatch(somOS_ServiceBasePRef *somSelf, 
		SOMClass* clsObj, 
		somToken* retValue, 
		somId methodId, 
		va_list ap);
typedef somTP_somOS_ServiceBasePRef_somClassDispatch *somTD_somOS_ServiceBasePRef_somClassDispatch;
typedef boolean   SOMLINK somTP_somOS_ServiceBasePRef_somCastObj(somOS_ServiceBasePRef *somSelf, 
		SOMClass* castedCls);
typedef somTP_somOS_ServiceBasePRef_somCastObj *somTD_somOS_ServiceBasePRef_somCastObj;
typedef boolean   SOMLINK somTP_somOS_ServiceBasePRef_somResetObj(somOS_ServiceBasePRef *somSelf);
typedef somTP_somOS_ServiceBasePRef_somResetObj *somTD_somOS_ServiceBasePRef_somResetObj;
typedef somOS_ServiceBasePRef*   SOMLINK somTP_somOS_ServiceBasePRef_somPrintSelf(somOS_ServiceBasePRef *somSelf);
typedef somTP_somOS_ServiceBasePRef_somPrintSelf *somTD_somOS_ServiceBasePRef_somPrintSelf;
typedef void   SOMLINK somTP_somOS_ServiceBasePRef_somDumpSelf(somOS_ServiceBasePRef *somSelf, 
		long level);
typedef somTP_somOS_ServiceBasePRef_somDumpSelf *somTD_somOS_ServiceBasePRef_somDumpSelf;
typedef void   SOMLINK somTP_somOS_ServiceBasePRef_somDumpSelfInt(somOS_ServiceBasePRef *somSelf, 
		long level);
typedef somTP_somOS_ServiceBasePRef_somDumpSelfInt *somTD_somOS_ServiceBasePRef_somDumpSelfInt;
}

#endif /* somOS_ServiceBasePRef_API */


/*
 * -- The C++ Wrapper Class for somOS_ServiceBasePRef
 */
class somOS_ServiceBasePRef : public somOS_ServiceBase
{
public:

// somOS_ServiceBasePRef::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 (!_somOS_ServiceBasePRef) somOS_ServiceBasePRefNewClass(somOS_ServiceBasePRef_MajorVersion,somOS_ServiceBasePRef_MinorVersion);
   return (void*)
   (((somTD_SOMClass_somNewNoInit)(SOMClassClassData.somNewNoInit))
         ((SOMClass *)((void*)_somOS_ServiceBasePRef)));
}

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

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

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

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


/*
 * Reintroduce inherited methods
 */

/* 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_somOS_ServiceBasePRef_reinit)(somOS_ServiceBaseClassData.reinit))(((somOS_ServiceBasePRef *)((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_somOS_ServiceBasePRef_capture)(somOS_ServiceBaseClassData.capture))(((somOS_ServiceBasePRef *)((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_somOS_ServiceBasePRef_GetInstanceManager)(somOS_ServiceBaseClassData.GetInstanceManager))(((somOS_ServiceBasePRef *)((void *)this)), ev)
	);
}


/* method: init_for_object_creation */
SOMObject*   init_for_object_creation(Environment *ev)
{
/*
 *  somOS::somOS::Server calls this method from somdCreateObj().
 *  - Services should override this method to do proper initialization
 *    at the time of object creation. (if necessary)
 *  - it initializes the data for CosObjectIdentity
 */
   return 	(
	 SOM_TestCls(this,_SOMCLASS_somOS_ServiceBase),
	 ((somTD_somOS_ServiceBasePRef_init_for_object_creation)(somOS_ServiceBaseClassData.init_for_object_creation))(((somOS_ServiceBasePRef *)((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_somOS_ServiceBasePRef_init_for_object_reactivation)(somOS_ServiceBaseClassData.init_for_object_reactivation))(((somOS_ServiceBasePRef *)((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_somOS_ServiceBasePRef_init_for_object_copy)(somOS_ServiceBaseClassData.init_for_object_copy))(((somOS_ServiceBasePRef *)((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_somOS_ServiceBasePRef_uninit_for_object_move)(somOS_ServiceBaseClassData.uninit_for_object_move))(((somOS_ServiceBasePRef *)((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_somOS_ServiceBasePRef_uninit_for_object_passivation)(somOS_ServiceBaseClassData.uninit_for_object_passivation))(((somOS_ServiceBasePRef *)((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().
 *  - Services should override this method to do proper uninitialization
 *    at the time of object destruction. (if necessary)
 */
   	(
	 SOM_TestCls(this,_SOMCLASS_somOS_ServiceBase),
	 ((somTD_somOS_ServiceBasePRef_uninit_for_object_destruction)(somOS_ServiceBaseClassData.uninit_for_object_destruction))(((somOS_ServiceBasePRef *)((void *)this)), ev)
	);
}


/* initializer method: somDefaultInit */
void   somDefaultInit(som3InitCtrl* ctrl)
{
/*
 *  For efficiency
 */
   	(
	 SOM_TestCls(this,_SOMCLASS_SOMObject),
	 ((somTD_somOS_ServiceBasePRef_somDefaultInit)(SOMObjectClassData.somDefaultInit))(((somOS_ServiceBasePRef *)((void *)this)),ctrl)
	);
}


/* method: somDestruct */
void   somDestruct(octet doFree, 
		som3DestructCtrl* ctrl)
{
/*
 *  Attempt to remove the entry for the object in the reference data table
 *  by calling remove_from_reference_data_table on the server.
 */
   	(
	 SOM_TestCls(this,_SOMCLASS_SOMObject),
	 ((somTD_somOS_ServiceBasePRef_somDestruct)(SOMObjectClassData.somDestruct))(((somOS_ServiceBasePRef *)((void *)this)),doFree,ctrl)
	);
}


/* method: is_identical */
boolean   is_identical(Environment *ev, 
		CosObjectIdentity_IdentifiableObject* other_object)
{
   return 	(
	 SOM_TestCls(this,_SOMCLASS_CosObjectIdentity_IdentifiableObject),
	 ((somTD_somOS_ServiceBasePRef_is_identical)(CosObjectIdentity_IdentifiableObjectClassData.is_identical))(((somOS_ServiceBasePRef *)((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_somOS_ServiceBasePRef__get_constant_random_id)(CosObjectIdentity_IdentifiableObjectClassData._get_constant_random_id))(((somOS_ServiceBasePRef *)((void *)this)), ev)
	);
}


/* 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_somOS_ServiceBasePRef_somDefaultCopyInit)(SOMObjectClassData.somDefaultCopyInit))(((somOS_ServiceBasePRef *)((void *)this)),ctrl,fromObj)
	);
}


/* method: somDefaultAssign */
somOS_ServiceBasePRef*  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_somOS_ServiceBasePRef_somDefaultAssign)(SOMObjectClassData.somDefaultAssign))(((somOS_ServiceBasePRef *)((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_somOS_ServiceBasePRef_somDefaultConstCopyInit)(SOMObjectClassData.somDefaultConstCopyInit))(((somOS_ServiceBasePRef *)((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_somOS_ServiceBasePRef_somDefaultVCopyInit)(SOMObjectClassData.somDefaultVCopyInit))(((somOS_ServiceBasePRef *)((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_somOS_ServiceBasePRef_somDefaultConstVCopyInit)(SOMObjectClassData.somDefaultConstVCopyInit))(((somOS_ServiceBasePRef *)((void *)this)),ctrl,fromObj)
	);
}


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


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


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


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


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


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


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


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


/* method: somGetSize */
long   somGetSize()
{
/*
 *  Return the size of the receiver.
 */
   return 	(
	 SOM_TestCls(this,_SOMCLASS_SOMObject),
	 ((somTD_somOS_ServiceBasePRef_somGetSize)(SOMObjectClassData.somGetSize))(((somOS_ServiceBasePRef *)((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_somOS_ServiceBasePRef_somIsA)(SOMObjectClassData.somIsA))(((somOS_ServiceBasePRef *)((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_somOS_ServiceBasePRef_somIsInstanceOf)(SOMObjectClassData.somIsInstanceOf))(((somOS_ServiceBasePRef *)((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_somOS_ServiceBasePRef_somRespondsTo)(SOMObjectClassData.somRespondsTo))(((somOS_ServiceBasePRef *)((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_somOS_ServiceBasePRef_somDispatch)(SOMObjectClassData.somDispatch))(((somOS_ServiceBasePRef *)((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_somOS_ServiceBasePRef_somDispatch)(SOMObjectClassData.somDispatch))(((somOS_ServiceBasePRef *)((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_somOS_ServiceBasePRef_somClassDispatch)(SOMObjectClassData.somClassDispatch))(((somOS_ServiceBasePRef *)((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_somOS_ServiceBasePRef_somClassDispatch)(SOMObjectClassData.somClassDispatch))(((somOS_ServiceBasePRef *)((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_somOS_ServiceBasePRef_somCastObj)(SOMObjectClassData.somCastObj))(((somOS_ServiceBasePRef *)((void *)this)),castedCls)
	);
}


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


/* method: somPrintSelf */
somOS_ServiceBasePRef*  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_somOS_ServiceBasePRef_somPrintSelf)(SOMObjectClassData.somPrintSelf))(((somOS_ServiceBasePRef *)((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_somOS_ServiceBasePRef_somDumpSelf)(SOMObjectClassData.somDumpSelf))(((somOS_ServiceBasePRef *)((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_somOS_ServiceBasePRef_somDumpSelfInt)(SOMObjectClassData.somDumpSelfInt))(((somOS_ServiceBasePRef *)((void *)this)),level)
	);
}



};   /* somOS_ServiceBasePRef */



#endif       /* SOM_somOS_ServiceBasePRef_xh */

#ifndef SOM_somOS_ServiceBaseCORBA_xh
#define SOM_somOS_ServiceBaseCORBA_xh


#define somOS_ServiceBaseCORBA_MajorVersion 3
#define somOS_ServiceBaseCORBA_MinorVersion 0
class somOS_ServiceBaseCORBA;

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

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

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

/*
 * Start of bindings for IDL types
 */


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

/*
 * A function to create the somOS_ServiceBaseCORBA class object...
 */
SOMEXTERN SOM_IMPORTEXPORT_somos_somos SOMClass * SOMLINK somOS_ServiceBaseCORBANewClass(
		integer4 majorVersion,
		integer4 minorVersion);


/*
 * The API 2 ClassData Structures...
 */
SOMEXTERN struct somOS_ServiceBaseCORBAClassDataStructure {
	SOMClass *classObject;
} SOMDLINK SOM_IMPORTEXPORT_somos_somos somOS_ServiceBaseCORBAClassData;
SOMEXTERN struct somOS_ServiceBaseCORBACClassDataStructure {
	som3ClassDetailsPtr    parentMtab;
	somDToken              instanceDataToken;
} SOMDLINK SOM_IMPORTEXPORT_somos_somos somOS_ServiceBaseCORBACClassData;


/*
 * Class Object and Method Token Macros
 */
#define _SOMCLASS_somOS_ServiceBaseCORBA (somOS_ServiceBaseCORBAClassData.classObject)
#ifndef SOMGD_somOS_ServiceBaseCORBA
    #if (defined(_somOS_ServiceBaseCORBA) || defined(__somOS_ServiceBaseCORBA))
        #undef _somOS_ServiceBaseCORBA
        #undef __somOS_ServiceBaseCORBA
        #define SOMGD_somOS_ServiceBaseCORBA 1
    #else
        #define _somOS_ServiceBaseCORBA _SOMCLASS_somOS_ServiceBaseCORBA
    #endif /* _somOS_ServiceBaseCORBA */
#endif /* SOMGD_somOS_ServiceBaseCORBA */
#define somOS_ServiceBaseCORBA_classObj _SOMCLASS_somOS_ServiceBaseCORBA
#define _SOMMTOKEN_somOS_ServiceBaseCORBA(method) ((somMToken)somOS_ServiceBaseCORBAClassData.method)

/*
 * -- Typedefs for somOS_ServiceBaseCORBA Method Procedures
 */
SOMEXTERN {

/*
 * -- Typedefs for Reintroduced Wrapper Methods
 */
typedef void   SOMLINK somTP_somOS_ServiceBaseCORBA_reinit(somOS_ServiceBaseCORBA *somSelf, Environment *ev, 
		somOS_ServiceBase_metastate_t* meta_data);
typedef somTP_somOS_ServiceBaseCORBA_reinit *somTD_somOS_ServiceBaseCORBA_reinit;
typedef void   SOMLINK somTP_somOS_ServiceBaseCORBA_capture(somOS_ServiceBaseCORBA *somSelf, Environment *ev, 
		somOS_ServiceBase_metastate_t* meta_data);
typedef somTP_somOS_ServiceBaseCORBA_capture *somTD_somOS_ServiceBaseCORBA_capture;
typedef SOMObject*   SOMLINK somTP_somOS_ServiceBaseCORBA_GetInstanceManager(somOS_ServiceBaseCORBA *somSelf, Environment *ev);
typedef somTP_somOS_ServiceBaseCORBA_GetInstanceManager *somTD_somOS_ServiceBaseCORBA_GetInstanceManager;
typedef SOMObject*   SOMLINK somTP_somOS_ServiceBaseCORBA_init_for_object_creation(somOS_ServiceBaseCORBA *somSelf, Environment *ev);
typedef somTP_somOS_ServiceBaseCORBA_init_for_object_creation *somTD_somOS_ServiceBaseCORBA_init_for_object_creation;
typedef SOMObject*   SOMLINK somTP_somOS_ServiceBaseCORBA_init_for_object_reactivation(somOS_ServiceBaseCORBA *somSelf, Environment *ev);
typedef somTP_somOS_ServiceBaseCORBA_init_for_object_reactivation *somTD_somOS_ServiceBaseCORBA_init_for_object_reactivation;
typedef SOMObject*   SOMLINK somTP_somOS_ServiceBaseCORBA_init_for_object_copy(somOS_ServiceBaseCORBA *somSelf, Environment *ev);
typedef somTP_somOS_ServiceBaseCORBA_init_for_object_copy *somTD_somOS_ServiceBaseCORBA_init_for_object_copy;
typedef void   SOMLINK somTP_somOS_ServiceBaseCORBA_uninit_for_object_move(somOS_ServiceBaseCORBA *somSelf, Environment *ev);
typedef somTP_somOS_ServiceBaseCORBA_uninit_for_object_move *somTD_somOS_ServiceBaseCORBA_uninit_for_object_move;
typedef void   SOMLINK somTP_somOS_ServiceBaseCORBA_uninit_for_object_passivation(somOS_ServiceBaseCORBA *somSelf, Environment *ev);
typedef somTP_somOS_ServiceBaseCORBA_uninit_for_object_passivation *somTD_somOS_ServiceBaseCORBA_uninit_for_object_passivation;
typedef void   SOMLINK somTP_somOS_ServiceBaseCORBA_uninit_for_object_destruction(somOS_ServiceBaseCORBA *somSelf, Environment *ev);
typedef somTP_somOS_ServiceBaseCORBA_uninit_for_object_destruction *somTD_somOS_ServiceBaseCORBA_uninit_for_object_destruction;
typedef void   SOMLINK somTP_somOS_ServiceBaseCORBA_somDefaultInit(somOS_ServiceBaseCORBA *somSelf, 
		som3InitCtrl* ctrl);
typedef somTP_somOS_ServiceBaseCORBA_somDefaultInit *somTD_somOS_ServiceBaseCORBA_somDefaultInit;
typedef void   SOMLINK somTP_somOS_ServiceBaseCORBA_somDestruct(somOS_ServiceBaseCORBA *somSelf, 
		octet doFree, 
		som3DestructCtrl* ctrl);
typedef somTP_somOS_ServiceBaseCORBA_somDestruct *somTD_somOS_ServiceBaseCORBA_somDestruct;
typedef boolean   SOMLINK somTP_somOS_ServiceBaseCORBA_is_identical(somOS_ServiceBaseCORBA *somSelf, Environment *ev, 
		CosObjectIdentity_IdentifiableObject* other_object);
typedef somTP_somOS_ServiceBaseCORBA_is_identical *somTD_somOS_ServiceBaseCORBA_is_identical;
typedef CosObjectIdentity_ObjectIdentifier   SOMLINK somTP_somOS_ServiceBaseCORBA__get_constant_random_id(somOS_ServiceBaseCORBA *somSelf, Environment *ev);
typedef somTP_somOS_ServiceBaseCORBA__get_constant_random_id *somTD_somOS_ServiceBaseCORBA__get_constant_random_id;
typedef void   SOMLINK somTP_somOS_ServiceBaseCORBA_somDefaultCopyInit(somOS_ServiceBaseCORBA *somSelf, 
		som3InitCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_somOS_ServiceBaseCORBA_somDefaultCopyInit *somTD_somOS_ServiceBaseCORBA_somDefaultCopyInit;
typedef somOS_ServiceBaseCORBA*   SOMLINK somTP_somOS_ServiceBaseCORBA_somDefaultAssign(somOS_ServiceBaseCORBA *somSelf, 
		som3AssignCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_somOS_ServiceBaseCORBA_somDefaultAssign *somTD_somOS_ServiceBaseCORBA_somDefaultAssign;
typedef void   SOMLINK somTP_somOS_ServiceBaseCORBA_somDefaultConstCopyInit(somOS_ServiceBaseCORBA *somSelf, 
		som3InitCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_somOS_ServiceBaseCORBA_somDefaultConstCopyInit *somTD_somOS_ServiceBaseCORBA_somDefaultConstCopyInit;
typedef void   SOMLINK somTP_somOS_ServiceBaseCORBA_somDefaultVCopyInit(somOS_ServiceBaseCORBA *somSelf, 
		som3InitCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_somOS_ServiceBaseCORBA_somDefaultVCopyInit *somTD_somOS_ServiceBaseCORBA_somDefaultVCopyInit;
typedef void   SOMLINK somTP_somOS_ServiceBaseCORBA_somDefaultConstVCopyInit(somOS_ServiceBaseCORBA *somSelf, 
		som3InitCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_somOS_ServiceBaseCORBA_somDefaultConstVCopyInit *somTD_somOS_ServiceBaseCORBA_somDefaultConstVCopyInit;
typedef somOS_ServiceBaseCORBA*   SOMLINK somTP_somOS_ServiceBaseCORBA_somDefaultConstAssign(somOS_ServiceBaseCORBA *somSelf, 
		som3AssignCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_somOS_ServiceBaseCORBA_somDefaultConstAssign *somTD_somOS_ServiceBaseCORBA_somDefaultConstAssign;
typedef somOS_ServiceBaseCORBA*   SOMLINK somTP_somOS_ServiceBaseCORBA_somDefaultVAssign(somOS_ServiceBaseCORBA *somSelf, 
		som3AssignCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_somOS_ServiceBaseCORBA_somDefaultVAssign *somTD_somOS_ServiceBaseCORBA_somDefaultVAssign;
typedef somOS_ServiceBaseCORBA*   SOMLINK somTP_somOS_ServiceBaseCORBA_somDefaultConstVAssign(somOS_ServiceBaseCORBA *somSelf, 
		som3AssignCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_somOS_ServiceBaseCORBA_somDefaultConstVAssign *somTD_somOS_ServiceBaseCORBA_somDefaultConstVAssign;
typedef void   SOMLINK somTP_somOS_ServiceBaseCORBA_somInit(somOS_ServiceBaseCORBA *somSelf);
typedef somTP_somOS_ServiceBaseCORBA_somInit *somTD_somOS_ServiceBaseCORBA_somInit;
typedef void   SOMLINK somTP_somOS_ServiceBaseCORBA_somUninit(somOS_ServiceBaseCORBA *somSelf);
typedef somTP_somOS_ServiceBaseCORBA_somUninit *somTD_somOS_ServiceBaseCORBA_somUninit;
typedef void   SOMLINK somTP_somOS_ServiceBaseCORBA_somFree(somOS_ServiceBaseCORBA *somSelf);
typedef somTP_somOS_ServiceBaseCORBA_somFree *somTD_somOS_ServiceBaseCORBA_somFree;
typedef SOMClass*   SOMLINK somTP_somOS_ServiceBaseCORBA_somGetClass(somOS_ServiceBaseCORBA *somSelf);
typedef somTP_somOS_ServiceBaseCORBA_somGetClass *somTD_somOS_ServiceBaseCORBA_somGetClass;
typedef string   SOMLINK somTP_somOS_ServiceBaseCORBA_somGetClassName(somOS_ServiceBaseCORBA *somSelf);
typedef somTP_somOS_ServiceBaseCORBA_somGetClassName *somTD_somOS_ServiceBaseCORBA_somGetClassName;
typedef long   SOMLINK somTP_somOS_ServiceBaseCORBA_somGetSize(somOS_ServiceBaseCORBA *somSelf);
typedef somTP_somOS_ServiceBaseCORBA_somGetSize *somTD_somOS_ServiceBaseCORBA_somGetSize;
typedef boolean   SOMLINK somTP_somOS_ServiceBaseCORBA_somIsA(somOS_ServiceBaseCORBA *somSelf, 
		SOMClass* aClassObj);
typedef somTP_somOS_ServiceBaseCORBA_somIsA *somTD_somOS_ServiceBaseCORBA_somIsA;
typedef boolean   SOMLINK somTP_somOS_ServiceBaseCORBA_somIsInstanceOf(somOS_ServiceBaseCORBA *somSelf, 
		SOMClass* aClassObj);
typedef somTP_somOS_ServiceBaseCORBA_somIsInstanceOf *somTD_somOS_ServiceBaseCORBA_somIsInstanceOf;
typedef boolean   SOMLINK somTP_somOS_ServiceBaseCORBA_somRespondsTo(somOS_ServiceBaseCORBA *somSelf, 
		somId mId);
typedef somTP_somOS_ServiceBaseCORBA_somRespondsTo *somTD_somOS_ServiceBaseCORBA_somRespondsTo;
typedef boolean   SOMLINK somTP_somOS_ServiceBaseCORBA_somDispatch(somOS_ServiceBaseCORBA *somSelf, 
		somToken* retValue, 
		somId methodId, 
		va_list ap);
typedef somTP_somOS_ServiceBaseCORBA_somDispatch *somTD_somOS_ServiceBaseCORBA_somDispatch;
typedef boolean   SOMLINK somTP_somOS_ServiceBaseCORBA_somClassDispatch(somOS_ServiceBaseCORBA *somSelf, 
		SOMClass* clsObj, 
		somToken* retValue, 
		somId methodId, 
		va_list ap);
typedef somTP_somOS_ServiceBaseCORBA_somClassDispatch *somTD_somOS_ServiceBaseCORBA_somClassDispatch;
typedef boolean   SOMLINK somTP_somOS_ServiceBaseCORBA_somCastObj(somOS_ServiceBaseCORBA *somSelf, 
		SOMClass* castedCls);
typedef somTP_somOS_ServiceBaseCORBA_somCastObj *somTD_somOS_ServiceBaseCORBA_somCastObj;
typedef boolean   SOMLINK somTP_somOS_ServiceBaseCORBA_somResetObj(somOS_ServiceBaseCORBA *somSelf);
typedef somTP_somOS_ServiceBaseCORBA_somResetObj *somTD_somOS_ServiceBaseCORBA_somResetObj;
typedef somOS_ServiceBaseCORBA*   SOMLINK somTP_somOS_ServiceBaseCORBA_somPrintSelf(somOS_ServiceBaseCORBA *somSelf);
typedef somTP_somOS_ServiceBaseCORBA_somPrintSelf *somTD_somOS_ServiceBaseCORBA_somPrintSelf;
typedef void   SOMLINK somTP_somOS_ServiceBaseCORBA_somDumpSelf(somOS_ServiceBaseCORBA *somSelf, 
		long level);
typedef somTP_somOS_ServiceBaseCORBA_somDumpSelf *somTD_somOS_ServiceBaseCORBA_somDumpSelf;
typedef void   SOMLINK somTP_somOS_ServiceBaseCORBA_somDumpSelfInt(somOS_ServiceBaseCORBA *somSelf, 
		long level);
typedef somTP_somOS_ServiceBaseCORBA_somDumpSelfInt *somTD_somOS_ServiceBaseCORBA_somDumpSelfInt;
}

#endif /* somOS_ServiceBaseCORBA_API */


/*
 * -- The C++ Wrapper Class for somOS_ServiceBaseCORBA
 */
class somOS_ServiceBaseCORBA : public somOS_ServiceBase
{
public:

// somOS_ServiceBaseCORBA::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 (!_somOS_ServiceBaseCORBA) somOS_ServiceBaseCORBANewClass(somOS_ServiceBaseCORBA_MajorVersion,somOS_ServiceBaseCORBA_MinorVersion);
   return (void*)
   (((somTD_SOMClass_somNewNoInit)(SOMClassClassData.somNewNoInit))
         ((SOMClass *)((void*)_somOS_ServiceBaseCORBA)));
}

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

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

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

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


/*
 * Reintroduce inherited methods
 */

/* 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_somOS_ServiceBaseCORBA_reinit)(somOS_ServiceBaseClassData.reinit))(((somOS_ServiceBaseCORBA *)((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_somOS_ServiceBaseCORBA_capture)(somOS_ServiceBaseClassData.capture))(((somOS_ServiceBaseCORBA *)((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_somOS_ServiceBaseCORBA_GetInstanceManager)(somOS_ServiceBaseClassData.GetInstanceManager))(((somOS_ServiceBaseCORBA *)((void *)this)), ev)
	);
}


/* method: init_for_object_creation */
SOMObject*   init_for_object_creation(Environment *ev)
{
/*
 *  somOS::somOS::Server calls this method from somdCreateObj().
 *  - Services should override this method to do proper initialization
 *    at the time of object creation. (if necessary)
 *  - it initializes the data for CosObjectIdentity
 */
   return 	(
	 SOM_TestCls(this,_SOMCLASS_somOS_ServiceBase),
	 ((somTD_somOS_ServiceBaseCORBA_init_for_object_creation)(somOS_ServiceBaseClassData.init_for_object_creation))(((somOS_ServiceBaseCORBA *)((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_somOS_ServiceBaseCORBA_init_for_object_reactivation)(somOS_ServiceBaseClassData.init_for_object_reactivation))(((somOS_ServiceBaseCORBA *)((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_somOS_ServiceBaseCORBA_init_for_object_copy)(somOS_ServiceBaseClassData.init_for_object_copy))(((somOS_ServiceBaseCORBA *)((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_somOS_ServiceBaseCORBA_uninit_for_object_move)(somOS_ServiceBaseClassData.uninit_for_object_move))(((somOS_ServiceBaseCORBA *)((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_somOS_ServiceBaseCORBA_uninit_for_object_passivation)(somOS_ServiceBaseClassData.uninit_for_object_passivation))(((somOS_ServiceBaseCORBA *)((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().
 *  - Services should override this method to do proper uninitialization
 *    at the time of object destruction. (if necessary)
 */
   	(
	 SOM_TestCls(this,_SOMCLASS_somOS_ServiceBase),
	 ((somTD_somOS_ServiceBaseCORBA_uninit_for_object_destruction)(somOS_ServiceBaseClassData.uninit_for_object_destruction))(((somOS_ServiceBaseCORBA *)((void *)this)), ev)
	);
}


/* initializer method: somDefaultInit */
void   somDefaultInit(som3InitCtrl* ctrl)
{
/*
 *  For efficiency
 */
   	(
	 SOM_TestCls(this,_SOMCLASS_SOMObject),
	 ((somTD_somOS_ServiceBaseCORBA_somDefaultInit)(SOMObjectClassData.somDefaultInit))(((somOS_ServiceBaseCORBA *)((void *)this)),ctrl)
	);
}


/* method: somDestruct */
void   somDestruct(octet doFree, 
		som3DestructCtrl* ctrl)
{
/*
 *  Attempt to remove the entry for the object in the reference data table
 *  by calling remove_from_reference_data_table on the server.
 */
   	(
	 SOM_TestCls(this,_SOMCLASS_SOMObject),
	 ((somTD_somOS_ServiceBaseCORBA_somDestruct)(SOMObjectClassData.somDestruct))(((somOS_ServiceBaseCORBA *)((void *)this)),doFree,ctrl)
	);
}


/* method: is_identical */
boolean   is_identical(Environment *ev, 
		CosObjectIdentity_IdentifiableObject* other_object)
{
   return 	(
	 SOM_TestCls(this,_SOMCLASS_CosObjectIdentity_IdentifiableObject),
	 ((somTD_somOS_ServiceBaseCORBA_is_identical)(CosObjectIdentity_IdentifiableObjectClassData.is_identical))(((somOS_ServiceBaseCORBA *)((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_somOS_ServiceBaseCORBA__get_constant_random_id)(CosObjectIdentity_IdentifiableObjectClassData._get_constant_random_id))(((somOS_ServiceBaseCORBA *)((void *)this)), ev)
	);
}


/* 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_somOS_ServiceBaseCORBA_somDefaultCopyInit)(SOMObjectClassData.somDefaultCopyInit))(((somOS_ServiceBaseCORBA *)((void *)this)),ctrl,fromObj)
	);
}


/* method: somDefaultAssign */
somOS_ServiceBaseCORBA*  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_somOS_ServiceBaseCORBA_somDefaultAssign)(SOMObjectClassData.somDefaultAssign))(((somOS_ServiceBaseCORBA *)((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_somOS_ServiceBaseCORBA_somDefaultConstCopyInit)(SOMObjectClassData.somDefaultConstCopyInit))(((somOS_ServiceBaseCORBA *)((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_somOS_ServiceBaseCORBA_somDefaultVCopyInit)(SOMObjectClassData.somDefaultVCopyInit))(((somOS_ServiceBaseCORBA *)((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_somOS_ServiceBaseCORBA_somDefaultConstVCopyInit)(SOMObjectClassData.somDefaultConstVCopyInit))(((somOS_ServiceBaseCORBA *)((void *)this)),ctrl,fromObj)
	);
}


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


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


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


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


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


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


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


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


/* method: somGetSize */
long   somGetSize()
{
/*
 *  Return the size of the receiver.
 */
   return 	(
	 SOM_TestCls(this,_SOMCLASS_SOMObject),
	 ((somTD_somOS_ServiceBaseCORBA_somGetSize)(SOMObjectClassData.somGetSize))(((somOS_ServiceBaseCORBA *)((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_somOS_ServiceBaseCORBA_somIsA)(SOMObjectClassData.somIsA))(((somOS_ServiceBaseCORBA *)((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_somOS_ServiceBaseCORBA_somIsInstanceOf)(SOMObjectClassData.somIsInstanceOf))(((somOS_ServiceBaseCORBA *)((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_somOS_ServiceBaseCORBA_somRespondsTo)(SOMObjectClassData.somRespondsTo))(((somOS_ServiceBaseCORBA *)((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_somOS_ServiceBaseCORBA_somDispatch)(SOMObjectClassData.somDispatch))(((somOS_ServiceBaseCORBA *)((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_somOS_ServiceBaseCORBA_somDispatch)(SOMObjectClassData.somDispatch))(((somOS_ServiceBaseCORBA *)((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_somOS_ServiceBaseCORBA_somClassDispatch)(SOMObjectClassData.somClassDispatch))(((somOS_ServiceBaseCORBA *)((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_somOS_ServiceBaseCORBA_somClassDispatch)(SOMObjectClassData.somClassDispatch))(((somOS_ServiceBaseCORBA *)((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_somOS_ServiceBaseCORBA_somCastObj)(SOMObjectClassData.somCastObj))(((somOS_ServiceBaseCORBA *)((void *)this)),castedCls)
	);
}


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


/* method: somPrintSelf */
somOS_ServiceBaseCORBA*  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_somOS_ServiceBaseCORBA_somPrintSelf)(SOMObjectClassData.somPrintSelf))(((somOS_ServiceBaseCORBA *)((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_somOS_ServiceBaseCORBA_somDumpSelf)(SOMObjectClassData.somDumpSelf))(((somOS_ServiceBaseCORBA *)((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_somOS_ServiceBaseCORBA_somDumpSelfInt)(SOMObjectClassData.somDumpSelfInt))(((somOS_ServiceBaseCORBA *)((void *)this)),level)
	);
}



};   /* somOS_ServiceBaseCORBA */



#endif       /* SOM_somOS_ServiceBaseCORBA_xh */

#ifndef SOM_somOS_ServiceBasePRefCORBA_xh
#define SOM_somOS_ServiceBasePRefCORBA_xh


#define somOS_ServiceBasePRefCORBA_MajorVersion 3
#define somOS_ServiceBasePRefCORBA_MinorVersion 0
class somOS_ServiceBasePRefCORBA;

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

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

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

/*
 * Start of bindings for IDL types
 */


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

/*
 * A function to create the somOS_ServiceBasePRefCORBA class object...
 */
SOMEXTERN SOM_IMPORTEXPORT_somos_somos SOMClass * SOMLINK somOS_ServiceBasePRefCORBANewClass(
		integer4 majorVersion,
		integer4 minorVersion);


/*
 * The API 2 ClassData Structures...
 */
SOMEXTERN struct somOS_ServiceBasePRefCORBAClassDataStructure {
	SOMClass *classObject;
} SOMDLINK SOM_IMPORTEXPORT_somos_somos somOS_ServiceBasePRefCORBAClassData;
SOMEXTERN struct somOS_ServiceBasePRefCORBACClassDataStructure {
	som3ClassDetailsPtr    parentMtab;
	somDToken              instanceDataToken;
} SOMDLINK SOM_IMPORTEXPORT_somos_somos somOS_ServiceBasePRefCORBACClassData;


/*
 * Class Object and Method Token Macros
 */
#define _SOMCLASS_somOS_ServiceBasePRefCORBA (somOS_ServiceBasePRefCORBAClassData.classObject)
#ifndef SOMGD_somOS_ServiceBasePRefCORBA
    #if (defined(_somOS_ServiceBasePRefCORBA) || defined(__somOS_ServiceBasePRefCORBA))
        #undef _somOS_ServiceBasePRefCORBA
        #undef __somOS_ServiceBasePRefCORBA
        #define SOMGD_somOS_ServiceBasePRefCORBA 1
    #else
        #define _somOS_ServiceBasePRefCORBA _SOMCLASS_somOS_ServiceBasePRefCORBA
    #endif /* _somOS_ServiceBasePRefCORBA */
#endif /* SOMGD_somOS_ServiceBasePRefCORBA */
#define somOS_ServiceBasePRefCORBA_classObj _SOMCLASS_somOS_ServiceBasePRefCORBA
#define _SOMMTOKEN_somOS_ServiceBasePRefCORBA(method) ((somMToken)somOS_ServiceBasePRefCORBAClassData.method)

/*
 * -- Typedefs for somOS_ServiceBasePRefCORBA Method Procedures
 */
SOMEXTERN {

/*
 * -- Typedefs for Reintroduced Wrapper Methods
 */
typedef void   SOMLINK somTP_somOS_ServiceBasePRefCORBA_somDefaultInit(somOS_ServiceBasePRefCORBA *somSelf, 
		som3InitCtrl* ctrl);
typedef somTP_somOS_ServiceBasePRefCORBA_somDefaultInit *somTD_somOS_ServiceBasePRefCORBA_somDefaultInit;
typedef void   SOMLINK somTP_somOS_ServiceBasePRefCORBA_somDestruct(somOS_ServiceBasePRefCORBA *somSelf, 
		octet doFree, 
		som3DestructCtrl* ctrl);
typedef somTP_somOS_ServiceBasePRefCORBA_somDestruct *somTD_somOS_ServiceBasePRefCORBA_somDestruct;
typedef SOMObject*   SOMLINK somTP_somOS_ServiceBasePRefCORBA_init_for_object_creation(somOS_ServiceBasePRefCORBA *somSelf, Environment *ev);
typedef somTP_somOS_ServiceBasePRefCORBA_init_for_object_creation *somTD_somOS_ServiceBasePRefCORBA_init_for_object_creation;
typedef void   SOMLINK somTP_somOS_ServiceBasePRefCORBA_uninit_for_object_destruction(somOS_ServiceBasePRefCORBA *somSelf, Environment *ev);
typedef somTP_somOS_ServiceBasePRefCORBA_uninit_for_object_destruction *somTD_somOS_ServiceBasePRefCORBA_uninit_for_object_destruction;
typedef void   SOMLINK somTP_somOS_ServiceBasePRefCORBA_reinit(somOS_ServiceBasePRefCORBA *somSelf, Environment *ev, 
		somOS_ServiceBase_metastate_t* meta_data);
typedef somTP_somOS_ServiceBasePRefCORBA_reinit *somTD_somOS_ServiceBasePRefCORBA_reinit;
typedef void   SOMLINK somTP_somOS_ServiceBasePRefCORBA_capture(somOS_ServiceBasePRefCORBA *somSelf, Environment *ev, 
		somOS_ServiceBase_metastate_t* meta_data);
typedef somTP_somOS_ServiceBasePRefCORBA_capture *somTD_somOS_ServiceBasePRefCORBA_capture;
typedef SOMObject*   SOMLINK somTP_somOS_ServiceBasePRefCORBA_GetInstanceManager(somOS_ServiceBasePRefCORBA *somSelf, Environment *ev);
typedef somTP_somOS_ServiceBasePRefCORBA_GetInstanceManager *somTD_somOS_ServiceBasePRefCORBA_GetInstanceManager;
typedef SOMObject*   SOMLINK somTP_somOS_ServiceBasePRefCORBA_init_for_object_reactivation(somOS_ServiceBasePRefCORBA *somSelf, Environment *ev);
typedef somTP_somOS_ServiceBasePRefCORBA_init_for_object_reactivation *somTD_somOS_ServiceBasePRefCORBA_init_for_object_reactivation;
typedef SOMObject*   SOMLINK somTP_somOS_ServiceBasePRefCORBA_init_for_object_copy(somOS_ServiceBasePRefCORBA *somSelf, Environment *ev);
typedef somTP_somOS_ServiceBasePRefCORBA_init_for_object_copy *somTD_somOS_ServiceBasePRefCORBA_init_for_object_copy;
typedef void   SOMLINK somTP_somOS_ServiceBasePRefCORBA_uninit_for_object_move(somOS_ServiceBasePRefCORBA *somSelf, Environment *ev);
typedef somTP_somOS_ServiceBasePRefCORBA_uninit_for_object_move *somTD_somOS_ServiceBasePRefCORBA_uninit_for_object_move;
typedef void   SOMLINK somTP_somOS_ServiceBasePRefCORBA_uninit_for_object_passivation(somOS_ServiceBasePRefCORBA *somSelf, Environment *ev);
typedef somTP_somOS_ServiceBasePRefCORBA_uninit_for_object_passivation *somTD_somOS_ServiceBasePRefCORBA_uninit_for_object_passivation;
typedef boolean   SOMLINK somTP_somOS_ServiceBasePRefCORBA_is_identical(somOS_ServiceBasePRefCORBA *somSelf, Environment *ev, 
		CosObjectIdentity_IdentifiableObject* other_object);
typedef somTP_somOS_ServiceBasePRefCORBA_is_identical *somTD_somOS_ServiceBasePRefCORBA_is_identical;
typedef CosObjectIdentity_ObjectIdentifier   SOMLINK somTP_somOS_ServiceBasePRefCORBA__get_constant_random_id(somOS_ServiceBasePRefCORBA *somSelf, Environment *ev);
typedef somTP_somOS_ServiceBasePRefCORBA__get_constant_random_id *somTD_somOS_ServiceBasePRefCORBA__get_constant_random_id;
typedef void   SOMLINK somTP_somOS_ServiceBasePRefCORBA_somDefaultCopyInit(somOS_ServiceBasePRefCORBA *somSelf, 
		som3InitCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_somOS_ServiceBasePRefCORBA_somDefaultCopyInit *somTD_somOS_ServiceBasePRefCORBA_somDefaultCopyInit;
typedef somOS_ServiceBasePRefCORBA*   SOMLINK somTP_somOS_ServiceBasePRefCORBA_somDefaultAssign(somOS_ServiceBasePRefCORBA *somSelf, 
		som3AssignCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_somOS_ServiceBasePRefCORBA_somDefaultAssign *somTD_somOS_ServiceBasePRefCORBA_somDefaultAssign;
typedef void   SOMLINK somTP_somOS_ServiceBasePRefCORBA_somDefaultConstCopyInit(somOS_ServiceBasePRefCORBA *somSelf, 
		som3InitCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_somOS_ServiceBasePRefCORBA_somDefaultConstCopyInit *somTD_somOS_ServiceBasePRefCORBA_somDefaultConstCopyInit;
typedef void   SOMLINK somTP_somOS_ServiceBasePRefCORBA_somDefaultVCopyInit(somOS_ServiceBasePRefCORBA *somSelf, 
		som3InitCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_somOS_ServiceBasePRefCORBA_somDefaultVCopyInit *somTD_somOS_ServiceBasePRefCORBA_somDefaultVCopyInit;
typedef void   SOMLINK somTP_somOS_ServiceBasePRefCORBA_somDefaultConstVCopyInit(somOS_ServiceBasePRefCORBA *somSelf, 
		som3InitCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_somOS_ServiceBasePRefCORBA_somDefaultConstVCopyInit *somTD_somOS_ServiceBasePRefCORBA_somDefaultConstVCopyInit;
typedef somOS_ServiceBasePRefCORBA*   SOMLINK somTP_somOS_ServiceBasePRefCORBA_somDefaultConstAssign(somOS_ServiceBasePRefCORBA *somSelf, 
		som3AssignCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_somOS_ServiceBasePRefCORBA_somDefaultConstAssign *somTD_somOS_ServiceBasePRefCORBA_somDefaultConstAssign;
typedef somOS_ServiceBasePRefCORBA*   SOMLINK somTP_somOS_ServiceBasePRefCORBA_somDefaultVAssign(somOS_ServiceBasePRefCORBA *somSelf, 
		som3AssignCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_somOS_ServiceBasePRefCORBA_somDefaultVAssign *somTD_somOS_ServiceBasePRefCORBA_somDefaultVAssign;
typedef somOS_ServiceBasePRefCORBA*   SOMLINK somTP_somOS_ServiceBasePRefCORBA_somDefaultConstVAssign(somOS_ServiceBasePRefCORBA *somSelf, 
		som3AssignCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_somOS_ServiceBasePRefCORBA_somDefaultConstVAssign *somTD_somOS_ServiceBasePRefCORBA_somDefaultConstVAssign;
typedef void   SOMLINK somTP_somOS_ServiceBasePRefCORBA_somInit(somOS_ServiceBasePRefCORBA *somSelf);
typedef somTP_somOS_ServiceBasePRefCORBA_somInit *somTD_somOS_ServiceBasePRefCORBA_somInit;
typedef void   SOMLINK somTP_somOS_ServiceBasePRefCORBA_somUninit(somOS_ServiceBasePRefCORBA *somSelf);
typedef somTP_somOS_ServiceBasePRefCORBA_somUninit *somTD_somOS_ServiceBasePRefCORBA_somUninit;
typedef void   SOMLINK somTP_somOS_ServiceBasePRefCORBA_somFree(somOS_ServiceBasePRefCORBA *somSelf);
typedef somTP_somOS_ServiceBasePRefCORBA_somFree *somTD_somOS_ServiceBasePRefCORBA_somFree;
typedef SOMClass*   SOMLINK somTP_somOS_ServiceBasePRefCORBA_somGetClass(somOS_ServiceBasePRefCORBA *somSelf);
typedef somTP_somOS_ServiceBasePRefCORBA_somGetClass *somTD_somOS_ServiceBasePRefCORBA_somGetClass;
typedef string   SOMLINK somTP_somOS_ServiceBasePRefCORBA_somGetClassName(somOS_ServiceBasePRefCORBA *somSelf);
typedef somTP_somOS_ServiceBasePRefCORBA_somGetClassName *somTD_somOS_ServiceBasePRefCORBA_somGetClassName;
typedef long   SOMLINK somTP_somOS_ServiceBasePRefCORBA_somGetSize(somOS_ServiceBasePRefCORBA *somSelf);
typedef somTP_somOS_ServiceBasePRefCORBA_somGetSize *somTD_somOS_ServiceBasePRefCORBA_somGetSize;
typedef boolean   SOMLINK somTP_somOS_ServiceBasePRefCORBA_somIsA(somOS_ServiceBasePRefCORBA *somSelf, 
		SOMClass* aClassObj);
typedef somTP_somOS_ServiceBasePRefCORBA_somIsA *somTD_somOS_ServiceBasePRefCORBA_somIsA;
typedef boolean   SOMLINK somTP_somOS_ServiceBasePRefCORBA_somIsInstanceOf(somOS_ServiceBasePRefCORBA *somSelf, 
		SOMClass* aClassObj);
typedef somTP_somOS_ServiceBasePRefCORBA_somIsInstanceOf *somTD_somOS_ServiceBasePRefCORBA_somIsInstanceOf;
typedef boolean   SOMLINK somTP_somOS_ServiceBasePRefCORBA_somRespondsTo(somOS_ServiceBasePRefCORBA *somSelf, 
		somId mId);
typedef somTP_somOS_ServiceBasePRefCORBA_somRespondsTo *somTD_somOS_ServiceBasePRefCORBA_somRespondsTo;
typedef boolean   SOMLINK somTP_somOS_ServiceBasePRefCORBA_somDispatch(somOS_ServiceBasePRefCORBA *somSelf, 
		somToken* retValue, 
		somId methodId, 
		va_list ap);
typedef somTP_somOS_ServiceBasePRefCORBA_somDispatch *somTD_somOS_ServiceBasePRefCORBA_somDispatch;
typedef boolean   SOMLINK somTP_somOS_ServiceBasePRefCORBA_somClassDispatch(somOS_ServiceBasePRefCORBA *somSelf, 
		SOMClass* clsObj, 
		somToken* retValue, 
		somId methodId, 
		va_list ap);
typedef somTP_somOS_ServiceBasePRefCORBA_somClassDispatch *somTD_somOS_ServiceBasePRefCORBA_somClassDispatch;
typedef boolean   SOMLINK somTP_somOS_ServiceBasePRefCORBA_somCastObj(somOS_ServiceBasePRefCORBA *somSelf, 
		SOMClass* castedCls);
typedef somTP_somOS_ServiceBasePRefCORBA_somCastObj *somTD_somOS_ServiceBasePRefCORBA_somCastObj;
typedef boolean   SOMLINK somTP_somOS_ServiceBasePRefCORBA_somResetObj(somOS_ServiceBasePRefCORBA *somSelf);
typedef somTP_somOS_ServiceBasePRefCORBA_somResetObj *somTD_somOS_ServiceBasePRefCORBA_somResetObj;
typedef somOS_ServiceBasePRefCORBA*   SOMLINK somTP_somOS_ServiceBasePRefCORBA_somPrintSelf(somOS_ServiceBasePRefCORBA *somSelf);
typedef somTP_somOS_ServiceBasePRefCORBA_somPrintSelf *somTD_somOS_ServiceBasePRefCORBA_somPrintSelf;
typedef void   SOMLINK somTP_somOS_ServiceBasePRefCORBA_somDumpSelf(somOS_ServiceBasePRefCORBA *somSelf, 
		long level);
typedef somTP_somOS_ServiceBasePRefCORBA_somDumpSelf *somTD_somOS_ServiceBasePRefCORBA_somDumpSelf;
typedef void   SOMLINK somTP_somOS_ServiceBasePRefCORBA_somDumpSelfInt(somOS_ServiceBasePRefCORBA *somSelf, 
		long level);
typedef somTP_somOS_ServiceBasePRefCORBA_somDumpSelfInt *somTD_somOS_ServiceBasePRefCORBA_somDumpSelfInt;
}

#endif /* somOS_ServiceBasePRefCORBA_API */


/*
 * -- The C++ Wrapper Class for somOS_ServiceBasePRefCORBA
 */
class somOS_ServiceBasePRefCORBA : public somOS_ServiceBasePRef, public somOS_ServiceBaseCORBA
{
public:

// somOS_ServiceBasePRefCORBA::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 (!_somOS_ServiceBasePRefCORBA) somOS_ServiceBasePRefCORBANewClass(somOS_ServiceBasePRefCORBA_MajorVersion,somOS_ServiceBasePRefCORBA_MinorVersion);
   return (void*)
   (((somTD_SOMClass_somNewNoInit)(SOMClassClassData.somNewNoInit))
         ((SOMClass *)((void*)_somOS_ServiceBasePRefCORBA)));
}

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

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

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

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


/*
 * Reintroduce inherited methods
 */

/* initializer method: somDefaultInit */
void   somDefaultInit(som3InitCtrl* ctrl)
{
/*
 *  For efficiency
 */
   	(
	 SOM_TestCls(this,_SOMCLASS_SOMObject),
	 ((somTD_somOS_ServiceBasePRefCORBA_somDefaultInit)(SOMObjectClassData.somDefaultInit))(((somOS_ServiceBasePRefCORBA *)((void *)this)),ctrl)
	);
}


/* method: somDestruct */
void   somDestruct(octet doFree, 
		som3DestructCtrl* ctrl)
{
/*
 *  For efficiency
 */
   	(
	 SOM_TestCls(this,_SOMCLASS_SOMObject),
	 ((somTD_somOS_ServiceBasePRefCORBA_somDestruct)(SOMObjectClassData.somDestruct))(((somOS_ServiceBasePRefCORBA *)((void *)this)),doFree,ctrl)
	);
}


/* 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_somOS_ServiceBasePRefCORBA_init_for_object_creation)(somOS_ServiceBaseClassData.init_for_object_creation))(((somOS_ServiceBasePRefCORBA *)((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_somOS_ServiceBasePRefCORBA_uninit_for_object_destruction)(somOS_ServiceBaseClassData.uninit_for_object_destruction))(((somOS_ServiceBasePRefCORBA *)((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_somOS_ServiceBasePRefCORBA_reinit)(somOS_ServiceBaseClassData.reinit))(((somOS_ServiceBasePRefCORBA *)((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_somOS_ServiceBasePRefCORBA_capture)(somOS_ServiceBaseClassData.capture))(((somOS_ServiceBasePRefCORBA *)((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_somOS_ServiceBasePRefCORBA_GetInstanceManager)(somOS_ServiceBaseClassData.GetInstanceManager))(((somOS_ServiceBasePRefCORBA *)((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_somOS_ServiceBasePRefCORBA_init_for_object_reactivation)(somOS_ServiceBaseClassData.init_for_object_reactivation))(((somOS_ServiceBasePRefCORBA *)((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_somOS_ServiceBasePRefCORBA_init_for_object_copy)(somOS_ServiceBaseClassData.init_for_object_copy))(((somOS_ServiceBasePRefCORBA *)((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_somOS_ServiceBasePRefCORBA_uninit_for_object_move)(somOS_ServiceBaseClassData.uninit_for_object_move))(((somOS_ServiceBasePRefCORBA *)((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_somOS_ServiceBasePRefCORBA_uninit_for_object_passivation)(somOS_ServiceBaseClassData.uninit_for_object_passivation))(((somOS_ServiceBasePRefCORBA *)((void *)this)), ev)
	);
}


/* method: is_identical */
boolean   is_identical(Environment *ev, 
		CosObjectIdentity_IdentifiableObject* other_object)
{
   return 	(
	 SOM_TestCls(this,_SOMCLASS_CosObjectIdentity_IdentifiableObject),
	 ((somTD_somOS_ServiceBasePRefCORBA_is_identical)(CosObjectIdentity_IdentifiableObjectClassData.is_identical))(((somOS_ServiceBasePRefCORBA *)((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_somOS_ServiceBasePRefCORBA__get_constant_random_id)(CosObjectIdentity_IdentifiableObjectClassData._get_constant_random_id))(((somOS_ServiceBasePRefCORBA *)((void *)this)), ev)
	);
}


/* 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_somOS_ServiceBasePRefCORBA_somDefaultCopyInit)(SOMObjectClassData.somDefaultCopyInit))(((somOS_ServiceBasePRefCORBA *)((void *)this)),ctrl,fromObj)
	);
}


/* method: somDefaultAssign */
somOS_ServiceBasePRefCORBA*  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_somOS_ServiceBasePRefCORBA_somDefaultAssign)(SOMObjectClassData.somDefaultAssign))(((somOS_ServiceBasePRefCORBA *)((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_somOS_ServiceBasePRefCORBA_somDefaultConstCopyInit)(SOMObjectClassData.somDefaultConstCopyInit))(((somOS_ServiceBasePRefCORBA *)((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_somOS_ServiceBasePRefCORBA_somDefaultVCopyInit)(SOMObjectClassData.somDefaultVCopyInit))(((somOS_ServiceBasePRefCORBA *)((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_somOS_ServiceBasePRefCORBA_somDefaultConstVCopyInit)(SOMObjectClassData.somDefaultConstVCopyInit))(((somOS_ServiceBasePRefCORBA *)((void *)this)),ctrl,fromObj)
	);
}


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


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


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


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


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


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


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


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


/* method: somGetSize */
long   somGetSize()
{
/*
 *  Return the size of the receiver.
 */
   return 	(
	 SOM_TestCls(this,_SOMCLASS_SOMObject),
	 ((somTD_somOS_ServiceBasePRefCORBA_somGetSize)(SOMObjectClassData.somGetSize))(((somOS_ServiceBasePRefCORBA *)((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_somOS_ServiceBasePRefCORBA_somIsA)(SOMObjectClassData.somIsA))(((somOS_ServiceBasePRefCORBA *)((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_somOS_ServiceBasePRefCORBA_somIsInstanceOf)(SOMObjectClassData.somIsInstanceOf))(((somOS_ServiceBasePRefCORBA *)((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_somOS_ServiceBasePRefCORBA_somRespondsTo)(SOMObjectClassData.somRespondsTo))(((somOS_ServiceBasePRefCORBA *)((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_somOS_ServiceBasePRefCORBA_somDispatch)(SOMObjectClassData.somDispatch))(((somOS_ServiceBasePRefCORBA *)((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_somOS_ServiceBasePRefCORBA_somDispatch)(SOMObjectClassData.somDispatch))(((somOS_ServiceBasePRefCORBA *)((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_somOS_ServiceBasePRefCORBA_somClassDispatch)(SOMObjectClassData.somClassDispatch))(((somOS_ServiceBasePRefCORBA *)((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_somOS_ServiceBasePRefCORBA_somClassDispatch)(SOMObjectClassData.somClassDispatch))(((somOS_ServiceBasePRefCORBA *)((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_somOS_ServiceBasePRefCORBA_somCastObj)(SOMObjectClassData.somCastObj))(((somOS_ServiceBasePRefCORBA *)((void *)this)),castedCls)
	);
}


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


/* method: somPrintSelf */
somOS_ServiceBasePRefCORBA*  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_somOS_ServiceBasePRefCORBA_somPrintSelf)(SOMObjectClassData.somPrintSelf))(((somOS_ServiceBasePRefCORBA *)((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_somOS_ServiceBasePRefCORBA_somDumpSelf)(SOMObjectClassData.somDumpSelf))(((somOS_ServiceBasePRefCORBA *)((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_somOS_ServiceBasePRefCORBA_somDumpSelfInt)(SOMObjectClassData.somDumpSelfInt))(((somOS_ServiceBasePRefCORBA *)((void *)this)),level)
	);
}



};   /* somOS_ServiceBasePRefCORBA */



#endif       /* SOM_somOS_ServiceBasePRefCORBA_xh */
