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

#ifndef SOM_ODObject_xh
#define SOM_ODObject_xh

class ODObject;

#define ODObject_MajorVersion 1
#define ODObject_MinorVersion 0

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

#include <ODTypes.h>



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

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

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

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

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

/* A procedure to create the ODObject Class */
SOMEXTERN
#if (defined(SOM_Module_ODObject_Source) || defined(ODObject_Class_Source) || defined (SOM_DONT_IMPORT_CLASS_ODObject))
WIN32_DLLEXPORT
#else
WIN32_DLLIMPORT
#endif
SOMClass * SOMLINK ODObjectNewClass(
		integer4,
		integer4 );

/* The API to the ODObject class object, and the methods it introduces. */
SOMEXTERN struct ODObjectClassDataStructure {
	SOMClass *classObject;
	somMToken InitObject;
	somMToken HasExtension;
	somMToken AcquireExtension;
	somMToken ReleaseExtension;
	somMToken Purge;
	somMToken IsEqualTo;
	somMToken SubClassResponsibility;
}
#if !(defined(SOM_Module_ODObject_Source) || defined(ODObject_Class_Source) || defined (SOM_DONT_IMPORT_CLASS_ODObject))
WIN32_DLLIMPORT
#elif defined(_MSC_VER)||defined(_WIN32_DECL_PROTO)
WIN32_DLLEXPORT
#endif
SOMDLINK ODObjectClassData;
#define _ODObject ODObjectClassData.classObject

/* The API to parentMtabs for ODObject, and the instance data it introduces. */
SOMEXTERN struct ODObjectCClassDataStructure {
	somMethodTabs parentMtab;
	somDToken              instanceDataToken;
}
#if !(defined(SOM_Module_ODObject_Source) || defined(ODObject_Class_Source) || defined (SOM_DONT_IMPORT_CLASS_ODObject))
WIN32_DLLIMPORT
#elif defined(_MSC_VER)||defined(_WIN32_DECL_PROTO)
WIN32_DLLEXPORT
#endif
SOMDLINK ODObjectCClassData;

/*
 * -- Typedefs for ODObject Method Procedures
 */
extern "C" {
typedef void   SOMLINK somTP_ODObject_InitObject(ODObject *somSelf, Environment *ev);
typedef somTP_ODObject_InitObject *somTD_ODObject_InitObject;
typedef ODBoolean   SOMLINK somTP_ODObject_HasExtension(ODObject *somSelf, Environment *ev,
		ODType extensionName);
typedef somTP_ODObject_HasExtension *somTD_ODObject_HasExtension;
typedef ODExtension*   SOMLINK somTP_ODObject_AcquireExtension(ODObject *somSelf, Environment *ev,
		ODType extensionName);
typedef somTP_ODObject_AcquireExtension *somTD_ODObject_AcquireExtension;
typedef void   SOMLINK somTP_ODObject_ReleaseExtension(ODObject *somSelf, Environment *ev,
		ODExtension* extension);
typedef somTP_ODObject_ReleaseExtension *somTD_ODObject_ReleaseExtension;
typedef ODSize   SOMLINK somTP_ODObject_Purge(ODObject *somSelf, Environment *ev,
		ODSize size);
typedef somTP_ODObject_Purge *somTD_ODObject_Purge;
typedef ODBoolean   SOMLINK somTP_ODObject_IsEqualTo(ODObject *somSelf, Environment *ev,
		ODObject* object);
typedef somTP_ODObject_IsEqualTo *somTD_ODObject_IsEqualTo;
typedef void   SOMLINK somTP_ODObject_SubClassResponsibility(ODObject *somSelf, Environment *ev);
typedef somTP_ODObject_SubClassResponsibility *somTD_ODObject_SubClassResponsibility;

/*
 * -- Typedefs for Reintroduced Wrapper Methods
 */
typedef void   SOMLINK somTP_ODObject_somDefaultInit(ODObject *somSelf,
		somInitCtrl* ctrl);
typedef somTP_ODObject_somDefaultInit *somTD_ODObject_somDefaultInit;
typedef void   SOMLINK somTP_ODObject_somDestruct(ODObject *somSelf,
		octet doFree,
		somDestructCtrl* ctrl);
typedef somTP_ODObject_somDestruct *somTD_ODObject_somDestruct;
typedef void   SOMLINK somTP_ODObject_somDefaultCopyInit(ODObject *somSelf,
		somInitCtrl* ctrl,
		SOMObject* fromObj);
typedef somTP_ODObject_somDefaultCopyInit *somTD_ODObject_somDefaultCopyInit;
typedef ODObject*   SOMLINK somTP_ODObject_somDefaultAssign(ODObject *somSelf,
		somAssignCtrl* ctrl,
		SOMObject* fromObj);
typedef somTP_ODObject_somDefaultAssign *somTD_ODObject_somDefaultAssign;
typedef void   SOMLINK somTP_ODObject_somDefaultConstCopyInit(ODObject *somSelf,
		somInitCtrl* ctrl,
		SOMObject* fromObj);
typedef somTP_ODObject_somDefaultConstCopyInit *somTD_ODObject_somDefaultConstCopyInit;
typedef void   SOMLINK somTP_ODObject_somDefaultVCopyInit(ODObject *somSelf,
		somInitCtrl* ctrl,
		SOMObject* fromObj);
typedef somTP_ODObject_somDefaultVCopyInit *somTD_ODObject_somDefaultVCopyInit;
typedef void   SOMLINK somTP_ODObject_somDefaultConstVCopyInit(ODObject *somSelf,
		somInitCtrl* ctrl,
		SOMObject* fromObj);
typedef somTP_ODObject_somDefaultConstVCopyInit *somTD_ODObject_somDefaultConstVCopyInit;
typedef ODObject*   SOMLINK somTP_ODObject_somDefaultConstAssign(ODObject *somSelf,
		somAssignCtrl* ctrl,
		SOMObject* fromObj);
typedef somTP_ODObject_somDefaultConstAssign *somTD_ODObject_somDefaultConstAssign;
typedef ODObject*   SOMLINK somTP_ODObject_somDefaultVAssign(ODObject *somSelf,
		somAssignCtrl* ctrl,
		SOMObject* fromObj);
typedef somTP_ODObject_somDefaultVAssign *somTD_ODObject_somDefaultVAssign;
typedef ODObject*   SOMLINK somTP_ODObject_somDefaultConstVAssign(ODObject *somSelf,
		somAssignCtrl* ctrl,
		SOMObject* fromObj);
typedef somTP_ODObject_somDefaultConstVAssign *somTD_ODObject_somDefaultConstVAssign;
typedef void   SOMLINK somTP_ODObject_somInit(ODObject *somSelf);
typedef somTP_ODObject_somInit *somTD_ODObject_somInit;
typedef void   SOMLINK somTP_ODObject_somFree(ODObject *somSelf);
typedef somTP_ODObject_somFree *somTD_ODObject_somFree;
typedef void   SOMLINK somTP_ODObject_somUninit(ODObject *somSelf);
typedef somTP_ODObject_somUninit *somTD_ODObject_somUninit;
typedef SOMClass*   SOMLINK somTP_ODObject_somGetClass(ODObject *somSelf);
typedef somTP_ODObject_somGetClass *somTD_ODObject_somGetClass;
typedef string   SOMLINK somTP_ODObject_somGetClassName(ODObject *somSelf);
typedef somTP_ODObject_somGetClassName *somTD_ODObject_somGetClassName;
typedef long   SOMLINK somTP_ODObject_somGetSize(ODObject *somSelf);
typedef somTP_ODObject_somGetSize *somTD_ODObject_somGetSize;
typedef boolean   SOMLINK somTP_ODObject_somIsA(ODObject *somSelf,
		SOMClass* aClassObj);
typedef somTP_ODObject_somIsA *somTD_ODObject_somIsA;
typedef boolean   SOMLINK somTP_ODObject_somIsInstanceOf(ODObject *somSelf,
		SOMClass* aClassObj);
typedef somTP_ODObject_somIsInstanceOf *somTD_ODObject_somIsInstanceOf;
typedef boolean   SOMLINK somTP_ODObject_somRespondsTo(ODObject *somSelf,
		somId mId);
typedef somTP_ODObject_somRespondsTo *somTD_ODObject_somRespondsTo;
typedef boolean   SOMLINK somTP_ODObject_somDispatch(ODObject *somSelf,
		somToken* retValue,
		somId methodId,
		va_list ap);
typedef somTP_ODObject_somDispatch *somTD_ODObject_somDispatch;
typedef boolean   SOMLINK somTP_ODObject_somClassDispatch(ODObject *somSelf,
		SOMClass* clsObj,
		somToken* retValue,
		somId methodId,
		va_list ap);
typedef somTP_ODObject_somClassDispatch *somTD_ODObject_somClassDispatch;
typedef boolean   SOMLINK somTP_ODObject_somCastObj(ODObject *somSelf,
		SOMClass* cls);
typedef somTP_ODObject_somCastObj *somTD_ODObject_somCastObj;
typedef boolean   SOMLINK somTP_ODObject_somResetObj(ODObject *somSelf);
typedef somTP_ODObject_somResetObj *somTD_ODObject_somResetObj;
typedef SOMObject*   SOMLINK somTP_ODObject_somPrintSelf(ODObject *somSelf);
typedef somTP_ODObject_somPrintSelf *somTD_ODObject_somPrintSelf;
typedef void   SOMLINK somTP_ODObject_somDumpSelf(ODObject *somSelf,
		long level);
typedef somTP_ODObject_somDumpSelf *somTD_ODObject_somDumpSelf;
typedef void   SOMLINK somTP_ODObject_somDumpSelfInt(ODObject *somSelf,
		long level);
typedef somTP_ODObject_somDumpSelfInt *somTD_ODObject_somDumpSelfInt;
}

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

// ODObject::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 (!_ODObject) ODObjectNewClass(ODObject_MajorVersion,ODObject_MinorVersion);
   return (void*)
      SOM_Resolve(_ODObject,SOMClass,somNewNoInit)
         ((SOMClass *)((void*)_ODObject));
}

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

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

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

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


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


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


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


/* method: ReleaseExtension */
void   ReleaseExtension(Environment *ev,
		ODExtension* extension)
{
   SOM_ResolveD(this,ODObject,ODObject,ReleaseExtension)
	(this, ev,extension);
#ifdef SOMCHKEXCEPT
   if ( ev->_major != NO_EXCEPTION )
      SOMCHKEXCEPT;
#endif
}


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


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


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


/*
 * Reintroduce inherited methods
 */

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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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



};   /* ODObject */



#endif       /* SOM_ODObject_xh */
