
/*
 * This file was generated by the SOM Compiler.
 * FileName: link.h.
 * Generated using:
 *     SOM Precompiler somipc: 2.29.1.19
 *     SOM Emitter emith.dll: 2.31.1.64
 */

/*
 *   This class is adapted from the book
 *     Class Construction in C and C++, Object Oriented Fundamentals
 *     by Roger Sessions, Copyright (c) 1992 Prentice Hall.
 *   Reprinted with permission.
 */


#ifndef SOM_link_h
#define SOM_link_h


/*
 * The SOM_STRICT_IDL macro means that we can ignore stars
 * in our declarations of objects.
 */
#define SOM_STRICT_IDL 1


/*
 * Passthru lines: File: "C.h", "before"
 */
#include "bt.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 the class name as an object type
 */
#ifndef link
#define link SOMObject
#endif

/*
 * Include Parent Bindings
 */
#ifndef SOM_baseType_h
#ifdef SOMLOCALINCLUDES
#include "bt.h"
#else
#include <bt.h>
#endif
#endif

/*
 * Start of bindings for IDL types
 */

#ifndef SOMClass
    #define SOMClass SOMObject
#endif /* SOMClass */

/*
 * End of bindings for IDL types.
 */

#define link_MajorVersion 0
#define link_MinorVersion 0

/*
 * Declare the class creation procedure
 */
SOMEXTERN 
#if defined(SOM_Module_link_Source)
        SOMDLLEXPORT
#else
    SOMDLLIMPORT
#endif
 SOMClass  SOMLINK linkNewClass(integer4 somtmajorVersion,
		integer4 somtminorVersion);

/*
 * Declare the ABI 2 ClassData structure
 */
SOMEXTERN struct linkClassDataStructure {
	SOMClass classObject;
	somMToken linkSetNext;
	somMToken linkSetPrevious;
	somMToken linkSetContents;
	somMToken linkGetNext;
	somMToken linkGetPrevious;
	somMToken linkGetContents;
} 
#if defined(SOM_Module_link_Source)
        SOMDLLEXPORT
#else
    SOMDLLIMPORT
#endif
 SOMDLINK linkClassData;

/*
 * Declare the ABI 2 CClassData structure
 */
SOMEXTERN struct linkCClassDataStructure {
	somMethodTabs parentMtab;
	somDToken instanceDataToken;
} 
#if defined(SOM_Module_link_Source)
        SOMDLLEXPORT
#else
    SOMDLLIMPORT
#endif
 SOMDLINK linkCClassData;

/*
 * Class Object and Method Token Macros
 */
#define _SOMCLASS_link (linkClassData.classObject)
#ifndef SOMGD_link
    #if (defined(_link) || defined(__link))
        #undef _link
        #undef __link
        #define SOMGD_link 1
    #else
        #define _link _SOMCLASS_link
    #endif /* _link */
#endif /* SOMGD_link */
#define link_classObj _SOMCLASS_link
#define _SOMMTOKEN_link(method) ((somMToken)linkClassData.method)

/*
 * New and Renew macros for link
 */
#define linkNew() \
   ( _link ? \
	_somNew(_link) \
	: ( linkNewClass(\
		link_MajorVersion, \
		link_MinorVersion),\
	   _somNew(_link)))
#define linkRenew(buf) \
   ( _link ? \
	_somRenew(_link, buf) \
	: ( linkNewClass(\
		link_MajorVersion, \
		link_MinorVersion),\
	   _somRenew(_link, buf)))

/*
 * New Method: linkSetNext
 */
typedef void   SOMLINK somTP_link_linkSetNext(link somSelf, 
		link nextLink);
typedef somTP_link_linkSetNext *somTD_link_linkSetNext;
/*
 *  Set the next pointer on target link to new link.
 */
#define somMD_link_linkSetNext "::link::linkSetNext"
#define link_linkSetNext(somSelf,nextLink) \
    (SOM_Resolve(somSelf, link, linkSetNext) \
	(somSelf,nextLink))
#ifndef SOMGD_linkSetNext
    #if (defined(_linkSetNext) || defined(__linkSetNext))
        #undef _linkSetNext
        #undef __linkSetNext
        #define SOMGD_linkSetNext 1
    #else
        #define _linkSetNext link_linkSetNext
    #endif /* _linkSetNext */
#endif /* SOMGD_linkSetNext */

/*
 * New Method: linkSetPrevious
 */
typedef void   SOMLINK somTP_link_linkSetPrevious(link somSelf, 
		link nextLink);
typedef somTP_link_linkSetPrevious *somTD_link_linkSetPrevious;
/*
 *  Set the previous pointer on target link to new link.
 */
#define somMD_link_linkSetPrevious "::link::linkSetPrevious"
#define link_linkSetPrevious(somSelf,nextLink) \
    (SOM_Resolve(somSelf, link, linkSetPrevious) \
	(somSelf,nextLink))
#ifndef SOMGD_linkSetPrevious
    #if (defined(_linkSetPrevious) || defined(__linkSetPrevious))
        #undef _linkSetPrevious
        #undef __linkSetPrevious
        #define SOMGD_linkSetPrevious 1
    #else
        #define _linkSetPrevious link_linkSetPrevious
    #endif /* _linkSetPrevious */
#endif /* SOMGD_linkSetPrevious */

/*
 * New Method: linkSetContents
 */
typedef void   SOMLINK somTP_link_linkSetContents(link somSelf, 
		baseType newContents);
typedef somTP_link_linkSetContents *somTD_link_linkSetContents;
/*
 *  Set the contents pointer on target link to new object.
 */
#define somMD_link_linkSetContents "::link::linkSetContents"
#define link_linkSetContents(somSelf,newContents) \
    (SOM_Resolve(somSelf, link, linkSetContents) \
	(somSelf,newContents))
#ifndef SOMGD_linkSetContents
    #if (defined(_linkSetContents) || defined(__linkSetContents))
        #undef _linkSetContents
        #undef __linkSetContents
        #define SOMGD_linkSetContents 1
    #else
        #define _linkSetContents link_linkSetContents
    #endif /* _linkSetContents */
#endif /* SOMGD_linkSetContents */

/*
 * New Method: linkGetNext
 */
typedef link   SOMLINK somTP_link_linkGetNext(link somSelf);
typedef somTP_link_linkGetNext *somTD_link_linkGetNext;
/*
 *  Get the next link after the target link.
 */
#define somMD_link_linkGetNext "::link::linkGetNext"
#define link_linkGetNext(somSelf) \
    (SOM_Resolve(somSelf, link, linkGetNext) \
	(somSelf))
#ifndef SOMGD_linkGetNext
    #if (defined(_linkGetNext) || defined(__linkGetNext))
        #undef _linkGetNext
        #undef __linkGetNext
        #define SOMGD_linkGetNext 1
    #else
        #define _linkGetNext link_linkGetNext
    #endif /* _linkGetNext */
#endif /* SOMGD_linkGetNext */

/*
 * New Method: linkGetPrevious
 */
typedef link   SOMLINK somTP_link_linkGetPrevious(link somSelf);
typedef somTP_link_linkGetPrevious *somTD_link_linkGetPrevious;
/*
 *  Get the previous link before the target link.
 */
#define somMD_link_linkGetPrevious "::link::linkGetPrevious"
#define link_linkGetPrevious(somSelf) \
    (SOM_Resolve(somSelf, link, linkGetPrevious) \
	(somSelf))
#ifndef SOMGD_linkGetPrevious
    #if (defined(_linkGetPrevious) || defined(__linkGetPrevious))
        #undef _linkGetPrevious
        #undef __linkGetPrevious
        #define SOMGD_linkGetPrevious 1
    #else
        #define _linkGetPrevious link_linkGetPrevious
    #endif /* _linkGetPrevious */
#endif /* SOMGD_linkGetPrevious */

/*
 * New Method: linkGetContents
 */
typedef baseType   SOMLINK somTP_link_linkGetContents(link somSelf);
typedef somTP_link_linkGetContents *somTD_link_linkGetContents;
/*
 *  Get the contents of the target link.
 */
#define somMD_link_linkGetContents "::link::linkGetContents"
#define link_linkGetContents(somSelf) \
    (SOM_Resolve(somSelf, link, linkGetContents) \
	(somSelf))
#ifndef SOMGD_linkGetContents
    #if (defined(_linkGetContents) || defined(__linkGetContents))
        #undef _linkGetContents
        #undef __linkGetContents
        #define SOMGD_linkGetContents 1
    #else
        #define _linkGetContents link_linkGetContents
    #endif /* _linkGetContents */
#endif /* SOMGD_linkGetContents */

/*
 * Full Names for Inherited Methods
 */
/* overridden methods */
#define link_print baseType_print
#define link_somInit SOMObject_somInit
#define link_somDumpSelfInt SOMObject_somDumpSelfInt

#ifndef SOM_DONT_USE_INHERITED_MACROS
#define link_match baseType_match
#define link_somDefaultInit SOMObject_somDefaultInit
#define link_somDestruct SOMObject_somDestruct
#define link_somDefaultCopyInit SOMObject_somDefaultCopyInit
#define link_somDefaultAssign SOMObject_somDefaultAssign
#define link_somDefaultConstCopyInit SOMObject_somDefaultConstCopyInit
#define link_somDefaultVCopyInit SOMObject_somDefaultVCopyInit
#define link_somDefaultConstVCopyInit SOMObject_somDefaultConstVCopyInit
#define link_somDefaultConstAssign SOMObject_somDefaultConstAssign
#define link_somDefaultVAssign SOMObject_somDefaultVAssign
#define link_somDefaultConstVAssign SOMObject_somDefaultConstVAssign
#define link_somUninit SOMObject_somUninit
#define link_somFree SOMObject_somFree
#define link_somGetClass SOMObject_somGetClass
#define link_somGetClassName SOMObject_somGetClassName
#define link_somGetSize SOMObject_somGetSize
#define link_somIsA SOMObject_somIsA
#define link_somIsInstanceOf SOMObject_somIsInstanceOf
#define link_somRespondsTo SOMObject_somRespondsTo
#define link_somDispatch SOMObject_somDispatch
#define link_somClassDispatch SOMObject_somClassDispatch
#define link_somCastObj SOMObject_somCastObj
#define link_somResetObj SOMObject_somResetObj
#define link_somPrintSelf SOMObject_somPrintSelf
#define link_somDumpSelf SOMObject_somDumpSelf
#endif /* SOM_DONT_USE_INHERITED_MACROS */

#endif       /* SOM_link_h */
