
/*
 * This file was generated by the SOM Compiler.
 * FileName: \odwin\h\REFCTOBJ.h.
 * Generated using:
 *     SOM Precompiler somipc: 2.29.1.3
 *     SOM Emitter emith.dll: 2.41
 */

/*
 * 
 *  Theory of Operation
 * 
 * 
 *   This file defines class ODRefCntObject.  This class is the common base class
 *   for all OpenDoc classes whose objects require ref counting.
 * 
 *  Classes defined in this interface
 * 
 */


#ifndef SOM_ODRefCntObject_h
#define SOM_ODRefCntObject_h


#include <som.h>

/*
 * -- This emitter treats Method Tokens as Thunks by default.
 * -- Use the sc modifier "nothunks" to change this default
 */
#undef somresolve_
#define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))



/*
 * Define class data structures as resolution macros
 */
#define ODRefCntObjectClassData (*resolve_ODRefCntObjectClassData())
#define ODRefCntObjectCClassData (*resolve_ODRefCntObjectCClassData())

/*
 * Define the class name as an object type
 */
#ifndef ODRefCntObject
#define ODRefCntObject SOMObject
#endif
#include <ODObject.h>

/*
 * Start of user-defined types:
 */
#ifndef SOMClass
    #define SOMClass SOMObject
#endif /* SOMClass */
#ifndef ODObject
    #define ODObject SOMObject
#endif /* ODObject */
#ifndef ODExtension
    #define ODExtension SOMObject
#endif /* ODExtension */
#ifndef ODRefCntObject
    #define ODRefCntObject SOMObject
#endif /* ODRefCntObject */

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

#define ODRefCntObject_MajorVersion 0
#define ODRefCntObject_MinorVersion 0

/*
 * External name shortening if required
 */
#ifdef SOM_USE_SHORT_EXTERNAL_NAMES
#define ODRefCntObjectNewClass c
#define ODRefCntObjectClassData d
#define ODRefCntObjectCClassData x
#endif /* SOM_USE_SHORT_EXTERNAL_NAMES */
/*--------------Migration------------*/
#define ODRefCntObject_classObj ODRefCntObjectClassData.classObject
#define _ODRefCntObject ODRefCntObject_classObj

/*
 * Declare the class creation procedure
 */
SOMEXTERN SOMClass * SOMLINK ODRefCntObjectNewClass(integer4 somntmajorVersion,
		integer4 somntminorVersion);

/*
 * Declare the class data structure
 */
SOMEXTERN struct ODRefCntObjectClassDataStructure {
	SOMClass *classObject;
	somMToken InitRefCntObject;
	somMToken IncrementRefCount;
	somMToken Release;
	somMToken GetRefCount;
}  _ODRefCntObjectClassData;
SOMEXTERN struct ODRefCntObjectClassDataStructure * SOMLINK resolve_ODRefCntObjectClassData(void);

/*
 * Declare the C specific class data structure
 */
SOMEXTERN struct ODRefCntObjectCClassDataStructure {
	somMethodTabs parentMtab;
	somDToken instanceDataToken;
}  _ODRefCntObjectCClassData;
SOMEXTERN struct ODRefCntObjectCClassDataStructure * SOMLINK resolve_ODRefCntObjectCClassData(void);

/*
 * New and Renew macros for ODRefCntObject
 */
#define ODRefCntObjectNew() \
   (_somNew(_ODRefCntObject ? _ODRefCntObject : ODRefCntObjectNewClass(ODRefCntObject_MajorVersion, ODRefCntObject_MinorVersion)))
#define ODRefCntObjectRenew(buf) \
   (_somRenew(_ODRefCntObject ? _ODRefCntObject : ODRefCntObjectNewClass(ODRefCntObject_MajorVersion, ODRefCntObject_MinorVersion), buf))

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

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

/*
 * New Method: InitRefCntObject
 */
typedef void   (SOMLINK * somTD_ODRefCntObject_InitRefCntObject)(ODRefCntObject *somSelf, Environment *ev);
#define somMD_ODRefCntObject_InitRefCntObject "::ODRefCntObject::InitRefCntObject"
#define ODRefCntObject_InitRefCntObject(somSelf,ev) \
    (SOM_Resolve(somSelf, ODRefCntObject, InitRefCntObject) \
	(somSelf,ev))
#ifndef SOMGD_InitRefCntObject
    #if (defined(_InitRefCntObject) || defined(__InitRefCntObject))
        #undef _InitRefCntObject
        #undef __InitRefCntObject
        #define SOMGD_InitRefCntObject 1
    #else
        #define _InitRefCntObject ODRefCntObject_InitRefCntObject
    #endif /* _InitRefCntObject */
#endif /* SOMGD_InitRefCntObject */

/*
 * New Method: IncrementRefCount
 */
typedef void   (SOMLINK * somTD_ODRefCntObject_IncrementRefCount)(ODRefCntObject *somSelf, Environment *ev);
#define somMD_ODRefCntObject_IncrementRefCount "::ODRefCntObject::IncrementRefCount"
#define ODRefCntObject_IncrementRefCount(somSelf,ev) \
    (SOM_Resolve(somSelf, ODRefCntObject, IncrementRefCount) \
	(somSelf,ev))
#ifndef SOMGD_IncrementRefCount
    #if (defined(_IncrementRefCount) || defined(__IncrementRefCount))
        #undef _IncrementRefCount
        #undef __IncrementRefCount
        #define SOMGD_IncrementRefCount 1
    #else
        #define _IncrementRefCount ODRefCntObject_IncrementRefCount
    #endif /* _IncrementRefCount */
#endif /* SOMGD_IncrementRefCount */

/*
 * New Method: Release
 */
typedef void   (SOMLINK * somTD_ODRefCntObject_Release)(ODRefCntObject *somSelf, Environment *ev);
#define somMD_ODRefCntObject_Release "::ODRefCntObject::Release"
#define ODRefCntObject_Release(somSelf,ev) \
    (SOM_Resolve(somSelf, ODRefCntObject, Release) \
	(somSelf,ev))
#ifndef SOMGD_Release
    #if (defined(_Release) || defined(__Release))
        #undef _Release
        #undef __Release
        #define SOMGD_Release 1
    #else
        #define _Release ODRefCntObject_Release
    #endif /* _Release */
#endif /* SOMGD_Release */

/*
 * New Method: GetRefCount
 */
typedef ODULong   (SOMLINK * somTD_ODRefCntObject_GetRefCount)(ODRefCntObject *somSelf, Environment *ev);
#define somMD_ODRefCntObject_GetRefCount "::ODRefCntObject::GetRefCount"
#define ODRefCntObject_GetRefCount(somSelf,ev) \
    (SOM_Resolve(somSelf, ODRefCntObject, GetRefCount) \
	(somSelf,ev))
#ifndef SOMGD_GetRefCount
    #if (defined(_GetRefCount) || defined(__GetRefCount))
        #undef _GetRefCount
        #undef __GetRefCount
        #define SOMGD_GetRefCount 1
    #else
        #define _GetRefCount ODRefCntObject_GetRefCount
    #endif /* _GetRefCount */
#endif /* SOMGD_GetRefCount */
#ifndef SOM_DONT_USE_INHERITED_MACROS
#define ODRefCntObject_InitObject ODObject_InitObject
#define ODRefCntObject_IsInitialized ODObject_IsInitialized
#define ODRefCntObject_HasExtension ODObject_HasExtension
#define ODRefCntObject_GetExtension ODObject_GetExtension
#define ODRefCntObject_ReleaseExtension ODObject_ReleaseExtension
#define ODRefCntObject_Purge ODObject_Purge
#define ODRefCntObject_IsEqualTo ODObject_IsEqualTo
#define ODRefCntObject_SubClassResponsibility ODObject_SubClassResponsibility
#define ODRefCntObject_somDefaultInit SOMObject_somDefaultInit
#define ODRefCntObject_somDestruct SOMObject_somDestruct
#define ODRefCntObject_somDefaultCopyInit SOMObject_somDefaultCopyInit
#define ODRefCntObject_somDefaultAssign SOMObject_somDefaultAssign
#define ODRefCntObject_somDefaultConstCopyInit SOMObject_somDefaultConstCopyInit
#define ODRefCntObject_somDefaultVCopyInit SOMObject_somDefaultVCopyInit
#define ODRefCntObject_somDefaultConstVCopyInit SOMObject_somDefaultConstVCopyInit
#define ODRefCntObject_somDefaultConstAssign SOMObject_somDefaultConstAssign
#define ODRefCntObject_somDefaultVAssign SOMObject_somDefaultVAssign
#define ODRefCntObject_somDefaultConstVAssign SOMObject_somDefaultConstVAssign
#define ODRefCntObject_somFree SOMObject_somFree
#define ODRefCntObject_somGetClass SOMObject_somGetClass
#define ODRefCntObject_somGetClassName SOMObject_somGetClassName
#define ODRefCntObject_somGetSize SOMObject_somGetSize
#define ODRefCntObject_somIsA SOMObject_somIsA
#define ODRefCntObject_somIsInstanceOf SOMObject_somIsInstanceOf
#define ODRefCntObject_somRespondsTo SOMObject_somRespondsTo
#define ODRefCntObject_somDispatch SOMObject_somDispatch
#define ODRefCntObject_somClassDispatch SOMObject_somClassDispatch
#define ODRefCntObject_somCastObj SOMObject_somCastObj
#define ODRefCntObject_somResetObj SOMObject_somResetObj
#define ODRefCntObject_somDispatchV SOMObject_somDispatchV
#define ODRefCntObject_somDispatchL SOMObject_somDispatchL
#define ODRefCntObject_somDispatchA SOMObject_somDispatchA
#define ODRefCntObject_somDispatchD SOMObject_somDispatchD
#define ODRefCntObject_somPrintSelf SOMObject_somPrintSelf
#define ODRefCntObject_somDumpSelf SOMObject_somDumpSelf
#define ODRefCntObject_somDumpSelfInt SOMObject_somDumpSelfInt
#endif /* SOM_DONT_USE_INHERITED_MACROS */

#endif       /* SOM_ODRefCntObject_h */
