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


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

/*
 *  SOMClass: System Object Model base metaclass
 *  Copyright (c) International Business Machines Corporation
 *                1991, 1992
 */


#ifndef somcls_h
#define somcls_h


#include <som.h>

/*
 * Define the class name as an object type
 */
#ifndef SOMClass
#define SOMClass SOMAny
#endif
#include <somobj.h>

#define SOMClass_MajorVersion 1
#define SOMClass_MinorVersion 1

/*
 * External name shortening if required
 */
#ifdef SOM_USE_SHORT_EXTERNAL_NAMES
#define SOMClassNewClass sommcc
#pragma linkage(sommcc, system)
#define SOMClassClassData sommcd
#define SOMClassCClassData sommcx
#endif /* SOM_USE_SHORT_EXTERNAL_NAMES */
/*--------------Migration------------*/
#define SOMClass_classObj SOMClassClassData.classObject
#define _SOMClass SOMClass_classObj

/*
 * New and Renew macros for SOMClass
 */
#define _SOMClassNew() (_somNew(SOMClassClassData.classObject))
#define SOMClassNew() \
	( SOMClassClassData.classObject \
		? _SOMClassNew() \
		: ( SOMClassNewClass(SOMClass_MajorVersion, SOMClass_MinorVersion), _SOMClassNew() ) )
#define SOMClassRenew(buf) \
	( _somRenew(SOMClassClassData.classObject, buf) )

/*
 * Override method: somInit
 */
#define SOMClass_somInit(somSelf) \
	SOMObject_somInit(somSelf)

/*
 * Override method: somUninit
 */
#define SOMClass_somUninit(somSelf) \
	SOMObject_somUninit(somSelf)

/*
 * Override method: somDumpSelfInt
 */
#define SOMClass_somDumpSelfInt(somSelf,level) \
	SOMObject_somDumpSelfInt(somSelf,level)

/*
 * New Method: somAddStaticMethod
 */
typedef somMToken    SOMLINK somTP_SOMClass_somAddStaticMethod(SOMClass *somSelf,
		INOUT somId methodId,
		INOUT somId methodDescriptor,
		IN somMethodProc *method,
		IN somMethodProc *redispatchStub,
		IN somMethodProc *applyStub);
#pragma linkage(somTP_SOMClass_somAddStaticMethod, system)
typedef somTP_SOMClass_somAddStaticMethod *somTD_SOMClass_somAddStaticMethod;
#define somMD_SOMClass_somAddStaticMethod "----"
#define SOMClass_somAddStaticMethod(somSelf,methodId,methodDescriptor,method,redispatchStub,applyStub) \
    (SOM_Resolve(somSelf, SOMClass, somAddStaticMethod) \
	(somSelf,methodId,methodDescriptor,method,redispatchStub,applyStub))
#define _somAddStaticMethod SOMClass_somAddStaticMethod

/*
 * New Method: somClassReady
 */
typedef void    SOMLINK somTP_SOMClass_somClassReady(SOMClass *somSelf);
#pragma linkage(somTP_SOMClass_somClassReady, system)
typedef somTP_SOMClass_somClassReady *somTD_SOMClass_somClassReady;
#define somMD_SOMClass_somClassReady "----"
#define SOMClass_somClassReady(somSelf) \
    (SOM_Resolve(somSelf, SOMClass, somClassReady) \
	(somSelf))
#define _somClassReady SOMClass_somClassReady

/*
 * New Method: somInitClass
 */
typedef void    SOMLINK somTP_SOMClass_somInitClass(SOMClass *somSelf,
		IN zString className,
		IN SOMAny *parentClass,
		IN integer4 instanceSize,
		IN int maxStaticMethods,
		IN integer4 majorVersion,
		IN integer4 minorVersion);
#pragma linkage(somTP_SOMClass_somInitClass, system)
typedef somTP_SOMClass_somInitClass *somTD_SOMClass_somInitClass;
#define somMD_SOMClass_somInitClass "----"
#define SOMClass_somInitClass(somSelf,className,parentClass,instanceSize,maxStaticMethods,majorVersion,minorVersion) \
    (SOM_Resolve(somSelf, SOMClass, somInitClass) \
	(somSelf,className,parentClass,instanceSize,maxStaticMethods,majorVersion,minorVersion))
#define _somInitClass SOMClass_somInitClass

/*
 * New Method: somOverrideSMethod
 */
typedef void    SOMLINK somTP_SOMClass_somOverrideSMethod(SOMClass *somSelf,
		INOUT somId methodId,
		IN somMethodProc *method);
#pragma linkage(somTP_SOMClass_somOverrideSMethod, system)
typedef somTP_SOMClass_somOverrideSMethod *somTD_SOMClass_somOverrideSMethod;
#define somMD_SOMClass_somOverrideSMethod "----"
#define SOMClass_somOverrideSMethod(somSelf,methodId,method) \
    (SOM_Resolve(somSelf, SOMClass, somOverrideSMethod) \
	(somSelf,methodId,method))
#define _somOverrideSMethod SOMClass_somOverrideSMethod

/*
 * New Method: somNew
 */
typedef SOMAny *   SOMLINK somTP_SOMClass_somNew(SOMClass *somSelf);
#pragma linkage(somTP_SOMClass_somNew, system)
typedef somTP_SOMClass_somNew *somTD_SOMClass_somNew;
#define somMD_SOMClass_somNew "----"
#define SOMClass_somNew(somSelf) \
    (SOM_Resolve(somSelf, SOMClass, somNew) \
	(somSelf))
#define _somNew SOMClass_somNew

/*
 * New Method: somNewNoInit
 */
typedef SOMAny *   SOMLINK somTP_SOMClass_somNewNoInit(SOMClass *somSelf);
#pragma linkage(somTP_SOMClass_somNewNoInit, system)
typedef somTP_SOMClass_somNewNoInit *somTD_SOMClass_somNewNoInit;
#define somMD_SOMClass_somNewNoInit "----"
#define SOMClass_somNewNoInit(somSelf) \
    (SOM_Resolve(somSelf, SOMClass, somNewNoInit) \
	(somSelf))
#define _somNewNoInit SOMClass_somNewNoInit

/*
 * New Method: somRenew
 */
typedef SOMAny *   SOMLINK somTP_SOMClass_somRenew(SOMClass *somSelf,
		IN void *obj);
#pragma linkage(somTP_SOMClass_somRenew, system)
typedef somTP_SOMClass_somRenew *somTD_SOMClass_somRenew;
#define somMD_SOMClass_somRenew "----"
#define SOMClass_somRenew(somSelf,obj) \
    (SOM_Resolve(somSelf, SOMClass, somRenew) \
	(somSelf,obj))
#define _somRenew SOMClass_somRenew

/*
 * New Method: somRenewNoInit
 */
typedef SOMAny *   SOMLINK somTP_SOMClass_somRenewNoInit(SOMClass *somSelf,
		IN void *obj);
#pragma linkage(somTP_SOMClass_somRenewNoInit, system)
typedef somTP_SOMClass_somRenewNoInit *somTD_SOMClass_somRenewNoInit;
#define somMD_SOMClass_somRenewNoInit "----"
#define SOMClass_somRenewNoInit(somSelf,obj) \
    (SOM_Resolve(somSelf, SOMClass, somRenewNoInit) \
	(somSelf,obj))
#define _somRenewNoInit SOMClass_somRenewNoInit

/*
 * New Method: somGetApplyStub
 */
typedef somMethodProc *   SOMLINK somTP_SOMClass_somGetApplyStub(SOMClass *somSelf,
		INOUT somId methodId);
#pragma linkage(somTP_SOMClass_somGetApplyStub, system)
typedef somTP_SOMClass_somGetApplyStub *somTD_SOMClass_somGetApplyStub;
#define somMD_SOMClass_somGetApplyStub "----"
#define SOMClass_somGetApplyStub(somSelf,methodId) \
    (SOM_Resolve(somSelf, SOMClass, somGetApplyStub) \
	(somSelf,methodId))
#define _somGetApplyStub SOMClass_somGetApplyStub

/*
 * New Method: somGetClassData
 */
typedef somClassDataStructure *   SOMLINK somTP_SOMClass_somGetClassData(SOMClass *somSelf);
#pragma linkage(somTP_SOMClass_somGetClassData, system)
typedef somTP_SOMClass_somGetClassData *somTD_SOMClass_somGetClassData;
#define somMD_SOMClass_somGetClassData "----"
#define SOMClass_somGetClassData(somSelf) \
    (SOM_Resolve(somSelf, SOMClass, somGetClassData) \
	(somSelf))
#define _somGetClassData SOMClass_somGetClassData

/*
 * New Method: somGetClassMtab
 */
typedef somMethodTab *   SOMLINK somTP_SOMClass_somGetClassMtab(SOMClass *somSelf);
#pragma linkage(somTP_SOMClass_somGetClassMtab, system)
typedef somTP_SOMClass_somGetClassMtab *somTD_SOMClass_somGetClassMtab;
#define somMD_SOMClass_somGetClassMtab "----"
#define SOMClass_somGetClassMtab(somSelf) \
    (SOM_Resolve(somSelf, SOMClass, somGetClassMtab) \
	(somSelf))
#define _somGetClassMtab SOMClass_somGetClassMtab

/*
 * New Method: somGetInstanceToken
 */
typedef somDToken    SOMLINK somTP_SOMClass_somGetInstanceToken(SOMClass *somSelf);
#pragma linkage(somTP_SOMClass_somGetInstanceToken, system)
typedef somTP_SOMClass_somGetInstanceToken *somTD_SOMClass_somGetInstanceToken;
#define somMD_SOMClass_somGetInstanceToken "----"
#define SOMClass_somGetInstanceToken(somSelf) \
    (SOM_Resolve(somSelf, SOMClass, somGetInstanceToken) \
	(somSelf))
#define _somGetInstanceToken SOMClass_somGetInstanceToken

/*
 * New Method: somGetMemberToken
 */
typedef somDToken    SOMLINK somTP_SOMClass_somGetMemberToken(SOMClass *somSelf,
		integer4 memberOffset,
		somDToken instanceToken);
#pragma linkage(somTP_SOMClass_somGetMemberToken, system)
typedef somTP_SOMClass_somGetMemberToken *somTD_SOMClass_somGetMemberToken;
#define somMD_SOMClass_somGetMemberToken "----"
#define SOMClass_somGetMemberToken(somSelf,memberOffset,instanceToken) \
    (SOM_Resolve(somSelf, SOMClass, somGetMemberToken) \
	(somSelf,memberOffset,instanceToken))
#define _somGetMemberToken SOMClass_somGetMemberToken

/*
 * New Method: somGetInstanceOffset
 */
typedef integer4    SOMLINK somTP_SOMClass_somGetInstanceOffset(SOMClass *somSelf);
#pragma linkage(somTP_SOMClass_somGetInstanceOffset, system)
typedef somTP_SOMClass_somGetInstanceOffset *somTD_SOMClass_somGetInstanceOffset;
#define somMD_SOMClass_somGetInstanceOffset "----"
#define SOMClass_somGetInstanceOffset(somSelf) \
    (SOM_Resolve(somSelf, SOMClass, somGetInstanceOffset) \
	(somSelf))
#define _somGetInstanceOffset SOMClass_somGetInstanceOffset

/*
 * New Method: somGetInstancePartSize
 */
typedef integer4    SOMLINK somTP_SOMClass_somGetInstancePartSize(SOMClass *somSelf);
#pragma linkage(somTP_SOMClass_somGetInstancePartSize, system)
typedef somTP_SOMClass_somGetInstancePartSize *somTD_SOMClass_somGetInstancePartSize;
#define somMD_SOMClass_somGetInstancePartSize "----"
#define SOMClass_somGetInstancePartSize(somSelf) \
    (SOM_Resolve(somSelf, SOMClass, somGetInstancePartSize) \
	(somSelf))
#define _somGetInstancePartSize SOMClass_somGetInstancePartSize

/*
 * New Method: somGetInstanceSize
 */
typedef integer4    SOMLINK somTP_SOMClass_somGetInstanceSize(SOMClass *somSelf);
#pragma linkage(somTP_SOMClass_somGetInstanceSize, system)
typedef somTP_SOMClass_somGetInstanceSize *somTD_SOMClass_somGetInstanceSize;
#define somMD_SOMClass_somGetInstanceSize "----"
#define SOMClass_somGetInstanceSize(somSelf) \
    (SOM_Resolve(somSelf, SOMClass, somGetInstanceSize) \
	(somSelf))
#define _somGetInstanceSize SOMClass_somGetInstanceSize

/*
 * New Method: somGetMethodDescriptor
 */
typedef somId    SOMLINK somTP_SOMClass_somGetMethodDescriptor(SOMClass *somSelf,
		IN somId methodId);
#pragma linkage(somTP_SOMClass_somGetMethodDescriptor, system)
typedef somTP_SOMClass_somGetMethodDescriptor *somTD_SOMClass_somGetMethodDescriptor;
#define somMD_SOMClass_somGetMethodDescriptor "----"
#define SOMClass_somGetMethodDescriptor(somSelf,methodId) \
    (SOM_Resolve(somSelf, SOMClass, somGetMethodDescriptor) \
	(somSelf,methodId))
#define _somGetMethodDescriptor SOMClass_somGetMethodDescriptor

/*
 * New Method: somGetName
 */
typedef zString    SOMLINK somTP_SOMClass_somGetName(SOMClass *somSelf);
#pragma linkage(somTP_SOMClass_somGetName, system)
typedef somTP_SOMClass_somGetName *somTD_SOMClass_somGetName;
#define somMD_SOMClass_somGetName "----"
#define SOMClass_somGetName(somSelf) \
    (SOM_Resolve(somSelf, SOMClass, somGetName) \
	(somSelf))
#define _somGetName SOMClass_somGetName

/*
 * New Method: somGetNumMethods
 */
typedef int    SOMLINK somTP_SOMClass_somGetNumMethods(SOMClass *somSelf);
#pragma linkage(somTP_SOMClass_somGetNumMethods, system)
typedef somTP_SOMClass_somGetNumMethods *somTD_SOMClass_somGetNumMethods;
#define somMD_SOMClass_somGetNumMethods "----"
#define SOMClass_somGetNumMethods(somSelf) \
    (SOM_Resolve(somSelf, SOMClass, somGetNumMethods) \
	(somSelf))
#define _somGetNumMethods SOMClass_somGetNumMethods

/*
 * New Method: somGetNumStaticMethods
 */
typedef int    SOMLINK somTP_SOMClass_somGetNumStaticMethods(SOMClass *somSelf);
#pragma linkage(somTP_SOMClass_somGetNumStaticMethods, system)
typedef somTP_SOMClass_somGetNumStaticMethods *somTD_SOMClass_somGetNumStaticMethods;
#define somMD_SOMClass_somGetNumStaticMethods "----"
#define SOMClass_somGetNumStaticMethods(somSelf) \
    (SOM_Resolve(somSelf, SOMClass, somGetNumStaticMethods) \
	(somSelf))
#define _somGetNumStaticMethods SOMClass_somGetNumStaticMethods

/*
 * New Method: somGetParent
 */
typedef SOMClass *   SOMLINK somTP_SOMClass_somGetParent(SOMClass *somSelf);
#pragma linkage(somTP_SOMClass_somGetParent, system)
typedef somTP_SOMClass_somGetParent *somTD_SOMClass_somGetParent;
#define somMD_SOMClass_somGetParent "----"
#define SOMClass_somGetParent(somSelf) \
    (SOM_Resolve(somSelf, SOMClass, somGetParent) \
	(somSelf))
#define _somGetParent SOMClass_somGetParent

/*
 * New Method: somGetPClsMtab
 */
typedef somMethodTab *   SOMLINK somTP_SOMClass_somGetPClsMtab(SOMClass *somSelf);
#pragma linkage(somTP_SOMClass_somGetPClsMtab, system)
typedef somTP_SOMClass_somGetPClsMtab *somTD_SOMClass_somGetPClsMtab;
#define somMD_SOMClass_somGetPClsMtab "----"
#define SOMClass_somGetPClsMtab(somSelf) \
    (SOM_Resolve(somSelf, SOMClass, somGetPClsMtab) \
	(somSelf))
#define _somGetPClsMtab SOMClass_somGetPClsMtab

/*
 * New Method: somSetClassData
 */
typedef void    SOMLINK somTP_SOMClass_somSetClassData(SOMClass *somSelf,
		IN somClassDataStructure *cds);
#pragma linkage(somTP_SOMClass_somSetClassData, system)
typedef somTP_SOMClass_somSetClassData *somTD_SOMClass_somSetClassData;
#define somMD_SOMClass_somSetClassData "----"
#define SOMClass_somSetClassData(somSelf,cds) \
    (SOM_Resolve(somSelf, SOMClass, somSetClassData) \
	(somSelf,cds))
#define _somSetClassData SOMClass_somSetClassData

/*
 * New Method: somCheckVersion
 */
typedef int    SOMLINK somTP_SOMClass_somCheckVersion(SOMClass *somSelf,
		IN integer4 majorVersion,
		IN integer4 minorVersion);
#pragma linkage(somTP_SOMClass_somCheckVersion, system)
typedef somTP_SOMClass_somCheckVersion *somTD_SOMClass_somCheckVersion;
#define somMD_SOMClass_somCheckVersion "----"
#define SOMClass_somCheckVersion(somSelf,majorVersion,minorVersion) \
    (SOM_Resolve(somSelf, SOMClass, somCheckVersion) \
	(somSelf,majorVersion,minorVersion))
#define _somCheckVersion SOMClass_somCheckVersion

/*
 * New Method: somDescendedFrom
 */
typedef int    SOMLINK somTP_SOMClass_somDescendedFrom(SOMClass *somSelf,
		IN SOMClass *aClassObj);
#pragma linkage(somTP_SOMClass_somDescendedFrom, system)
typedef somTP_SOMClass_somDescendedFrom *somTD_SOMClass_somDescendedFrom;
#define somMD_SOMClass_somDescendedFrom "----"
#define SOMClass_somDescendedFrom(somSelf,aClassObj) \
    (SOM_Resolve(somSelf, SOMClass, somDescendedFrom) \
	(somSelf,aClassObj))
#define _somDescendedFrom SOMClass_somDescendedFrom

/*
 * New Method: somSupportsMethod
 */
typedef int    SOMLINK somTP_SOMClass_somSupportsMethod(SOMClass *somSelf,
		INOUT somId mId);
#pragma linkage(somTP_SOMClass_somSupportsMethod, system)
typedef somTP_SOMClass_somSupportsMethod *somTD_SOMClass_somSupportsMethod;
#define somMD_SOMClass_somSupportsMethod "----"
#define SOMClass_somSupportsMethod(somSelf,mId) \
    (SOM_Resolve(somSelf, SOMClass, somSupportsMethod) \
	(somSelf,mId))
#define _somSupportsMethod SOMClass_somSupportsMethod

/*
 * New Method: somFindMethod
 */
typedef int    SOMLINK somTP_SOMClass_somFindMethod(SOMClass *somSelf,
		INOUT somId methodId,
		OUT somMethodProc **m);
#pragma linkage(somTP_SOMClass_somFindMethod, system)
typedef somTP_SOMClass_somFindMethod *somTD_SOMClass_somFindMethod;
#define somMD_SOMClass_somFindMethod "----"
#define SOMClass_somFindMethod(somSelf,methodId,m) \
    (SOM_Resolve(somSelf, SOMClass, somFindMethod) \
	(somSelf,methodId,m))
#define _somFindMethod SOMClass_somFindMethod

/*
 * New Method: somFindMethodOk
 */
typedef int    SOMLINK somTP_SOMClass_somFindMethodOk(SOMClass *somSelf,
		INOUT somId methodId,
		OUT somMethodProc **m);
#pragma linkage(somTP_SOMClass_somFindMethodOk, system)
typedef somTP_SOMClass_somFindMethodOk *somTD_SOMClass_somFindMethodOk;
#define somMD_SOMClass_somFindMethodOk "----"
#define SOMClass_somFindMethodOk(somSelf,methodId,m) \
    (SOM_Resolve(somSelf, SOMClass, somFindMethodOk) \
	(somSelf,methodId,m))
#define _somFindMethodOk SOMClass_somFindMethodOk

/*
 * New Method: somFindSMethod
 */
typedef somMethodProc *   SOMLINK somTP_SOMClass_somFindSMethod(SOMClass *somSelf,
		INOUT somId methodId);
#pragma linkage(somTP_SOMClass_somFindSMethod, system)
typedef somTP_SOMClass_somFindSMethod *somTD_SOMClass_somFindSMethod;
#define somMD_SOMClass_somFindSMethod "----"
#define SOMClass_somFindSMethod(somSelf,methodId) \
    (SOM_Resolve(somSelf, SOMClass, somFindSMethod) \
	(somSelf,methodId))
#define _somFindSMethod SOMClass_somFindSMethod

/*
 * New Method: somFindSMethodOk
 */
typedef somMethodProc *   SOMLINK somTP_SOMClass_somFindSMethodOk(SOMClass *somSelf,
		INOUT somId methodId);
#pragma linkage(somTP_SOMClass_somFindSMethodOk, system)
typedef somTP_SOMClass_somFindSMethodOk *somTD_SOMClass_somFindSMethodOk;
#define somMD_SOMClass_somFindSMethodOk "----"
#define SOMClass_somFindSMethodOk(somSelf,methodId) \
    (SOM_Resolve(somSelf, SOMClass, somFindSMethodOk) \
	(somSelf,methodId))
#define _somFindSMethodOk SOMClass_somFindSMethodOk

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

/*
 * Declare the class data structure
 */
SOMEXTERN struct SOMClassClassDataStructure {
	SOMAny *classObject;
	somMToken somNew;
	somMToken somRenew;
	somMToken somInitClass;
	somMToken somClassReady;
	somMToken somGetName;
	somMToken somGetParent;
	somMToken somDescendedFrom;
	somMToken somCheckVersion;
	somMToken somFindMethod;
	somMToken somFindMethodOk;
	somMToken somSupportsMethod;
	somMToken somGetNumMethods;
	somMToken somGetInstanceSize;
	somMToken somGetInstanceOffset;
	somMToken somGetInstancePartSize;
	somMToken somGetMethodIndex;
	somMToken somGetNumStaticMethods;
	somMToken somGetPClsMtab;
	somMToken somGetClassMtab;
	somMToken somAddStaticMethod;
	somMToken somOverrideSMethod;
	somMToken somAddDynamicMethod;
	somMToken somGetMethodOffset;
	somMToken somGetApplyStub;
	somMToken somFindSMethod;
	somMToken somFindSMethodOk;
	somMToken somGetMethodDescriptor;
	somMToken somGetNthMethodInfo;
	somMToken somSetClassData;
	somMToken somGetClassData;
	somMToken somNewNoInit;
	somMToken somRenewNoInit;
	somMToken somGetInstanceToken;
	somMToken somGetMemberToken;
	somMToken somSetMethodDescriptor;
	somMToken somGetMethodData;
} SOMClassClassData;

/*
 * Declare the C specific class data structure
 */
SOMEXTERN struct SOMClassCClassDataStructure {
	somMethodTab *parentMtab;
	somDToken instanceDataToken;
} SOMClassCClassData;

#endif       /* somcls_h */
