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

/*
 * 
 *  Theory of Operation
 * 
 * 
 *   This class is used to represent the destination side of OpenDoc links.
 *   ODDrafts create and own these links. The source ODPart will ask the draft
 *   to create an ODLinkSource and an ODLink pair, and return the ODLink
 *   object to the the destination part.  The destination part uses the ODLink
 *   object to extract the contents of the link.
 * 
 *  Classes defined in this interface
 * 
 */


#ifndef SOM_ODLink_h
#define SOM_ODLink_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 ODLinkClassData (*resolve_ODLinkClassData())
#define ODLinkCClassData (*resolve_ODLinkCClassData())

/*
 * Define the class name as an object type
 */
#ifndef ODLink
#define ODLink SOMObject
#endif
#include <LinkB.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 ODPersistentObject
    #define ODPersistentObject SOMObject
#endif /* ODPersistentObject */
#ifndef ODStorageUnit
    #define ODStorageUnit SOMObject
#endif /* ODStorageUnit */
#ifndef ODFrame
    #define ODFrame SOMObject
#endif /* ODFrame */
#ifndef ODBaseLink
    #define ODBaseLink SOMObject
#endif /* ODBaseLink */
#ifndef ODLinkSource
    #define ODLinkSource SOMObject
#endif /* ODLinkSource */
#ifndef ODPart
    #define ODPart SOMObject
#endif /* ODPart */
#ifndef ODPartList
    #define ODPartList SOMObject
#endif /* ODPartList */
#ifndef ODDraft
    #define ODDraft SOMObject
#endif /* ODDraft */
#ifndef ODFacet
    #define ODFacet SOMObject
#endif /* ODFacet */
#ifndef ODLink
    #define ODLink SOMObject
#endif /* ODLink */

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

#define ODLink_MajorVersion 1
#define ODLink_MinorVersion 0

/*
 * External name shortening if required
 */
#ifdef SOM_USE_SHORT_EXTERNAL_NAMES
#define ODLinkNewClass c
#define ODLinkClassData d
#define ODLinkCClassData x
#endif /* SOM_USE_SHORT_EXTERNAL_NAMES */
/*--------------Migration------------*/
#define ODLink_classObj ODLinkClassData.classObject
#define _ODLink ODLink_classObj

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

/*
 * Declare the class data structure
 */
SOMEXTERN struct ODLinkClassDataStructure {
	SOMClass *classObject;
	somMToken InitLink;
	somMToken InitLinkFromStorage;
	somMToken CreateLinkEdition;
	somMToken GetLinkEdition;
	somMToken UpdateLinkEdition;
	somMToken GetTextValue;
	somMToken CloneIntoMemoryContainer;
	somMToken RefreshDataObject;
	somMToken UpdateDependents;
	somMToken ThrowIfInvalidKey;
	somMToken GetDataObject;
	somMToken UseItemName;
}  _ODLinkClassData;
SOMEXTERN struct ODLinkClassDataStructure * SOMLINK resolve_ODLinkClassData(void);

/*
 * Declare the C specific class data structure
 */
SOMEXTERN struct ODLinkCClassDataStructure {
	somMethodTabs parentMtab;
	somDToken instanceDataToken;
}  _ODLinkCClassData;
SOMEXTERN struct ODLinkCClassDataStructure * SOMLINK resolve_ODLinkCClassData(void);

/*
 * New and Renew macros for ODLink
 */
#define ODLinkNew() \
   (_somNew(_ODLink ? _ODLink : ODLinkNewClass(ODLink_MajorVersion, ODLink_MinorVersion)))
#define ODLinkRenew(buf) \
   (_somRenew(_ODLink ? _ODLink : ODLinkNewClass(ODLink_MajorVersion, ODLink_MinorVersion), buf))

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

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

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

/*
 * Override method: Externalize
 */
#define ODLink_Externalize(somSelf,ev) \
	ODPersistentObject_Externalize(somSelf,ev)

/*
 * Override method: ReleaseAll
 */
#define ODLink_ReleaseAll(somSelf,ev) \
	ODPersistentObject_ReleaseAll(somSelf,ev)

/*
 * Override method: CloneInto
 */
#define ODLink_CloneInto(somSelf,ev,key,toSU,scope) \
	ODPersistentObject_CloneInto(somSelf,ev,key,toSU,scope)

/*
 * Override method: GetChangeID
 */
#define ODLink_GetChangeID(somSelf,ev) \
	ODBaseLink_GetChangeID(somSelf,ev)

/*
 * Override method: GetChangeTime
 */
#define ODLink_GetChangeTime(somSelf,ev) \
	ODBaseLink_GetChangeTime(somSelf,ev)

/*
 * Override method: GetContentStorageUnit
 */
#define ODLink_GetContentStorageUnit(somSelf,ev,key) \
	ODBaseLink_GetContentStorageUnit(somSelf,ev,key)

/*
 * Override method: GetStatus
 */
#define ODLink_GetStatus(somSelf,ev) \
	ODBaseLink_GetStatus(somSelf,ev)

/*
 * Override method: Lock
 */
#define ODLink_Lock(somSelf,ev,wait,key) \
	ODBaseLink_Lock(somSelf,ev,wait,key)

/*
 * Override method: Unlock
 */
#define ODLink_Unlock(somSelf,ev,key) \
	ODBaseLink_Unlock(somSelf,ev,key)

/*
 * Override method: RegisterDependent
 */
#define ODLink_RegisterDependent(somSelf,ev,clientPart,id) \
	ODBaseLink_RegisterDependent(somSelf,ev,clientPart,id)

/*
 * Override method: ShowSourceContent
 */
#define ODLink_ShowSourceContent(somSelf,ev) \
	ODBaseLink_ShowSourceContent(somSelf,ev)

/*
 * Override method: UnregisterDependent
 */
#define ODLink_UnregisterDependent(somSelf,ev,clientPart) \
	ODBaseLink_UnregisterDependent(somSelf,ev,clientPart)

/*
 * Override method: ShowLinkDestinationInfo
 */
#define ODLink_ShowLinkDestinationInfo(somSelf,ev,facet,info,infoResult) \
	ODBaseLink_ShowLinkDestinationInfo(somSelf,ev,facet,info,infoResult)

/*
 * Override method: GetLinkSource
 */
#define ODLink_GetLinkSource(somSelf,ev) \
	ODBaseLink_GetLinkSource(somSelf,ev)

/*
 * New Method: UpdateDependents
 */
typedef void   (SOMLINK * somTD_ODLink_UpdateDependents)(ODLink *somSelf, Environment *ev,
		ODChangeID id);
#define somMD_ODLink_UpdateDependents "::ODLink::UpdateDependents"
#define ODLink_UpdateDependents(somSelf,ev,id) \
    (SOM_Resolve(somSelf, ODLink, UpdateDependents) \
	(somSelf,ev,id))
#ifndef SOMGD_UpdateDependents
    #if (defined(_UpdateDependents) || defined(__UpdateDependents))
        #undef _UpdateDependents
        #undef __UpdateDependents
        #define SOMGD_UpdateDependents 1
    #else
        #define _UpdateDependents ODLink_UpdateDependents
    #endif /* _UpdateDependents */
#endif /* SOMGD_UpdateDependents */

/*
 * New Method: InitLink
 */
typedef void   (SOMLINK * somTD_ODLink_InitLink)(ODLink *somSelf, Environment *ev,
		ODStorageUnit* storageUnit,
		ODLinkSource* linkSource);
#define somMD_ODLink_InitLink "::ODLink::InitLink"
#define ODLink_InitLink(somSelf,ev,storageUnit,linkSource) \
    (SOM_Resolve(somSelf, ODLink, InitLink) \
	(somSelf,ev,storageUnit,linkSource))
#ifndef SOMGD_InitLink
    #if (defined(_InitLink) || defined(__InitLink))
        #undef _InitLink
        #undef __InitLink
        #define SOMGD_InitLink 1
    #else
        #define _InitLink ODLink_InitLink
    #endif /* _InitLink */
#endif /* SOMGD_InitLink */

/*
 * New Method: InitLinkFromStorage
 */
typedef void   (SOMLINK * somTD_ODLink_InitLinkFromStorage)(ODLink *somSelf, Environment *ev,
		ODStorageUnit* storageUnit);
#define somMD_ODLink_InitLinkFromStorage "::ODLink::InitLinkFromStorage"
#define ODLink_InitLinkFromStorage(somSelf,ev,storageUnit) \
    (SOM_Resolve(somSelf, ODLink, InitLinkFromStorage) \
	(somSelf,ev,storageUnit))
#ifndef SOMGD_InitLinkFromStorage
    #if (defined(_InitLinkFromStorage) || defined(__InitLinkFromStorage))
        #undef _InitLinkFromStorage
        #undef __InitLinkFromStorage
        #define SOMGD_InitLinkFromStorage 1
    #else
        #define _InitLinkFromStorage ODLink_InitLinkFromStorage
    #endif /* _InitLinkFromStorage */
#endif /* SOMGD_InitLinkFromStorage */

/*
 * New Method: GetTextValue
 */
typedef ODHandle   (SOMLINK * somTD_ODLink_GetTextValue)(ODLink *somSelf, Environment *ev,
		ODLinkKey key);
#define somMD_ODLink_GetTextValue "::ODLink::GetTextValue"
#define ODLink_GetTextValue(somSelf,ev,key) \
    (SOM_Resolve(somSelf, ODLink, GetTextValue) \
	(somSelf,ev,key))
#ifndef SOMGD_GetTextValue
    #if (defined(_GetTextValue) || defined(__GetTextValue))
        #undef _GetTextValue
        #undef __GetTextValue
        #define SOMGD_GetTextValue 1
    #else
        #define _GetTextValue ODLink_GetTextValue
    #endif /* _GetTextValue */
#endif /* SOMGD_GetTextValue */

/*
 * New Method: CloneIntoMemoryContainer
 */
typedef ODHandle   (SOMLINK * somTD_ODLink_CloneIntoMemoryContainer)(ODLink *somSelf, Environment *ev,
		ODLinkKey key);
#define somMD_ODLink_CloneIntoMemoryContainer "::ODLink::CloneIntoMemoryContainer"
#define ODLink_CloneIntoMemoryContainer(somSelf,ev,key) \
    (SOM_Resolve(somSelf, ODLink, CloneIntoMemoryContainer) \
	(somSelf,ev,key))
#ifndef SOMGD_CloneIntoMemoryContainer
    #if (defined(_CloneIntoMemoryContainer) || defined(__CloneIntoMemoryContainer))
        #undef _CloneIntoMemoryContainer
        #undef __CloneIntoMemoryContainer
        #define SOMGD_CloneIntoMemoryContainer 1
    #else
        #define _CloneIntoMemoryContainer ODLink_CloneIntoMemoryContainer
    #endif /* _CloneIntoMemoryContainer */
#endif /* SOMGD_CloneIntoMemoryContainer */

/*
 * New Method: RefreshDataObject
 */
typedef void   (SOMLINK * somTD_ODLink_RefreshDataObject)(ODLink *somSelf, Environment *ev,
		ODLinkKey key);
#define somMD_ODLink_RefreshDataObject "::ODLink::RefreshDataObject"
#define ODLink_RefreshDataObject(somSelf,ev,key) \
    (SOM_Resolve(somSelf, ODLink, RefreshDataObject) \
	(somSelf,ev,key))
#ifndef SOMGD_RefreshDataObject
    #if (defined(_RefreshDataObject) || defined(__RefreshDataObject))
        #undef _RefreshDataObject
        #undef __RefreshDataObject
        #define SOMGD_RefreshDataObject 1
    #else
        #define _RefreshDataObject ODLink_RefreshDataObject
    #endif /* _RefreshDataObject */
#endif /* SOMGD_RefreshDataObject */

/*
 * New Method: ThrowIfInvalidKey
 */
typedef void   (SOMLINK * somTD_ODLink_ThrowIfInvalidKey)(ODLink *somSelf, Environment *ev,
		ODLinkKey key);
#define somMD_ODLink_ThrowIfInvalidKey "::ODLink::ThrowIfInvalidKey"
#define ODLink_ThrowIfInvalidKey(somSelf,ev,key) \
    (SOM_Resolve(somSelf, ODLink, ThrowIfInvalidKey) \
	(somSelf,ev,key))
#ifndef SOMGD_ThrowIfInvalidKey
    #if (defined(_ThrowIfInvalidKey) || defined(__ThrowIfInvalidKey))
        #undef _ThrowIfInvalidKey
        #undef __ThrowIfInvalidKey
        #define SOMGD_ThrowIfInvalidKey 1
    #else
        #define _ThrowIfInvalidKey ODLink_ThrowIfInvalidKey
    #endif /* _ThrowIfInvalidKey */
#endif /* SOMGD_ThrowIfInvalidKey */

/*
 * New Method: UseItemName
 */
typedef void   (SOMLINK * somTD_ODLink_UseItemName)(ODLink *somSelf, Environment *ev,
		char* pszItemName);
#define somMD_ODLink_UseItemName "::ODLink::UseItemName"
#define ODLink_UseItemName(somSelf,ev,pszItemName) \
    (SOM_Resolve(somSelf, ODLink, UseItemName) \
	(somSelf,ev,pszItemName))
#ifndef SOMGD_UseItemName
    #if (defined(_UseItemName) || defined(__UseItemName))
        #undef _UseItemName
        #undef __UseItemName
        #define SOMGD_UseItemName 1
    #else
        #define _UseItemName ODLink_UseItemName
    #endif /* _UseItemName */
#endif /* SOMGD_UseItemName */

/*
 * New Method: GetDataObject
 */
typedef LPVOID   (SOMLINK * somTD_ODLink_GetDataObject)(ODLink *somSelf, Environment *ev,
		ODLinkKey key);
#define somMD_ODLink_GetDataObject "::ODLink::GetDataObject"
#define ODLink_GetDataObject(somSelf,ev,key) \
    (SOM_Resolve(somSelf, ODLink, GetDataObject) \
	(somSelf,ev,key))
#ifndef SOMGD_GetDataObject
    #if (defined(_GetDataObject) || defined(__GetDataObject))
        #undef _GetDataObject
        #undef __GetDataObject
        #define SOMGD_GetDataObject 1
    #else
        #define _GetDataObject ODLink_GetDataObject
    #endif /* _GetDataObject */
#endif /* SOMGD_GetDataObject */
#ifndef SOM_DONT_USE_INHERITED_MACROS
#define ODLink_InitPersistentObject ODPersistentObject_InitPersistentObject
#define ODLink_InitPersistentObjectFromStorage ODPersistentObject_InitPersistentObjectFromStorage
#define ODLink_GetStorageUnit ODPersistentObject_GetStorageUnit
#define ODLink_GetID ODPersistentObject_GetID
#define ODLink_InitRefCntObject ODRefCntObject_InitRefCntObject
#define ODLink_IncrementRefCount ODRefCntObject_IncrementRefCount
#define ODLink_GetRefCount ODRefCntObject_GetRefCount
#define ODLink_InitObject ODObject_InitObject
#define ODLink_IsInitialized ODObject_IsInitialized
#define ODLink_HasExtension ODObject_HasExtension
#define ODLink_GetExtension ODObject_GetExtension
#define ODLink_ReleaseExtension ODObject_ReleaseExtension
#define ODLink_Purge ODObject_Purge
#define ODLink_IsEqualTo ODObject_IsEqualTo
#define ODLink_SubClassResponsibility ODObject_SubClassResponsibility
#define ODLink_somDefaultInit SOMObject_somDefaultInit
#define ODLink_somDestruct SOMObject_somDestruct
#define ODLink_somDefaultCopyInit SOMObject_somDefaultCopyInit
#define ODLink_somDefaultAssign SOMObject_somDefaultAssign
#define ODLink_somDefaultConstCopyInit SOMObject_somDefaultConstCopyInit
#define ODLink_somDefaultVCopyInit SOMObject_somDefaultVCopyInit
#define ODLink_somDefaultConstVCopyInit SOMObject_somDefaultConstVCopyInit
#define ODLink_somDefaultConstAssign SOMObject_somDefaultConstAssign
#define ODLink_somDefaultVAssign SOMObject_somDefaultVAssign
#define ODLink_somDefaultConstVAssign SOMObject_somDefaultConstVAssign
#define ODLink_somFree SOMObject_somFree
#define ODLink_somGetClass SOMObject_somGetClass
#define ODLink_somGetClassName SOMObject_somGetClassName
#define ODLink_somGetSize SOMObject_somGetSize
#define ODLink_somIsA SOMObject_somIsA
#define ODLink_somIsInstanceOf SOMObject_somIsInstanceOf
#define ODLink_somRespondsTo SOMObject_somRespondsTo
#define ODLink_somDispatch SOMObject_somDispatch
#define ODLink_somClassDispatch SOMObject_somClassDispatch
#define ODLink_somCastObj SOMObject_somCastObj
#define ODLink_somResetObj SOMObject_somResetObj
#define ODLink_somDispatchV SOMObject_somDispatchV
#define ODLink_somDispatchL SOMObject_somDispatchL
#define ODLink_somDispatchA SOMObject_somDispatchA
#define ODLink_somDispatchD SOMObject_somDispatchD
#define ODLink_somPrintSelf SOMObject_somPrintSelf
#define ODLink_somDumpSelf SOMObject_somDumpSelf
#define ODLink_somDumpSelfInt SOMObject_somDumpSelfInt
#endif /* SOM_DONT_USE_INHERITED_MACROS */

#endif       /* SOM_ODLink_h */
