/* Copyright (c) 1992 Colin Jensen.  All Rights Reserved. */


/*
 * This file was generated by the SOM Compiler.
 * FileName: somobj.h.
 * Generated using:
 *     SOM Precompiler spc: 1.22
 *     SOM Emitter emith: 1.11
 */

/*
 *  SOMObject: System Object Model root class
 *  Copyright (c) International Business Machines Corporation
 *                1991, 1992
 */


#ifndef somobj_h
#define somobj_h


#include <som.h>

/*
 * Define the class name as an object type
 */
#ifndef SOMObject
#define SOMObject SOMAny
#endif

#define SOMObject_MajorVersion 1
#define SOMObject_MinorVersion 1

/*
 * External name shortening if required
 */
#ifdef SOM_USE_SHORT_EXTERNAL_NAMES
#define SOMObjectNewClass somobc
#pragma linkage(somobc, system)
#define SOMObjectClassData somobd
#define SOMObjectCClassData somobx
#endif /* SOM_USE_SHORT_EXTERNAL_NAMES */
/*--------------Migration------------*/
#define SOMObject_classObj SOMObjectClassData.classObject
#define _SOMObject SOMObject_classObj

/*
 * New and Renew macros for SOMObject
 */
#define _SOMObjectNew() (_somNew(SOMObjectClassData.classObject))
#define SOMObjectNew() \
	( SOMObjectClassData.classObject \
		? _SOMObjectNew() \
		: ( SOMObjectNewClass(SOMObject_MajorVersion, SOMObject_MinorVersion), _SOMObjectNew() ) )
#define SOMObjectRenew(buf) \
	( _somRenew(SOMObjectClassData.classObject, buf) )

/*
 * New Method: somFree
 */
typedef void    SOMLINK somTP_SOMObject_somFree(SOMObject *somSelf);
#pragma linkage(somTP_SOMObject_somFree, system)
typedef somTP_SOMObject_somFree *somTD_SOMObject_somFree;
#define somMD_SOMObject_somFree "----"
#define SOMObject_somFree(somSelf) \
    (SOM_Resolve(somSelf, SOMObject, somFree) \
	(somSelf))
#define _somFree SOMObject_somFree

/*
 * New Method: somInit
 */
typedef void    SOMLINK somTP_SOMObject_somInit(SOMObject *somSelf);
#pragma linkage(somTP_SOMObject_somInit, system)
typedef somTP_SOMObject_somInit *somTD_SOMObject_somInit;
#define somMD_SOMObject_somInit "----"
#define SOMObject_somInit(somSelf) \
    (SOM_Resolve(somSelf, SOMObject, somInit) \
	(somSelf))
#define _somInit SOMObject_somInit

/*
 * New Method: somUninit
 */
typedef void    SOMLINK somTP_SOMObject_somUninit(SOMObject *somSelf);
#pragma linkage(somTP_SOMObject_somUninit, system)
typedef somTP_SOMObject_somUninit *somTD_SOMObject_somUninit;
#define somMD_SOMObject_somUninit "----"
#define SOMObject_somUninit(somSelf) \
    (SOM_Resolve(somSelf, SOMObject, somUninit) \
	(somSelf))
#define _somUninit SOMObject_somUninit

/*
 * New Method: somGetClass
 */
typedef SOMClass *   SOMLINK somTP_SOMObject_somGetClass(SOMObject *somSelf);
#pragma linkage(somTP_SOMObject_somGetClass, system)
typedef somTP_SOMObject_somGetClass *somTD_SOMObject_somGetClass;
#define somMD_SOMObject_somGetClass "----"
#define SOMObject_somGetClass(somSelf) \
    (SOM_Resolve(somSelf, SOMObject, somGetClass) \
	(somSelf))
#define _somGetClass SOMObject_somGetClass

/*
 * New Method: somGetClassName
 */
typedef zString    SOMLINK somTP_SOMObject_somGetClassName(SOMObject *somSelf);
#pragma linkage(somTP_SOMObject_somGetClassName, system)
typedef somTP_SOMObject_somGetClassName *somTD_SOMObject_somGetClassName;
#define somMD_SOMObject_somGetClassName "----"
#define SOMObject_somGetClassName(somSelf) \
    (SOM_Resolve(somSelf, SOMObject, somGetClassName) \
	(somSelf))
#define _somGetClassName SOMObject_somGetClassName

/*
 * New Method: somGetSize
 */
typedef integer4    SOMLINK somTP_SOMObject_somGetSize(SOMObject *somSelf);
#pragma linkage(somTP_SOMObject_somGetSize, system)
typedef somTP_SOMObject_somGetSize *somTD_SOMObject_somGetSize;
#define somMD_SOMObject_somGetSize "----"
#define SOMObject_somGetSize(somSelf) \
    (SOM_Resolve(somSelf, SOMObject, somGetSize) \
	(somSelf))
#define _somGetSize SOMObject_somGetSize

/*
 * New Method: somIsA
 */
typedef int    SOMLINK somTP_SOMObject_somIsA(SOMObject *somSelf,
		SOMClass *aClassObj);
#pragma linkage(somTP_SOMObject_somIsA, system)
typedef somTP_SOMObject_somIsA *somTD_SOMObject_somIsA;
#define somMD_SOMObject_somIsA "----"
#define SOMObject_somIsA(somSelf,aClassObj) \
    (SOM_Resolve(somSelf, SOMObject, somIsA) \
	(somSelf,aClassObj))
#define _somIsA SOMObject_somIsA

/*
 * New Method: somIsInstanceOf
 */
typedef int    SOMLINK somTP_SOMObject_somIsInstanceOf(SOMObject *somSelf,
		SOMClass *aClassObj);
#pragma linkage(somTP_SOMObject_somIsInstanceOf, system)
typedef somTP_SOMObject_somIsInstanceOf *somTD_SOMObject_somIsInstanceOf;
#define somMD_SOMObject_somIsInstanceOf "----"
#define SOMObject_somIsInstanceOf(somSelf,aClassObj) \
    (SOM_Resolve(somSelf, SOMObject, somIsInstanceOf) \
	(somSelf,aClassObj))
#define _somIsInstanceOf SOMObject_somIsInstanceOf

/*
 * New Method: somRespondsTo
 */
typedef int    SOMLINK somTP_SOMObject_somRespondsTo(SOMObject *somSelf,
		IN somId mId);
#pragma linkage(somTP_SOMObject_somRespondsTo, system)
typedef somTP_SOMObject_somRespondsTo *somTD_SOMObject_somRespondsTo;
#define somMD_SOMObject_somRespondsTo "----"
#define SOMObject_somRespondsTo(somSelf,mId) \
    (SOM_Resolve(somSelf, SOMObject, somRespondsTo) \
	(somSelf,mId))
#define _somRespondsTo SOMObject_somRespondsTo

/*
 * New Method: somDispatchV
 */
typedef void    SOMLINK somTP_SOMObject_somDispatchV(SOMObject *somSelf,
		INOUT somId methodId,
		INOUT somId descriptor,
		...);
#pragma linkage(somTP_SOMObject_somDispatchV, system)
typedef somTP_SOMObject_somDispatchV *somTD_SOMObject_somDispatchV;
#define somMD_SOMObject_somDispatchV "----"
#define SOMObject_somDispatchV(somSelf,methodId,descriptor,ap) \
    (SOM_Resolve(somSelf, SOMObject, somDispatchV) \
	(somSelf,methodId,descriptor,ap))
#define va_SOMObject_somDispatchV ((somTD_SOMObject_somDispatchV) SOMObjectCClassData.somDispatchV)
#define va_somDispatchV va_SOMObject_somDispatchV
#define _somDispatchV va_SOMObject_somDispatchV

/*
 * New Method: somDispatchL
 */
typedef integer4    SOMLINK somTP_SOMObject_somDispatchL(SOMObject *somSelf,
		INOUT somId methodId,
		INOUT somId descriptor,
		...);
#pragma linkage(somTP_SOMObject_somDispatchL, system)
typedef somTP_SOMObject_somDispatchL *somTD_SOMObject_somDispatchL;
#define somMD_SOMObject_somDispatchL "----"
#define SOMObject_somDispatchL(somSelf,methodId,descriptor,ap) \
    (SOM_Resolve(somSelf, SOMObject, somDispatchL) \
	(somSelf,methodId,descriptor,ap))
#define va_SOMObject_somDispatchL ((somTD_SOMObject_somDispatchL) SOMObjectCClassData.somDispatchL)
#define va_somDispatchL va_SOMObject_somDispatchL
#define _somDispatchL va_SOMObject_somDispatchL

/*
 * New Method: somDispatchA
 */
typedef void *   SOMLINK somTP_SOMObject_somDispatchA(SOMObject *somSelf,
		INOUT somId methodId,
		INOUT somId descriptor,
		...);
#pragma linkage(somTP_SOMObject_somDispatchA, system)
typedef somTP_SOMObject_somDispatchA *somTD_SOMObject_somDispatchA;
#define somMD_SOMObject_somDispatchA "----"
#define SOMObject_somDispatchA(somSelf,methodId,descriptor,ap) \
    (SOM_Resolve(somSelf, SOMObject, somDispatchA) \
	(somSelf,methodId,descriptor,ap))
#define va_SOMObject_somDispatchA ((somTD_SOMObject_somDispatchA) SOMObjectCClassData.somDispatchA)
#define va_somDispatchA va_SOMObject_somDispatchA
#define _somDispatchA va_SOMObject_somDispatchA

/*
 * New Method: somDispatchD
 */
typedef float8    SOMLINK somTP_SOMObject_somDispatchD(SOMObject *somSelf,
		INOUT somId methodId,
		INOUT somId descriptor,
		...);
#pragma linkage(somTP_SOMObject_somDispatchD, system)
typedef somTP_SOMObject_somDispatchD *somTD_SOMObject_somDispatchD;
#define somMD_SOMObject_somDispatchD "----"
#define SOMObject_somDispatchD(somSelf,methodId,descriptor,ap) \
    (SOM_Resolve(somSelf, SOMObject, somDispatchD) \
	(somSelf,methodId,descriptor,ap))
#define va_SOMObject_somDispatchD ((somTD_SOMObject_somDispatchD) SOMObjectCClassData.somDispatchD)
#define va_somDispatchD va_SOMObject_somDispatchD
#define _somDispatchD va_SOMObject_somDispatchD

/*
 * New Method: somPrintSelf
 */
typedef SOMAny *   SOMLINK somTP_SOMObject_somPrintSelf(SOMObject *somSelf);
#pragma linkage(somTP_SOMObject_somPrintSelf, system)
typedef somTP_SOMObject_somPrintSelf *somTD_SOMObject_somPrintSelf;
#define somMD_SOMObject_somPrintSelf "----"
#define SOMObject_somPrintSelf(somSelf) \
    (SOM_Resolve(somSelf, SOMObject, somPrintSelf) \
	(somSelf))
#define _somPrintSelf SOMObject_somPrintSelf

/*
 * New Method: somDumpSelf
 */
typedef void    SOMLINK somTP_SOMObject_somDumpSelf(SOMObject *somSelf,
		int level);
#pragma linkage(somTP_SOMObject_somDumpSelf, system)
typedef somTP_SOMObject_somDumpSelf *somTD_SOMObject_somDumpSelf;
#define somMD_SOMObject_somDumpSelf "----"
#define SOMObject_somDumpSelf(somSelf,level) \
    (SOM_Resolve(somSelf, SOMObject, somDumpSelf) \
	(somSelf,level))
#define _somDumpSelf SOMObject_somDumpSelf

/*
 * New Method: somDumpSelfInt
 */
typedef void    SOMLINK somTP_SOMObject_somDumpSelfInt(SOMObject *somSelf,
		int level);
#pragma linkage(somTP_SOMObject_somDumpSelfInt, system)
typedef somTP_SOMObject_somDumpSelfInt *somTD_SOMObject_somDumpSelfInt;
#define somMD_SOMObject_somDumpSelfInt "----"
#define SOMObject_somDumpSelfInt(somSelf,level) \
    (SOM_Resolve(somSelf, SOMObject, somDumpSelfInt) \
	(somSelf,level))
#define _somDumpSelfInt SOMObject_somDumpSelfInt

/*
 * Declare the class creation procedure
 */
SOMEXTERN SOMAny * SOMLINK SOMObjectNewClass(integer4 scemajorVersion,
		integer4 sceminorVersion);
#pragma linkage(SOMObjectNewClass, system)

/*
 * Declare the class data structure
 */
SOMEXTERN struct SOMObjectClassDataStructure {
	SOMAny *classObject;
	somMToken somInit;
	somMToken somUninit;
	somMToken somFree;
	somMToken somMissingMethod;
	somMToken somGetClassName;
	somMToken somGetClass;
	somMToken somIsA;
	somMToken somRespondsTo;
	somMToken somIsInstanceOf;
	somMToken somGetSize;
	somMToken somDumpSelf;
	somMToken somDumpSelfInt;
	somMToken somPrintSelf;
	somMToken somFreeObj;
	somMToken somDispatchV;
	somMToken somDispatchL;
	somMToken somDispatchA;
	somMToken somDispatchD;
} SOMObjectClassData;

/*
 * Declare the C specific class data structure
 */
SOMEXTERN struct SOMObjectCClassDataStructure {
	somMethodTab *parentMtab;
	somDToken instanceDataToken;
	somMethodProc *somDispatchV;
	somMethodProc *somDispatchL;
	somMethodProc *somDispatchA;
	somMethodProc *somDispatchD;
} SOMObjectCClassData;

#endif       /* somobj_h */
