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

/*
 *    COMPONENT_NAME: somx
 * 
 *    ORIGINS: 27
 * 
 * 
 *    25H7912  (C)  COPYRIGHT International Business Machines Corp. 1992,1996
 *    All Rights Reserved
 *    Licensed Materials - Property of IBM
 *    US Government Users Restricted Rights - Use, duplication or
 *    disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
 * 
 *    @(#) 1.1 src/somples.os2/somu/c/fb/dog.idl, somples.somu, som3.0 12/2/96 14:34:14 [12/4/96 15:12:50]
 * 
 * 
 * DISCLAIMER OF WARRANTIES.
 * The following [enclosed] code is sample code created by IBM
 * Corporation. This sample code is not part of any standard or IBM
 * product and is provided to you solely for the purpose of assisting
 * you in the development of your applications.  The code is provided
 * "AS IS". IBM MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT
 * NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
 * FOR A PARTICULAR PURPOSE, REGARDING THE FUNCTION OR PERFORMANCE OF
 * THIS CODE.  IBM shall not be liable for any damages arising out of
 * your use of the sample code, even if they have been advised of the
 * possibility of such damages.
 * 
 * DISTRIBUTION.
 * This sample code can be freely distributed, copied, altered, and
 * incorporated into other software, provided that it bears the above
 * Copyright notice and DISCLAIMER intact.
 */


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


#ifndef SOM_Dog_ih
#define SOM_Dog_ih


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

#ifndef SOM_Dog_h
#include "dog.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 {
	string mydata;
} __somC_Dog_ProtectedPrivateData;
typedef __somC_Dog_ProtectedPrivateData DogData, *DogDataPtr;

/*
 * -- GetData macro
 */
typedef DogDataPtr SOMLINK somTP_Dog_DataThunk(void*);
typedef somTP_Dog_DataThunk *somTD_Dog_DataThunk;

#define DogGetData(somSelf) \
   (((somTD_Dog_DataThunk)(DogCClassData.instanceDataToken))(somSelf))
#define _mydata somThis->mydata

/*
 * -- Primary Implementation File Support
 */
#if (defined(Dog_Class_Source) || defined(SOM_Module_dog_Source))

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

static void SOMLINK __somC_Dog_classInit(SOMClass cls);


/*
 * Init ClassData Structures
 */
struct DogClassDataStructure SOMDLLEXPORT SOMDLINK DogClassData = {0};
struct DogCClassDataStructure SOMDLLEXPORT SOMDLINK DogCClassData = {0};


/*
 * Identifiers
 */
static char __somC_Strings_Dog0[] = {"Dog"}; /* class name */
static char __somC_Strings_Dog1[] = {"dogActivity"}; /* method name */
static char __somC_Strings_Dog2[] = {"DogSet"}; /* method name */
static char __somC_Strings_Dog3[] = {"DogGet"}; /* method name */
static char __somC_Strings_Dog4[] = {"SOMObject"}; /* parent name */
static char __somC_Strings_Dog5[] = {"somDefaultInit"}; /* overridden method name */
static char * __somC_Dog_regIdsArray[] = {
	__somC_Strings_Dog0,
#ifndef __somC_Dog_regIds_dogActivity
#define __somC_Dog_regIds_dogActivity 1
#endif
	__somC_Strings_Dog1,
#ifndef __somC_Dog_regIds_DogSet
#define __somC_Dog_regIds_DogSet 2
#endif
	__somC_Strings_Dog2,
#ifndef __somC_Dog_regIds_DogGet
#define __somC_Dog_regIds_DogGet 3
#endif
	__somC_Strings_Dog3,
	__somC_Strings_Dog4,
#ifndef __somC_Dog_regIds_somDefaultInit
#define __somC_Dog_regIds_somDefaultInit 5
#endif
	__somC_Strings_Dog5
};


/*
 * Overridden method: somDefaultInit
 */
SOM_Scope void  SOMLINK somDefaultInit(Dog somSelf,
		som3InitCtrl* ctrl);

/*
 * New Method: dogActivity
 */
SOM_Scope void  SOMLINK dogActivity(Dog somSelf);
#ifndef somId_dogActivity
#define somId_dogActivity ((somId)&(__somC_Dog_regIdsArray[__somC_Dog_regIds_dogActivity]))
#endif
/* Contract specification:
[CALLTYPE_OIDL (1)][VERSION 0]
*/
#define dogActivity_somMethodInfoValue 0
#define dogActivity_somApplyStubValue 0x1
#define dogActivity_somHasMPlan 24

/*
 * New Method: DogSet
 */
SOM_Scope void  SOMLINK DogSet(Dog somSelf,
		string s);
#ifndef somId_DogSet
#define somId_DogSet ((somId)&(__somC_Dog_regIdsArray[__somC_Dog_regIds_DogSet]))
#endif
#define SOM_MPR_MINFO_DogSet {0, 8, 0}
static somMpRowMethodInfo Dog_DogSet_mp_minfoRow = {{0, SOM_MP_ROWTYPE_METHODINFO}, SOM_MPR_MINFO_DogSet};
#ifndef DEFINEDDog_DogSet_mp
#define DEFINEDDog_DogSet_mp
/*[ ::Dog::DogSet Dog_DogSet_mp ]*/
/* Contract specification:
[CALLTYPE_OIDL (1)][VERSION 0]
ARG 0[in]: String
*/
static struct { void * rows; unsigned char csr[4]; } Dog_DogSet_mp={&Dog_DogSet_mp_minfoRow, {
0x81, 0x01, 0x54},
};
#endif
#define DogSet_somMethodInfoValue 0
#define DogSet_somApplyStubValue &Dog_DogSet_mp.csr
#define DogSet_somHasMPlan 8

/*
 * New Method: DogGet
 */
SOM_Scope string  SOMLINK DogGet(Dog somSelf);
#ifndef somId_DogGet
#define somId_DogGet ((somId)&(__somC_Dog_regIdsArray[__somC_Dog_regIds_DogGet]))
#endif
/* Contract specification:
[CALLTYPE_OIDL (1)][RESULT][VERSION 0]
RESULT[out]: String
*/
#define DogGet_somMethodInfoValue 0
#define DogGet_somApplyStubValue 0x940105
#define DogGet_somHasMPlan 24

/*
 * Functions for attributes.
 */

/*
 * Special Method Support
 */
#define Dog_BeginInitializer_somDefaultInit \
   if (!ctrl) { \
      ctrl = &globalCtrl;\
      memcpy(ctrl,&((DogCClassData.parentMtab)->initCtrl),sizeof(somInitCtrl)); \
   } \
   myMask = ctrl->mask; \
   somThis = (DogData*)((char*)somSelf + ctrl->info->dataOffset);\
   ctrl->info = (somInitInfo*)(ctrl->infoSize + (char*)(ctrl->info)); \
   ctrl->mask += 1;

/*
 * Ancestor_Init Macros
 */
#define Dog_Init_SOMObject_somDefaultInit(somSelf, ctrl) \
    if (myMask[0]&1) \
       ((somTD_SOMObject_somDefaultInit) \
           ctrl->info->defaultInit) \
               ((SOMObject )((void *) somSelf), ctrl)

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

somMethodDefn __somC_Dog_newNDMethodsArray[] = {
	{  (0 | dogActivity_somHasMPlan), 0, (somMToken)0, (somMethodPtr)dogActivity, 
	   0, (somMethodPtr)dogActivity_somApplyStubValue, 
	   (somMethodInfo *) dogActivity_somMethodInfoValue, &DogClassData.dogActivity, 0, 1 },
	{  (0 | DogSet_somHasMPlan), 0, (somMToken)0, (somMethodPtr)DogSet, 
	   0, (somMethodPtr)DogSet_somApplyStubValue, 
	   (somMethodInfo *) DogSet_somMethodInfoValue, &DogClassData.DogSet, 0, 1 },
	{  (0 | DogGet_somHasMPlan), 0, (somMToken)0, (somMethodPtr)DogGet, 
	   0, (somMethodPtr)DogGet_somApplyStubValue, 
	   (somMethodInfo *) DogGet_somMethodInfoValue, &DogClassData.DogGet, 0, 1 }
};

static somSpecialOverrides __somC_Dog_specialOverridesArray[] = {
  {0, 0, (somMethodPtr)somDefaultInit },
};

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

static struct DogClassDataStructure __somC_Dog_resolvedMTokens;

static void * __somC_Dog_CIB_unsharedClassVariablesPtr = 0;
som3ClassInfoStruct __somC_Dog_ClassInfo; /* C forward reference */

SOM_CIB Dog_ClassInitBlock = {
	1,	/* layoutVersion */
	&__somC_Dog_classVars1,
	&__somC_Dog_CIB_unsharedClassVariablesPtr,	/* unsharedVars */
	Dog_MajorVersion,
	Dog_MinorVersion,
	0x40014,	/* constFlags */
	0xFFFFFFFF,	/* inheritVars */
	0,	/* classMeta */
	(somMethodPtr) __somC_Dog_classInit,	/* classInit */
	(somMethodPtr) 0,	/* classUninit */
	(somMethodPtr) 0,	/* legacyInit */
	(somMethodPtr) 0,	/* legacyUninit */
	(somMethodPtr) 0,	/* udaAssign */
	(somMethodPtr) 0,	/* udaConstAssign */
	0,	/* protectedDataOffset */
	0,	/* numEmbeddedObjs */
	0,	/* embeddedObjs */
	6,	/* numRegIds */
	__somC_Dog_regIdsArray,	/* regIds */
	(sizeof(struct DogClassDataStructure) - sizeof(SOMClass *))/sizeof(somMToken),	/* numClassDataEntries */
	(somClassDataStructurePtr)&DogClassData,
	(somCClassDataStructurePtr)&DogCClassData,
	&__somC_Dog_ClassInfo,
	1,	/* numParents */
	(SOMClass**)__somC_Dog_parentArray,	/* parents */
	1,	/* numDirectInitClasses */
	(SOMClass**)__somC_Dog_parentArray,	/* directInitClasses */
	0,	/* numNewInitializers */
	0,	/* newInitializerSymbols */
	0,	/* numOvInitializers */
	0,	/* ovInitializerSymbols */
	__somC_Dog_specialOverridesArray,	/* special overrides */
	3,	/* maxNDMethods */
	__somC_Dog_newNDMethodsArray,	/* newNDMethods */
	0,	/* numOverrides */
	0,	/* overrides */
	0,	/* numInheritedSelections */
	0,	/* inheritedSelections */
	0,	/* numMigratedMethods */
	0 	/* migrated methods */
};	/* CIB */

static som3ClassDetails __somC_Dog_ClassDetails = {
	(somMethodTabPtr)NULL,	/* mtab */
	(somMethodTabPtr *)__somC_Dog_parentMtabs,	/* parentMtabs */
	&Dog_ClassInitBlock,	/* CIB pointer */
	(somTD_somRenewNoInitNoZeroThunk)0,	/* somRenewNoInitNoZeroThunk */
	(long)0,	/* instanceSize */
	(somMethodProc**)NULL,	/* resolvedInits */
	(somClassDataStructure *)&__somC_Dog_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_Dog_ClassInfo = {
	0,	/* classObject */
	&__somC_Dog_ClassDetails	/* class details */
};


/*
 * Class Creation and Initialization
 */

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

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

/* NewClass Function */
SOMEXTERN SOMDLLEXPORT SOMClass  SOMLINK DogNewClass (long reqMajorVersion, long reqMinorVersion)
{
   if (_SOMCLASS_Dog && _somCheckVersion(_SOMCLASS_Dog,reqMajorVersion,reqMinorVersion))
      return _SOMCLASS_Dog;
__somC_Dog_parentArray[0] = (SOMClass *)&_SOMCLASS_SOMObject;
   /* require parents */
   if (!_SOMCLASS_SOMObject) SOMObjectNewClass(SOMObject_MajorVersion,SOMObject_MinorVersion);
   /* return new class */
   return somBuildClass2( &Dog_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_Dog_ih */
