
/*
 * This file was generated by the SOM Compiler.
 * FileName: F:\BUILD\NT\ship\include\mlink.xh.
 * Generated using:
 *     SOM Precompiler somipc: Development
 *     SOM Emitter emitxh.dll: Development
 */

#ifndef SOM_somf_MLinkable_xh
#define SOM_somf_MLinkable_xh

class somf_MLinkable;

#define somf_MLinkable_MajorVersion 2
#define somf_MLinkable_MinorVersion 1

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

/* C++ parent defs */
#ifndef SOM_SOMObject_xh
#include <somobj.xh>
#endif

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

/*
 * Start of user-defined types:
 */
class SOMClass;
class SOMObject;

/*
 * End of user-defined types.
 */

/* A procedure to create the somf_MLinkable Class */
SOMEXTERN
#if (defined(SOM_Module_mlink_Source) || defined(somf_MLinkable_Class_Source) || defined (SOM_DONT_IMPORT_CLASS_somf_MLinkable))
WIN32_DLLEXPORT
#else
WIN32_DLLIMPORT
#endif
SOMClass * SOMLINK somf_MLinkableNewClass(
		integer4,
		integer4 );

/* The API to the somf_MLinkable class object, and the methods it introduces. */
SOMEXTERN struct somf_MLinkableClassDataStructure {
	SOMClass *classObject;
	somMToken somfGetNext;
	somMToken somfSetNext;
	somMToken somfGetPrevious;
	somMToken somfSetPrevious;
	somMToken somfMLinkableInit;
}
#if !(defined(SOM_Module_mlink_Source) || defined(somf_MLinkable_Class_Source) || defined (SOM_DONT_IMPORT_CLASS_somf_MLinkable))
WIN32_DLLIMPORT
#elif defined(_MSC_VER)||defined(_WIN32_DECL_PROTO)
WIN32_DLLEXPORT
#endif
SOMDLINK somf_MLinkableClassData;
#define _somf_MLinkable somf_MLinkableClassData.classObject

/* The API to parentMtabs for somf_MLinkable, and the instance data it introduces. */
SOMEXTERN struct somf_MLinkableCClassDataStructure {
	somMethodTabs parentMtab;
	somDToken              instanceDataToken;
}
#if !(defined(SOM_Module_mlink_Source) || defined(somf_MLinkable_Class_Source) || defined (SOM_DONT_IMPORT_CLASS_somf_MLinkable))
WIN32_DLLIMPORT
#elif defined(_MSC_VER)||defined(_WIN32_DECL_PROTO)
WIN32_DLLEXPORT
#endif
SOMDLINK somf_MLinkableCClassData;

/*
 * -- Typedefs for somf_MLinkable Method Procedures
 */
extern "C" {
typedef somf_MLinkable*   SOMLINK somTP_somf_MLinkable_somfMLinkableInit(somf_MLinkable *somSelf, Environment *ev,
		somf_MLinkable* n,
		somf_MLinkable* p);
typedef somTP_somf_MLinkable_somfMLinkableInit *somTD_somf_MLinkable_somfMLinkableInit;
typedef somf_MLinkable*   SOMLINK somTP_somf_MLinkable_somfGetNext(somf_MLinkable *somSelf, Environment *ev);
typedef somTP_somf_MLinkable_somfGetNext *somTD_somf_MLinkable_somfGetNext;
typedef void   SOMLINK somTP_somf_MLinkable_somfSetNext(somf_MLinkable *somSelf, Environment *ev,
		somf_MLinkable* aLink);
typedef somTP_somf_MLinkable_somfSetNext *somTD_somf_MLinkable_somfSetNext;
typedef somf_MLinkable*   SOMLINK somTP_somf_MLinkable_somfGetPrevious(somf_MLinkable *somSelf, Environment *ev);
typedef somTP_somf_MLinkable_somfGetPrevious *somTD_somf_MLinkable_somfGetPrevious;
typedef void   SOMLINK somTP_somf_MLinkable_somfSetPrevious(somf_MLinkable *somSelf, Environment *ev,
		somf_MLinkable* aLink);
typedef somTP_somf_MLinkable_somfSetPrevious *somTD_somf_MLinkable_somfSetPrevious;

/*
 * -- Typedefs for Reintroduced Wrapper Methods
 */
typedef void   SOMLINK somTP_somf_MLinkable_somDefaultInit(somf_MLinkable *somSelf,
		somInitCtrl* ctrl);
typedef somTP_somf_MLinkable_somDefaultInit *somTD_somf_MLinkable_somDefaultInit;
typedef void   SOMLINK somTP_somf_MLinkable_somDestruct(somf_MLinkable *somSelf,
		octet doFree,
		somDestructCtrl* ctrl);
typedef somTP_somf_MLinkable_somDestruct *somTD_somf_MLinkable_somDestruct;
typedef void   SOMLINK somTP_somf_MLinkable_somDefaultCopyInit(somf_MLinkable *somSelf,
		somInitCtrl* ctrl,
		SOMObject* fromObj);
typedef somTP_somf_MLinkable_somDefaultCopyInit *somTD_somf_MLinkable_somDefaultCopyInit;
typedef somf_MLinkable*   SOMLINK somTP_somf_MLinkable_somDefaultAssign(somf_MLinkable *somSelf,
		somAssignCtrl* ctrl,
		SOMObject* fromObj);
typedef somTP_somf_MLinkable_somDefaultAssign *somTD_somf_MLinkable_somDefaultAssign;
typedef void   SOMLINK somTP_somf_MLinkable_somDefaultConstCopyInit(somf_MLinkable *somSelf,
		somInitCtrl* ctrl,
		SOMObject* fromObj);
typedef somTP_somf_MLinkable_somDefaultConstCopyInit *somTD_somf_MLinkable_somDefaultConstCopyInit;
typedef void   SOMLINK somTP_somf_MLinkable_somDefaultVCopyInit(somf_MLinkable *somSelf,
		somInitCtrl* ctrl,
		SOMObject* fromObj);
typedef somTP_somf_MLinkable_somDefaultVCopyInit *somTD_somf_MLinkable_somDefaultVCopyInit;
typedef void   SOMLINK somTP_somf_MLinkable_somDefaultConstVCopyInit(somf_MLinkable *somSelf,
		somInitCtrl* ctrl,
		SOMObject* fromObj);
typedef somTP_somf_MLinkable_somDefaultConstVCopyInit *somTD_somf_MLinkable_somDefaultConstVCopyInit;
typedef somf_MLinkable*   SOMLINK somTP_somf_MLinkable_somDefaultConstAssign(somf_MLinkable *somSelf,
		somAssignCtrl* ctrl,
		SOMObject* fromObj);
typedef somTP_somf_MLinkable_somDefaultConstAssign *somTD_somf_MLinkable_somDefaultConstAssign;
typedef somf_MLinkable*   SOMLINK somTP_somf_MLinkable_somDefaultVAssign(somf_MLinkable *somSelf,
		somAssignCtrl* ctrl,
		SOMObject* fromObj);
typedef somTP_somf_MLinkable_somDefaultVAssign *somTD_somf_MLinkable_somDefaultVAssign;
typedef somf_MLinkable*   SOMLINK somTP_somf_MLinkable_somDefaultConstVAssign(somf_MLinkable *somSelf,
		somAssignCtrl* ctrl,
		SOMObject* fromObj);
typedef somTP_somf_MLinkable_somDefaultConstVAssign *somTD_somf_MLinkable_somDefaultConstVAssign;
typedef void   SOMLINK somTP_somf_MLinkable_somInit(somf_MLinkable *somSelf);
typedef somTP_somf_MLinkable_somInit *somTD_somf_MLinkable_somInit;
typedef void   SOMLINK somTP_somf_MLinkable_somFree(somf_MLinkable *somSelf);
typedef somTP_somf_MLinkable_somFree *somTD_somf_MLinkable_somFree;
typedef void   SOMLINK somTP_somf_MLinkable_somUninit(somf_MLinkable *somSelf);
typedef somTP_somf_MLinkable_somUninit *somTD_somf_MLinkable_somUninit;
typedef SOMClass*   SOMLINK somTP_somf_MLinkable_somGetClass(somf_MLinkable *somSelf);
typedef somTP_somf_MLinkable_somGetClass *somTD_somf_MLinkable_somGetClass;
typedef string   SOMLINK somTP_somf_MLinkable_somGetClassName(somf_MLinkable *somSelf);
typedef somTP_somf_MLinkable_somGetClassName *somTD_somf_MLinkable_somGetClassName;
typedef long   SOMLINK somTP_somf_MLinkable_somGetSize(somf_MLinkable *somSelf);
typedef somTP_somf_MLinkable_somGetSize *somTD_somf_MLinkable_somGetSize;
typedef boolean   SOMLINK somTP_somf_MLinkable_somIsA(somf_MLinkable *somSelf,
		SOMClass* aClassObj);
typedef somTP_somf_MLinkable_somIsA *somTD_somf_MLinkable_somIsA;
typedef boolean   SOMLINK somTP_somf_MLinkable_somIsInstanceOf(somf_MLinkable *somSelf,
		SOMClass* aClassObj);
typedef somTP_somf_MLinkable_somIsInstanceOf *somTD_somf_MLinkable_somIsInstanceOf;
typedef boolean   SOMLINK somTP_somf_MLinkable_somRespondsTo(somf_MLinkable *somSelf,
		somId mId);
typedef somTP_somf_MLinkable_somRespondsTo *somTD_somf_MLinkable_somRespondsTo;
typedef boolean   SOMLINK somTP_somf_MLinkable_somDispatch(somf_MLinkable *somSelf,
		somToken* retValue,
		somId methodId,
		va_list ap);
typedef somTP_somf_MLinkable_somDispatch *somTD_somf_MLinkable_somDispatch;
typedef boolean   SOMLINK somTP_somf_MLinkable_somClassDispatch(somf_MLinkable *somSelf,
		SOMClass* clsObj,
		somToken* retValue,
		somId methodId,
		va_list ap);
typedef somTP_somf_MLinkable_somClassDispatch *somTD_somf_MLinkable_somClassDispatch;
typedef boolean   SOMLINK somTP_somf_MLinkable_somCastObj(somf_MLinkable *somSelf,
		SOMClass* cls);
typedef somTP_somf_MLinkable_somCastObj *somTD_somf_MLinkable_somCastObj;
typedef boolean   SOMLINK somTP_somf_MLinkable_somResetObj(somf_MLinkable *somSelf);
typedef somTP_somf_MLinkable_somResetObj *somTD_somf_MLinkable_somResetObj;
typedef SOMObject*   SOMLINK somTP_somf_MLinkable_somPrintSelf(somf_MLinkable *somSelf);
typedef somTP_somf_MLinkable_somPrintSelf *somTD_somf_MLinkable_somPrintSelf;
typedef void   SOMLINK somTP_somf_MLinkable_somDumpSelf(somf_MLinkable *somSelf,
		long level);
typedef somTP_somf_MLinkable_somDumpSelf *somTD_somf_MLinkable_somDumpSelf;
typedef void   SOMLINK somTP_somf_MLinkable_somDumpSelfInt(somf_MLinkable *somSelf,
		long level);
typedef somTP_somf_MLinkable_somDumpSelfInt *somTD_somf_MLinkable_somDumpSelfInt;
}

#endif /* somf_MLinkable_API */


/*
 * -- This emitter believes that method thunks are unavailable,
 * -- so somResolve will be called.
 */
#undef somresolve_
#define somresolve_(obj,mToken) (somResolve(obj,mToken))

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

// somf_MLinkable::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 (!_somf_MLinkable) somf_MLinkableNewClass(somf_MLinkable_MajorVersion,somf_MLinkable_MinorVersion);
   return (void*)
      SOM_Resolve(_somf_MLinkable,SOMClass,somNewNoInit)
         ((SOMClass *)((void*)_somf_MLinkable));
}

// somf_MLinkable::delete uses somDestruct.
void operator delete(void * obj)
{
   if (obj && *(void**)obj) {
      SOM_Resolve(obj,SOMObject,somDestruct)
         ((SOMObject*)obj, 1, 0);
   }
}

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

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

somf_MLinkable(const somf_MLinkable* fromObj)
{
   if (*(void**)this != 
       ((somParentMtabStructPtr)
        (somf_MLinkableCClassData.parentMtab))->mtab)
      return;
   ((SOMObject*)((void*)this))->somDefaultConstCopyInit(0,((SOMObject*)((void*)fromObj)));
}


/* method: somfMLinkableInit */
somf_MLinkable*   somfMLinkableInit(Environment *ev,
		somf_MLinkable* n,
		somf_MLinkable* p)
{
#ifdef SOMCHKEXCEPT
   somf_MLinkable* __somResult = 
      SOM_ResolveD(this,somf_MLinkable,somf_MLinkable,somfMLinkableInit)
	(this, ev,n,p);
   if ( ev->_major != NO_EXCEPTION )
      SOMCHKEXCEPT;
   return __somResult;
#else
   return SOM_ResolveD(this,somf_MLinkable,somf_MLinkable,somfMLinkableInit)
	(this, ev,n,p);
#endif
}


/* method: somfGetNext */
somf_MLinkable*   somfGetNext(Environment *ev)
{
#ifdef SOMCHKEXCEPT
   somf_MLinkable* __somResult = 
      SOM_ResolveD(this,somf_MLinkable,somf_MLinkable,somfGetNext)
	(this, ev);
   if ( ev->_major != NO_EXCEPTION )
      SOMCHKEXCEPT;
   return __somResult;
#else
   return SOM_ResolveD(this,somf_MLinkable,somf_MLinkable,somfGetNext)
	(this, ev);
#endif
}


/* method: somfSetNext */
void   somfSetNext(Environment *ev,
		somf_MLinkable* aLink)
{
   SOM_ResolveD(this,somf_MLinkable,somf_MLinkable,somfSetNext)
	(this, ev,aLink);
#ifdef SOMCHKEXCEPT
   if ( ev->_major != NO_EXCEPTION )
      SOMCHKEXCEPT;
#endif
}


/* method: somfGetPrevious */
somf_MLinkable*   somfGetPrevious(Environment *ev)
{
#ifdef SOMCHKEXCEPT
   somf_MLinkable* __somResult = 
      SOM_ResolveD(this,somf_MLinkable,somf_MLinkable,somfGetPrevious)
	(this, ev);
   if ( ev->_major != NO_EXCEPTION )
      SOMCHKEXCEPT;
   return __somResult;
#else
   return SOM_ResolveD(this,somf_MLinkable,somf_MLinkable,somfGetPrevious)
	(this, ev);
#endif
}


/* method: somfSetPrevious */
void   somfSetPrevious(Environment *ev,
		somf_MLinkable* aLink)
{
   SOM_ResolveD(this,somf_MLinkable,somf_MLinkable,somfSetPrevious)
	(this, ev,aLink);
#ifdef SOMCHKEXCEPT
   if ( ev->_major != NO_EXCEPTION )
      SOMCHKEXCEPT;
#endif
}


/*
 * Reintroduce inherited methods
 */

/* initializer method: somDefaultInit */
void   somDefaultInit(somInitCtrl* ctrl)
{
   SOM_ResolveD(this,somf_MLinkable,SOMObject,somDefaultInit)
	(this,ctrl);
}


/* method: somDestruct */
void   somDestruct(octet doFree,
		somDestructCtrl* ctrl)
{
   SOM_ResolveD(this,somf_MLinkable,SOMObject,somDestruct)
	(this,doFree,ctrl);
}


/* initializer method: somDefaultCopyInit */
void   somDefaultCopyInit(somInitCtrl* ctrl,
		SOMObject* fromObj)
{
   SOM_ResolveD(this,somf_MLinkable,SOMObject,somDefaultCopyInit)
	(this,ctrl,fromObj);
}


/* method: somDefaultAssign */
somf_MLinkable*  somDefaultAssign(somAssignCtrl* ctrl,
		SOMObject* fromObj)
{
   return SOM_ResolveD(this,somf_MLinkable,SOMObject,somDefaultAssign)
	(this,ctrl,fromObj);
}


/* initializer method: somDefaultConstCopyInit */
void   somDefaultConstCopyInit(somInitCtrl* ctrl,
		SOMObject* fromObj)
{
   SOM_ResolveD(this,somf_MLinkable,SOMObject,somDefaultConstCopyInit)
	(this,ctrl,fromObj);
}


/* initializer method: somDefaultVCopyInit */
void   somDefaultVCopyInit(somInitCtrl* ctrl,
		SOMObject* fromObj)
{
   SOM_ResolveD(this,somf_MLinkable,SOMObject,somDefaultVCopyInit)
	(this,ctrl,fromObj);
}


/* initializer method: somDefaultConstVCopyInit */
void   somDefaultConstVCopyInit(somInitCtrl* ctrl,
		SOMObject* fromObj)
{
   SOM_ResolveD(this,somf_MLinkable,SOMObject,somDefaultConstVCopyInit)
	(this,ctrl,fromObj);
}


/* method: somDefaultConstAssign */
somf_MLinkable*  somDefaultConstAssign(somAssignCtrl* ctrl,
		SOMObject* fromObj)
{
   return SOM_ResolveD(this,somf_MLinkable,SOMObject,somDefaultConstAssign)
	(this,ctrl,fromObj);
}


/* method: somDefaultVAssign */
somf_MLinkable*  somDefaultVAssign(somAssignCtrl* ctrl,
		SOMObject* fromObj)
{
   return SOM_ResolveD(this,somf_MLinkable,SOMObject,somDefaultVAssign)
	(this,ctrl,fromObj);
}


/* method: somDefaultConstVAssign */
somf_MLinkable*  somDefaultConstVAssign(somAssignCtrl* ctrl,
		SOMObject* fromObj)
{
   return SOM_ResolveD(this,somf_MLinkable,SOMObject,somDefaultConstVAssign)
	(this,ctrl,fromObj);
}


/* method: somInit */
void   somInit()
{
   SOM_ResolveD(this,somf_MLinkable,SOMObject,somInit)
	(this);
}


/* method: somFree */
void   somFree()
{
   SOM_ResolveD(this,somf_MLinkable,SOMObject,somFree)
	(this);
}


/* method: somUninit */
void   somUninit()
{
   SOM_ResolveD(this,somf_MLinkable,SOMObject,somUninit)
	(this);
}


/* method: somGetClass */
SOMClass*   somGetClass()
{
   return SOM_ResolveD(this,somf_MLinkable,SOMObject,somGetClass)
	(this);
}


/* method: somGetClassName */
string   somGetClassName()
{
   return SOM_ResolveD(this,somf_MLinkable,SOMObject,somGetClassName)
	(this);
}


/* method: somGetSize */
long   somGetSize()
{
   return SOM_ResolveD(this,somf_MLinkable,SOMObject,somGetSize)
	(this);
}


/* method: somIsA */
boolean   somIsA(SOMClass* aClassObj)
{
   return SOM_ResolveD(this,somf_MLinkable,SOMObject,somIsA)
	(this,aClassObj);
}


/* method: somIsInstanceOf */
boolean   somIsInstanceOf(SOMClass* aClassObj)
{
   return SOM_ResolveD(this,somf_MLinkable,SOMObject,somIsInstanceOf)
	(this,aClassObj);
}


/* method: somRespondsTo */
boolean   somRespondsTo(somId mId)
{
   return SOM_ResolveD(this,somf_MLinkable,SOMObject,somRespondsTo)
	(this,mId);
}


/* va_list method: somDispatch */
/* the va_list invocation form */
boolean   somf_MLinkable_somDispatch(somToken* retValue,
		somId methodId,
		va_list ap)
{
return SOM_ResolveD(this,somf_MLinkable,SOMObject,somDispatch)
	(this,retValue,methodId,ap);
}

/* the varargs invocation form */
boolean   somDispatch(somToken* retValue,
		somId methodId,
		...)
{
   va_list ap;
   va_start(ap, methodId);
   boolean __somResult = 
      SOM_ResolveD(this,somf_MLinkable,SOMObject,somDispatch)
	(this,retValue,methodId,ap);
   va_end(ap);
   return __somResult;
}


/* va_list method: somClassDispatch */
/* the va_list invocation form */
boolean   somf_MLinkable_somClassDispatch(SOMClass* clsObj,
		somToken* retValue,
		somId methodId,
		va_list ap)
{
return SOM_ResolveD(this,somf_MLinkable,SOMObject,somClassDispatch)
	(this,clsObj,retValue,methodId,ap);
}

/* the varargs invocation form */
boolean   somClassDispatch(SOMClass* clsObj,
		somToken* retValue,
		somId methodId,
		...)
{
   va_list ap;
   va_start(ap, methodId);
   boolean __somResult = 
      SOM_ResolveD(this,somf_MLinkable,SOMObject,somClassDispatch)
	(this,clsObj,retValue,methodId,ap);
   va_end(ap);
   return __somResult;
}


/* method: somCastObj */
boolean   somCastObj(SOMClass* cls)
{
   return SOM_ResolveD(this,somf_MLinkable,SOMObject,somCastObj)
	(this,cls);
}


/* method: somResetObj */
boolean   somResetObj()
{
   return SOM_ResolveD(this,somf_MLinkable,SOMObject,somResetObj)
	(this);
}


/* method: somPrintSelf */
SOMObject*   somPrintSelf()
{
   return SOM_ResolveD(this,somf_MLinkable,SOMObject,somPrintSelf)
	(this);
}


/* method: somDumpSelf */
void   somDumpSelf(long level)
{
   SOM_ResolveD(this,somf_MLinkable,SOMObject,somDumpSelf)
	(this,level);
}


/* method: somDumpSelfInt */
void   somDumpSelfInt(long level)
{
   SOM_ResolveD(this,somf_MLinkable,SOMObject,somDumpSelfInt)
	(this,level);
}



};   /* somf_MLinkable */



#endif       /* SOM_somf_MLinkable_xh */
