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

/*
 *    This is a class interface definition which defines the CORBA-defined
 *    Principal object. CORBA defines the Principal object but (at this
 *    time) does not define the interface to this object. The methods for
 *    this object are, therefore, subject to change in future implementations.
 * 
 *    The BOA guarantees that for every method invocation it will identify
 *    the principal on whose behalf the request is performed. An object
 *    implementation may request an instance of this class to determine
 *    if a method invocation has been made by someone with the appropriate
 *    authority. An instance of this class is returned when the following
 *    method is invoked on the BOA:
 * 
 *      get_principal(in BOA boaobj, in Environment lcl_ev,
 *                    in SOMDObject obj, in Environment req_ev);
 * 
 */


#ifndef SOM_Principal_xh
#define SOM_Principal_xh


#define Principal_MajorVersion 2
#define Principal_MinorVersion 2
class Principal;

/* Parents */
#ifndef SOM_SOMObject_xh
#ifdef SOMLOCALINCLUDES
#include "somobj.xh"
#else
#include <somobj.xh>
#endif
#endif

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

#ifndef Principal_API
#define Principal_API
/*
 * -- The Class API
 */
#ifndef SOM_IMPORTEXPORT_somd_principl
#ifdef SOM_DLL_somd
	/* export semantics */
	#if defined(SOM_DEFFILE_somd)\
	||(defined(SOM_DEFFILE_BY_DEFAULT)&&!defined(SOM_NODEFFILE_somd))\
	|| !defined(SOM_Module_principl_Source)
	#define SOM_IMPORTEXPORT_somd_principl
	#else
	#define SOM_IMPORTEXPORT_somd_principl SOMDLLEXPORT
	#endif
#else
	#define SOM_IMPORTEXPORT_somd_principl SOMDLLIMPORT
#endif
#endif

/*
 * Start of bindings for IDL types
 */

class SOMClass;
class SOMObject;

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

/*
 * A function to create the Principal class object...
 */
SOMEXTERN SOM_IMPORTEXPORT_somd_principl SOMClass * SOMLINK PrincipalNewClass(
		integer4 majorVersion,
		integer4 minorVersion);


/*
 * The API 2 ClassData Structures...
 */
SOMEXTERN struct PrincipalClassDataStructure {
	SOMClass *classObject;
	somMToken _set_userName;
	somMToken _get_userName;
	somMToken _set_hostName;
	somMToken _get_hostName;
	somMToken private1;
	somMToken private2;
} SOMDLINK SOM_IMPORTEXPORT_somd_principl PrincipalClassData;
SOMEXTERN struct PrincipalCClassDataStructure {
	som3ClassDetailsPtr    parentMtab;
	somDToken              instanceDataToken;
} SOMDLINK SOM_IMPORTEXPORT_somd_principl PrincipalCClassData;


/*
 * Class Object and Method Token Macros
 */
#define _SOMCLASS_Principal (PrincipalClassData.classObject)
#ifndef SOMGD_Principal
    #if (defined(_Principal) || defined(__Principal))
        #undef _Principal
        #undef __Principal
        #define SOMGD_Principal 1
    #else
        #define _Principal _SOMCLASS_Principal
    #endif /* _Principal */
#endif /* SOMGD_Principal */
#define Principal_classObj _SOMCLASS_Principal
#define _SOMMTOKEN_Principal(method) ((somMToken)PrincipalClassData.method)

/*
 * -- Typedefs for Principal Method Procedures
 */
SOMEXTERN {
typedef string   SOMLINK somTP_Principal__get_userName(Principal *somSelf, Environment *ev);
typedef somTP_Principal__get_userName *somTD_Principal__get_userName;
typedef void   SOMLINK somTP_Principal__set_userName(Principal *somSelf, Environment *ev, 
		string userName);
typedef somTP_Principal__set_userName *somTD_Principal__set_userName;
typedef string   SOMLINK somTP_Principal__get_hostName(Principal *somSelf, Environment *ev);
typedef somTP_Principal__get_hostName *somTD_Principal__get_hostName;
typedef void   SOMLINK somTP_Principal__set_hostName(Principal *somSelf, Environment *ev, 
		string hostName);
typedef somTP_Principal__set_hostName *somTD_Principal__set_hostName;

/*
 * -- Typedefs for Reintroduced Wrapper Methods
 */
typedef void   SOMLINK somTP_Principal_somDefaultInit(Principal *somSelf, 
		som3InitCtrl* ctrl);
typedef somTP_Principal_somDefaultInit *somTD_Principal_somDefaultInit;
typedef void   SOMLINK somTP_Principal_somDestruct(Principal *somSelf, 
		octet doFree, 
		som3DestructCtrl* ctrl);
typedef somTP_Principal_somDestruct *somTD_Principal_somDestruct;
typedef void   SOMLINK somTP_Principal_somDefaultCopyInit(Principal *somSelf, 
		som3InitCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_Principal_somDefaultCopyInit *somTD_Principal_somDefaultCopyInit;
typedef Principal*   SOMLINK somTP_Principal_somDefaultAssign(Principal *somSelf, 
		som3AssignCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_Principal_somDefaultAssign *somTD_Principal_somDefaultAssign;
typedef void   SOMLINK somTP_Principal_somDefaultConstCopyInit(Principal *somSelf, 
		som3InitCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_Principal_somDefaultConstCopyInit *somTD_Principal_somDefaultConstCopyInit;
typedef void   SOMLINK somTP_Principal_somDefaultVCopyInit(Principal *somSelf, 
		som3InitCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_Principal_somDefaultVCopyInit *somTD_Principal_somDefaultVCopyInit;
typedef void   SOMLINK somTP_Principal_somDefaultConstVCopyInit(Principal *somSelf, 
		som3InitCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_Principal_somDefaultConstVCopyInit *somTD_Principal_somDefaultConstVCopyInit;
typedef Principal*   SOMLINK somTP_Principal_somDefaultConstAssign(Principal *somSelf, 
		som3AssignCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_Principal_somDefaultConstAssign *somTD_Principal_somDefaultConstAssign;
typedef Principal*   SOMLINK somTP_Principal_somDefaultVAssign(Principal *somSelf, 
		som3AssignCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_Principal_somDefaultVAssign *somTD_Principal_somDefaultVAssign;
typedef Principal*   SOMLINK somTP_Principal_somDefaultConstVAssign(Principal *somSelf, 
		som3AssignCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_Principal_somDefaultConstVAssign *somTD_Principal_somDefaultConstVAssign;
typedef void   SOMLINK somTP_Principal_somInit(Principal *somSelf);
typedef somTP_Principal_somInit *somTD_Principal_somInit;
typedef void   SOMLINK somTP_Principal_somUninit(Principal *somSelf);
typedef somTP_Principal_somUninit *somTD_Principal_somUninit;
typedef void   SOMLINK somTP_Principal_somFree(Principal *somSelf);
typedef somTP_Principal_somFree *somTD_Principal_somFree;
typedef SOMClass*   SOMLINK somTP_Principal_somGetClass(Principal *somSelf);
typedef somTP_Principal_somGetClass *somTD_Principal_somGetClass;
typedef string   SOMLINK somTP_Principal_somGetClassName(Principal *somSelf);
typedef somTP_Principal_somGetClassName *somTD_Principal_somGetClassName;
typedef long   SOMLINK somTP_Principal_somGetSize(Principal *somSelf);
typedef somTP_Principal_somGetSize *somTD_Principal_somGetSize;
typedef boolean   SOMLINK somTP_Principal_somIsA(Principal *somSelf, 
		SOMClass* aClassObj);
typedef somTP_Principal_somIsA *somTD_Principal_somIsA;
typedef boolean   SOMLINK somTP_Principal_somIsInstanceOf(Principal *somSelf, 
		SOMClass* aClassObj);
typedef somTP_Principal_somIsInstanceOf *somTD_Principal_somIsInstanceOf;
typedef boolean   SOMLINK somTP_Principal_somRespondsTo(Principal *somSelf, 
		somId mId);
typedef somTP_Principal_somRespondsTo *somTD_Principal_somRespondsTo;
typedef boolean   SOMLINK somTP_Principal_somDispatch(Principal *somSelf, 
		somToken* retValue, 
		somId methodId, 
		va_list ap);
typedef somTP_Principal_somDispatch *somTD_Principal_somDispatch;
typedef boolean   SOMLINK somTP_Principal_somClassDispatch(Principal *somSelf, 
		SOMClass* clsObj, 
		somToken* retValue, 
		somId methodId, 
		va_list ap);
typedef somTP_Principal_somClassDispatch *somTD_Principal_somClassDispatch;
typedef boolean   SOMLINK somTP_Principal_somCastObj(Principal *somSelf, 
		SOMClass* castedCls);
typedef somTP_Principal_somCastObj *somTD_Principal_somCastObj;
typedef boolean   SOMLINK somTP_Principal_somResetObj(Principal *somSelf);
typedef somTP_Principal_somResetObj *somTD_Principal_somResetObj;
typedef Principal*   SOMLINK somTP_Principal_somPrintSelf(Principal *somSelf);
typedef somTP_Principal_somPrintSelf *somTD_Principal_somPrintSelf;
typedef void   SOMLINK somTP_Principal_somDumpSelf(Principal *somSelf, 
		long level);
typedef somTP_Principal_somDumpSelf *somTD_Principal_somDumpSelf;
typedef void   SOMLINK somTP_Principal_somDumpSelfInt(Principal *somSelf, 
		long level);
typedef somTP_Principal_somDumpSelfInt *somTD_Principal_somDumpSelfInt;
}

#endif /* Principal_API */


/*
 * -- The C++ Wrapper Class for Principal
 */
class Principal : public SOMObject
{
public:

// Principal::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 (!_Principal) PrincipalNewClass(Principal_MajorVersion,Principal_MinorVersion);
   return (void*)
   (((somTD_SOMClass_somNewNoInit)(SOMClassClassData.somNewNoInit))
         ((SOMClass *)((void*)_Principal)));
}

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

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

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

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


/* method: _get_userName */
string   _get_userName(Environment *ev)
{
/*
 *  User who made the request.
 */
   return 	(
	 SOM_TestCls(this,_SOMCLASS_Principal),
	 ((somTD_Principal__get_userName)(PrincipalClassData._get_userName))(((Principal *)((void *)this)), ev)
	);
}


/* method: _set_userName */
void   _set_userName(Environment *ev, 
		string userName)
{
/*
 *  User who made the request.
 */
   	(
	 SOM_TestCls(this,_SOMCLASS_Principal),
	 ((somTD_Principal__set_userName)(PrincipalClassData._set_userName))(((Principal *)((void *)this)), ev,userName)
	);
}


/* method: _get_hostName */
string   _get_hostName(Environment *ev)
{
/*
 *  Host from which the request was made.
 *  D21548
 */
   return 	(
	 SOM_TestCls(this,_SOMCLASS_Principal),
	 ((somTD_Principal__get_hostName)(PrincipalClassData._get_hostName))(((Principal *)((void *)this)), ev)
	);
}


/* method: _set_hostName */
void   _set_hostName(Environment *ev, 
		string hostName)
{
/*
 *  Host from which the request was made.
 *  D21548
 */
   	(
	 SOM_TestCls(this,_SOMCLASS_Principal),
	 ((somTD_Principal__set_hostName)(PrincipalClassData._set_hostName))(((Principal *)((void *)this)), ev,hostName)
	);
}


/*
 * Reintroduce inherited methods
 */

/* initializer method: somDefaultInit */
void   somDefaultInit(som3InitCtrl* ctrl)
{
/*
 *  A default initializer for a SOM object. Passing a null ctrl
 *  indicates to the receiver that its class is the class of the
 *  object being initialized, whereby the initializer will determine
 *  an appropriate control structure.
 */
   	(
	 SOM_TestCls(this,_SOMCLASS_SOMObject),
	 ((somTD_Principal_somDefaultInit)(SOMObjectClassData.somDefaultInit))(((Principal *)((void *)this)),ctrl)
	);
}


/* method: somDestruct */
void   somDestruct(octet doFree, 
		som3DestructCtrl* ctrl)
{
/*
 *  The default destructor for a SOM object. A nonzero <doFree>
 *  indicates that the object storage should be freed by the
 *  object's class (via somDeallocate) after uninitialization.
 *  As with somDefaultInit, a null ctrl can be passed.
 */
   	(
	 SOM_TestCls(this,_SOMCLASS_SOMObject),
	 ((somTD_Principal_somDestruct)(SOMObjectClassData.somDestruct))(((Principal *)((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_Principal_somDefaultCopyInit)(SOMObjectClassData.somDefaultCopyInit))(((Principal *)((void *)this)),ctrl,fromObj)
	);
}


/* method: somDefaultAssign */
Principal*  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_Principal_somDefaultAssign)(SOMObjectClassData.somDefaultAssign))(((Principal *)((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_Principal_somDefaultConstCopyInit)(SOMObjectClassData.somDefaultConstCopyInit))(((Principal *)((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_Principal_somDefaultVCopyInit)(SOMObjectClassData.somDefaultVCopyInit))(((Principal *)((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_Principal_somDefaultConstVCopyInit)(SOMObjectClassData.somDefaultConstVCopyInit))(((Principal *)((void *)this)),ctrl,fromObj)
	);
}


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


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


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


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


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


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


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


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


/* method: somGetSize */
long   somGetSize()
{
/*
 *  Return the size of the receiver.
 */
   return 	(
	 SOM_TestCls(this,_SOMCLASS_SOMObject),
	 ((somTD_Principal_somGetSize)(SOMObjectClassData.somGetSize))(((Principal *)((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_Principal_somIsA)(SOMObjectClassData.somIsA))(((Principal *)((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_Principal_somIsInstanceOf)(SOMObjectClassData.somIsInstanceOf))(((Principal *)((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_Principal_somRespondsTo)(SOMObjectClassData.somRespondsTo))(((Principal *)((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_Principal_somDispatch)(SOMObjectClassData.somDispatch))(((Principal *)((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_Principal_somDispatch)(SOMObjectClassData.somDispatch))(((Principal *)((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_Principal_somClassDispatch)(SOMObjectClassData.somClassDispatch))(((Principal *)((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_Principal_somClassDispatch)(SOMObjectClassData.somClassDispatch))(((Principal *)((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_Principal_somCastObj)(SOMObjectClassData.somCastObj))(((Principal *)((void *)this)),castedCls)
	);
}


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


/* method: somPrintSelf */
Principal*  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_Principal_somPrintSelf)(SOMObjectClassData.somPrintSelf))(((Principal *)((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_Principal_somDumpSelf)(SOMObjectClassData.somDumpSelf))(((Principal *)((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_Principal_somDumpSelfInt)(SOMObjectClassData.somDumpSelfInt))(((Principal *)((void *)this)),level)
	);
}



};   /* Principal */



#endif       /* SOM_Principal_xh */
