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

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

/*
 * Start of bindings for IDL types
 */

class SOMClass;
class SOMObject;
typedef
string  CosNaming_Istring;
typedef
struct CosNaming_NameComponent {
CosNaming_Istring id;
CosNaming_Istring kind;
} CosNaming_NameComponent;
struct CosNaming_NameComponent;
#ifndef _IDL_SEQUENCE_CosNaming_NameComponent_defined
#define _IDL_SEQUENCE_CosNaming_NameComponent_defined
typedef struct {
    unsigned long _maximum;
    unsigned long _length;
    struct CosNaming_NameComponent *_buffer;
} _IDL_SEQUENCE_CosNaming_NameComponent;
#endif /* _IDL_SEQUENCE_CosNaming_NameComponent_defined */ 
typedef
_IDL_SEQUENCE_CosNaming_NameComponent CosNaming_Name;
typedef unsigned long CosNaming_BindingType;
#define CosNaming_nobject 1UL
#define CosNaming_ncontext 2UL
typedef
struct CosNaming_Binding {
CosNaming_Name binding_name;
CosNaming_BindingType binding_type;
} CosNaming_Binding;
struct CosNaming_Binding;
#ifndef _IDL_SEQUENCE_CosNaming_Binding_defined
#define _IDL_SEQUENCE_CosNaming_Binding_defined
typedef struct {
    unsigned long _maximum;
    unsigned long _length;
    struct CosNaming_Binding *_buffer;
} _IDL_SEQUENCE_CosNaming_Binding;
#endif /* _IDL_SEQUENCE_CosNaming_Binding_defined */ 
typedef
_IDL_SEQUENCE_CosNaming_Binding CosNaming_BindingList;

#ifndef SOM_DONT_USE_SHORT_NAMES
#ifndef SOMTGD_Istring
    #ifdef Istring
        #undef Istring
        #define SOMTGD_Istring 1
    #else
        #define Istring CosNaming_Istring
    #endif /* Istring */
#endif /* SOMTGD_Istring */
#endif /* SOM_DONT_USE_SHORT_NAMES */

#ifndef SOM_DONT_USE_SHORT_NAMES
#ifndef SOMTGD_NameComponent
    #ifdef NameComponent
        #undef NameComponent
        #define SOMTGD_NameComponent 1
    #else
        #define NameComponent CosNaming_NameComponent
    #endif /* NameComponent */
#endif /* SOMTGD_NameComponent */
#ifndef SOMTGD__IDL_SEQUENCE_NameComponent
    #ifdef _IDL_SEQUENCE_NameComponent
        #undef _IDL_SEQUENCE_NameComponent
        #define SOMTGD__IDL_SEQUENCE_NameComponent 1
    #else
        #define _IDL_SEQUENCE_NameComponent _IDL_SEQUENCE_CosNaming_NameComponent
    #endif /* _IDL_SEQUENCE_NameComponent */
#endif /* SOMTGD__IDL_SEQUENCE_NameComponent */

#ifndef SOM_DONT_USE_SHORT_NAMES
#ifndef SOMTGD_Name
    #ifdef Name
        #undef Name
        #define SOMTGD_Name 1
    #else
        #define Name CosNaming_Name
    #endif /* Name */
#endif /* SOMTGD_Name */
#endif /* SOM_DONT_USE_SHORT_NAMES */
#ifndef SOMTGD_BindingType
    #ifdef BindingType
        #undef BindingType
        #define SOMTGD_BindingType 1
    #else
        #define BindingType CosNaming_BindingType
    #endif /* BindingType */
#endif /* SOMTGD_BindingType */
#ifndef SOMTGD_Binding
    #ifdef Binding
        #undef Binding
        #define SOMTGD_Binding 1
    #else
        #define Binding CosNaming_Binding
    #endif /* Binding */
#endif /* SOMTGD_Binding */
#ifndef SOMTGD__IDL_SEQUENCE_Binding
    #ifdef _IDL_SEQUENCE_Binding
        #undef _IDL_SEQUENCE_Binding
        #define SOMTGD__IDL_SEQUENCE_Binding 1
    #else
        #define _IDL_SEQUENCE_Binding _IDL_SEQUENCE_CosNaming_Binding
    #endif /* _IDL_SEQUENCE_Binding */
#endif /* SOMTGD__IDL_SEQUENCE_Binding */

#ifndef SOM_DONT_USE_SHORT_NAMES
#ifndef SOMTGD_BindingList
    #ifdef BindingList
        #undef BindingList
        #define SOMTGD_BindingList 1
    #else
        #define BindingList CosNaming_BindingList
    #endif /* BindingList */
#endif /* SOMTGD_BindingList */
#endif /* SOM_DONT_USE_SHORT_NAMES */
#endif /* SOM_DONT_USE_SHORT_NAMES */

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

#ifndef SOM_CosNaming_BindingIterator_xh
#define SOM_CosNaming_BindingIterator_xh


#define CosNaming_BindingIterator_MajorVersion 3
#define CosNaming_BindingIterator_MinorVersion 0
class CosNaming_BindingIterator;

/* 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 CosNaming_BindingIterator_API
#define CosNaming_BindingIterator_API
/*
 * -- The Class API
 */
#ifndef SOM_IMPORTEXPORT_somnmf_naming
#ifdef SOM_DLL_somnmf
	/* export semantics */
	#if defined(SOM_DEFFILE_somnmf)\
	||(defined(SOM_DEFFILE_BY_DEFAULT)&&!defined(SOM_NODEFFILE_somnmf))\
	|| !defined(SOM_Module_naming_Source)
	#define SOM_IMPORTEXPORT_somnmf_naming
	#else
	#define SOM_IMPORTEXPORT_somnmf_naming SOMDLLEXPORT
	#endif
#else
	#define SOM_IMPORTEXPORT_somnmf_naming SOMDLLIMPORT
#endif
#endif

/*
 * Start of bindings for IDL types
 */


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

/*
 * A function to create the CosNaming_BindingIterator class object...
 */
SOMEXTERN SOM_IMPORTEXPORT_somnmf_naming SOMClass * SOMLINK CosNaming_BindingIteratorNewClass(
		integer4 majorVersion,
		integer4 minorVersion);


/*
 * The API 2 ClassData Structures...
 */
SOMEXTERN struct CosNaming_BindingIteratorClassDataStructure {
	SOMClass *classObject;
	somMToken next_one;
	somMToken next_n;
	somMToken destroy;
} SOMDLINK SOM_IMPORTEXPORT_somnmf_naming CosNaming_BindingIteratorClassData;
SOMEXTERN struct CosNaming_BindingIteratorCClassDataStructure {
	som3ClassDetailsPtr    parentMtab;
	somDToken              instanceDataToken;
} SOMDLINK SOM_IMPORTEXPORT_somnmf_naming CosNaming_BindingIteratorCClassData;


/*
 * Class Object and Method Token Macros
 */
#define _SOMCLASS_CosNaming_BindingIterator (CosNaming_BindingIteratorClassData.classObject)
#ifndef SOMGD_CosNaming_BindingIterator
    #if (defined(_CosNaming_BindingIterator) || defined(__CosNaming_BindingIterator))
        #undef _CosNaming_BindingIterator
        #undef __CosNaming_BindingIterator
        #define SOMGD_CosNaming_BindingIterator 1
    #else
        #define _CosNaming_BindingIterator _SOMCLASS_CosNaming_BindingIterator
    #endif /* _CosNaming_BindingIterator */
#endif /* SOMGD_CosNaming_BindingIterator */
#define CosNaming_BindingIterator_classObj _SOMCLASS_CosNaming_BindingIterator
#define _SOMMTOKEN_CosNaming_BindingIterator(method) ((somMToken)CosNaming_BindingIteratorClassData.method)

/*
 * -- Typedefs for CosNaming_BindingIterator Method Procedures
 */
SOMEXTERN {
typedef boolean   SOMLINK somTP_CosNaming_BindingIterator_next_one(CosNaming_BindingIterator *somSelf, Environment *ev, 
		CosNaming_Binding* b);
typedef somTP_CosNaming_BindingIterator_next_one *somTD_CosNaming_BindingIterator_next_one;
typedef boolean   SOMLINK somTP_CosNaming_BindingIterator_next_n(CosNaming_BindingIterator *somSelf, Environment *ev, 
		unsigned long how_many, 
		CosNaming_BindingList* bl);
typedef somTP_CosNaming_BindingIterator_next_n *somTD_CosNaming_BindingIterator_next_n;
typedef void   SOMLINK somTP_CosNaming_BindingIterator_destroy(CosNaming_BindingIterator *somSelf, Environment *ev);
typedef somTP_CosNaming_BindingIterator_destroy *somTD_CosNaming_BindingIterator_destroy;

/*
 * -- Typedefs for Reintroduced Wrapper Methods
 */
typedef void   SOMLINK somTP_CosNaming_BindingIterator_somDefaultInit(CosNaming_BindingIterator *somSelf, 
		som3InitCtrl* ctrl);
typedef somTP_CosNaming_BindingIterator_somDefaultInit *somTD_CosNaming_BindingIterator_somDefaultInit;
typedef void   SOMLINK somTP_CosNaming_BindingIterator_somDestruct(CosNaming_BindingIterator *somSelf, 
		octet doFree, 
		som3DestructCtrl* ctrl);
typedef somTP_CosNaming_BindingIterator_somDestruct *somTD_CosNaming_BindingIterator_somDestruct;
typedef void   SOMLINK somTP_CosNaming_BindingIterator_somDefaultCopyInit(CosNaming_BindingIterator *somSelf, 
		som3InitCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_CosNaming_BindingIterator_somDefaultCopyInit *somTD_CosNaming_BindingIterator_somDefaultCopyInit;
typedef CosNaming_BindingIterator*   SOMLINK somTP_CosNaming_BindingIterator_somDefaultAssign(CosNaming_BindingIterator *somSelf, 
		som3AssignCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_CosNaming_BindingIterator_somDefaultAssign *somTD_CosNaming_BindingIterator_somDefaultAssign;
typedef void   SOMLINK somTP_CosNaming_BindingIterator_somDefaultConstCopyInit(CosNaming_BindingIterator *somSelf, 
		som3InitCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_CosNaming_BindingIterator_somDefaultConstCopyInit *somTD_CosNaming_BindingIterator_somDefaultConstCopyInit;
typedef void   SOMLINK somTP_CosNaming_BindingIterator_somDefaultVCopyInit(CosNaming_BindingIterator *somSelf, 
		som3InitCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_CosNaming_BindingIterator_somDefaultVCopyInit *somTD_CosNaming_BindingIterator_somDefaultVCopyInit;
typedef void   SOMLINK somTP_CosNaming_BindingIterator_somDefaultConstVCopyInit(CosNaming_BindingIterator *somSelf, 
		som3InitCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_CosNaming_BindingIterator_somDefaultConstVCopyInit *somTD_CosNaming_BindingIterator_somDefaultConstVCopyInit;
typedef CosNaming_BindingIterator*   SOMLINK somTP_CosNaming_BindingIterator_somDefaultConstAssign(CosNaming_BindingIterator *somSelf, 
		som3AssignCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_CosNaming_BindingIterator_somDefaultConstAssign *somTD_CosNaming_BindingIterator_somDefaultConstAssign;
typedef CosNaming_BindingIterator*   SOMLINK somTP_CosNaming_BindingIterator_somDefaultVAssign(CosNaming_BindingIterator *somSelf, 
		som3AssignCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_CosNaming_BindingIterator_somDefaultVAssign *somTD_CosNaming_BindingIterator_somDefaultVAssign;
typedef CosNaming_BindingIterator*   SOMLINK somTP_CosNaming_BindingIterator_somDefaultConstVAssign(CosNaming_BindingIterator *somSelf, 
		som3AssignCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_CosNaming_BindingIterator_somDefaultConstVAssign *somTD_CosNaming_BindingIterator_somDefaultConstVAssign;
typedef void   SOMLINK somTP_CosNaming_BindingIterator_somInit(CosNaming_BindingIterator *somSelf);
typedef somTP_CosNaming_BindingIterator_somInit *somTD_CosNaming_BindingIterator_somInit;
typedef void   SOMLINK somTP_CosNaming_BindingIterator_somUninit(CosNaming_BindingIterator *somSelf);
typedef somTP_CosNaming_BindingIterator_somUninit *somTD_CosNaming_BindingIterator_somUninit;
typedef void   SOMLINK somTP_CosNaming_BindingIterator_somFree(CosNaming_BindingIterator *somSelf);
typedef somTP_CosNaming_BindingIterator_somFree *somTD_CosNaming_BindingIterator_somFree;
typedef SOMClass*   SOMLINK somTP_CosNaming_BindingIterator_somGetClass(CosNaming_BindingIterator *somSelf);
typedef somTP_CosNaming_BindingIterator_somGetClass *somTD_CosNaming_BindingIterator_somGetClass;
typedef string   SOMLINK somTP_CosNaming_BindingIterator_somGetClassName(CosNaming_BindingIterator *somSelf);
typedef somTP_CosNaming_BindingIterator_somGetClassName *somTD_CosNaming_BindingIterator_somGetClassName;
typedef long   SOMLINK somTP_CosNaming_BindingIterator_somGetSize(CosNaming_BindingIterator *somSelf);
typedef somTP_CosNaming_BindingIterator_somGetSize *somTD_CosNaming_BindingIterator_somGetSize;
typedef boolean   SOMLINK somTP_CosNaming_BindingIterator_somIsA(CosNaming_BindingIterator *somSelf, 
		SOMClass* aClassObj);
typedef somTP_CosNaming_BindingIterator_somIsA *somTD_CosNaming_BindingIterator_somIsA;
typedef boolean   SOMLINK somTP_CosNaming_BindingIterator_somIsInstanceOf(CosNaming_BindingIterator *somSelf, 
		SOMClass* aClassObj);
typedef somTP_CosNaming_BindingIterator_somIsInstanceOf *somTD_CosNaming_BindingIterator_somIsInstanceOf;
typedef boolean   SOMLINK somTP_CosNaming_BindingIterator_somRespondsTo(CosNaming_BindingIterator *somSelf, 
		somId mId);
typedef somTP_CosNaming_BindingIterator_somRespondsTo *somTD_CosNaming_BindingIterator_somRespondsTo;
typedef boolean   SOMLINK somTP_CosNaming_BindingIterator_somDispatch(CosNaming_BindingIterator *somSelf, 
		somToken* retValue, 
		somId methodId, 
		va_list ap);
typedef somTP_CosNaming_BindingIterator_somDispatch *somTD_CosNaming_BindingIterator_somDispatch;
typedef boolean   SOMLINK somTP_CosNaming_BindingIterator_somClassDispatch(CosNaming_BindingIterator *somSelf, 
		SOMClass* clsObj, 
		somToken* retValue, 
		somId methodId, 
		va_list ap);
typedef somTP_CosNaming_BindingIterator_somClassDispatch *somTD_CosNaming_BindingIterator_somClassDispatch;
typedef boolean   SOMLINK somTP_CosNaming_BindingIterator_somCastObj(CosNaming_BindingIterator *somSelf, 
		SOMClass* castedCls);
typedef somTP_CosNaming_BindingIterator_somCastObj *somTD_CosNaming_BindingIterator_somCastObj;
typedef boolean   SOMLINK somTP_CosNaming_BindingIterator_somResetObj(CosNaming_BindingIterator *somSelf);
typedef somTP_CosNaming_BindingIterator_somResetObj *somTD_CosNaming_BindingIterator_somResetObj;
typedef CosNaming_BindingIterator*   SOMLINK somTP_CosNaming_BindingIterator_somPrintSelf(CosNaming_BindingIterator *somSelf);
typedef somTP_CosNaming_BindingIterator_somPrintSelf *somTD_CosNaming_BindingIterator_somPrintSelf;
typedef void   SOMLINK somTP_CosNaming_BindingIterator_somDumpSelf(CosNaming_BindingIterator *somSelf, 
		long level);
typedef somTP_CosNaming_BindingIterator_somDumpSelf *somTD_CosNaming_BindingIterator_somDumpSelf;
typedef void   SOMLINK somTP_CosNaming_BindingIterator_somDumpSelfInt(CosNaming_BindingIterator *somSelf, 
		long level);
typedef somTP_CosNaming_BindingIterator_somDumpSelfInt *somTD_CosNaming_BindingIterator_somDumpSelfInt;
}

#endif /* CosNaming_BindingIterator_API */


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

// CosNaming_BindingIterator::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 (!_CosNaming_BindingIterator) CosNaming_BindingIteratorNewClass(CosNaming_BindingIterator_MajorVersion,CosNaming_BindingIterator_MinorVersion);
   return (void*)
   (((somTD_SOMClass_somNewNoInit)(SOMClassClassData.somNewNoInit))
         ((SOMClass *)((void*)_CosNaming_BindingIterator)));
}

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

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

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

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


/* method: next_one */
boolean   next_one(Environment *ev, 
		CosNaming_Binding* b)
{
/*
 *  returns the next binding. FALSE is returned if
 *  there are no more bindings
 */
   return 	(
	 SOM_TestCls(this,_SOMCLASS_CosNaming_BindingIterator),
	 ((somTD_CosNaming_BindingIterator_next_one)(CosNaming_BindingIteratorClassData.next_one))(((CosNaming_BindingIterator *)((void *)this)), ev,b)
	);
}


/* method: next_n */
boolean   next_n(Environment *ev, 
		unsigned long how_many, 
		CosNaming_BindingList* bl)
{
/*
 *  returns at most the "how_many" number of bindings.
 *  Returns FALSE if there are no more bindings
 */
   return 	(
	 SOM_TestCls(this,_SOMCLASS_CosNaming_BindingIterator),
	 ((somTD_CosNaming_BindingIterator_next_n)(CosNaming_BindingIteratorClassData.next_n))(((CosNaming_BindingIterator *)((void *)this)), ev,how_many,bl)
	);
}


/* method: destroy */
void   destroy(Environment *ev)
{
/*
 *  destroys the iterator
 */
   	(
	 SOM_TestCls(this,_SOMCLASS_CosNaming_BindingIterator),
	 ((somTD_CosNaming_BindingIterator_destroy)(CosNaming_BindingIteratorClassData.destroy))(((CosNaming_BindingIterator *)((void *)this)), ev)
	);
}


/*
 * Reintroduce inherited methods
 */

/* initializer method: somDefaultInit */
void   somDefaultInit(som3InitCtrl* ctrl)
{
/*
 *  A default initializer for a SOM object. Passing a null ctrl
 *  indicates to the receiver that its class is the class of the
 *  object being initialized, whereby the initializer will determine
 *  an appropriate control structure.
 */
   	(
	 SOM_TestCls(this,_SOMCLASS_SOMObject),
	 ((somTD_CosNaming_BindingIterator_somDefaultInit)(SOMObjectClassData.somDefaultInit))(((CosNaming_BindingIterator *)((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_CosNaming_BindingIterator_somDestruct)(SOMObjectClassData.somDestruct))(((CosNaming_BindingIterator *)((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_CosNaming_BindingIterator_somDefaultCopyInit)(SOMObjectClassData.somDefaultCopyInit))(((CosNaming_BindingIterator *)((void *)this)),ctrl,fromObj)
	);
}


/* method: somDefaultAssign */
CosNaming_BindingIterator*  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_CosNaming_BindingIterator_somDefaultAssign)(SOMObjectClassData.somDefaultAssign))(((CosNaming_BindingIterator *)((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_CosNaming_BindingIterator_somDefaultConstCopyInit)(SOMObjectClassData.somDefaultConstCopyInit))(((CosNaming_BindingIterator *)((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_CosNaming_BindingIterator_somDefaultVCopyInit)(SOMObjectClassData.somDefaultVCopyInit))(((CosNaming_BindingIterator *)((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_CosNaming_BindingIterator_somDefaultConstVCopyInit)(SOMObjectClassData.somDefaultConstVCopyInit))(((CosNaming_BindingIterator *)((void *)this)),ctrl,fromObj)
	);
}


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


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


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


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


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


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


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


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


/* method: somGetSize */
long   somGetSize()
{
/*
 *  Return the size of the receiver.
 */
   return 	(
	 SOM_TestCls(this,_SOMCLASS_SOMObject),
	 ((somTD_CosNaming_BindingIterator_somGetSize)(SOMObjectClassData.somGetSize))(((CosNaming_BindingIterator *)((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_CosNaming_BindingIterator_somIsA)(SOMObjectClassData.somIsA))(((CosNaming_BindingIterator *)((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_CosNaming_BindingIterator_somIsInstanceOf)(SOMObjectClassData.somIsInstanceOf))(((CosNaming_BindingIterator *)((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_CosNaming_BindingIterator_somRespondsTo)(SOMObjectClassData.somRespondsTo))(((CosNaming_BindingIterator *)((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_CosNaming_BindingIterator_somDispatch)(SOMObjectClassData.somDispatch))(((CosNaming_BindingIterator *)((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_CosNaming_BindingIterator_somDispatch)(SOMObjectClassData.somDispatch))(((CosNaming_BindingIterator *)((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_CosNaming_BindingIterator_somClassDispatch)(SOMObjectClassData.somClassDispatch))(((CosNaming_BindingIterator *)((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_CosNaming_BindingIterator_somClassDispatch)(SOMObjectClassData.somClassDispatch))(((CosNaming_BindingIterator *)((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_CosNaming_BindingIterator_somCastObj)(SOMObjectClassData.somCastObj))(((CosNaming_BindingIterator *)((void *)this)),castedCls)
	);
}


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


/* method: somPrintSelf */
CosNaming_BindingIterator*  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_CosNaming_BindingIterator_somPrintSelf)(SOMObjectClassData.somPrintSelf))(((CosNaming_BindingIterator *)((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_CosNaming_BindingIterator_somDumpSelf)(SOMObjectClassData.somDumpSelf))(((CosNaming_BindingIterator *)((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_CosNaming_BindingIterator_somDumpSelfInt)(SOMObjectClassData.somDumpSelfInt))(((CosNaming_BindingIterator *)((void *)this)),level)
	);
}



};   /* CosNaming_BindingIterator */



#endif       /* SOM_CosNaming_BindingIterator_xh */

#ifndef SOM_CosNaming_NamingContext_xh
#define SOM_CosNaming_NamingContext_xh


#define CosNaming_NamingContext_MajorVersion 3
#define CosNaming_NamingContext_MinorVersion 0
class CosNaming_NamingContext;

/* 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 CosNaming_NamingContext_API
#define CosNaming_NamingContext_API
/*
 * -- The Class API
 */

/*
 * Start of bindings for IDL types
 */

typedef unsigned long CosNaming_NamingContext_NotFoundReason;
#define CosNaming_NamingContext_missing_node 1UL
#define CosNaming_NamingContext_not_context 2UL
#define CosNaming_NamingContext_not_object 3UL
#define ex_CosNaming_NamingContext_NotFound "::CosNaming::NamingContext::NotFound"
typedef
struct CosNaming_NamingContext_NotFound {
CosNaming_NamingContext_NotFoundReason why;
CosNaming_Name rest_of_name;
} CosNaming_NamingContext_NotFound;
#define ex_CosNaming_NamingContext_CannotProceed "::CosNaming::NamingContext::CannotProceed"
typedef
struct CosNaming_NamingContext_CannotProceed {
CosNaming_NamingContext* cxt;
CosNaming_Name rest_of_name;
} CosNaming_NamingContext_CannotProceed;
#define ex_CosNaming_NamingContext_InvalidName "::CosNaming::NamingContext::InvalidName"
typedef
struct CosNaming_NamingContext_InvalidName {
CosNaming_Name name;
} CosNaming_NamingContext_InvalidName;
#define ex_CosNaming_NamingContext_AlreadyBound "::CosNaming::NamingContext::AlreadyBound"
#define CosNaming_NamingContext_AlreadyBound NULL
#define ex_CosNaming_NamingContext_NotEmpty "::CosNaming::NamingContext::NotEmpty"
#define CosNaming_NamingContext_NotEmpty NULL

#ifndef SOM_DONT_USE_SHORT_NAMES
#ifndef SOMTGD_NotFoundReason
    #ifdef NotFoundReason
        #undef NotFoundReason
        #define SOMTGD_NotFoundReason 1
    #else
        #define NotFoundReason CosNaming_NamingContext_NotFoundReason
    #endif /* NotFoundReason */
#endif /* SOMTGD_NotFoundReason */
#ifndef SOMTGD_ex_NotFound
    #ifdef ex_NotFound
        #undef ex_NotFound
        #define SOMTGD_ex_NotFound 1
    #else
        #define ex_NotFound ex_CosNaming_NamingContext_NotFound
    #endif /* ex_NotFound */
#endif /* SOMTGD_ex_NotFound */
#ifndef SOMTGD_NotFound
    #ifdef NotFound
        #undef NotFound
        #define SOMTGD_NotFound 1
    #else
        #define NotFound CosNaming_NamingContext_NotFound
    #endif /* NotFound */
#endif /* SOMTGD_NotFound */
#ifndef SOMTGD_ex_CannotProceed
    #ifdef ex_CannotProceed
        #undef ex_CannotProceed
        #define SOMTGD_ex_CannotProceed 1
    #else
        #define ex_CannotProceed ex_CosNaming_NamingContext_CannotProceed
    #endif /* ex_CannotProceed */
#endif /* SOMTGD_ex_CannotProceed */
#ifndef SOMTGD_CannotProceed
    #ifdef CannotProceed
        #undef CannotProceed
        #define SOMTGD_CannotProceed 1
    #else
        #define CannotProceed CosNaming_NamingContext_CannotProceed
    #endif /* CannotProceed */
#endif /* SOMTGD_CannotProceed */
#ifndef SOMTGD_ex_InvalidName
    #ifdef ex_InvalidName
        #undef ex_InvalidName
        #define SOMTGD_ex_InvalidName 1
    #else
        #define ex_InvalidName ex_CosNaming_NamingContext_InvalidName
    #endif /* ex_InvalidName */
#endif /* SOMTGD_ex_InvalidName */
#ifndef SOMTGD_InvalidName
    #ifdef InvalidName
        #undef InvalidName
        #define SOMTGD_InvalidName 1
    #else
        #define InvalidName CosNaming_NamingContext_InvalidName
    #endif /* InvalidName */
#endif /* SOMTGD_InvalidName */
#ifndef SOMTGD_ex_AlreadyBound
    #ifdef ex_AlreadyBound
        #undef ex_AlreadyBound
        #define SOMTGD_ex_AlreadyBound 1
    #else
        #define ex_AlreadyBound ex_CosNaming_NamingContext_AlreadyBound
    #endif /* ex_AlreadyBound */
#endif /* SOMTGD_ex_AlreadyBound */
#ifndef SOMTGD_AlreadyBound
    #ifdef AlreadyBound
        #undef AlreadyBound
        #define SOMTGD_AlreadyBound 1
    #else
        #define AlreadyBound CosNaming_NamingContext_AlreadyBound
    #endif /* AlreadyBound */
#endif /* SOMTGD_AlreadyBound */
#ifndef SOMTGD_ex_NotEmpty
    #ifdef ex_NotEmpty
        #undef ex_NotEmpty
        #define SOMTGD_ex_NotEmpty 1
    #else
        #define ex_NotEmpty ex_CosNaming_NamingContext_NotEmpty
    #endif /* ex_NotEmpty */
#endif /* SOMTGD_ex_NotEmpty */
#ifndef SOMTGD_NotEmpty
    #ifdef NotEmpty
        #undef NotEmpty
        #define SOMTGD_NotEmpty 1
    #else
        #define NotEmpty CosNaming_NamingContext_NotEmpty
    #endif /* NotEmpty */
#endif /* SOMTGD_NotEmpty */
#endif /* SOM_DONT_USE_SHORT_NAMES */

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

/*
 * A function to create the CosNaming_NamingContext class object...
 */
SOMEXTERN SOM_IMPORTEXPORT_somnmf_naming SOMClass * SOMLINK CosNaming_NamingContextNewClass(
		integer4 majorVersion,
		integer4 minorVersion);


/*
 * The API 2 ClassData Structures...
 */
SOMEXTERN struct CosNaming_NamingContextClassDataStructure {
	SOMClass *classObject;
	somMToken bind;
	somMToken rebind;
	somMToken bind_context;
	somMToken rebind_context;
	somMToken resolve;
	somMToken unbind;
	somMToken new_context;
	somMToken bind_new_context;
	somMToken destroy;
	somMToken list;
	somMToken resolvex;
} SOMDLINK SOM_IMPORTEXPORT_somnmf_naming CosNaming_NamingContextClassData;
SOMEXTERN struct CosNaming_NamingContextCClassDataStructure {
	som3ClassDetailsPtr    parentMtab;
	somDToken              instanceDataToken;
} SOMDLINK SOM_IMPORTEXPORT_somnmf_naming CosNaming_NamingContextCClassData;


/*
 * Class Object and Method Token Macros
 */
#define _SOMCLASS_CosNaming_NamingContext (CosNaming_NamingContextClassData.classObject)
#ifndef SOMGD_CosNaming_NamingContext
    #if (defined(_CosNaming_NamingContext) || defined(__CosNaming_NamingContext))
        #undef _CosNaming_NamingContext
        #undef __CosNaming_NamingContext
        #define SOMGD_CosNaming_NamingContext 1
    #else
        #define _CosNaming_NamingContext _SOMCLASS_CosNaming_NamingContext
    #endif /* _CosNaming_NamingContext */
#endif /* SOMGD_CosNaming_NamingContext */
#define CosNaming_NamingContext_classObj _SOMCLASS_CosNaming_NamingContext
#define _SOMMTOKEN_CosNaming_NamingContext(method) ((somMToken)CosNaming_NamingContextClassData.method)

/*
 * -- Typedefs for CosNaming_NamingContext Method Procedures
 */
SOMEXTERN {
typedef void   SOMLINK somTP_CosNaming_NamingContext_bind(CosNaming_NamingContext *somSelf, Environment *ev, 
		CosNaming_Name* n, 
		SOMObject* obj);
typedef somTP_CosNaming_NamingContext_bind *somTD_CosNaming_NamingContext_bind;
typedef void   SOMLINK somTP_CosNaming_NamingContext_rebind(CosNaming_NamingContext *somSelf, Environment *ev, 
		CosNaming_Name* n, 
		SOMObject* obj);
typedef somTP_CosNaming_NamingContext_rebind *somTD_CosNaming_NamingContext_rebind;
typedef void   SOMLINK somTP_CosNaming_NamingContext_bind_context(CosNaming_NamingContext *somSelf, Environment *ev, 
		CosNaming_Name* n, 
		CosNaming_NamingContext* nc);
typedef somTP_CosNaming_NamingContext_bind_context *somTD_CosNaming_NamingContext_bind_context;
typedef void   SOMLINK somTP_CosNaming_NamingContext_rebind_context(CosNaming_NamingContext *somSelf, Environment *ev, 
		CosNaming_Name* n, 
		CosNaming_NamingContext* nc);
typedef somTP_CosNaming_NamingContext_rebind_context *somTD_CosNaming_NamingContext_rebind_context;
typedef SOMObject*   SOMLINK somTP_CosNaming_NamingContext_resolve(CosNaming_NamingContext *somSelf, Environment *ev, 
		CosNaming_Name* n);
typedef somTP_CosNaming_NamingContext_resolve *somTD_CosNaming_NamingContext_resolve;
typedef void   SOMLINK somTP_CosNaming_NamingContext_unbind(CosNaming_NamingContext *somSelf, Environment *ev, 
		CosNaming_Name* n);
typedef somTP_CosNaming_NamingContext_unbind *somTD_CosNaming_NamingContext_unbind;
typedef CosNaming_NamingContext*   SOMLINK somTP_CosNaming_NamingContext_new_context(CosNaming_NamingContext *somSelf, Environment *ev);
typedef somTP_CosNaming_NamingContext_new_context *somTD_CosNaming_NamingContext_new_context;
typedef CosNaming_NamingContext*   SOMLINK somTP_CosNaming_NamingContext_bind_new_context(CosNaming_NamingContext *somSelf, Environment *ev, 
		CosNaming_Name* n);
typedef somTP_CosNaming_NamingContext_bind_new_context *somTD_CosNaming_NamingContext_bind_new_context;
typedef void   SOMLINK somTP_CosNaming_NamingContext_destroy(CosNaming_NamingContext *somSelf, Environment *ev);
typedef somTP_CosNaming_NamingContext_destroy *somTD_CosNaming_NamingContext_destroy;
typedef void   SOMLINK somTP_CosNaming_NamingContext_list(CosNaming_NamingContext *somSelf, Environment *ev, 
		unsigned long how_many, 
		CosNaming_BindingList* bl, 
		CosNaming_BindingIterator** bi);
typedef somTP_CosNaming_NamingContext_list *somTD_CosNaming_NamingContext_list;

/*
 * -- Typedefs for Reintroduced Wrapper Methods
 */
typedef void   SOMLINK somTP_CosNaming_NamingContext_somDefaultInit(CosNaming_NamingContext *somSelf, 
		som3InitCtrl* ctrl);
typedef somTP_CosNaming_NamingContext_somDefaultInit *somTD_CosNaming_NamingContext_somDefaultInit;
typedef void   SOMLINK somTP_CosNaming_NamingContext_somDestruct(CosNaming_NamingContext *somSelf, 
		octet doFree, 
		som3DestructCtrl* ctrl);
typedef somTP_CosNaming_NamingContext_somDestruct *somTD_CosNaming_NamingContext_somDestruct;
typedef void   SOMLINK somTP_CosNaming_NamingContext_somDefaultCopyInit(CosNaming_NamingContext *somSelf, 
		som3InitCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_CosNaming_NamingContext_somDefaultCopyInit *somTD_CosNaming_NamingContext_somDefaultCopyInit;
typedef CosNaming_NamingContext*   SOMLINK somTP_CosNaming_NamingContext_somDefaultAssign(CosNaming_NamingContext *somSelf, 
		som3AssignCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_CosNaming_NamingContext_somDefaultAssign *somTD_CosNaming_NamingContext_somDefaultAssign;
typedef void   SOMLINK somTP_CosNaming_NamingContext_somDefaultConstCopyInit(CosNaming_NamingContext *somSelf, 
		som3InitCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_CosNaming_NamingContext_somDefaultConstCopyInit *somTD_CosNaming_NamingContext_somDefaultConstCopyInit;
typedef void   SOMLINK somTP_CosNaming_NamingContext_somDefaultVCopyInit(CosNaming_NamingContext *somSelf, 
		som3InitCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_CosNaming_NamingContext_somDefaultVCopyInit *somTD_CosNaming_NamingContext_somDefaultVCopyInit;
typedef void   SOMLINK somTP_CosNaming_NamingContext_somDefaultConstVCopyInit(CosNaming_NamingContext *somSelf, 
		som3InitCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_CosNaming_NamingContext_somDefaultConstVCopyInit *somTD_CosNaming_NamingContext_somDefaultConstVCopyInit;
typedef CosNaming_NamingContext*   SOMLINK somTP_CosNaming_NamingContext_somDefaultConstAssign(CosNaming_NamingContext *somSelf, 
		som3AssignCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_CosNaming_NamingContext_somDefaultConstAssign *somTD_CosNaming_NamingContext_somDefaultConstAssign;
typedef CosNaming_NamingContext*   SOMLINK somTP_CosNaming_NamingContext_somDefaultVAssign(CosNaming_NamingContext *somSelf, 
		som3AssignCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_CosNaming_NamingContext_somDefaultVAssign *somTD_CosNaming_NamingContext_somDefaultVAssign;
typedef CosNaming_NamingContext*   SOMLINK somTP_CosNaming_NamingContext_somDefaultConstVAssign(CosNaming_NamingContext *somSelf, 
		som3AssignCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_CosNaming_NamingContext_somDefaultConstVAssign *somTD_CosNaming_NamingContext_somDefaultConstVAssign;
typedef void   SOMLINK somTP_CosNaming_NamingContext_somInit(CosNaming_NamingContext *somSelf);
typedef somTP_CosNaming_NamingContext_somInit *somTD_CosNaming_NamingContext_somInit;
typedef void   SOMLINK somTP_CosNaming_NamingContext_somUninit(CosNaming_NamingContext *somSelf);
typedef somTP_CosNaming_NamingContext_somUninit *somTD_CosNaming_NamingContext_somUninit;
typedef void   SOMLINK somTP_CosNaming_NamingContext_somFree(CosNaming_NamingContext *somSelf);
typedef somTP_CosNaming_NamingContext_somFree *somTD_CosNaming_NamingContext_somFree;
typedef SOMClass*   SOMLINK somTP_CosNaming_NamingContext_somGetClass(CosNaming_NamingContext *somSelf);
typedef somTP_CosNaming_NamingContext_somGetClass *somTD_CosNaming_NamingContext_somGetClass;
typedef string   SOMLINK somTP_CosNaming_NamingContext_somGetClassName(CosNaming_NamingContext *somSelf);
typedef somTP_CosNaming_NamingContext_somGetClassName *somTD_CosNaming_NamingContext_somGetClassName;
typedef long   SOMLINK somTP_CosNaming_NamingContext_somGetSize(CosNaming_NamingContext *somSelf);
typedef somTP_CosNaming_NamingContext_somGetSize *somTD_CosNaming_NamingContext_somGetSize;
typedef boolean   SOMLINK somTP_CosNaming_NamingContext_somIsA(CosNaming_NamingContext *somSelf, 
		SOMClass* aClassObj);
typedef somTP_CosNaming_NamingContext_somIsA *somTD_CosNaming_NamingContext_somIsA;
typedef boolean   SOMLINK somTP_CosNaming_NamingContext_somIsInstanceOf(CosNaming_NamingContext *somSelf, 
		SOMClass* aClassObj);
typedef somTP_CosNaming_NamingContext_somIsInstanceOf *somTD_CosNaming_NamingContext_somIsInstanceOf;
typedef boolean   SOMLINK somTP_CosNaming_NamingContext_somRespondsTo(CosNaming_NamingContext *somSelf, 
		somId mId);
typedef somTP_CosNaming_NamingContext_somRespondsTo *somTD_CosNaming_NamingContext_somRespondsTo;
typedef boolean   SOMLINK somTP_CosNaming_NamingContext_somDispatch(CosNaming_NamingContext *somSelf, 
		somToken* retValue, 
		somId methodId, 
		va_list ap);
typedef somTP_CosNaming_NamingContext_somDispatch *somTD_CosNaming_NamingContext_somDispatch;
typedef boolean   SOMLINK somTP_CosNaming_NamingContext_somClassDispatch(CosNaming_NamingContext *somSelf, 
		SOMClass* clsObj, 
		somToken* retValue, 
		somId methodId, 
		va_list ap);
typedef somTP_CosNaming_NamingContext_somClassDispatch *somTD_CosNaming_NamingContext_somClassDispatch;
typedef boolean   SOMLINK somTP_CosNaming_NamingContext_somCastObj(CosNaming_NamingContext *somSelf, 
		SOMClass* castedCls);
typedef somTP_CosNaming_NamingContext_somCastObj *somTD_CosNaming_NamingContext_somCastObj;
typedef boolean   SOMLINK somTP_CosNaming_NamingContext_somResetObj(CosNaming_NamingContext *somSelf);
typedef somTP_CosNaming_NamingContext_somResetObj *somTD_CosNaming_NamingContext_somResetObj;
typedef CosNaming_NamingContext*   SOMLINK somTP_CosNaming_NamingContext_somPrintSelf(CosNaming_NamingContext *somSelf);
typedef somTP_CosNaming_NamingContext_somPrintSelf *somTD_CosNaming_NamingContext_somPrintSelf;
typedef void   SOMLINK somTP_CosNaming_NamingContext_somDumpSelf(CosNaming_NamingContext *somSelf, 
		long level);
typedef somTP_CosNaming_NamingContext_somDumpSelf *somTD_CosNaming_NamingContext_somDumpSelf;
typedef void   SOMLINK somTP_CosNaming_NamingContext_somDumpSelfInt(CosNaming_NamingContext *somSelf, 
		long level);
typedef somTP_CosNaming_NamingContext_somDumpSelfInt *somTD_CosNaming_NamingContext_somDumpSelfInt;
}

#endif /* CosNaming_NamingContext_API */


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

// CosNaming_NamingContext::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 (!_CosNaming_NamingContext) CosNaming_NamingContextNewClass(CosNaming_NamingContext_MajorVersion,CosNaming_NamingContext_MinorVersion);
   return (void*)
   (((somTD_SOMClass_somNewNoInit)(SOMClassClassData.somNewNoInit))
         ((SOMClass *)((void*)_CosNaming_NamingContext)));
}

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

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

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

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


/* method: bind */
void   bind(Environment *ev, 
		CosNaming_Name* n, 
		SOMObject* obj)
{
/*
 *  creates a binding of a name and an object in
 *  the target naming context. Naming Contexts that are
 *  bound using bind do not participate in name resolution
 *  when compound name resolution is done
 */
   	(
	 SOM_TestCls(this,_SOMCLASS_CosNaming_NamingContext),
	 ((somTD_CosNaming_NamingContext_bind)(CosNaming_NamingContextClassData.bind))(((CosNaming_NamingContext *)((void *)this)), ev,n,obj)
	);
}


/* method: rebind */
void   rebind(Environment *ev, 
		CosNaming_Name* n, 
		SOMObject* obj)
{
/*
 *  creates a binding of the name and an object even if
 *  the name is already bound in the context. Naming
 *  contexts that are bound using rebind do not participate
 *  in name resolution process when compound names are
 *  passed to be resolved.
 */
   	(
	 SOM_TestCls(this,_SOMCLASS_CosNaming_NamingContext),
	 ((somTD_CosNaming_NamingContext_rebind)(CosNaming_NamingContextClassData.rebind))(((CosNaming_NamingContext *)((void *)this)), ev,n,obj)
	);
}


/* method: bind_context */
void   bind_context(Environment *ev, 
		CosNaming_Name* n, 
		CosNaming_NamingContext* nc)
{
/*
 *  binds a naming context to the name. Naming contexts
 *  that are bound using bind_context participate in
 *  name resolution when compound names are resolved
 */
   	(
	 SOM_TestCls(this,_SOMCLASS_CosNaming_NamingContext),
	 ((somTD_CosNaming_NamingContext_bind_context)(CosNaming_NamingContextClassData.bind_context))(((CosNaming_NamingContext *)((void *)this)), ev,n,nc)
	);
}


/* method: rebind_context */
void   rebind_context(Environment *ev, 
		CosNaming_Name* n, 
		CosNaming_NamingContext* nc)
{
/*
 *  creates a binding between a name and a naming context
 *  in the target naming context even if the name is
 *  already bound in the context. Naming contexts that
 *  are bound using rebind_context participate in name
 *  resolution when compound names are resolved
 */
   	(
	 SOM_TestCls(this,_SOMCLASS_CosNaming_NamingContext),
	 ((somTD_CosNaming_NamingContext_rebind_context)(CosNaming_NamingContextClassData.rebind_context))(((CosNaming_NamingContext *)((void *)this)), ev,n,nc)
	);
}


/* method: resolve */
SOMObject*   resolve(Environment *ev, 
		CosNaming_Name* n)
{
/*
 * retrieves an object bound to a name in the context
 *  Since names can be compound, name resolution can
 *  traverse multiple naming contexts
 */
   return 	(
	 SOM_TestCls(this,_SOMCLASS_CosNaming_NamingContext),
	 ((somTD_CosNaming_NamingContext_resolve)(CosNaming_NamingContextClassData.resolve))(((CosNaming_NamingContext *)((void *)this)), ev,n)
	);
}


/* method: unbind */
void   unbind(Environment *ev, 
		CosNaming_Name* n)
{
/*
 *  removes a name binding from a context
 */
   	(
	 SOM_TestCls(this,_SOMCLASS_CosNaming_NamingContext),
	 ((somTD_CosNaming_NamingContext_unbind)(CosNaming_NamingContextClassData.unbind))(((CosNaming_NamingContext *)((void *)this)), ev,n)
	);
}


/* method: new_context */
CosNaming_NamingContext*   new_context(Environment *ev)
{
/*
 *  Returns a new naming context in the same process as
 *  the context on which the operation was invoked
 *  The new context is not bound to any name
 */
   return 	(
	 SOM_TestCls(this,_SOMCLASS_CosNaming_NamingContext),
	 ((somTD_CosNaming_NamingContext_new_context)(CosNaming_NamingContextClassData.new_context))(((CosNaming_NamingContext *)((void *)this)), ev)
	);
}


/* method: bind_new_context */
CosNaming_NamingContext*   bind_new_context(Environment *ev, 
		CosNaming_Name* n)
{
/*
 *  Creates a name naming context and binds it to the name
 *  supplied as the argument.
 *  The naming context is created in the same process as
 *  the context on which the bind_new_context was invoked
 */
   return 	(
	 SOM_TestCls(this,_SOMCLASS_CosNaming_NamingContext),
	 ((somTD_CosNaming_NamingContext_bind_new_context)(CosNaming_NamingContextClassData.bind_new_context))(((CosNaming_NamingContext *)((void *)this)), ev,n)
	);
}


/* method: destroy */
void   destroy(Environment *ev)
{
/*
 *  destroys the naming context. If the naming context has
 *  bindings, a NotEmpty exception is raised. It is the
 *  responsibilty of the caller to make sure that there
 *  are no refernces to this naming context.
 */
   	(
	 SOM_TestCls(this,_SOMCLASS_CosNaming_NamingContext),
	 ((somTD_CosNaming_NamingContext_destroy)(CosNaming_NamingContextClassData.destroy))(((CosNaming_NamingContext *)((void *)this)), ev)
	);
}


/* method: list */
void   list(Environment *ev, 
		unsigned long how_many, 
		CosNaming_BindingList* bl, 
		CosNaming_BindingIterator** bi)
{
/*
 *  returns at most "how_many" number of bindings in bl.
 *  If the naming context contains additional bindings, a
 *  BindingIterator is returned. If the naming context
 *  does not contain additional bindings, the binding
 *  iterator is a "nil" object reference
 */
   	(
	 SOM_TestCls(this,_SOMCLASS_CosNaming_NamingContext),
	 ((somTD_CosNaming_NamingContext_list)(CosNaming_NamingContextClassData.list))(((CosNaming_NamingContext *)((void *)this)), ev,how_many,bl,bi)
	);
}


/*
 * 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_CosNaming_NamingContext_somDefaultInit)(SOMObjectClassData.somDefaultInit))(((CosNaming_NamingContext *)((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_CosNaming_NamingContext_somDestruct)(SOMObjectClassData.somDestruct))(((CosNaming_NamingContext *)((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_CosNaming_NamingContext_somDefaultCopyInit)(SOMObjectClassData.somDefaultCopyInit))(((CosNaming_NamingContext *)((void *)this)),ctrl,fromObj)
	);
}


/* method: somDefaultAssign */
CosNaming_NamingContext*  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_CosNaming_NamingContext_somDefaultAssign)(SOMObjectClassData.somDefaultAssign))(((CosNaming_NamingContext *)((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_CosNaming_NamingContext_somDefaultConstCopyInit)(SOMObjectClassData.somDefaultConstCopyInit))(((CosNaming_NamingContext *)((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_CosNaming_NamingContext_somDefaultVCopyInit)(SOMObjectClassData.somDefaultVCopyInit))(((CosNaming_NamingContext *)((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_CosNaming_NamingContext_somDefaultConstVCopyInit)(SOMObjectClassData.somDefaultConstVCopyInit))(((CosNaming_NamingContext *)((void *)this)),ctrl,fromObj)
	);
}


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


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


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


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


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


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


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


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


/* method: somGetSize */
long   somGetSize()
{
/*
 *  Return the size of the receiver.
 */
   return 	(
	 SOM_TestCls(this,_SOMCLASS_SOMObject),
	 ((somTD_CosNaming_NamingContext_somGetSize)(SOMObjectClassData.somGetSize))(((CosNaming_NamingContext *)((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_CosNaming_NamingContext_somIsA)(SOMObjectClassData.somIsA))(((CosNaming_NamingContext *)((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_CosNaming_NamingContext_somIsInstanceOf)(SOMObjectClassData.somIsInstanceOf))(((CosNaming_NamingContext *)((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_CosNaming_NamingContext_somRespondsTo)(SOMObjectClassData.somRespondsTo))(((CosNaming_NamingContext *)((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_CosNaming_NamingContext_somDispatch)(SOMObjectClassData.somDispatch))(((CosNaming_NamingContext *)((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_CosNaming_NamingContext_somDispatch)(SOMObjectClassData.somDispatch))(((CosNaming_NamingContext *)((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_CosNaming_NamingContext_somClassDispatch)(SOMObjectClassData.somClassDispatch))(((CosNaming_NamingContext *)((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_CosNaming_NamingContext_somClassDispatch)(SOMObjectClassData.somClassDispatch))(((CosNaming_NamingContext *)((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_CosNaming_NamingContext_somCastObj)(SOMObjectClassData.somCastObj))(((CosNaming_NamingContext *)((void *)this)),castedCls)
	);
}


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


/* method: somPrintSelf */
CosNaming_NamingContext*  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_CosNaming_NamingContext_somPrintSelf)(SOMObjectClassData.somPrintSelf))(((CosNaming_NamingContext *)((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_CosNaming_NamingContext_somDumpSelf)(SOMObjectClassData.somDumpSelf))(((CosNaming_NamingContext *)((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_CosNaming_NamingContext_somDumpSelfInt)(SOMObjectClassData.somDumpSelfInt))(((CosNaming_NamingContext *)((void *)this)),level)
	);
}



};   /* CosNaming_NamingContext */



#endif       /* SOM_CosNaming_NamingContext_xh */
