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

/*
 *    COMPONENT_NAME: somd
 * 
 *    ORIGINS: 27
 * 
 * 
 *     25H7912  (C)  COPYRIGHT International Business Machines Corp. 1992,1994,1996
 *    All Rights Reserved
 *    Licensed Materials - Property of IBM
 *    US Government Users Restricted Rights - Use, duplication or
 *    disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
 * 
 */


#ifndef SOM_NVList_xh
#define SOM_NVList_xh


/*
 *   This class implements the NVList object.
 *   An NVList contains an ordered set of NamedValue structures.
 * 
 *   NVLists are used to pass argument lists for an operation when creating
 *   a request for the Dynamic Invocation Interface (DII).
 */

#define NVList_MajorVersion 2
#define NVList_MinorVersion 2
class NVList;

/*
 *   This class implements the NVList object.
 *   An NVList contains an ordered set of NamedValue structures.
 * 
 *   NVLists are used to pass argument lists for an operation when creating
 *   a request for the Dynamic Invocation Interface (DII).
 */

/* 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 NVList_API
#define NVList_API
/*
 * -- The Class API
 */
#ifndef SOM_IMPORTEXPORT_somd_nvlist
#ifdef SOM_DLL_somd
	/* export semantics */
	#if defined(SOM_DEFFILE_somd)\
	||(defined(SOM_DEFFILE_BY_DEFAULT)&&!defined(SOM_NODEFFILE_somd))\
	|| !defined(SOM_Module_nvlist_Source)
	#define SOM_IMPORTEXPORT_somd_nvlist
	#else
	#define SOM_IMPORTEXPORT_somd_nvlist SOMDLLEXPORT
	#endif
#else
	#define SOM_IMPORTEXPORT_somd_nvlist SOMDLLIMPORT
#endif
#endif

/*
 * Start of bindings for IDL types
 */

class SOMClass;
class SOMObject;
class Container;

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

/*
 * A function to create the NVList class object...
 */
SOMEXTERN SOM_IMPORTEXPORT_somd_nvlist SOMClass * SOMLINK NVListNewClass(
		integer4 majorVersion,
		integer4 minorVersion);


/*
 * The API 2 ClassData Structures...
 */
SOMEXTERN struct NVListClassDataStructure {
	SOMClass *classObject;
	somMToken add_item;
	somMToken remove_item;
	somMToken free;
	somMToken free_memory;
	somMToken get_count;
	somMToken set_item;
	somMToken get_item;
	somMToken get_item_by_name;
} SOMDLINK SOM_IMPORTEXPORT_somd_nvlist NVListClassData;
SOMEXTERN struct NVListCClassDataStructure {
	som3ClassDetailsPtr    parentMtab;
	somDToken              instanceDataToken;
} SOMDLINK SOM_IMPORTEXPORT_somd_nvlist NVListCClassData;


/*
 * Class Object and Method Token Macros
 */
#define _SOMCLASS_NVList (NVListClassData.classObject)
#ifndef SOMGD_NVList
    #if (defined(_NVList) || defined(__NVList))
        #undef _NVList
        #undef __NVList
        #define SOMGD_NVList 1
    #else
        #define _NVList _SOMCLASS_NVList
    #endif /* _NVList */
#endif /* SOMGD_NVList */
#define NVList_classObj _SOMCLASS_NVList
#define _SOMMTOKEN_NVList(method) ((somMToken)NVListClassData.method)

/*
 * -- Typedefs for NVList Method Procedures
 */
SOMEXTERN {
typedef ORBStatus   SOMLINK somTP_NVList_add_item(NVList *somSelf, Environment *ev, 
		Identifier item_name, 
		TypeCode item_type, 
		void* value, 
		long value_len, 
		Flags item_flags);
typedef somTP_NVList_add_item *somTD_NVList_add_item;
typedef ORBStatus   SOMLINK somTP_NVList_free(NVList *somSelf, Environment *ev);
typedef somTP_NVList_free *somTD_NVList_free;
typedef ORBStatus   SOMLINK somTP_NVList_free_memory(NVList *somSelf, Environment *ev);
typedef somTP_NVList_free_memory *somTD_NVList_free_memory;
typedef ORBStatus   SOMLINK somTP_NVList_get_count(NVList *somSelf, Environment *ev, 
		long* count);
typedef somTP_NVList_get_count *somTD_NVList_get_count;
typedef ORBStatus   SOMLINK somTP_NVList_set_item(NVList *somSelf, Environment *ev, 
		long item_number, 
		Identifier item_name, 
		TypeCode item_type, 
		void* value, 
		long value_len, 
		Flags item_flags);
typedef somTP_NVList_set_item *somTD_NVList_set_item;
typedef ORBStatus   SOMLINK somTP_NVList_get_item(NVList *somSelf, Environment *ev, 
		long item_number, 
		Identifier* item_name, 
		TypeCode* item_type, 
		void** value, 
		long* value_len, 
		Flags* item_flags);
typedef somTP_NVList_get_item *somTD_NVList_get_item;

/*
 * -- Typedefs for Reintroduced Wrapper Methods
 */
typedef void   SOMLINK somTP_NVList_somDefaultInit(NVList *somSelf, 
		som3InitCtrl* ctrl);
typedef somTP_NVList_somDefaultInit *somTD_NVList_somDefaultInit;
typedef void   SOMLINK somTP_NVList_somDestruct(NVList *somSelf, 
		octet doFree, 
		som3DestructCtrl* ctrl);
typedef somTP_NVList_somDestruct *somTD_NVList_somDestruct;
typedef void   SOMLINK somTP_NVList_somDefaultCopyInit(NVList *somSelf, 
		som3InitCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_NVList_somDefaultCopyInit *somTD_NVList_somDefaultCopyInit;
typedef NVList*   SOMLINK somTP_NVList_somDefaultAssign(NVList *somSelf, 
		som3AssignCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_NVList_somDefaultAssign *somTD_NVList_somDefaultAssign;
typedef void   SOMLINK somTP_NVList_somDefaultConstCopyInit(NVList *somSelf, 
		som3InitCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_NVList_somDefaultConstCopyInit *somTD_NVList_somDefaultConstCopyInit;
typedef void   SOMLINK somTP_NVList_somDefaultVCopyInit(NVList *somSelf, 
		som3InitCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_NVList_somDefaultVCopyInit *somTD_NVList_somDefaultVCopyInit;
typedef void   SOMLINK somTP_NVList_somDefaultConstVCopyInit(NVList *somSelf, 
		som3InitCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_NVList_somDefaultConstVCopyInit *somTD_NVList_somDefaultConstVCopyInit;
typedef NVList*   SOMLINK somTP_NVList_somDefaultConstAssign(NVList *somSelf, 
		som3AssignCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_NVList_somDefaultConstAssign *somTD_NVList_somDefaultConstAssign;
typedef NVList*   SOMLINK somTP_NVList_somDefaultVAssign(NVList *somSelf, 
		som3AssignCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_NVList_somDefaultVAssign *somTD_NVList_somDefaultVAssign;
typedef NVList*   SOMLINK somTP_NVList_somDefaultConstVAssign(NVList *somSelf, 
		som3AssignCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_NVList_somDefaultConstVAssign *somTD_NVList_somDefaultConstVAssign;
typedef void   SOMLINK somTP_NVList_somInit(NVList *somSelf);
typedef somTP_NVList_somInit *somTD_NVList_somInit;
typedef void   SOMLINK somTP_NVList_somUninit(NVList *somSelf);
typedef somTP_NVList_somUninit *somTD_NVList_somUninit;
typedef void   SOMLINK somTP_NVList_somFree(NVList *somSelf);
typedef somTP_NVList_somFree *somTD_NVList_somFree;
typedef SOMClass*   SOMLINK somTP_NVList_somGetClass(NVList *somSelf);
typedef somTP_NVList_somGetClass *somTD_NVList_somGetClass;
typedef string   SOMLINK somTP_NVList_somGetClassName(NVList *somSelf);
typedef somTP_NVList_somGetClassName *somTD_NVList_somGetClassName;
typedef long   SOMLINK somTP_NVList_somGetSize(NVList *somSelf);
typedef somTP_NVList_somGetSize *somTD_NVList_somGetSize;
typedef boolean   SOMLINK somTP_NVList_somIsA(NVList *somSelf, 
		SOMClass* aClassObj);
typedef somTP_NVList_somIsA *somTD_NVList_somIsA;
typedef boolean   SOMLINK somTP_NVList_somIsInstanceOf(NVList *somSelf, 
		SOMClass* aClassObj);
typedef somTP_NVList_somIsInstanceOf *somTD_NVList_somIsInstanceOf;
typedef boolean   SOMLINK somTP_NVList_somRespondsTo(NVList *somSelf, 
		somId mId);
typedef somTP_NVList_somRespondsTo *somTD_NVList_somRespondsTo;
typedef boolean   SOMLINK somTP_NVList_somDispatch(NVList *somSelf, 
		somToken* retValue, 
		somId methodId, 
		va_list ap);
typedef somTP_NVList_somDispatch *somTD_NVList_somDispatch;
typedef boolean   SOMLINK somTP_NVList_somClassDispatch(NVList *somSelf, 
		SOMClass* clsObj, 
		somToken* retValue, 
		somId methodId, 
		va_list ap);
typedef somTP_NVList_somClassDispatch *somTD_NVList_somClassDispatch;
typedef boolean   SOMLINK somTP_NVList_somCastObj(NVList *somSelf, 
		SOMClass* castedCls);
typedef somTP_NVList_somCastObj *somTD_NVList_somCastObj;
typedef boolean   SOMLINK somTP_NVList_somResetObj(NVList *somSelf);
typedef somTP_NVList_somResetObj *somTD_NVList_somResetObj;
typedef NVList*   SOMLINK somTP_NVList_somPrintSelf(NVList *somSelf);
typedef somTP_NVList_somPrintSelf *somTD_NVList_somPrintSelf;
typedef void   SOMLINK somTP_NVList_somDumpSelf(NVList *somSelf, 
		long level);
typedef somTP_NVList_somDumpSelf *somTD_NVList_somDumpSelf;
typedef void   SOMLINK somTP_NVList_somDumpSelfInt(NVList *somSelf, 
		long level);
typedef somTP_NVList_somDumpSelfInt *somTD_NVList_somDumpSelfInt;
}

#endif /* NVList_API */


/*
 * -- The C++ Wrapper Class for NVList
 */
class NVList : public SOMObject
{
/*
 *   This class implements the NVList object.
 *   An NVList contains an ordered set of NamedValue structures.
 * 
 *   NVLists are used to pass argument lists for an operation when creating
 *   a request for the Dynamic Invocation Interface (DII).
 */
public:

// NVList::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 (!_NVList) NVListNewClass(NVList_MajorVersion,NVList_MinorVersion);
   return (void*)
   (((somTD_SOMClass_somNewNoInit)(SOMClassClassData.somNewNoInit))
         ((SOMClass *)((void*)_NVList)));
}

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

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

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

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


/* method: add_item */
ORBStatus   add_item(Environment *ev, 
		Identifier item_name, 
		TypeCode item_type, 
		void* value, 
		long value_len, 
		Flags item_flags)
{
/*
 *  Add an element to an NVList.
 */
   return 	(
	 SOM_TestCls(this,_SOMCLASS_NVList),
	 ((somTD_NVList_add_item)(NVListClassData.add_item))(((NVList *)((void *)this)), ev,item_name,item_type,value,value_len,item_flags)
	);
}


/* method: free */
ORBStatus   free(Environment *ev)
{
/*
 *  Free the NVList and any associated memory.
 */
   return 	(
	 SOM_TestCls(this,_SOMCLASS_NVList),
	 ((somTD_NVList_free)(NVListClassData.free))(((NVList *)((void *)this)), ev)
	);
}


/* method: free_memory */
ORBStatus   free_memory(Environment *ev)
{
/*
 *  Free dynamically allocated memory associated with the list.
 */
   return 	(
	 SOM_TestCls(this,_SOMCLASS_NVList),
	 ((somTD_NVList_free_memory)(NVListClassData.free_memory))(((NVList *)((void *)this)), ev)
	);
}


/* method: get_count */
ORBStatus   get_count(Environment *ev, 
		long* count)
{
/*
 *  Get the number of elements in the NVList.
 */
   return 	(
	 SOM_TestCls(this,_SOMCLASS_NVList),
	 ((somTD_NVList_get_count)(NVListClassData.get_count))(((NVList *)((void *)this)), ev,count)
	);
}


/* method: set_item */
ORBStatus   set_item(Environment *ev, 
		long item_number, 
		Identifier item_name, 
		TypeCode item_type, 
		void* value, 
		long value_len, 
		Flags item_flags)
{
/*
 *  Set the contents of an element in an NVList.
 *  Items are numbered beginning from 0.
 */
   return 	(
	 SOM_TestCls(this,_SOMCLASS_NVList),
	 ((somTD_NVList_set_item)(NVListClassData.set_item))(((NVList *)((void *)this)), ev,item_number,item_name,item_type,value,value_len,item_flags)
	);
}


/* method: get_item */
ORBStatus   get_item(Environment *ev, 
		long item_number, 
		Identifier* item_name, 
		TypeCode* item_type, 
		void** value, 
		long* value_len, 
		Flags* item_flags)
{
/*
 *  Get the contents of an element in an NVList.
 *  Items are numbered beginning from 0.
 *  OWNERSHIP of the "out" parameters is NOT transferred to the caller;
 *  Hence, the caller should not free them.
 */
   return 	(
	 SOM_TestCls(this,_SOMCLASS_NVList),
	 ((somTD_NVList_get_item)(NVListClassData.get_item))(((NVList *)((void *)this)), ev,item_number,item_name,item_type,value,value_len,item_flags)
	);
}


/*
 * 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_NVList_somDefaultInit)(SOMObjectClassData.somDefaultInit))(((NVList *)((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_NVList_somDestruct)(SOMObjectClassData.somDestruct))(((NVList *)((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_NVList_somDefaultCopyInit)(SOMObjectClassData.somDefaultCopyInit))(((NVList *)((void *)this)),ctrl,fromObj)
	);
}


/* method: somDefaultAssign */
NVList*  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_NVList_somDefaultAssign)(SOMObjectClassData.somDefaultAssign))(((NVList *)((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_NVList_somDefaultConstCopyInit)(SOMObjectClassData.somDefaultConstCopyInit))(((NVList *)((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_NVList_somDefaultVCopyInit)(SOMObjectClassData.somDefaultVCopyInit))(((NVList *)((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_NVList_somDefaultConstVCopyInit)(SOMObjectClassData.somDefaultConstVCopyInit))(((NVList *)((void *)this)),ctrl,fromObj)
	);
}


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


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


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


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


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


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


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


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


/* method: somGetSize */
long   somGetSize()
{
/*
 *  Return the size of the receiver.
 */
   return 	(
	 SOM_TestCls(this,_SOMCLASS_SOMObject),
	 ((somTD_NVList_somGetSize)(SOMObjectClassData.somGetSize))(((NVList *)((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_NVList_somIsA)(SOMObjectClassData.somIsA))(((NVList *)((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_NVList_somIsInstanceOf)(SOMObjectClassData.somIsInstanceOf))(((NVList *)((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_NVList_somRespondsTo)(SOMObjectClassData.somRespondsTo))(((NVList *)((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_NVList_somDispatch)(SOMObjectClassData.somDispatch))(((NVList *)((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_NVList_somDispatch)(SOMObjectClassData.somDispatch))(((NVList *)((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_NVList_somClassDispatch)(SOMObjectClassData.somClassDispatch))(((NVList *)((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_NVList_somClassDispatch)(SOMObjectClassData.somClassDispatch))(((NVList *)((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_NVList_somCastObj)(SOMObjectClassData.somCastObj))(((NVList *)((void *)this)),castedCls)
	);
}


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


/* method: somPrintSelf */
NVList*  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_NVList_somPrintSelf)(SOMObjectClassData.somPrintSelf))(((NVList *)((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_NVList_somDumpSelf)(SOMObjectClassData.somDumpSelf))(((NVList *)((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_NVList_somDumpSelfInt)(SOMObjectClassData.somDumpSelfInt))(((NVList *)((void *)this)),level)
	);
}



};   /* NVList */



#endif       /* SOM_NVList_xh */
