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

#ifndef SOM_Component_xh
#define SOM_Component_xh

class Component;

#define Component_MajorVersion 1
#define Component_MinorVersion 0

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

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

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

/*
 * Start of user-defined types:
 */
class SOMClass;
class SOMObject;
class ODFrame;
class ODFacet;
class ODPlatformCanvas;
class Component;

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

/* A procedure to create the Component Class */
SOMEXTERN
#if (defined(SOM_Module_comp_Source) || defined(Component_Class_Source) || defined (SOM_DONT_IMPORT_CLASS_Component))
WIN32_DLLEXPORT
#else
WIN32_DLLIMPORT
#endif
SOMClass * SOMLINK ComponentNewClass(
		integer4,
		integer4 );

/* The API to the Component class object, and the methods it introduces. */
SOMEXTERN struct ComponentClassDataStructure {
	SOMClass *classObject;
	somMToken GetComponentInstanceError;
	somMToken SetComponentInstanceError;
	somMToken GetComponentVersion;
	somMToken Reserved1;
}
#if !(defined(SOM_Module_comp_Source) || defined(Component_Class_Source) || defined (SOM_DONT_IMPORT_CLASS_Component))
WIN32_DLLIMPORT
#elif defined(_MSC_VER)||defined(_WIN32_DECL_PROTO)
WIN32_DLLEXPORT
#endif
SOMDLINK ComponentClassData;
#define _Component ComponentClassData.classObject

/* The API to parentMtabs for Component, and the instance data it introduces. */
SOMEXTERN struct ComponentCClassDataStructure {
	somMethodTabs parentMtab;
	somDToken              instanceDataToken;
}
#if !(defined(SOM_Module_comp_Source) || defined(Component_Class_Source) || defined (SOM_DONT_IMPORT_CLASS_Component))
WIN32_DLLIMPORT
#elif defined(_MSC_VER)||defined(_WIN32_DECL_PROTO)
WIN32_DLLEXPORT
#endif
SOMDLINK ComponentCClassData;

/*
 * -- Typedefs for Component Method Procedures
 */
extern "C" {
typedef OSErr   SOMLINK somTP_Component_GetComponentInstanceError(Component *somSelf, Environment *ev);
typedef somTP_Component_GetComponentInstanceError *somTD_Component_GetComponentInstanceError;
typedef void   SOMLINK somTP_Component_SetComponentInstanceError(Component *somSelf, Environment *ev,
		OSErr theError);
typedef somTP_Component_SetComponentInstanceError *somTD_Component_SetComponentInstanceError;
typedef ODULong   SOMLINK somTP_Component_GetComponentVersion(Component *somSelf, Environment *ev);
typedef somTP_Component_GetComponentVersion *somTD_Component_GetComponentVersion;

/*
 * -- Typedefs for Reintroduced Wrapper Methods
 */
typedef void   SOMLINK somTP_Component_somDefaultInit(Component *somSelf,
		somInitCtrl* ctrl);
typedef somTP_Component_somDefaultInit *somTD_Component_somDefaultInit;
typedef void   SOMLINK somTP_Component_somDestruct(Component *somSelf,
		octet doFree,
		somDestructCtrl* ctrl);
typedef somTP_Component_somDestruct *somTD_Component_somDestruct;
typedef void   SOMLINK somTP_Component_somDefaultCopyInit(Component *somSelf,
		somInitCtrl* ctrl,
		SOMObject* fromObj);
typedef somTP_Component_somDefaultCopyInit *somTD_Component_somDefaultCopyInit;
typedef Component*   SOMLINK somTP_Component_somDefaultAssign(Component *somSelf,
		somAssignCtrl* ctrl,
		SOMObject* fromObj);
typedef somTP_Component_somDefaultAssign *somTD_Component_somDefaultAssign;
typedef void   SOMLINK somTP_Component_somDefaultConstCopyInit(Component *somSelf,
		somInitCtrl* ctrl,
		SOMObject* fromObj);
typedef somTP_Component_somDefaultConstCopyInit *somTD_Component_somDefaultConstCopyInit;
typedef void   SOMLINK somTP_Component_somDefaultVCopyInit(Component *somSelf,
		somInitCtrl* ctrl,
		SOMObject* fromObj);
typedef somTP_Component_somDefaultVCopyInit *somTD_Component_somDefaultVCopyInit;
typedef void   SOMLINK somTP_Component_somDefaultConstVCopyInit(Component *somSelf,
		somInitCtrl* ctrl,
		SOMObject* fromObj);
typedef somTP_Component_somDefaultConstVCopyInit *somTD_Component_somDefaultConstVCopyInit;
typedef Component*   SOMLINK somTP_Component_somDefaultConstAssign(Component *somSelf,
		somAssignCtrl* ctrl,
		SOMObject* fromObj);
typedef somTP_Component_somDefaultConstAssign *somTD_Component_somDefaultConstAssign;
typedef Component*   SOMLINK somTP_Component_somDefaultVAssign(Component *somSelf,
		somAssignCtrl* ctrl,
		SOMObject* fromObj);
typedef somTP_Component_somDefaultVAssign *somTD_Component_somDefaultVAssign;
typedef Component*   SOMLINK somTP_Component_somDefaultConstVAssign(Component *somSelf,
		somAssignCtrl* ctrl,
		SOMObject* fromObj);
typedef somTP_Component_somDefaultConstVAssign *somTD_Component_somDefaultConstVAssign;
typedef void   SOMLINK somTP_Component_somInit(Component *somSelf);
typedef somTP_Component_somInit *somTD_Component_somInit;
typedef void   SOMLINK somTP_Component_somFree(Component *somSelf);
typedef somTP_Component_somFree *somTD_Component_somFree;
typedef void   SOMLINK somTP_Component_somUninit(Component *somSelf);
typedef somTP_Component_somUninit *somTD_Component_somUninit;
typedef SOMClass*   SOMLINK somTP_Component_somGetClass(Component *somSelf);
typedef somTP_Component_somGetClass *somTD_Component_somGetClass;
typedef string   SOMLINK somTP_Component_somGetClassName(Component *somSelf);
typedef somTP_Component_somGetClassName *somTD_Component_somGetClassName;
typedef long   SOMLINK somTP_Component_somGetSize(Component *somSelf);
typedef somTP_Component_somGetSize *somTD_Component_somGetSize;
typedef boolean   SOMLINK somTP_Component_somIsA(Component *somSelf,
		SOMClass* aClassObj);
typedef somTP_Component_somIsA *somTD_Component_somIsA;
typedef boolean   SOMLINK somTP_Component_somIsInstanceOf(Component *somSelf,
		SOMClass* aClassObj);
typedef somTP_Component_somIsInstanceOf *somTD_Component_somIsInstanceOf;
typedef boolean   SOMLINK somTP_Component_somRespondsTo(Component *somSelf,
		somId mId);
typedef somTP_Component_somRespondsTo *somTD_Component_somRespondsTo;
typedef boolean   SOMLINK somTP_Component_somDispatch(Component *somSelf,
		somToken* retValue,
		somId methodId,
		va_list ap);
typedef somTP_Component_somDispatch *somTD_Component_somDispatch;
typedef boolean   SOMLINK somTP_Component_somClassDispatch(Component *somSelf,
		SOMClass* clsObj,
		somToken* retValue,
		somId methodId,
		va_list ap);
typedef somTP_Component_somClassDispatch *somTD_Component_somClassDispatch;
typedef boolean   SOMLINK somTP_Component_somCastObj(Component *somSelf,
		SOMClass* cls);
typedef somTP_Component_somCastObj *somTD_Component_somCastObj;
typedef boolean   SOMLINK somTP_Component_somResetObj(Component *somSelf);
typedef somTP_Component_somResetObj *somTD_Component_somResetObj;
typedef SOMObject*   SOMLINK somTP_Component_somPrintSelf(Component *somSelf);
typedef somTP_Component_somPrintSelf *somTD_Component_somPrintSelf;
typedef void   SOMLINK somTP_Component_somDumpSelf(Component *somSelf,
		long level);
typedef somTP_Component_somDumpSelf *somTD_Component_somDumpSelf;
typedef void   SOMLINK somTP_Component_somDumpSelfInt(Component *somSelf,
		long level);
typedef somTP_Component_somDumpSelfInt *somTD_Component_somDumpSelfInt;
}

#endif /* Component_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 Component
 */
class Component : public SOMObject
{
public:

// Component::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 (!_Component) ComponentNewClass(Component_MajorVersion,Component_MinorVersion);
   return (void*)
      SOM_Resolve(_Component,SOMClass,somNewNoInit)
         ((SOMClass *)((void*)_Component));
}

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

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

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

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


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


/* method: SetComponentInstanceError */
void   SetComponentInstanceError(Environment *ev,
		OSErr theError)
{
   SOM_ResolveD(this,Component,Component,SetComponentInstanceError)
	(this, ev,theError);
#ifdef SOMCHKEXCEPT
   if ( ev->_major != NO_EXCEPTION )
      SOMCHKEXCEPT;
#endif
}


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


/*
 * Reintroduce inherited methods
 */

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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


/* va_list method: somDispatch */
/* the va_list invocation form */
boolean   Component_somDispatch(somToken* retValue,
		somId methodId,
		va_list ap)
{
return SOM_ResolveD(this,Component,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,Component,SOMObject,somDispatch)
	(this,retValue,methodId,ap);
   va_end(ap);
   return __somResult;
}


/* va_list method: somClassDispatch */
/* the va_list invocation form */
boolean   Component_somClassDispatch(SOMClass* clsObj,
		somToken* retValue,
		somId methodId,
		va_list ap)
{
return SOM_ResolveD(this,Component,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,Component,SOMObject,somClassDispatch)
	(this,clsObj,retValue,methodId,ap);
   va_end(ap);
   return __somResult;
}


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


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


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


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


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



};   /* Component */



#endif       /* SOM_Component_xh */
