
#ifndef SOM_Test_xih
#define SOM_Test_xih

#if defined(__IBMC__) && (__IBMC__ >= 300)
  #pragma info(none)
#else
  #if defined(__IBMC__)
     #pragma checkout(suspend)
  #endif
#endif


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

#ifndef SOM_Test_xh
#include "derived.xh"
#endif
#include <somcsr.h>

/*
 * -- Instance Data
 */
typedef void TestData;
#define __somC_Test_NODATA

/*
 * This class introduces no instance data, so no GetData macro is provided
 */

/*
 * -- Method Macros for use in Method Procedures
 */
#ifdef METHOD_MACROS
  #define _hello_ somSelf->hello_
  #define __get_hellomsg somSelf->_get_hellomsg
  #define __set_hellomsg somSelf->_set_hellomsg
  #define _somDefaultInit somSelf->somDefaultInit
  #define _somDestruct somSelf->somDestruct
  #define _somDefaultCopyInit somSelf->somDefaultCopyInit
  #define _somDefaultAssign somSelf->somDefaultAssign
  #define _somDefaultConstCopyInit somSelf->somDefaultConstCopyInit
  #define _somDefaultVCopyInit somSelf->somDefaultVCopyInit
  #define _somDefaultConstVCopyInit somSelf->somDefaultConstVCopyInit
  #define _somDefaultConstAssign somSelf->somDefaultConstAssign
  #define _somDefaultVAssign somSelf->somDefaultVAssign
  #define _somDefaultConstVAssign somSelf->somDefaultConstVAssign
  #define _somInit somSelf->somInit
  #define _somUninit somSelf->somUninit
  #define _somFree somSelf->somFree
  #define _somGetClass somSelf->somGetClass
  #define _somGetClassName somSelf->somGetClassName
  #define _somGetSize somSelf->somGetSize
  #define _somIsA somSelf->somIsA
  #define _somIsInstanceOf somSelf->somIsInstanceOf
  #define _somRespondsTo somSelf->somRespondsTo
  #define _somDispatch somSelf->somDispatch
  #define _somClassDispatch somSelf->somClassDispatch
  #define _somCastObj somSelf->somCastObj
  #define _somResetObj somSelf->somResetObj
  #define _somPrintSelf somSelf->somPrintSelf
  #define _somDumpSelf somSelf->somDumpSelf
  #define _somDumpSelfInt somSelf->somDumpSelfInt
  #define _mello_ somSelf->mello_
  #define __get_msg somSelf->_get_msg
  #define __set_msg somSelf->_set_msg
  #define _somDefaultInit somSelf->somDefaultInit
  #define _somDestruct somSelf->somDestruct
  #define _somDefaultCopyInit somSelf->somDefaultCopyInit
  #define _somDefaultAssign somSelf->somDefaultAssign
  #define _somDefaultConstCopyInit somSelf->somDefaultConstCopyInit
  #define _somDefaultVCopyInit somSelf->somDefaultVCopyInit
  #define _somDefaultConstVCopyInit somSelf->somDefaultConstVCopyInit
  #define _somDefaultConstAssign somSelf->somDefaultConstAssign
  #define _somDefaultVAssign somSelf->somDefaultVAssign
  #define _somDefaultConstVAssign somSelf->somDefaultConstVAssign
  #define _somInit somSelf->somInit
  #define _somUninit somSelf->somUninit
  #define _somFree somSelf->somFree
  #define _somGetClass somSelf->somGetClass
  #define _somGetClassName somSelf->somGetClassName
  #define _somGetSize somSelf->somGetSize
  #define _somIsA somSelf->somIsA
  #define _somIsInstanceOf somSelf->somIsInstanceOf
  #define _somRespondsTo somSelf->somRespondsTo
  #define _somDispatch somSelf->somDispatch
  #define _somClassDispatch somSelf->somClassDispatch
  #define _somCastObj somSelf->somCastObj
  #define _somResetObj somSelf->somResetObj
  #define _somPrintSelf somSelf->somPrintSelf
  #define _somDumpSelf somSelf->somDumpSelf
  #define _somDumpSelfInt somSelf->somDumpSelfInt
  #define _somInit somSelf->somInit
#endif /* METHOD_MACROS */


/*
 * -- Primary Implementation File Support
 */
#if (defined(Test_Class_Source) || defined(SOM_Module_derived_Source))

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

static void SOMLINK __somC_Test_classInit(SOMClass *cls);


/*
 * Init ClassData Structures
 */
struct TestClassDataStructure SOMDLLEXPORT SOMDLINK TestClassData = {0};
struct TestCClassDataStructure SOMDLLEXPORT SOMDLINK TestCClassData = {0};


/*
 * Identifiers
 */
static char __somC_Strings_Test0[] = {"Test"}; /* class name */
static char __somC_Strings_Test1[] = {"Hello"}; /* parent name */
static char __somC_Strings_Test2[] = {"Mello"}; /* parent name */
static char __somC_Strings_Test3[] = {"somInit"}; /* overridden method name */
static char * __somC_Test_regIdsArray[] = {
	__somC_Strings_Test0,
	__somC_Strings_Test1,
	__somC_Strings_Test2,
#ifndef __somC_Test_regIds_somInit
#define __somC_Test_regIds_somInit 3
#endif
	__somC_Strings_Test3
};


/*
 * Overridden method: somInit
 */
SOM_Scope void  SOMLINK somInit(Test *somSelf);
typedef void   SOMLINK somTP_xih_Test_somInit(Test *somSelf);
typedef somTP_xih_Test_somInit *somTD_xih_Test_somInit;
/* pcalls for somInit/somUninit are turned off */
#define Test_parent_Hello_somInit(__somSelf) 
#ifndef parent_Hello_somInit
   #define parent_Hello_somInit(__somSelf) 
#endif
#ifndef parent_somInit
   #define parent_somInit(__somSelf) 
#endif
#define Test_parents_somInit(__somSelf) 
/* pcalls for somInit/somUninit are turned off */
#define Test_parent_Mello_somInit(__somSelf) 
#ifndef parent_Mello_somInit
   #define parent_Mello_somInit(__somSelf) 
#endif
#ifndef parent_somInit
   #define parent_somInit(__somSelf) 
#endif
#define Test_parents_somInit(__somSelf) 

/*
 * Functions for attributes.
 */

/*
 * Special Method Support
 */

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

void * __somC_Test_parentMtabs[2];

static somOverrideMethod_t2 __somC_Test_overridesArray[] = {
{ &(__somC_Test_regIdsArray[__somC_Test_regIds_somInit]), 
#ifdef SOMPCALLTest_somInit
   (somMethodPtr*)&Test_pcall_somInit_resolved, 
   (somMethodPtr)Test_pcallResolve_somInit, 
#else
   (somMethodPtr*)0, 
   (somMethodPtr)0, 
#endif
(somMethodPtr)somInit }
};

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

static struct TestClassDataStructure __somC_Test_resolvedMTokens;
static void * __somC_Test_unsharedClassVariablesPtr = 0;
extern som3ClassInfoStruct __somC_Test_ClassInfo; /* C++ forward reference */

static SOM_CIB Test_ClassInitBlock = {
	1,	/* layoutVersion */
	&__somC_Test_classVars1,
	&__somC_Test_unsharedClassVariablesPtr,	/* unsharedVars */
	Test_MajorVersion,
	Test_MinorVersion,
	0x40004,	/* constFlags */
	0xFFFFFFFF,	/* inheritVars */
	(SOMClass**)0,	/* classMeta */
	(somMethodPtr) __somC_Test_classInit,	/* classInit */
	(somMethodPtr) 0,	/* classUninit */
	(somMethodPtr) somInit,	/* legacyInit */
	(somMethodPtr) 0,	/* legacyUninit */
	(somMethodPtr) 0,	/* udaAssign */
	(somMethodPtr) 0,	/* udaConstAssign */
	0,	/* protectedDataOffset */
	0,	/* numEmbeddedObjs */
	0,	/* embeddedObjs */
	4,	/* numRegIds */
	__somC_Test_regIdsArray,	/* regIds */
	((sizeof(struct TestClassDataStructure) - sizeof(SOMClass *))/sizeof(somMToken)),	/* numClassDataEntries */
	(somClassDataStructurePtr)&TestClassData,
	(somCClassDataStructurePtr)&TestCClassData,
	&__somC_Test_ClassInfo,
	2,	/* numParents */
	(SOMClass***)__somC_Test_parentArray,	/* parents */
	2,	/* numDirectInitClasses */
	(SOMClass***)__somC_Test_parentArray,	/* directInitClasses */
	0,	/* numNewInitializers */
	0,	/* newInitializerSymbols */
	0,	/* numOvInitializers */
	0,	/* ovInitializerSymbols */
	0,	/* special overrides */
	0,	/* maxNDMethods */
	0,	/* newNDMethods */
	1,	/* numOverrides */
	__somC_Test_overridesArray,	/* overrides */
	0,	/* numInheritedSelections */
	0,	/* inheritedSelections */
	0,	/* numMigratedMethods */
	0 	/* migratedMethods */
};	/* CIB */
static som3ClassDetails __somC_Test_ClassDetails = {
	(somMethodTabPtr)NULL,	/* mtab */
	(somMethodTabPtr *)__somC_Test_parentMtabs,	/* parentMtabs */
	&Test_ClassInitBlock,	/* ClassInitBlock address */
	(somTD_somRenewNoInitNoZeroThunk)0,	/* somRenewNoInitNoZeroThunk */
	(long)0,	/* instanceSize */
	(somMethodProc**)NULL,	/* resolvedInits */
	(somClassDataStructure *)&__somC_Test_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_Test_ClassInfo = {
	0,	/* classObject */
	&__somC_Test_ClassDetails	/* class details */
};


/*
 * Class Creation and Initialization
 */

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

/* classinit function */
SOM_Scope void SOMLINK __somC_Test_classInit(SOMClass *somSelf)
{
   SOM_IgnoreWarning(somSelf);
}

/* NewClass Function */
SOMEXTERN SOMDLLEXPORT SOMClass * SOMLINK  TestNewClass (long reqMajorVersion, long reqMinorVersion)
{
    if (_SOMCLASS_Test && _SOMCLASS_Test->somCheckVersion(reqMajorVersion, reqMinorVersion))
          return ((SOMClass*)((void*)_SOMCLASS_Test));
__somC_Test_parentArray[0] = (SOMClass **)&_SOMCLASS_Hello;
__somC_Test_parentArray[1] = (SOMClass **)&_SOMCLASS_Mello;
   /* require parents */
   if (!_SOMCLASS_Hello) HelloNewClass(Hello_MajorVersion,Hello_MinorVersion);
   if (!_SOMCLASS_Mello) MelloNewClass(Mello_MajorVersion,Mello_MinorVersion);
   /* return new class */
   return ((SOMClass*)(void*)somBuildClass2(&Test_ClassInitBlock, reqMajorVersion, reqMinorVersion));
}

#if defined(__IBMC__) && (__IBMC__ >= 300)
  #pragma info(restore)
#else
  #if defined(__IBMC__)
    #pragma checkout(resume)
  #endif
#endif



#endif /* Primary Implementation Support */

#endif       /* SOM_Test_xih */
