
/*
 * This file was generated by the SOM Compiler.
 * FileName: ll.ih.
 * Generated using:
 *     SOM Precompiler somipc: 2.29.1.19
 *     SOM Emitter emitih.dll: 2.77.1.179
 */

/*
 *   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.
 */


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


#ifndef SOM_linkedList_ih
#define SOM_linkedList_ih


/*
 * Set the scope of method functions
 */
#ifndef SOM_Scope
#define SOM_Scope static
#endif

#ifndef SOM_linkedList_h
#include "ll.h"
#endif
#include <somcsr.h>
#if defined(__IBMC__) && (__IBMC__ >= 300)
  #pragma info(none)
#else
  #if defined(__IBMC__)
     #pragma checkout(suspend)
  #endif
#endif


/*
 * -- Instance data
 */
typedef struct {
	long max;
	long nlinks;
	link currentLink;
	link headLink;
	link tailLink;
} __somC_linkedList_ProtectedPrivateData;
typedef __somC_linkedList_ProtectedPrivateData linkedListData, *linkedListDataPtr;

/*
 * -- GetData macro
 */
typedef linkedListDataPtr SOMLINK somTP_linkedList_DataThunk(void*);
typedef somTP_linkedList_DataThunk *somTD_linkedList_DataThunk;

#define linkedListGetData(somSelf) \
   (((somTD_linkedList_DataThunk)(linkedListCClassData.instanceDataToken))(somSelf))
#define _max somThis->max
#define _nlinks somThis->nlinks
#define _currentLink somThis->currentLink
#define _headLink somThis->headLink
#define _tailLink somThis->tailLink

/*
 * -- Primary Implementation File Support
 */
#if (defined(linkedList_Class_Source) || defined(SOM_Module_ll_Source))

#ifndef linkedListMethodDebug
   #define linkedListMethodDebug(c,m) SOMMethodDebug(c,m)
#endif  /* linkedListMethodDebug */

static void SOMLINK __somC_linkedList_classInit(SOMClass cls);


/*
 * Init ClassData Structures
 */
struct linkedListClassDataStructure SOMDLLEXPORT SOMDLINK linkedListClassData = {0};
struct linkedListCClassDataStructure SOMDLLEXPORT SOMDLINK linkedListCClassData = {0};


/*
 * Identifiers
 */
static char __somC_Strings_linkedList0[] = {"linkedList"}; /* class name */
static char __somC_Strings_linkedList1[] = {"llHead"}; /* method name */
static char __somC_Strings_linkedList2[] = {"llTail"}; /* method name */
static char __somC_Strings_linkedList3[] = {"llLength"}; /* method name */
static char __somC_Strings_linkedList4[] = {"llSetMax"}; /* method name */
static char __somC_Strings_linkedList5[] = {"llLeft"}; /* method name */
static char __somC_Strings_linkedList6[] = {"llNext"}; /* method name */
static char __somC_Strings_linkedList7[] = {"llPrevious"}; /* method name */
static char __somC_Strings_linkedList8[] = {"llRetrieve"}; /* method name */
static char __somC_Strings_linkedList9[] = {"llReplace"}; /* method name */
static char __somC_Strings_linkedList10[] = {"llPromoteTail"}; /* method name */
static char __somC_Strings_linkedList11[] = {"llAddHead"}; /* method name */
static char __somC_Strings_linkedList12[] = {"llAddTail"}; /* method name */
static char __somC_Strings_linkedList13[] = {"llRemoveHead"}; /* method name */
static char __somC_Strings_linkedList14[] = {"llIsTail"}; /* method name */
static char __somC_Strings_linkedList15[] = {"llFreeContents"}; /* method name */
static char __somC_Strings_linkedList16[] = {"llTrace"}; /* method name */
static char __somC_Strings_linkedList17[] = {"baseType"}; /* parent name */
static char __somC_Strings_linkedList18[] = {"print"}; /* overridden method name */
static char __somC_Strings_linkedList19[] = {"somInit"}; /* overridden method name */
static char __somC_Strings_linkedList20[] = {"somUninit"}; /* overridden method name */
static char __somC_Strings_linkedList21[] = {"somDumpSelfInt"}; /* overridden method name */
static char * __somC_linkedList_regIdsArray[] = {
	__somC_Strings_linkedList0,
#ifndef __somC_linkedList_regIds_llHead
#define __somC_linkedList_regIds_llHead 1
#endif
	__somC_Strings_linkedList1,
#ifndef __somC_linkedList_regIds_llTail
#define __somC_linkedList_regIds_llTail 2
#endif
	__somC_Strings_linkedList2,
#ifndef __somC_linkedList_regIds_llLength
#define __somC_linkedList_regIds_llLength 3
#endif
	__somC_Strings_linkedList3,
#ifndef __somC_linkedList_regIds_llSetMax
#define __somC_linkedList_regIds_llSetMax 4
#endif
	__somC_Strings_linkedList4,
#ifndef __somC_linkedList_regIds_llLeft
#define __somC_linkedList_regIds_llLeft 5
#endif
	__somC_Strings_linkedList5,
#ifndef __somC_linkedList_regIds_llNext
#define __somC_linkedList_regIds_llNext 6
#endif
	__somC_Strings_linkedList6,
#ifndef __somC_linkedList_regIds_llPrevious
#define __somC_linkedList_regIds_llPrevious 7
#endif
	__somC_Strings_linkedList7,
#ifndef __somC_linkedList_regIds_llRetrieve
#define __somC_linkedList_regIds_llRetrieve 8
#endif
	__somC_Strings_linkedList8,
#ifndef __somC_linkedList_regIds_llReplace
#define __somC_linkedList_regIds_llReplace 9
#endif
	__somC_Strings_linkedList9,
#ifndef __somC_linkedList_regIds_llPromoteTail
#define __somC_linkedList_regIds_llPromoteTail 10
#endif
	__somC_Strings_linkedList10,
#ifndef __somC_linkedList_regIds_llAddHead
#define __somC_linkedList_regIds_llAddHead 11
#endif
	__somC_Strings_linkedList11,
#ifndef __somC_linkedList_regIds_llAddTail
#define __somC_linkedList_regIds_llAddTail 12
#endif
	__somC_Strings_linkedList12,
#ifndef __somC_linkedList_regIds_llRemoveHead
#define __somC_linkedList_regIds_llRemoveHead 13
#endif
	__somC_Strings_linkedList13,
#ifndef __somC_linkedList_regIds_llIsTail
#define __somC_linkedList_regIds_llIsTail 14
#endif
	__somC_Strings_linkedList14,
#ifndef __somC_linkedList_regIds_llFreeContents
#define __somC_linkedList_regIds_llFreeContents 15
#endif
	__somC_Strings_linkedList15,
#ifndef __somC_linkedList_regIds_llTrace
#define __somC_linkedList_regIds_llTrace 16
#endif
	__somC_Strings_linkedList16,
	__somC_Strings_linkedList17,
#ifndef __somC_linkedList_regIds_print
#define __somC_linkedList_regIds_print 18
#endif
	__somC_Strings_linkedList18,
#ifndef __somC_linkedList_regIds_somInit
#define __somC_linkedList_regIds_somInit 19
#endif
	__somC_Strings_linkedList19,
#ifndef __somC_linkedList_regIds_somUninit
#define __somC_linkedList_regIds_somUninit 20
#endif
	__somC_Strings_linkedList20,
#ifndef __somC_linkedList_regIds_somDumpSelfInt
#define __somC_linkedList_regIds_somDumpSelfInt 21
#endif
	__somC_Strings_linkedList21
};


/*
 * Overridden method: print
 */
SOM_Scope void  SOMLINK print(linkedList somSelf,
		FILE* outputFile);
static somMethodProc* linkedList_parent_baseType_print_resolved;
#define linkedList_parent_baseType_print(somSelf,outputFile) \
  ((( somTD_baseType_print ) \
    linkedList_parent_baseType_print_resolved)(somSelf,outputFile))
#ifndef SOMGD_pmc_baseType_print
  #ifdef parent_baseType_print
     #define SOMGD_pmc_baseType_print 1
     #undef parent_baseType_print
  #else
     #define parent_baseType_print linkedList_parent_baseType_print
  #endif /* parent_baseType_print */
#endif /* SOMGD_pmc_baseType_print */
#ifndef SOMGD_pmc_parent_print
  #ifdef parent_print
    #define SOMGD_pmc_parent_print
    #undef parent_print
  #else
#define parent_print linkedList_parent_baseType_print
  #endif
#endif
#define linkedList_parents_print(somSelf,outputFile) (\
   linkedList_parent_baseType_print(somSelf,outputFile))
#define SOMPCALLlinkedList_print
static somMethodProc* linkedList_pcall_print_resolved;
#define linkedList_pcall_print(somSelf,outputFile) \
  ((( somTD_baseType_print ) \
    linkedList_pcall_print_resolved)(somSelf,outputFile))
static void  SOMLINK linkedList_pcallResolve_print(linkedList somSelf,
		FILE* outputFile)
{
   ((somTD_baseType_print) 
      somPCallResolve(somSelf, _linkedList, _SOMMTOKEN_baseType(print)))(somSelf,outputFile);
}


/*
 * Overridden method: somInit
 */
SOM_Scope void  SOMLINK somInit(linkedList somSelf);
/* pcalls for somInit/somUninit are turned off */
#define linkedList_parent_baseType_somInit(__somSelf) 
#ifndef parent_baseType_somInit
   #define parent_baseType_somInit(__somSelf) 
#endif
#ifndef parent_somInit
   #define parent_somInit(__somSelf) 
#endif
#define linkedList_parents_somInit(__somSelf) 

/*
 * Overridden method: somUninit
 */
SOM_Scope void  SOMLINK somUninit(linkedList somSelf);
/* pcalls for somInit/somUninit are turned off */
#define linkedList_parent_baseType_somUninit(__somSelf) 
#ifndef parent_baseType_somUninit
   #define parent_baseType_somUninit(__somSelf) 
#endif
#ifndef parent_somUninit
   #define parent_somUninit(__somSelf) 
#endif
#define linkedList_parents_somUninit(__somSelf) 

/*
 * Overridden method: somDumpSelfInt
 */
SOM_Scope void  SOMLINK somDumpSelfInt(linkedList somSelf,
		long level);
static somMethodProc* linkedList_parent_baseType_somDumpSelfInt_resolved;
#define linkedList_parent_baseType_somDumpSelfInt(somSelf,level) \
  ((( somTD_SOMObject_somDumpSelfInt ) \
    linkedList_parent_baseType_somDumpSelfInt_resolved)(somSelf,level))
#ifndef SOMGD_pmc_baseType_somDumpSelfInt
  #ifdef parent_baseType_somDumpSelfInt
     #define SOMGD_pmc_baseType_somDumpSelfInt 1
     #undef parent_baseType_somDumpSelfInt
  #else
     #define parent_baseType_somDumpSelfInt linkedList_parent_baseType_somDumpSelfInt
  #endif /* parent_baseType_somDumpSelfInt */
#endif /* SOMGD_pmc_baseType_somDumpSelfInt */
#ifndef SOMGD_pmc_parent_somDumpSelfInt
  #ifdef parent_somDumpSelfInt
    #define SOMGD_pmc_parent_somDumpSelfInt
    #undef parent_somDumpSelfInt
  #else
#define parent_somDumpSelfInt linkedList_parent_baseType_somDumpSelfInt
  #endif
#endif
#define linkedList_parents_somDumpSelfInt(somSelf,level) (\
   linkedList_parent_baseType_somDumpSelfInt(somSelf,level))
#define SOMPCALLlinkedList_somDumpSelfInt
static somMethodProc* linkedList_pcall_somDumpSelfInt_resolved;
#define linkedList_pcall_somDumpSelfInt(somSelf,level) \
  ((( somTD_SOMObject_somDumpSelfInt ) \
    linkedList_pcall_somDumpSelfInt_resolved)(somSelf,level))
static void  SOMLINK linkedList_pcallResolve_somDumpSelfInt(linkedList somSelf,
		long level)
{
   ((somTD_SOMObject_somDumpSelfInt) 
      somPCallResolve(somSelf, _linkedList, _SOMMTOKEN_SOMObject(somDumpSelfInt)))(somSelf,level);
}


/*
 * New Method: llHead
 */
SOM_Scope baseType  SOMLINK llHead(linkedList somSelf);
/*
 *  Make the head of the list the current link, and return its contents.
 */
#ifndef somId_llHead
#define somId_llHead ((somId)&(__somC_linkedList_regIdsArray[__somC_linkedList_regIds_llHead]))
#endif
/* Contract specification:
[CALLTYPE_OIDL (1)][RESULT][VERSION 0]
RESULT[out]: ObjREF
*/
#define llHead_somMethodInfoValue 0
#define llHead_somApplyStubValue 0x960105
#define llHead_somHasMPlan 24

/*
 * New Method: llTail
 */
SOM_Scope baseType  SOMLINK llTail(linkedList somSelf);
/*
 *  Make the tail of the list the current link, and returns its contents.
 */
#ifndef somId_llTail
#define somId_llTail ((somId)&(__somC_linkedList_regIdsArray[__somC_linkedList_regIds_llTail]))
#endif
/* Contract specification:
[CALLTYPE_OIDL (1)][RESULT][VERSION 0]
RESULT[out]: ObjREF
*/
#define llTail_somMethodInfoValue 0
#define llTail_somApplyStubValue 0x960105
#define llTail_somHasMPlan 24

/*
 * New Method: llLength
 */
SOM_Scope long  SOMLINK llLength(linkedList somSelf);
/*
 *  Return the number of links is the list.
 */
#ifndef somId_llLength
#define somId_llLength ((somId)&(__somC_linkedList_regIdsArray[__somC_linkedList_regIds_llLength]))
#endif
/* Contract specification:
[CALLTYPE_OIDL (1)][RESULT][VERSION 0]
RESULT[out]: Long
*/
#define llLength_somMethodInfoValue 0
#define llLength_somApplyStubValue 0x830105
#define llLength_somHasMPlan 24

/*
 * New Method: llSetMax
 */
SOM_Scope void  SOMLINK llSetMax(linkedList somSelf,
		long newMax);
/*
 *  Set the maximum number of links the list can contain.
 */
#ifndef somId_llSetMax
#define somId_llSetMax ((somId)&(__somC_linkedList_regIdsArray[__somC_linkedList_regIds_llSetMax]))
#endif
#define SOM_MPR_MINFO_llSetMax {0, 8, 0}
static somMpRowMethodInfo linkedList_llSetMax_mp_minfoRow = {{0, SOM_MP_ROWTYPE_METHODINFO}, SOM_MPR_MINFO_llSetMax};
#ifndef DEFINEDlinkedList_llSetMax_mp
#define DEFINEDlinkedList_llSetMax_mp
/*[ ::linkedList::llSetMax linkedList_llSetMax_mp ]*/
/* Contract specification:
[CALLTYPE_OIDL (1)][VERSION 0]
ARG 0[in]: Long
*/
static struct { void * rows; unsigned char csr[4]; } linkedList_llSetMax_mp={&linkedList_llSetMax_mp_minfoRow, {
0x81, 0x01, 0x43},
};
#endif
#define llSetMax_somMethodInfoValue 0
#define llSetMax_somApplyStubValue &linkedList_llSetMax_mp.csr
#define llSetMax_somHasMPlan 8

/*
 * New Method: llLeft
 */
SOM_Scope long  SOMLINK llLeft(linkedList somSelf);
/*
 *  Return the number of links that can still be added to the list.
 */
#ifndef somId_llLeft
#define somId_llLeft ((somId)&(__somC_linkedList_regIdsArray[__somC_linkedList_regIds_llLeft]))
#endif
/* Contract specification:
[CALLTYPE_OIDL (1)][RESULT][VERSION 0]
RESULT[out]: Long
*/
#define llLeft_somMethodInfoValue 0
#define llLeft_somApplyStubValue 0x830105
#define llLeft_somHasMPlan 24

/*
 * New Method: llNext
 */
SOM_Scope baseType  SOMLINK llNext(linkedList somSelf);
/*
 *  Make the link after current the new current link, and
 *  return its contents.
 */
#ifndef somId_llNext
#define somId_llNext ((somId)&(__somC_linkedList_regIdsArray[__somC_linkedList_regIds_llNext]))
#endif
/* Contract specification:
[CALLTYPE_OIDL (1)][RESULT][VERSION 0]
RESULT[out]: ObjREF
*/
#define llNext_somMethodInfoValue 0
#define llNext_somApplyStubValue 0x960105
#define llNext_somHasMPlan 24

/*
 * New Method: llPrevious
 */
SOM_Scope baseType  SOMLINK llPrevious(linkedList somSelf);
/*
 *  Make the link before current the new current link, and
 *  return its contents.
 */
#ifndef somId_llPrevious
#define somId_llPrevious ((somId)&(__somC_linkedList_regIdsArray[__somC_linkedList_regIds_llPrevious]))
#endif
/* Contract specification:
[CALLTYPE_OIDL (1)][RESULT][VERSION 0]
RESULT[out]: ObjREF
*/
#define llPrevious_somMethodInfoValue 0
#define llPrevious_somApplyStubValue 0x960105
#define llPrevious_somHasMPlan 24

/*
 * New Method: llRetrieve
 */
SOM_Scope baseType  SOMLINK llRetrieve(linkedList somSelf);
/*
 *  Return the contents of the current link.
 */
#ifndef somId_llRetrieve
#define somId_llRetrieve ((somId)&(__somC_linkedList_regIdsArray[__somC_linkedList_regIds_llRetrieve]))
#endif
/* Contract specification:
[CALLTYPE_OIDL (1)][RESULT][VERSION 0]
RESULT[out]: ObjREF
*/
#define llRetrieve_somMethodInfoValue 0
#define llRetrieve_somApplyStubValue 0x960105
#define llRetrieve_somHasMPlan 24

/*
 * New Method: llReplace
 */
SOM_Scope baseType  SOMLINK llReplace(linkedList somSelf,
		baseType newElement);
/*
 *  Replace the contents of the current list but this new
 *  element, and return a pointer to the new contents.
 */
#ifndef somId_llReplace
#define somId_llReplace ((somId)&(__somC_linkedList_regIdsArray[__somC_linkedList_regIds_llReplace]))
#endif
#define SOM_MPR_MINFO_llReplace {0, 8, 0}
static somMpRowMethodInfo linkedList_llReplace_mp_minfoRow = {{0, SOM_MP_ROWTYPE_METHODINFO}, SOM_MPR_MINFO_llReplace};
#ifndef DEFINEDlinkedList_llReplace_mp
#define DEFINEDlinkedList_llReplace_mp
/*[ ::linkedList::llReplace linkedList_llReplace_mp ]*/
/* Contract specification:
[CALLTYPE_OIDL (1)][RESULT][VERSION 0]
RESULT[out]: ObjREF
ARG 1[in]: ObjREF
*/
static struct { void * rows; unsigned char csr[4]; } linkedList_llReplace_mp={&linkedList_llReplace_mp_minfoRow, {
0x85, 0x02, 0x96, 0x56},
};
#endif
#define llReplace_somMethodInfoValue 0
#define llReplace_somApplyStubValue &linkedList_llReplace_mp.csr
#define llReplace_somHasMPlan 8

/*
 * New Method: llPromoteTail
 */
SOM_Scope baseType  SOMLINK llPromoteTail(linkedList somSelf);
/*
 *  Move the tail link to the head of the list, and return
 *  its contents.
 */
#ifndef somId_llPromoteTail
#define somId_llPromoteTail ((somId)&(__somC_linkedList_regIdsArray[__somC_linkedList_regIds_llPromoteTail]))
#endif
/* Contract specification:
[CALLTYPE_OIDL (1)][RESULT][VERSION 0]
RESULT[out]: ObjREF
*/
#define llPromoteTail_somMethodInfoValue 0
#define llPromoteTail_somApplyStubValue 0x960105
#define llPromoteTail_somHasMPlan 24

/*
 * New Method: llAddHead
 */
SOM_Scope baseType  SOMLINK llAddHead(linkedList somSelf,
		baseType newElement);
/*
 *  Add a link containing this new Element to the head of the
 *  list, and return a pointer to the new Element.
 */
#ifndef somId_llAddHead
#define somId_llAddHead ((somId)&(__somC_linkedList_regIdsArray[__somC_linkedList_regIds_llAddHead]))
#endif
#define SOM_MPR_MINFO_llAddHead {0, 8, 0}
static somMpRowMethodInfo linkedList_llAddHead_mp_minfoRow = {{0, SOM_MP_ROWTYPE_METHODINFO}, SOM_MPR_MINFO_llAddHead};
#ifndef DEFINEDlinkedList_llAddHead_mp
#define DEFINEDlinkedList_llAddHead_mp
/*[ ::linkedList::llAddHead linkedList_llAddHead_mp ]*/
/* Contract specification:
[CALLTYPE_OIDL (1)][RESULT][VERSION 0]
RESULT[out]: ObjREF
ARG 1[in]: ObjREF
*/
static struct { void * rows; unsigned char csr[4]; } linkedList_llAddHead_mp={&linkedList_llAddHead_mp_minfoRow, {
0x85, 0x02, 0x96, 0x56},
};
#endif
#define llAddHead_somMethodInfoValue 0
#define llAddHead_somApplyStubValue &linkedList_llAddHead_mp.csr
#define llAddHead_somHasMPlan 8

/*
 * New Method: llAddTail
 */
SOM_Scope baseType  SOMLINK llAddTail(linkedList somSelf,
		baseType newElement);
/*
 *  Add a link containing this new Element to the tail of the
 *  list, and return a pointer to the new Element.
 */
#ifndef somId_llAddTail
#define somId_llAddTail ((somId)&(__somC_linkedList_regIdsArray[__somC_linkedList_regIds_llAddTail]))
#endif
#define SOM_MPR_MINFO_llAddTail {0, 8, 0}
static somMpRowMethodInfo linkedList_llAddTail_mp_minfoRow = {{0, SOM_MP_ROWTYPE_METHODINFO}, SOM_MPR_MINFO_llAddTail};
#ifndef DEFINEDlinkedList_llAddTail_mp
#define DEFINEDlinkedList_llAddTail_mp
/*[ ::linkedList::llAddTail linkedList_llAddTail_mp ]*/
/* Contract specification:
[CALLTYPE_OIDL (1)][RESULT][VERSION 0]
RESULT[out]: ObjREF
ARG 1[in]: ObjREF
*/
static struct { void * rows; unsigned char csr[4]; } linkedList_llAddTail_mp={&linkedList_llAddTail_mp_minfoRow, {
0x85, 0x02, 0x96, 0x56},
};
#endif
#define llAddTail_somMethodInfoValue 0
#define llAddTail_somApplyStubValue &linkedList_llAddTail_mp.csr
#define llAddTail_somHasMPlan 8

/*
 * New Method: llRemoveHead
 */
SOM_Scope baseType  SOMLINK llRemoveHead(linkedList somSelf);
/*
 *  Delete the link at the head of the list.
 */
#ifndef somId_llRemoveHead
#define somId_llRemoveHead ((somId)&(__somC_linkedList_regIdsArray[__somC_linkedList_regIds_llRemoveHead]))
#endif
/* Contract specification:
[CALLTYPE_OIDL (1)][RESULT][VERSION 0]
RESULT[out]: ObjREF
*/
#define llRemoveHead_somMethodInfoValue 0
#define llRemoveHead_somApplyStubValue 0x960105
#define llRemoveHead_somHasMPlan 24

/*
 * New Method: llIsTail
 */
SOM_Scope long  SOMLINK llIsTail(linkedList somSelf);
/*
 *  Returns TRUE if the current link is the head of the list,
 *  FALSE otherwise.
 */
#ifndef somId_llIsTail
#define somId_llIsTail ((somId)&(__somC_linkedList_regIdsArray[__somC_linkedList_regIds_llIsTail]))
#endif
/* Contract specification:
[CALLTYPE_OIDL (1)][RESULT][VERSION 0]
RESULT[out]: Long
*/
#define llIsTail_somMethodInfoValue 0
#define llIsTail_somApplyStubValue 0x830105
#define llIsTail_somHasMPlan 24

/*
 * New Method: llFreeContents
 */
SOM_Scope void  SOMLINK llFreeContents(linkedList somSelf);
/*
 *  Frees the entire list, including the contents of each link.
 */
#ifndef somId_llFreeContents
#define somId_llFreeContents ((somId)&(__somC_linkedList_regIdsArray[__somC_linkedList_regIds_llFreeContents]))
#endif
/* Contract specification:
[CALLTYPE_OIDL (1)][VERSION 0]
*/
#define llFreeContents_somMethodInfoValue 0
#define llFreeContents_somApplyStubValue 0x1
#define llFreeContents_somHasMPlan 24

/*
 * New Method: llTrace
 */
SOM_Scope void  SOMLINK llTrace(linkedList somSelf,
		FILE* output);
/*
 *  Trace the linkedList, useful for debugging.
 */
#ifndef somId_llTrace
#define somId_llTrace ((somId)&(__somC_linkedList_regIdsArray[__somC_linkedList_regIds_llTrace]))
#endif
#define SOM_MPR_MINFO_llTrace {0, 8, 0}
static somMethodInfo llTraceMethodInfo = {0, 8, 0};
#define llTrace_somMethodInfoValue &llTraceMethodInfo
#define llTrace_somApplyStubValue 0
#define llTrace_somHasMPlan 0

/*
 * Functions for attributes.
 */

/*
 * Special Method Support
 */

/*
 * -- Routines and Structures to create the class object
 */
static SOMClass * __somC_linkedList_parentArray[] = {
	NULL,
};
void * __somC_linkedList_parentMtabs[1];

somMethodDefn __somC_linkedList_newNDMethodsArray[] = {
	{  (0 | llHead_somHasMPlan), 0, (somMToken)0, (somMethodPtr)llHead, 
	   0, (somMethodPtr)llHead_somApplyStubValue, 
	   (somMethodInfo *) llHead_somMethodInfoValue, &linkedListClassData.llHead, 0, 1 },
	{  (0 | llTail_somHasMPlan), 0, (somMToken)0, (somMethodPtr)llTail, 
	   0, (somMethodPtr)llTail_somApplyStubValue, 
	   (somMethodInfo *) llTail_somMethodInfoValue, &linkedListClassData.llTail, 0, 1 },
	{  (0 | llLength_somHasMPlan), 0, (somMToken)0, (somMethodPtr)llLength, 
	   0, (somMethodPtr)llLength_somApplyStubValue, 
	   (somMethodInfo *) llLength_somMethodInfoValue, &linkedListClassData.llLength, 0, 1 },
	{  (0 | llSetMax_somHasMPlan), 0, (somMToken)0, (somMethodPtr)llSetMax, 
	   0, (somMethodPtr)llSetMax_somApplyStubValue, 
	   (somMethodInfo *) llSetMax_somMethodInfoValue, &linkedListClassData.llSetMax, 0, 1 },
	{  (0 | llLeft_somHasMPlan), 0, (somMToken)0, (somMethodPtr)llLeft, 
	   0, (somMethodPtr)llLeft_somApplyStubValue, 
	   (somMethodInfo *) llLeft_somMethodInfoValue, &linkedListClassData.llLeft, 0, 1 },
	{  (0 | llNext_somHasMPlan), 0, (somMToken)0, (somMethodPtr)llNext, 
	   0, (somMethodPtr)llNext_somApplyStubValue, 
	   (somMethodInfo *) llNext_somMethodInfoValue, &linkedListClassData.llNext, 0, 1 },
	{  (0 | llPrevious_somHasMPlan), 0, (somMToken)0, (somMethodPtr)llPrevious, 
	   0, (somMethodPtr)llPrevious_somApplyStubValue, 
	   (somMethodInfo *) llPrevious_somMethodInfoValue, &linkedListClassData.llPrevious, 0, 1 },
	{  (0 | llRetrieve_somHasMPlan), 0, (somMToken)0, (somMethodPtr)llRetrieve, 
	   0, (somMethodPtr)llRetrieve_somApplyStubValue, 
	   (somMethodInfo *) llRetrieve_somMethodInfoValue, &linkedListClassData.llRetrieve, 0, 1 },
	{  (0 | llReplace_somHasMPlan), 0, (somMToken)0, (somMethodPtr)llReplace, 
	   0, (somMethodPtr)llReplace_somApplyStubValue, 
	   (somMethodInfo *) llReplace_somMethodInfoValue, &linkedListClassData.llReplace, 0, 1 },
	{  (0 | llPromoteTail_somHasMPlan), 0, (somMToken)0, (somMethodPtr)llPromoteTail, 
	   0, (somMethodPtr)llPromoteTail_somApplyStubValue, 
	   (somMethodInfo *) llPromoteTail_somMethodInfoValue, &linkedListClassData.llPromoteTail, 0, 1 },
	{  (0 | llAddHead_somHasMPlan), 0, (somMToken)0, (somMethodPtr)llAddHead, 
	   0, (somMethodPtr)llAddHead_somApplyStubValue, 
	   (somMethodInfo *) llAddHead_somMethodInfoValue, &linkedListClassData.llAddHead, 0, 1 },
	{  (0 | llAddTail_somHasMPlan), 0, (somMToken)0, (somMethodPtr)llAddTail, 
	   0, (somMethodPtr)llAddTail_somApplyStubValue, 
	   (somMethodInfo *) llAddTail_somMethodInfoValue, &linkedListClassData.llAddTail, 0, 1 },
	{  (0 | llRemoveHead_somHasMPlan), 0, (somMToken)0, (somMethodPtr)llRemoveHead, 
	   0, (somMethodPtr)llRemoveHead_somApplyStubValue, 
	   (somMethodInfo *) llRemoveHead_somMethodInfoValue, &linkedListClassData.llRemoveHead, 0, 1 },
	{  (0 | llIsTail_somHasMPlan), 0, (somMToken)0, (somMethodPtr)llIsTail, 
	   0, (somMethodPtr)llIsTail_somApplyStubValue, 
	   (somMethodInfo *) llIsTail_somMethodInfoValue, &linkedListClassData.llIsTail, 0, 1 },
	{  (0 | llFreeContents_somHasMPlan), 0, (somMToken)0, (somMethodPtr)llFreeContents, 
	   0, (somMethodPtr)llFreeContents_somApplyStubValue, 
	   (somMethodInfo *) llFreeContents_somMethodInfoValue, &linkedListClassData.llFreeContents, 0, 1 },
	{  (0 | llTrace_somHasMPlan), 0, (somMToken)0, (somMethodPtr)llTrace, 
	   0, (somMethodPtr)llTrace_somApplyStubValue, 
	   (somMethodInfo *) llTrace_somMethodInfoValue, &linkedListClassData.llTrace, 0, 1 }
};

static somOverrideMethod_t2 __somC_linkedList_overridesArray[] = {
{ &(__somC_linkedList_regIdsArray[__somC_linkedList_regIds_print]), 
#ifdef SOMPCALLlinkedList_print
   (somMethodPtr*)&linkedList_pcall_print_resolved, 
   (somMethodPtr)linkedList_pcallResolve_print, 
#else
   (somMethodPtr*)0, 
   (somMethodPtr)0, 
#endif
(somMethodPtr)print },
{ &(__somC_linkedList_regIdsArray[__somC_linkedList_regIds_somInit]), 
#ifdef SOMPCALLlinkedList_somInit
   (somMethodPtr*)&linkedList_pcall_somInit_resolved, 
   (somMethodPtr)linkedList_pcallResolve_somInit, 
#else
   (somMethodPtr*)0, 
   (somMethodPtr)0, 
#endif
(somMethodPtr)somInit },
{ &(__somC_linkedList_regIdsArray[__somC_linkedList_regIds_somUninit]), 
#ifdef SOMPCALLlinkedList_somUninit
   (somMethodPtr*)&linkedList_pcall_somUninit_resolved, 
   (somMethodPtr)linkedList_pcallResolve_somUninit, 
#else
   (somMethodPtr*)0, 
   (somMethodPtr)0, 
#endif
(somMethodPtr)somUninit },
{ &(__somC_linkedList_regIdsArray[__somC_linkedList_regIds_somDumpSelfInt]), 
#ifdef SOMPCALLlinkedList_somDumpSelfInt
   (somMethodPtr*)&linkedList_pcall_somDumpSelfInt_resolved, 
   (somMethodPtr)linkedList_pcallResolve_somDumpSelfInt, 
#else
   (somMethodPtr*)0, 
   (somMethodPtr)0, 
#endif
(somMethodPtr)somDumpSelfInt }
};

static somClassVars1 __somC_linkedList_classVars1 = {
	1,		/* layoutVersion */
	(void *)NULL,	/* extension */
	sizeof(linkedListData),	/* dataSize */
	4,		/* type code dataAlignment */
	(somMethodPtr)0,	/* classAllocate */
	(somMethodPtr)0	/* classDeallocate */
};

static struct linkedListClassDataStructure __somC_linkedList_resolvedMTokens;

static void * __somC_linkedList_CIB_unsharedClassVariablesPtr = 0;
som3ClassInfoStruct __somC_linkedList_ClassInfo; /* C forward reference */

SOM_CIB linkedList_ClassInitBlock = {
	1,	/* layoutVersion */
	&__somC_linkedList_classVars1,
	&__somC_linkedList_CIB_unsharedClassVariablesPtr,	/* unsharedVars */
	linkedList_MajorVersion,
	linkedList_MinorVersion,
	0x40004,	/* constFlags */
	0xFFFFFFFF,	/* inheritVars */
	0,	/* classMeta */
	(somMethodPtr) __somC_linkedList_classInit,	/* classInit */
	(somMethodPtr) 0,	/* classUninit */
	(somMethodPtr) somInit,	/* legacyInit */
	(somMethodPtr) somUninit,	/* legacyUninit */
	(somMethodPtr) 0,	/* udaAssign */
	(somMethodPtr) 0,	/* udaConstAssign */
	0,	/* protectedDataOffset */
	0,	/* numEmbeddedObjs */
	0,	/* embeddedObjs */
	22,	/* numRegIds */
	__somC_linkedList_regIdsArray,	/* regIds */
	(sizeof(struct linkedListClassDataStructure) - sizeof(SOMClass *))/sizeof(somMToken),	/* numClassDataEntries */
	(somClassDataStructurePtr)&linkedListClassData,
	(somCClassDataStructurePtr)&linkedListCClassData,
	&__somC_linkedList_ClassInfo,
	1,	/* numParents */
	(SOMClass**)__somC_linkedList_parentArray,	/* parents */
	1,	/* numDirectInitClasses */
	(SOMClass**)__somC_linkedList_parentArray,	/* directInitClasses */
	0,	/* numNewInitializers */
	0,	/* newInitializerSymbols */
	0,	/* numOvInitializers */
	0,	/* ovInitializerSymbols */
	0,	/* special overrides */
	16,	/* maxNDMethods */
	__somC_linkedList_newNDMethodsArray,	/* newNDMethods */
	4,	/* numOverrides */
	__somC_linkedList_overridesArray,	/* overrides */
	0,	/* numInheritedSelections */
	0,	/* inheritedSelections */
	0,	/* numMigratedMethods */
	0 	/* migrated methods */
};	/* CIB */

static som3ClassDetails __somC_linkedList_ClassDetails = {
	(somMethodTabPtr)NULL,	/* mtab */
	(somMethodTabPtr *)__somC_linkedList_parentMtabs,	/* parentMtabs */
	&linkedList_ClassInitBlock,	/* CIB pointer */
	(somTD_somRenewNoInitNoZeroThunk)0,	/* somRenewNoInitNoZeroThunk */
	(long)0,	/* instanceSize */
	(somMethodProc**)NULL,	/* resolvedInits */
	(somClassDataStructure *)&__somC_linkedList_resolvedMTokens,	/* resolvedMTokens */
	{0,0,0,0},	/* initCtrl */
	{0,0,0,0},	/* destructCtrl */
	{0,0,0,0},	/* assignCtrl */
	(long)1,	/* layoutVersion */
	(void*)NULL,	/* extension */
	(somDToken)NULL,	/* publicDataToken */
	(somDToken)NULL,	/* protectedDataToken */
};
som3ClassInfoStruct __somC_linkedList_ClassInfo = {
	0,	/* classObject */
	&__somC_linkedList_ClassDetails	/* class details */
};


/*
 * Class Creation and Initialization
 */

#if defined(__IBMC__) && (defined(_WIN32) || defined(__OS2__)) && !defined(SOM_PREWARP)
#pragma alloc_text (SEG0002, __somC_linkedList_classInit)
#pragma alloc_text (SEG0002, linkedListNewClass)
#endif

/* classinit function */
SOM_Scope void SOMLINK __somC_linkedList_classInit(SOMClass somSelf)
{
   SOM_IgnoreWarning(somSelf);
   linkedList_parent_baseType_somDumpSelfInt_resolved = 
	somParentNumResolve(linkedListCClassData.parentMtab, 1, _SOMMTOKEN_SOMObject(somDumpSelfInt)); 
   linkedList_parent_baseType_print_resolved = 
	somParentNumResolve(linkedListCClassData.parentMtab, 1, _SOMMTOKEN_baseType(print)); 
}

/* NewClass Function */
SOMEXTERN SOMDLLEXPORT SOMClass  SOMLINK linkedListNewClass (long reqMajorVersion, long reqMinorVersion)
{
   if (_SOMCLASS_linkedList && _somCheckVersion(_SOMCLASS_linkedList,reqMajorVersion,reqMinorVersion))
      return _SOMCLASS_linkedList;
__somC_linkedList_parentArray[0] = (SOMClass *)&_SOMCLASS_baseType;
   /* require parents */
   if (!_SOMCLASS_baseType) baseTypeNewClass(baseType_MajorVersion,baseType_MinorVersion);
   /* return new class */
   return somBuildClass2( &linkedList_ClassInitBlock, reqMajorVersion, reqMinorVersion );
}

#endif       /* Primary Implementation Support */
#if defined(__IBMC__) && (__IBMC__ >= 300)
  #pragma info(restore)
#else
  #if defined(__IBMC__)
    #pragma checkout(resume)
  #endif
#endif

#endif       /* SOM_linkedList_ih */
