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

/*
 *    @(#) 2.36 src/somd/implrep.idl, somd, som3.0 9/26/96 14:01:57 [12/22/96 21:11:43]
 * 
 *    COMPONENT_NAME: somd
 * 
 *    ORIGINS: 27
 * 
 * 
 *     25H7912  (C)  COPYRIGHT International Business Machines Corp. 1992,1995,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_ImplRepository_xh
#define SOM_ImplRepository_xh


/*
 *   CLASS SPECIFICATION FOR IMPLEMENTATION REPOSITORY
 *   The ImplRepository class contains methods which add/update/list/delete
 *   information from both the Implementation repository and the Name service.
 */

#define ImplRepository_MajorVersion 2
#define ImplRepository_MinorVersion 2
class ImplRepository;

/*
 *   CLASS SPECIFICATION FOR IMPLEMENTATION REPOSITORY
 *   The ImplRepository class contains methods which add/update/list/delete
 *   information from both the Implementation repository and the Name service.
 */

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

/*
 * Start of bindings for IDL types
 */

class SOMClass;
class SOMObject;
class Container;
class ExtendedNaming_PropertyBindingIterator;
class ExtendedNaming_PropertyIterator;
class ExtendedNaming_IndexIterator;
class SOMDObject;
class Principal;
class ImplementationDef;
class InterfaceDef;
class NVList;
class Context;
class Request;
class CosObjectIdentity_IdentifiableObject;
class CosStream_Streamable;
class CosStream_StreamableFactory;
typedef
struct ImplRepository_PV {
string  name;
string  value;
} ImplRepository_PV, ImplRepository_PropertyValue;
#ifndef _IDL_SEQUENCE_ImplRepository_PV_defined
#define _IDL_SEQUENCE_ImplRepository_PV_defined
typedef struct {
    unsigned long _maximum;
    unsigned long _length;
    ImplRepository_PV *_buffer;
} _IDL_SEQUENCE_ImplRepository_PV;
#endif /* _IDL_SEQUENCE_ImplRepository_PV_defined */ 
typedef
_IDL_SEQUENCE_ImplRepository_PV ImplRepository_PVList;
/*
 *  This is a list of optional properties which are to be
 *  associated with a class name when registering with the Name Server.
 */

#ifndef _IDL_SEQUENCE_string_defined
#define _IDL_SEQUENCE_string_defined
typedef struct {
    unsigned long _maximum;
    unsigned long _length;
    string *_buffer;
} _IDL_SEQUENCE_string;
#endif /* _IDL_SEQUENCE_string_defined */ 
#ifndef _IDL_SEQUENCE_ImplementationDef_defined
#define _IDL_SEQUENCE_ImplementationDef_defined
typedef struct {
    unsigned long _maximum;
    unsigned long _length;
    ImplementationDef **_buffer;
} _IDL_SEQUENCE_ImplementationDef;
#endif /* _IDL_SEQUENCE_ImplementationDef_defined */ 

#ifndef SOM_DONT_USE_SHORT_NAMES
#ifndef SOMTGD_PropertyValue
    #ifdef PropertyValue
        #undef PropertyValue
        #define SOMTGD_PropertyValue 1
    #else
        #define PropertyValue ImplRepository_PropertyValue
    #endif /* PropertyValue */
#endif /* SOMTGD_PropertyValue */
#endif /* SOM_DONT_USE_SHORT_NAMES */

#ifndef SOM_DONT_USE_SHORT_NAMES
#ifndef SOMTGD__IDL_SEQUENCE_PV
    #ifdef _IDL_SEQUENCE_PV
        #undef _IDL_SEQUENCE_PV
        #define SOMTGD__IDL_SEQUENCE_PV 1
    #else
        #define _IDL_SEQUENCE_PV _IDL_SEQUENCE_ImplRepository_PV
    #endif /* _IDL_SEQUENCE_PV */
#endif /* SOMTGD__IDL_SEQUENCE_PV */

#ifndef SOM_DONT_USE_SHORT_NAMES
#ifndef SOMTGD_PVList
    #ifdef PVList
        #undef PVList
        #define SOMTGD_PVList 1
    #else
        #define PVList ImplRepository_PVList
    #endif /* PVList */
#endif /* SOMTGD_PVList */
#endif /* SOM_DONT_USE_SHORT_NAMES */
#endif /* SOM_DONT_USE_SHORT_NAMES */

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

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

class ImplRepository;
#include <impldef.xh>

#ifndef SOM_IMPORTEXPORT_somd
#if defined(_WIN32) && !defined(SOM_DLL_somd)
#define SOM_IMPORTEXPORT_somd SOMDLLIMPORT
#else
#define SOM_IMPORTEXPORT_somd
#endif
#endif
SOMEXTERN SOM_IMPORTEXPORT_somd ImplRepository * SOMDLINK SOMD_ImplRepObject;


/*
 * A function to create the ImplRepository class object...
 */
SOMEXTERN SOM_IMPORTEXPORT_somd_implrep SOMClass * SOMLINK ImplRepositoryNewClass(
		integer4 majorVersion,
		integer4 minorVersion);


/*
 * The API 2 ClassData Structures...
 */
SOMEXTERN struct ImplRepositoryClassDataStructure {
	SOMClass *classObject;
	somMToken find_impldef;
	somMToken find_impldef_by_alias;
	somMToken find_impldef2;
	somMToken find_impldef_by_alias2;
	somMToken find_impldef_by_class;
	somMToken add_impldef;
	somMToken update_impldef;
	somMToken delete_impldef;
	somMToken add_class_to_impldef;
	somMToken remove_class_from_impldef;
	somMToken remove_class_from_all;
	somMToken find_classes_by_impldef;
	somMToken implr_get_impl;
	somMToken implr_search_impl;
	somMToken implr_search_class;
	somMToken implr_update_impl;
	somMToken find_all_impldefs;
	somMToken find_all_aliases;
	somMToken add_class_to_all;
	somMToken add_class_with_properties;
} SOMDLINK SOM_IMPORTEXPORT_somd_implrep ImplRepositoryClassData;
SOMEXTERN struct ImplRepositoryCClassDataStructure {
	som3ClassDetailsPtr    parentMtab;
	somDToken              instanceDataToken;
} SOMDLINK SOM_IMPORTEXPORT_somd_implrep ImplRepositoryCClassData;


/*
 * Class Object and Method Token Macros
 */
#define _SOMCLASS_ImplRepository (ImplRepositoryClassData.classObject)
#ifndef SOMGD_ImplRepository
    #if (defined(_ImplRepository) || defined(__ImplRepository))
        #undef _ImplRepository
        #undef __ImplRepository
        #define SOMGD_ImplRepository 1
    #else
        #define _ImplRepository _SOMCLASS_ImplRepository
    #endif /* _ImplRepository */
#endif /* SOMGD_ImplRepository */
#define ImplRepository_classObj _SOMCLASS_ImplRepository
#define _SOMMTOKEN_ImplRepository(method) ((somMToken)ImplRepositoryClassData.method)

/*
 * -- Typedefs for ImplRepository Method Procedures
 */
SOMEXTERN {
typedef ImplementationDef*   SOMLINK somTP_ImplRepository_find_impldef(ImplRepository *somSelf, Environment *ev, 
		ImplId implid);
typedef somTP_ImplRepository_find_impldef *somTD_ImplRepository_find_impldef;
typedef ImplementationDef*   SOMLINK somTP_ImplRepository_find_impldef_by_alias(ImplRepository *somSelf, Environment *ev, 
		string alias_name);
typedef somTP_ImplRepository_find_impldef_by_alias *somTD_ImplRepository_find_impldef_by_alias;
typedef ORBStatus   SOMLINK somTP_ImplRepository_find_all_aliases(ImplRepository *somSelf, Environment *ev, 
		_IDL_SEQUENCE_string* impl_aliases);
typedef somTP_ImplRepository_find_all_aliases *somTD_ImplRepository_find_all_aliases;
typedef ORBStatus   SOMLINK somTP_ImplRepository_find_all_impldefs(ImplRepository *somSelf, Environment *ev, 
		_IDL_SEQUENCE_ImplementationDef* outimpldefs);
typedef somTP_ImplRepository_find_all_impldefs *somTD_ImplRepository_find_all_impldefs;
typedef ORBStatus   SOMLINK somTP_ImplRepository_add_impldef(ImplRepository *somSelf, Environment *ev, 
		ImplementationDef* impldef);
typedef somTP_ImplRepository_add_impldef *somTD_ImplRepository_add_impldef;
typedef ORBStatus   SOMLINK somTP_ImplRepository_update_impldef(ImplRepository *somSelf, Environment *ev, 
		ImplementationDef* impldef);
typedef somTP_ImplRepository_update_impldef *somTD_ImplRepository_update_impldef;
typedef ORBStatus   SOMLINK somTP_ImplRepository_delete_impldef(ImplRepository *somSelf, Environment *ev, 
		ImplId implid);
typedef somTP_ImplRepository_delete_impldef *somTD_ImplRepository_delete_impldef;
typedef _IDL_SEQUENCE_ImplementationDef   SOMLINK somTP_ImplRepository_find_impldef_by_class(ImplRepository *somSelf, Environment *ev, 
		string classname);
typedef somTP_ImplRepository_find_impldef_by_class *somTD_ImplRepository_find_impldef_by_class;
typedef void   SOMLINK somTP_ImplRepository_add_class_to_impldef(ImplRepository *somSelf, Environment *ev, 
		ImplId implid, 
		string classname);
typedef somTP_ImplRepository_add_class_to_impldef *somTD_ImplRepository_add_class_to_impldef;
typedef void   SOMLINK somTP_ImplRepository_remove_class_from_impldef(ImplRepository *somSelf, Environment *ev, 
		ImplId implid, 
		string classname);
typedef somTP_ImplRepository_remove_class_from_impldef *somTD_ImplRepository_remove_class_from_impldef;
typedef void   SOMLINK somTP_ImplRepository_remove_class_from_all(ImplRepository *somSelf, Environment *ev, 
		string classname);
typedef somTP_ImplRepository_remove_class_from_all *somTD_ImplRepository_remove_class_from_all;
typedef _IDL_SEQUENCE_string   SOMLINK somTP_ImplRepository_find_classes_by_impldef(ImplRepository *somSelf, Environment *ev, 
		ImplId implid);
typedef somTP_ImplRepository_find_classes_by_impldef *somTD_ImplRepository_find_classes_by_impldef;
typedef ORBStatus   SOMLINK somTP_ImplRepository_add_class_to_all(ImplRepository *somSelf, Environment *ev, 
		string classname);
typedef somTP_ImplRepository_add_class_to_all *somTD_ImplRepository_add_class_to_all;
typedef ORBStatus   SOMLINK somTP_ImplRepository_add_class_with_properties(ImplRepository *somSelf, Environment *ev, 
		ImplId implid, 
		string classname, 
		ImplRepository_PVList* pvl);
typedef somTP_ImplRepository_add_class_with_properties *somTD_ImplRepository_add_class_with_properties;

/*
 * -- Typedefs for Reintroduced Wrapper Methods
 */
typedef void   SOMLINK somTP_ImplRepository_somDefaultInit(ImplRepository *somSelf, 
		som3InitCtrl* ctrl);
typedef somTP_ImplRepository_somDefaultInit *somTD_ImplRepository_somDefaultInit;
typedef void   SOMLINK somTP_ImplRepository_somDestruct(ImplRepository *somSelf, 
		octet doFree, 
		som3DestructCtrl* ctrl);
typedef somTP_ImplRepository_somDestruct *somTD_ImplRepository_somDestruct;
typedef void   SOMLINK somTP_ImplRepository_somDefaultCopyInit(ImplRepository *somSelf, 
		som3InitCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_ImplRepository_somDefaultCopyInit *somTD_ImplRepository_somDefaultCopyInit;
typedef ImplRepository*   SOMLINK somTP_ImplRepository_somDefaultAssign(ImplRepository *somSelf, 
		som3AssignCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_ImplRepository_somDefaultAssign *somTD_ImplRepository_somDefaultAssign;
typedef void   SOMLINK somTP_ImplRepository_somDefaultConstCopyInit(ImplRepository *somSelf, 
		som3InitCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_ImplRepository_somDefaultConstCopyInit *somTD_ImplRepository_somDefaultConstCopyInit;
typedef void   SOMLINK somTP_ImplRepository_somDefaultVCopyInit(ImplRepository *somSelf, 
		som3InitCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_ImplRepository_somDefaultVCopyInit *somTD_ImplRepository_somDefaultVCopyInit;
typedef void   SOMLINK somTP_ImplRepository_somDefaultConstVCopyInit(ImplRepository *somSelf, 
		som3InitCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_ImplRepository_somDefaultConstVCopyInit *somTD_ImplRepository_somDefaultConstVCopyInit;
typedef ImplRepository*   SOMLINK somTP_ImplRepository_somDefaultConstAssign(ImplRepository *somSelf, 
		som3AssignCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_ImplRepository_somDefaultConstAssign *somTD_ImplRepository_somDefaultConstAssign;
typedef ImplRepository*   SOMLINK somTP_ImplRepository_somDefaultVAssign(ImplRepository *somSelf, 
		som3AssignCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_ImplRepository_somDefaultVAssign *somTD_ImplRepository_somDefaultVAssign;
typedef ImplRepository*   SOMLINK somTP_ImplRepository_somDefaultConstVAssign(ImplRepository *somSelf, 
		som3AssignCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_ImplRepository_somDefaultConstVAssign *somTD_ImplRepository_somDefaultConstVAssign;
typedef void   SOMLINK somTP_ImplRepository_somInit(ImplRepository *somSelf);
typedef somTP_ImplRepository_somInit *somTD_ImplRepository_somInit;
typedef void   SOMLINK somTP_ImplRepository_somUninit(ImplRepository *somSelf);
typedef somTP_ImplRepository_somUninit *somTD_ImplRepository_somUninit;
typedef void   SOMLINK somTP_ImplRepository_somFree(ImplRepository *somSelf);
typedef somTP_ImplRepository_somFree *somTD_ImplRepository_somFree;
typedef SOMClass*   SOMLINK somTP_ImplRepository_somGetClass(ImplRepository *somSelf);
typedef somTP_ImplRepository_somGetClass *somTD_ImplRepository_somGetClass;
typedef string   SOMLINK somTP_ImplRepository_somGetClassName(ImplRepository *somSelf);
typedef somTP_ImplRepository_somGetClassName *somTD_ImplRepository_somGetClassName;
typedef long   SOMLINK somTP_ImplRepository_somGetSize(ImplRepository *somSelf);
typedef somTP_ImplRepository_somGetSize *somTD_ImplRepository_somGetSize;
typedef boolean   SOMLINK somTP_ImplRepository_somIsA(ImplRepository *somSelf, 
		SOMClass* aClassObj);
typedef somTP_ImplRepository_somIsA *somTD_ImplRepository_somIsA;
typedef boolean   SOMLINK somTP_ImplRepository_somIsInstanceOf(ImplRepository *somSelf, 
		SOMClass* aClassObj);
typedef somTP_ImplRepository_somIsInstanceOf *somTD_ImplRepository_somIsInstanceOf;
typedef boolean   SOMLINK somTP_ImplRepository_somRespondsTo(ImplRepository *somSelf, 
		somId mId);
typedef somTP_ImplRepository_somRespondsTo *somTD_ImplRepository_somRespondsTo;
typedef boolean   SOMLINK somTP_ImplRepository_somDispatch(ImplRepository *somSelf, 
		somToken* retValue, 
		somId methodId, 
		va_list ap);
typedef somTP_ImplRepository_somDispatch *somTD_ImplRepository_somDispatch;
typedef boolean   SOMLINK somTP_ImplRepository_somClassDispatch(ImplRepository *somSelf, 
		SOMClass* clsObj, 
		somToken* retValue, 
		somId methodId, 
		va_list ap);
typedef somTP_ImplRepository_somClassDispatch *somTD_ImplRepository_somClassDispatch;
typedef boolean   SOMLINK somTP_ImplRepository_somCastObj(ImplRepository *somSelf, 
		SOMClass* castedCls);
typedef somTP_ImplRepository_somCastObj *somTD_ImplRepository_somCastObj;
typedef boolean   SOMLINK somTP_ImplRepository_somResetObj(ImplRepository *somSelf);
typedef somTP_ImplRepository_somResetObj *somTD_ImplRepository_somResetObj;
typedef ImplRepository*   SOMLINK somTP_ImplRepository_somPrintSelf(ImplRepository *somSelf);
typedef somTP_ImplRepository_somPrintSelf *somTD_ImplRepository_somPrintSelf;
typedef void   SOMLINK somTP_ImplRepository_somDumpSelf(ImplRepository *somSelf, 
		long level);
typedef somTP_ImplRepository_somDumpSelf *somTD_ImplRepository_somDumpSelf;
typedef void   SOMLINK somTP_ImplRepository_somDumpSelfInt(ImplRepository *somSelf, 
		long level);
typedef somTP_ImplRepository_somDumpSelfInt *somTD_ImplRepository_somDumpSelfInt;
}

#endif /* ImplRepository_API */


/*
 * -- The C++ Wrapper Class for ImplRepository
 */
class ImplRepository : public SOMObject
{
/*
 *   CLASS SPECIFICATION FOR IMPLEMENTATION REPOSITORY
 *   The ImplRepository class contains methods which add/update/list/delete
 *   information from both the Implementation repository and the Name service.
 */
public:

// ImplRepository::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 (!_ImplRepository) ImplRepositoryNewClass(ImplRepository_MajorVersion,ImplRepository_MinorVersion);
   return (void*)
   (((somTD_SOMClass_somNewNoInit)(SOMClassClassData.somNewNoInit))
         ((SOMClass *)((void*)_ImplRepository)));
}

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

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

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

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


/* method: find_impldef */
ImplementationDef*   find_impldef(Environment *ev, 
		ImplId implid)
{
/*
 *  This method searches the Implementation Repository and returns
 *  an ImplementationDef object with the specified implid.
 *  OWNERSHIP of the return parameter is transferred to the caller.
 *  The following minor codes are returned in the Environment structure:
 *          1. SOMDERROR_NoMemory
 *          2. SOMDERROR_BadParm
 *          3. SOMDERROR_NoDBInit
 *          4. SOMDERROR_NoDBAvailable
 *          5. SOMDERROR_AccessDenied
 *          6. SOMDERROR_ClassNotFound
 */
   return 	(
	 SOM_TestCls(this,_SOMCLASS_ImplRepository),
	 ((somTD_ImplRepository_find_impldef)(ImplRepositoryClassData.find_impldef))(((ImplRepository *)((void *)this)), ev,implid)
	);
}


/* method: find_impldef_by_alias */
ImplementationDef*   find_impldef_by_alias(Environment *ev, 
		string alias_name)
{
/*
 *  This method searches the Implementation Repository and returns
 *  an ImplementationDef object with the specified name (alias).
 *  OWNERSHIP of the return parameter is transferred to the caller.
 *  The following minor codes are returned in the Environment structure:
 *          1. SOMDERROR_NoMemory
 *          2. SOMDERROR_BadParm
 *          3. SOMDERROR_NoDBInit
 *          4. SOMDERROR_NoDBAvailable
 *          5. SOMDERROR_AccessDenied
 *          6. SOMDERROR_ClassNotFound
 */
   return 	(
	 SOM_TestCls(this,_SOMCLASS_ImplRepository),
	 ((somTD_ImplRepository_find_impldef_by_alias)(ImplRepositoryClassData.find_impldef_by_alias))(((ImplRepository *)((void *)this)), ev,alias_name)
	);
}


/* method: find_all_aliases */
ORBStatus   find_all_aliases(Environment *ev, 
		_IDL_SEQUENCE_string* impl_aliases)
{
/*
 *  This method searches the Implementation Repository and returns
 *  a sequence of impl_alias associated with all the impldef objects
 *  stored in the repository.
 *  The structure representing the sequence is created by the caller.
 *  OWNERSHIP of the _buffer field and every string in the buffer is
 *  transferred to the caller.
 *  The following minor codes are returned in the Environment structure:
 *          1. SOMDERROR_NoMemory
 *          2. SOMDERROR_BadParm
 *          3. SOMDERROR_NoDBInit
 *          4. SOMDERROR_NoDBAvailable
 *          5. SOMDERROR_AccessDenied
 */
   return 	(
	 SOM_TestCls(this,_SOMCLASS_ImplRepository),
	 ((somTD_ImplRepository_find_all_aliases)(ImplRepositoryClassData.find_all_aliases))(((ImplRepository *)((void *)this)), ev,impl_aliases)
	);
}


/* method: find_all_impldefs */
ORBStatus   find_all_impldefs(Environment *ev, 
		_IDL_SEQUENCE_ImplementationDef* outimpldefs)
{
/*
 *  This method searches the Implementation Repository and returns
 *  all the ImplementationDef objects in it.
 *  The structure representing the sequence is created by the caller.
 *  OWNERSHIP of the _buffer field and every ImplementationDef object in
 *  the buffer is transferred to the caller.
 *  The following minor codes are returned in the Environment structure:
 *          1. SOMDERROR_NoMemory
 *          2. SOMDERROR_BadParm
 *          3. SOMDERROR_NoDBInit
 *          4. SOMDERROR_NoDBAvailable
 *          5. SOMDERROR_AccessDenied
 *          6. SOMDERROR_ClassNotFound
 */
   return 	(
	 SOM_TestCls(this,_SOMCLASS_ImplRepository),
	 ((somTD_ImplRepository_find_all_impldefs)(ImplRepositoryClassData.find_all_impldefs))(((ImplRepository *)((void *)this)), ev,outimpldefs)
	);
}


/* method: add_impldef */
ORBStatus   add_impldef(Environment *ev, 
		ImplementationDef* impldef)
{
/*
 *  This method inserts an ImplementationDef object into the Implementation
 *  Repository. Also, a default class value is associated with this impl_id
 *  with the Name server if it is available.
 *  The following minor codes are returned in the Environment structure:
 *           1. SOMDERROR_NoMemory
 *           2. SOMDERROR_UnknownError
 *           3. SOMDERROR_BadParm
 *           4. SOMDERROR_NoDBInit
 *           5. SOMDERROR_NoDBAvailable
 *           6. SOMDERROR_AccessDenied
 *           7. SOMDERROR_DuplicateEntry
 *           8. SOMDERROR_CannotCreateUUID
 *           9. SOMDERROR_NullImplAlias
 *          10. SOMDERROR_NamingNotActive
 */
   return 	(
	 SOM_TestCls(this,_SOMCLASS_ImplRepository),
	 ((somTD_ImplRepository_add_impldef)(ImplRepositoryClassData.add_impldef))(((ImplRepository *)((void *)this)), ev,impldef)
	);
}


/* method: update_impldef */
ORBStatus   update_impldef(Environment *ev, 
		ImplementationDef* impldef)
{
/*
 *  This method replaces an ImplementationDef object in the Implementation
 *  Repository with the supplied object.  The "impl_id" attribute of the
 *  supplied object is used to find the object to replace in the Impl.
 *  Repository. Also, the default value associated with this impl_id
 *  is updated in the Name server if it is available.
 *  The following minor codes are returned in the Environment structure:
 *           1. SOMDERROR_NoMemory
 *           2. SOMDERROR_BadParm
 *           3. SOMDERROR_NoDBInit
 *           4. SOMDERROR_NoDBAvailable
 *           5. SOMDERROR_AccessDenied
 *           6. SOMDERROR_DuplicateEntry
 *           7. SOMDERROR_NullImplAlias
 *           8. SOMDERROR_NamingNotActive
 */
   return 	(
	 SOM_TestCls(this,_SOMCLASS_ImplRepository),
	 ((somTD_ImplRepository_update_impldef)(ImplRepositoryClassData.update_impldef))(((ImplRepository *)((void *)this)), ev,impldef)
	);
}


/* method: delete_impldef */
ORBStatus   delete_impldef(Environment *ev, 
		ImplId implid)
{
/*
 *  This method deletes the ImplementationDef object with the specified
 *  implid from the Implementation Repository.  Also, the default entry
 *  associated with this impl_id is deleted from the Name server if it
 *  is available.
 *  The following minor codes are returned in the Environment structure:
 *           1. SOMDERROR_NoMemory
 *           2. SOMDERROR_EntryNotFound
 *           3. SOMDERROR_NoDBInit
 *           4. SOMDERROR_NoDBAvailable
 *           5. SOMDERROR_AccessDenied
 *           6. SOMDERROR_NullImplId
 *           7. SOMDERROR_NamingNotActive
 */
   return 	(
	 SOM_TestCls(this,_SOMCLASS_ImplRepository),
	 ((somTD_ImplRepository_delete_impldef)(ImplRepositoryClassData.delete_impldef))(((ImplRepository *)((void *)this)), ev,implid)
	);
}


/* method: find_impldef_by_class */
_IDL_SEQUENCE_ImplementationDef   find_impldef_by_class(Environment *ev, 
		string classname)
{
/*
 *  This method with the help of the information in the Implementation
 *  repository and the Name service returns the sequence of
 *  ImplementationDef objects of servers that implement the desired class.
 *  OWNERSHIP for the  _buffer field of the return sequence and
 *  for each element in the sequence is transferred to the caller.
 *  The following minor codes are returned in the Environment structure:
 *          1. SOMDERROR_NoMemory
 *          2. SOMDERROR_BadParm
 *          3. SOMDERROR_NoDBInit
 *          4. SOMDERROR_NoDBAvailable
 *          5. SOMDERROR_AccessDenied
 *          6. SOMDERROR_NamingNotActive
 *          7. SOMDERROR_ClassNotFound
 */
   return 	(
	 SOM_TestCls(this,_SOMCLASS_ImplRepository),
	 ((somTD_ImplRepository_find_impldef_by_class)(ImplRepositoryClassData.find_impldef_by_class))(((ImplRepository *)((void *)this)), ev,classname)
	);
}


/* method: add_class_to_impldef */
void   add_class_to_impldef(Environment *ev, 
		ImplId implid, 
		string classname)
{
/*
 *  This method associates the "classname" with the ImplementationDef
 *  whose id is "implid".  This is meant to indicate that the server
 *  (specified by the ImplementationDef) implements the named class.
 *  The following minor codes are returned in the Environment structure:
 *          1. SOMDERROR_NoMemory
 *          2. SOMDERROR_BadParm
 *          3. SOMDERROR_NoDBInit
 *          4. SOMDERROR_NoDBAvailable
 *          5. SOMDERROR_AccessDenied
 *          6. SOMDERROR_NamingNotActive
 */
   	(
	 SOM_TestCls(this,_SOMCLASS_ImplRepository),
	 ((somTD_ImplRepository_add_class_to_impldef)(ImplRepositoryClassData.add_class_to_impldef))(((ImplRepository *)((void *)this)), ev,implid,classname)
	);
}


/* method: remove_class_from_impldef */
void   remove_class_from_impldef(Environment *ev, 
		ImplId implid, 
		string classname)
{
/*
 *  This method removes the classname from the list of classnames
 *  associated with the ImplementationDef whose id is "implid".
 *  The following minor codes are returned in the Environment structure:
 *          1. SOMDERROR_NoMemory
 *          2. SOMDERROR_BadParm
 *          3. SOMDERROR_NoDBInit
 *          4. SOMDERROR_NoDBAvailable
 *          5. SOMDERROR_AccessDenied
 *          6. SOMDERROR_NamingNotActive
 */
   	(
	 SOM_TestCls(this,_SOMCLASS_ImplRepository),
	 ((somTD_ImplRepository_remove_class_from_impldef)(ImplRepositoryClassData.remove_class_from_impldef))(((ImplRepository *)((void *)this)), ev,implid,classname)
	);
}


/* method: remove_class_from_all */
void   remove_class_from_all(Environment *ev, 
		string classname)
{
/*
 *  This method removes the classname from all the ImplementationDefs.
 *  The following minor codes are returned in the Environment structure:
 *          1. SOMDERROR_NoMemory
 *          2. SOMDERROR_BadParm
 *          3. SOMDERROR_NoDBInit
 *          4. SOMDERROR_NoDBAvailable
 *          5. SOMDERROR_AccessDenied
 *          6. SOMDERROR_NamingNotActive
 */
   	(
	 SOM_TestCls(this,_SOMCLASS_ImplRepository),
	 ((somTD_ImplRepository_remove_class_from_all)(ImplRepositoryClassData.remove_class_from_all))(((ImplRepository *)((void *)this)), ev,classname)
	);
}


/* method: find_classes_by_impldef */
_IDL_SEQUENCE_string   find_classes_by_impldef(Environment *ev, 
		ImplId implid)
{
/*
 *  This method queries the Name service and returns the set of
 *  class names supported by a server with specified "implid".
 *  OWNERSHIP for the _buffer field in the return sequence
 *  and for each element in the sequence is transferred to the caller.
 *  The following minor codes are returned in the Environment structure:
 *          1. SOMDERROR_NoMemory
 *          2. SOMDERROR_BadParm
 *          3. SOMDERROR_NoDBInit
 *          4. SOMDERROR_NoDBAvailable
 *          5. SOMDERROR_AccessDenied
 *          6. SOMDERROR_ClassNotFound
 *          7. SOMDERROR_NamingNotActive
 */
   return 	(
	 SOM_TestCls(this,_SOMCLASS_ImplRepository),
	 ((somTD_ImplRepository_find_classes_by_impldef)(ImplRepositoryClassData.find_classes_by_impldef))(((ImplRepository *)((void *)this)), ev,implid)
	);
}


/* method: add_class_to_all */
ORBStatus   add_class_to_all(Environment *ev, 
		string classname)
{
/*
 *  This method will associate the classname with all ImplementationDef
 *  objects in the repository.
 *  The following minor codes are returned in the Environment structure:
 *          1. SOMDERROR_NoMemory
 *          2. SOMDERROR_BadParm
 *          3. SOMDERROR_NoDBInit
 *          4. SOMDERROR_NoDBAvailable
 *          5. SOMDERROR_AccessDenied
 *          6. SOMDERROR_ClassNotFound
 *          7. SOMDERROR_NamingNotActive
 */
   return 	(
	 SOM_TestCls(this,_SOMCLASS_ImplRepository),
	 ((somTD_ImplRepository_add_class_to_all)(ImplRepositoryClassData.add_class_to_all))(((ImplRepository *)((void *)this)), ev,classname)
	);
}


/* method: add_class_with_properties */
ORBStatus   add_class_with_properties(Environment *ev, 
		ImplId implid, 
		string classname, 
		ImplRepository_PVList* pvl)
{
/*
 *  This method associates the classname with the ImplementationDef
 *  whose id is "implid".  This is meant to indicate that the server
 *  (specified by the ImplementationDef) implements the named class.
 *  In addition, the optional PVList sequenece will associate the
 *  specified properties and values with a class.
 *  The following minor codes are returned in the Environment structure:
 *          1. SOMDERROR_NoMemory
 *          2. SOMDERROR_BadParm
 *          3. SOMDERROR_NoDBInit
 *          4. SOMDERROR_NoDBAvailable
 *          5. SOMDERROR_AccessDenied
 *          6. SOMDERROR_ClassNotFound
 *          7. SOMDERROR_NamingNotActive
 */
   return 	(
	 SOM_TestCls(this,_SOMCLASS_ImplRepository),
	 ((somTD_ImplRepository_add_class_with_properties)(ImplRepositoryClassData.add_class_with_properties))(((ImplRepository *)((void *)this)), ev,implid,classname,pvl)
	);
}


/*
 * 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_ImplRepository_somDefaultInit)(SOMObjectClassData.somDefaultInit))(((ImplRepository *)((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_ImplRepository_somDestruct)(SOMObjectClassData.somDestruct))(((ImplRepository *)((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_ImplRepository_somDefaultCopyInit)(SOMObjectClassData.somDefaultCopyInit))(((ImplRepository *)((void *)this)),ctrl,fromObj)
	);
}


/* method: somDefaultAssign */
ImplRepository*  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_ImplRepository_somDefaultAssign)(SOMObjectClassData.somDefaultAssign))(((ImplRepository *)((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_ImplRepository_somDefaultConstCopyInit)(SOMObjectClassData.somDefaultConstCopyInit))(((ImplRepository *)((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_ImplRepository_somDefaultVCopyInit)(SOMObjectClassData.somDefaultVCopyInit))(((ImplRepository *)((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_ImplRepository_somDefaultConstVCopyInit)(SOMObjectClassData.somDefaultConstVCopyInit))(((ImplRepository *)((void *)this)),ctrl,fromObj)
	);
}


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


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


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


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


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


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


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


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


/* method: somGetSize */
long   somGetSize()
{
/*
 *  Return the size of the receiver.
 */
   return 	(
	 SOM_TestCls(this,_SOMCLASS_SOMObject),
	 ((somTD_ImplRepository_somGetSize)(SOMObjectClassData.somGetSize))(((ImplRepository *)((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_ImplRepository_somIsA)(SOMObjectClassData.somIsA))(((ImplRepository *)((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_ImplRepository_somIsInstanceOf)(SOMObjectClassData.somIsInstanceOf))(((ImplRepository *)((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_ImplRepository_somRespondsTo)(SOMObjectClassData.somRespondsTo))(((ImplRepository *)((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_ImplRepository_somDispatch)(SOMObjectClassData.somDispatch))(((ImplRepository *)((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_ImplRepository_somDispatch)(SOMObjectClassData.somDispatch))(((ImplRepository *)((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_ImplRepository_somClassDispatch)(SOMObjectClassData.somClassDispatch))(((ImplRepository *)((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_ImplRepository_somClassDispatch)(SOMObjectClassData.somClassDispatch))(((ImplRepository *)((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_ImplRepository_somCastObj)(SOMObjectClassData.somCastObj))(((ImplRepository *)((void *)this)),castedCls)
	);
}


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


/* method: somPrintSelf */
ImplRepository*  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_ImplRepository_somPrintSelf)(SOMObjectClassData.somPrintSelf))(((ImplRepository *)((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_ImplRepository_somDumpSelf)(SOMObjectClassData.somDumpSelf))(((ImplRepository *)((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_ImplRepository_somDumpSelfInt)(SOMObjectClassData.somDumpSelfInt))(((ImplRepository *)((void *)this)),level)
	);
}



};   /* ImplRepository */



#endif       /* SOM_ImplRepository_xh */
