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

/*
 * 
 *  Classes defined in this interface
 * 
 */


#ifndef SOM_ODDocument_h
#define SOM_ODDocument_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 ODDocumentClassData (*resolve_ODDocumentClassData())
#define ODDocumentCClassData (*resolve_ODDocumentCClassData())

/*
 * Define the class name as an object type
 */
#ifndef ODDocument
#define ODDocument SOMObject
#endif
#include <RefCtObj.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 */
#ifndef ODDocument
    #define ODDocument SOMObject
#endif /* ODDocument */
#ifndef ODContainer
    #define ODContainer SOMObject
#endif /* ODContainer */
#ifndef ODDraft
    #define ODDraft SOMObject
#endif /* ODDraft */
#ifndef ODStorageUnit
    #define ODStorageUnit SOMObject
#endif /* ODStorageUnit */

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

#define ODDocument_MajorVersion 0
#define ODDocument_MinorVersion 0

/*
 * External name shortening if required
 */
#ifdef SOM_USE_SHORT_EXTERNAL_NAMES
#define ODDocumentNewClass c
#define ODDocumentClassData d
#define ODDocumentCClassData x
#endif /* SOM_USE_SHORT_EXTERNAL_NAMES */
/*--------------Migration------------*/
#define ODDocument_classObj ODDocumentClassData.classObject
#define _ODDocument ODDocument_classObj

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

/*
 * Declare the class data structure
 */
SOMEXTERN struct ODDocumentClassDataStructure {
	SOMClass *classObject;
	somMToken GetContainer;
	somMToken GetID;
	somMToken GetName;
	somMToken SetName;
	somMToken CollapseDrafts;
	somMToken GetDraft;
	somMToken Exists;
	somMToken GetBaseDraft;
	somMToken CreateDraft;
	somMToken SaveToAPrevDraft;
	somMToken SetBaseDraftFromForeignDraft;
	somMToken InitDocument;
	somMToken ReleaseDraft;
	somMToken GetUserData;
	somMToken SetUserData;
}  _ODDocumentClassData;
SOMEXTERN struct ODDocumentClassDataStructure * SOMLINK resolve_ODDocumentClassData(void);

/*
 * Declare the C specific class data structure
 */
SOMEXTERN struct ODDocumentCClassDataStructure {
	somMethodTabs parentMtab;
	somDToken instanceDataToken;
}  _ODDocumentCClassData;
SOMEXTERN struct ODDocumentCClassDataStructure * SOMLINK resolve_ODDocumentCClassData(void);

/*
 * New and Renew macros for ODDocument
 */
#define ODDocumentNew() \
   (_somNew(_ODDocument ? _ODDocument : ODDocumentNewClass(ODDocument_MajorVersion, ODDocument_MinorVersion)))
#define ODDocumentRenew(buf) \
   (_somRenew(_ODDocument ? _ODDocument : ODDocumentNewClass(ODDocument_MajorVersion, ODDocument_MinorVersion), buf))

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

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

/*
 * Override method: IncrementRefCount
 */
#define ODDocument_IncrementRefCount(somSelf,ev) \
	ODRefCntObject_IncrementRefCount(somSelf,ev)

/*
 * Override method: Release
 */
#define ODDocument_Release(somSelf,ev) \
	ODRefCntObject_Release(somSelf,ev)

/*
 * New Method: GetContainer
 */
typedef ODContainer*   (SOMLINK * somTD_ODDocument_GetContainer)(ODDocument *somSelf, Environment *ev);
#define somMD_ODDocument_GetContainer "::ODDocument::GetContainer"
#define ODDocument_GetContainer(somSelf,ev) \
    (SOM_Resolve(somSelf, ODDocument, GetContainer) \
	(somSelf,ev))
#ifndef SOMGD_GetContainer
    #if (defined(_GetContainer) || defined(__GetContainer))
        #undef _GetContainer
        #undef __GetContainer
        #define SOMGD_GetContainer 1
    #else
        #define _GetContainer ODDocument_GetContainer
    #endif /* _GetContainer */
#endif /* SOMGD_GetContainer */

/*
 * New Method: GetID
 */
typedef ODDocumentID   (SOMLINK * somTD_ODDocument_GetID)(ODDocument *somSelf, Environment *ev);
#define somMD_ODDocument_GetID "::ODDocument::GetID"
#define ODDocument_GetID(somSelf,ev) \
    (SOM_Resolve(somSelf, ODDocument, GetID) \
	(somSelf,ev))
#ifndef SOMGD_GetID
    #if (defined(_GetID) || defined(__GetID))
        #undef _GetID
        #undef __GetID
        #define SOMGD_GetID 1
    #else
        #define _GetID ODDocument_GetID
    #endif /* _GetID */
#endif /* SOMGD_GetID */

/*
 * New Method: GetName
 */
typedef ODDocumentName   (SOMLINK * somTD_ODDocument_GetName)(ODDocument *somSelf, Environment *ev);
#define somMD_ODDocument_GetName "::ODDocument::GetName"
#define ODDocument_GetName(somSelf,ev) \
    (SOM_Resolve(somSelf, ODDocument, GetName) \
	(somSelf,ev))
#ifndef SOMGD_GetName
    #if (defined(_GetName) || defined(__GetName))
        #undef _GetName
        #undef __GetName
        #define SOMGD_GetName 1
    #else
        #define _GetName ODDocument_GetName
    #endif /* _GetName */
#endif /* SOMGD_GetName */

/*
 * New Method: SetName
 */
typedef void   (SOMLINK * somTD_ODDocument_SetName)(ODDocument *somSelf, Environment *ev,
		ODDocumentName* name);
#define somMD_ODDocument_SetName "::ODDocument::SetName"
#define ODDocument_SetName(somSelf,ev,name) \
    (SOM_Resolve(somSelf, ODDocument, SetName) \
	(somSelf,ev,name))
#ifndef SOMGD_SetName
    #if (defined(_SetName) || defined(__SetName))
        #undef _SetName
        #undef __SetName
        #define SOMGD_SetName 1
    #else
        #define _SetName ODDocument_SetName
    #endif /* _SetName */
#endif /* SOMGD_SetName */

/*
 * New Method: CollapseDrafts
 */
typedef ODDocument*   (SOMLINK * somTD_ODDocument_CollapseDrafts)(ODDocument *somSelf, Environment *ev,
		ODDraft* from,
		ODDraft* to);
#define somMD_ODDocument_CollapseDrafts "::ODDocument::CollapseDrafts"
#define ODDocument_CollapseDrafts(somSelf,ev,from,to) \
    (SOM_Resolve(somSelf, ODDocument, CollapseDrafts) \
	(somSelf,ev,from,to))
#ifndef SOMGD_CollapseDrafts
    #if (defined(_CollapseDrafts) || defined(__CollapseDrafts))
        #undef _CollapseDrafts
        #undef __CollapseDrafts
        #define SOMGD_CollapseDrafts 1
    #else
        #define _CollapseDrafts ODDocument_CollapseDrafts
    #endif /* _CollapseDrafts */
#endif /* SOMGD_CollapseDrafts */

/*
 * New Method: GetDraft
 */
typedef ODDraft*   (SOMLINK * somTD_ODDocument_GetDraft)(ODDocument *somSelf, Environment *ev,
		ODDraftPermissions perms,
		ODDraftID id,
		ODDraft* draft,
		ODPositionCode posCode,
		ODBoolean release);
#define somMD_ODDocument_GetDraft "::ODDocument::GetDraft"
#define ODDocument_GetDraft(somSelf,ev,perms,id,draft,posCode,release) \
    (SOM_Resolve(somSelf, ODDocument, GetDraft) \
	(somSelf,ev,perms,id,draft,posCode,release))
#ifndef SOMGD_GetDraft
    #if (defined(_GetDraft) || defined(__GetDraft))
        #undef _GetDraft
        #undef __GetDraft
        #define SOMGD_GetDraft 1
    #else
        #define _GetDraft ODDocument_GetDraft
    #endif /* _GetDraft */
#endif /* SOMGD_GetDraft */

/*
 * New Method: Exists
 */
typedef ODBoolean   (SOMLINK * somTD_ODDocument_Exists)(ODDocument *somSelf, Environment *ev,
		ODDraftID id,
		ODDraft* draft,
		ODPositionCode posCode);
#define somMD_ODDocument_Exists "::ODDocument::Exists"
#define ODDocument_Exists(somSelf,ev,id,draft,posCode) \
    (SOM_Resolve(somSelf, ODDocument, Exists) \
	(somSelf,ev,id,draft,posCode))
#ifndef SOMGD_Exists
    #if (defined(_Exists) || defined(__Exists))
        #undef _Exists
        #undef __Exists
        #define SOMGD_Exists 1
    #else
        #define _Exists ODDocument_Exists
    #endif /* _Exists */
#endif /* SOMGD_Exists */

/*
 * New Method: GetBaseDraft
 */
typedef ODDraft*   (SOMLINK * somTD_ODDocument_GetBaseDraft)(ODDocument *somSelf, Environment *ev,
		ODDraftPermissions perms);
#define somMD_ODDocument_GetBaseDraft "::ODDocument::GetBaseDraft"
#define ODDocument_GetBaseDraft(somSelf,ev,perms) \
    (SOM_Resolve(somSelf, ODDocument, GetBaseDraft) \
	(somSelf,ev,perms))
#ifndef SOMGD_GetBaseDraft
    #if (defined(_GetBaseDraft) || defined(__GetBaseDraft))
        #undef _GetBaseDraft
        #undef __GetBaseDraft
        #define SOMGD_GetBaseDraft 1
    #else
        #define _GetBaseDraft ODDocument_GetBaseDraft
    #endif /* _GetBaseDraft */
#endif /* SOMGD_GetBaseDraft */

/*
 * New Method: CreateDraft
 */
typedef ODDraft*   (SOMLINK * somTD_ODDocument_CreateDraft)(ODDocument *somSelf, Environment *ev,
		ODDraft* below,
		ODBoolean releaseBelow);
#define somMD_ODDocument_CreateDraft "::ODDocument::CreateDraft"
#define ODDocument_CreateDraft(somSelf,ev,below,releaseBelow) \
    (SOM_Resolve(somSelf, ODDocument, CreateDraft) \
	(somSelf,ev,below,releaseBelow))
#ifndef SOMGD_CreateDraft
    #if (defined(_CreateDraft) || defined(__CreateDraft))
        #undef _CreateDraft
        #undef __CreateDraft
        #define SOMGD_CreateDraft 1
    #else
        #define _CreateDraft ODDocument_CreateDraft
    #endif /* _CreateDraft */
#endif /* SOMGD_CreateDraft */

/*
 * New Method: SaveToAPrevDraft
 */
typedef void   (SOMLINK * somTD_ODDocument_SaveToAPrevDraft)(ODDocument *somSelf, Environment *ev,
		ODDraft* from,
		ODDraft* to);
#define somMD_ODDocument_SaveToAPrevDraft "::ODDocument::SaveToAPrevDraft"
#define ODDocument_SaveToAPrevDraft(somSelf,ev,from,to) \
    (SOM_Resolve(somSelf, ODDocument, SaveToAPrevDraft) \
	(somSelf,ev,from,to))
#ifndef SOMGD_SaveToAPrevDraft
    #if (defined(_SaveToAPrevDraft) || defined(__SaveToAPrevDraft))
        #undef _SaveToAPrevDraft
        #undef __SaveToAPrevDraft
        #define SOMGD_SaveToAPrevDraft 1
    #else
        #define _SaveToAPrevDraft ODDocument_SaveToAPrevDraft
    #endif /* _SaveToAPrevDraft */
#endif /* SOMGD_SaveToAPrevDraft */

/*
 * New Method: SetBaseDraftFromForeignDraft
 */
typedef void   (SOMLINK * somTD_ODDocument_SetBaseDraftFromForeignDraft)(ODDocument *somSelf, Environment *ev,
		ODDraft* draft);
#define somMD_ODDocument_SetBaseDraftFromForeignDraft "::ODDocument::SetBaseDraftFromForeignDraft"
#define ODDocument_SetBaseDraftFromForeignDraft(somSelf,ev,draft) \
    (SOM_Resolve(somSelf, ODDocument, SetBaseDraftFromForeignDraft) \
	(somSelf,ev,draft))
#ifndef SOMGD_SetBaseDraftFromForeignDraft
    #if (defined(_SetBaseDraftFromForeignDraft) || defined(__SetBaseDraftFromForeignDraft))
        #undef _SetBaseDraftFromForeignDraft
        #undef __SetBaseDraftFromForeignDraft
        #define SOMGD_SetBaseDraftFromForeignDraft 1
    #else
        #define _SetBaseDraftFromForeignDraft ODDocument_SetBaseDraftFromForeignDraft
    #endif /* _SetBaseDraftFromForeignDraft */
#endif /* SOMGD_SetBaseDraftFromForeignDraft */

/*
 * New Method: InitDocument
 */
typedef void   (SOMLINK * somTD_ODDocument_InitDocument)(ODDocument *somSelf, Environment *ev,
		ODContainer* container,
		ODDocumentID id);
#define somMD_ODDocument_InitDocument "::ODDocument::InitDocument"
#define ODDocument_InitDocument(somSelf,ev,container,id) \
    (SOM_Resolve(somSelf, ODDocument, InitDocument) \
	(somSelf,ev,container,id))
#ifndef SOMGD_InitDocument
    #if (defined(_InitDocument) || defined(__InitDocument))
        #undef _InitDocument
        #undef __InitDocument
        #define SOMGD_InitDocument 1
    #else
        #define _InitDocument ODDocument_InitDocument
    #endif /* _InitDocument */
#endif /* SOMGD_InitDocument */

/*
 * New Method: ReleaseDraft
 */
typedef ODDocument*   (SOMLINK * somTD_ODDocument_ReleaseDraft)(ODDocument *somSelf, Environment *ev,
		ODDraft* draft);
#define somMD_ODDocument_ReleaseDraft "::ODDocument::ReleaseDraft"
#define ODDocument_ReleaseDraft(somSelf,ev,draft) \
    (SOM_Resolve(somSelf, ODDocument, ReleaseDraft) \
	(somSelf,ev,draft))
#ifndef SOMGD_ReleaseDraft
    #if (defined(_ReleaseDraft) || defined(__ReleaseDraft))
        #undef _ReleaseDraft
        #undef __ReleaseDraft
        #define SOMGD_ReleaseDraft 1
    #else
        #define _ReleaseDraft ODDocument_ReleaseDraft
    #endif /* _ReleaseDraft */
#endif /* SOMGD_ReleaseDraft */

/*
 * New Method: GetUserData
 */
typedef void*   (SOMLINK * somTD_ODDocument_GetUserData)(ODDocument *somSelf, Environment *ev);
#define somMD_ODDocument_GetUserData "::ODDocument::GetUserData"
#define ODDocument_GetUserData(somSelf,ev) \
    (SOM_Resolve(somSelf, ODDocument, GetUserData) \
	(somSelf,ev))
#ifndef SOMGD_GetUserData
    #if (defined(_GetUserData) || defined(__GetUserData))
        #undef _GetUserData
        #undef __GetUserData
        #define SOMGD_GetUserData 1
    #else
        #define _GetUserData ODDocument_GetUserData
    #endif /* _GetUserData */
#endif /* SOMGD_GetUserData */

/*
 * New Method: SetUserData
 */
typedef void   (SOMLINK * somTD_ODDocument_SetUserData)(ODDocument *somSelf, Environment *ev,
		void* userData);
#define somMD_ODDocument_SetUserData "::ODDocument::SetUserData"
#define ODDocument_SetUserData(somSelf,ev,userData) \
    (SOM_Resolve(somSelf, ODDocument, SetUserData) \
	(somSelf,ev,userData))
#ifndef SOMGD_SetUserData
    #if (defined(_SetUserData) || defined(__SetUserData))
        #undef _SetUserData
        #undef __SetUserData
        #define SOMGD_SetUserData 1
    #else
        #define _SetUserData ODDocument_SetUserData
    #endif /* _SetUserData */
#endif /* SOMGD_SetUserData */
#ifndef SOM_DONT_USE_INHERITED_MACROS
#define ODDocument_InitRefCntObject ODRefCntObject_InitRefCntObject
#define ODDocument_GetRefCount ODRefCntObject_GetRefCount
#define ODDocument_InitObject ODObject_InitObject
#define ODDocument_IsInitialized ODObject_IsInitialized
#define ODDocument_HasExtension ODObject_HasExtension
#define ODDocument_GetExtension ODObject_GetExtension
#define ODDocument_ReleaseExtension ODObject_ReleaseExtension
#define ODDocument_Purge ODObject_Purge
#define ODDocument_IsEqualTo ODObject_IsEqualTo
#define ODDocument_SubClassResponsibility ODObject_SubClassResponsibility
#define ODDocument_somDefaultInit SOMObject_somDefaultInit
#define ODDocument_somDestruct SOMObject_somDestruct
#define ODDocument_somDefaultCopyInit SOMObject_somDefaultCopyInit
#define ODDocument_somDefaultAssign SOMObject_somDefaultAssign
#define ODDocument_somDefaultConstCopyInit SOMObject_somDefaultConstCopyInit
#define ODDocument_somDefaultVCopyInit SOMObject_somDefaultVCopyInit
#define ODDocument_somDefaultConstVCopyInit SOMObject_somDefaultConstVCopyInit
#define ODDocument_somDefaultConstAssign SOMObject_somDefaultConstAssign
#define ODDocument_somDefaultVAssign SOMObject_somDefaultVAssign
#define ODDocument_somDefaultConstVAssign SOMObject_somDefaultConstVAssign
#define ODDocument_somFree SOMObject_somFree
#define ODDocument_somGetClass SOMObject_somGetClass
#define ODDocument_somGetClassName SOMObject_somGetClassName
#define ODDocument_somGetSize SOMObject_somGetSize
#define ODDocument_somIsA SOMObject_somIsA
#define ODDocument_somIsInstanceOf SOMObject_somIsInstanceOf
#define ODDocument_somRespondsTo SOMObject_somRespondsTo
#define ODDocument_somDispatch SOMObject_somDispatch
#define ODDocument_somClassDispatch SOMObject_somClassDispatch
#define ODDocument_somCastObj SOMObject_somCastObj
#define ODDocument_somResetObj SOMObject_somResetObj
#define ODDocument_somDispatchV SOMObject_somDispatchV
#define ODDocument_somDispatchL SOMObject_somDispatchL
#define ODDocument_somDispatchA SOMObject_somDispatchA
#define ODDocument_somDispatchD SOMObject_somDispatchD
#define ODDocument_somPrintSelf SOMObject_somPrintSelf
#define ODDocument_somDumpSelf SOMObject_somDumpSelf
#define ODDocument_somDumpSelfInt SOMObject_somDumpSelfInt
#endif /* SOM_DONT_USE_INHERITED_MACROS */

#endif       /* SOM_ODDocument_h */
