
/*
 * This file was generated by the SOM Compiler.
 * FileName: dldog.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.
 * 
 *    @(#) 2.9.1.1 src/somples.os2/somd/c/animal/dldog.idl, somples.somd, som3.0 12/2/96 17:00:29 [12/4/96 15:09:07]
 * 
 * 
 * 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_dLittleDog_ih
#define SOM_dLittleDog_ih


#if (defined(dLittleDog_Class_Source) || defined(SOM_Module_dldog_Source))
#ifndef SOM_DLL_danimal
#define SOM_DLL_danimal
#endif
#endif


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

#ifndef SOM_dLittleDog_h
#include "dldog.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 {
	double LDweight;
        /*
         *  Weight of dog in ounces.
         */
} __somC_dLittleDog_ProtectedPrivateData;
typedef __somC_dLittleDog_ProtectedPrivateData dLittleDogData, *dLittleDogDataPtr;

/*
 * -- GetData macro
 */
typedef dLittleDogDataPtr SOMLINK somTP_dLittleDog_DataThunk(void*);
typedef somTP_dLittleDog_DataThunk *somTD_dLittleDog_DataThunk;

#define dLittleDogGetData(somSelf) \
   (((somTD_dLittleDog_DataThunk)(dLittleDogCClassData.instanceDataToken))(somSelf))
#define _LDweight somThis->LDweight

/*
 * -- Primary Implementation File Support
 */
#if (defined(dLittleDog_Class_Source) || defined(SOM_Module_dldog_Source))

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

static void SOMLINK __somC_dLittleDog_classInit(SOMClass cls);


/*
 * Init ClassData Structures
 */
struct dLittleDogClassDataStructure SOM_IMPORTEXPORT_danimal_dldog SOMDLINK dLittleDogClassData = {0};
struct dLittleDogCClassDataStructure SOM_IMPORTEXPORT_danimal_dldog SOMDLINK dLittleDogCClassData = {0};


/*
 * Identifiers
 */
static char __somC_Strings_dLittleDog0[] = {"dLittleDog"}; /* class name */
static char __somC_Strings_dLittleDog1[] = {"_get_LDweight"}; /* method name */
static char __somC_Strings_dLittleDog2[] = {"_set_LDweight"}; /* method name */
static char __somC_Strings_dLittleDog3[] = {"dDog"}; /* parent name */
static char __somC_Strings_dLittleDog4[] = {"somDefaultInit"}; /* overridden method name */
static char __somC_Strings_dLittleDog5[] = {"display"}; /* overridden method name */
static char * __somC_dLittleDog_regIdsArray[] = {
	__somC_Strings_dLittleDog0,
#ifndef __somC_dLittleDog_regIds__get_LDweight
#define __somC_dLittleDog_regIds__get_LDweight 1
#endif
	__somC_Strings_dLittleDog1,
#ifndef __somC_dLittleDog_regIds__set_LDweight
#define __somC_dLittleDog_regIds__set_LDweight 2
#endif
	__somC_Strings_dLittleDog2,
	__somC_Strings_dLittleDog3,
#ifndef __somC_dLittleDog_regIds_somDefaultInit
#define __somC_dLittleDog_regIds_somDefaultInit 4
#endif
	__somC_Strings_dLittleDog4,
#ifndef __somC_dLittleDog_regIds_display
#define __somC_dLittleDog_regIds_display 5
#endif
	__somC_Strings_dLittleDog5
};


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

/*
 * Overridden method: display
 */
SOM_Scope string  SOMLINK display(dLittleDog somSelf, Environment *ev);
static somMethodProc* dLittleDog_parent_dDog_display_resolved;
#define dLittleDog_parent_dDog_display(somSelf,ev) \
  ((( somTD_dAnimal_display ) \
    dLittleDog_parent_dDog_display_resolved)(somSelf,ev))
#ifndef SOMGD_pmc_dDog_display
  #ifdef parent_dDog_display
     #define SOMGD_pmc_dDog_display 1
     #undef parent_dDog_display
  #else
     #define parent_dDog_display dLittleDog_parent_dDog_display
  #endif /* parent_dDog_display */
#endif /* SOMGD_pmc_dDog_display */
#ifndef SOMGD_pmc_parent_display
  #ifdef parent_display
    #define SOMGD_pmc_parent_display
    #undef parent_display
  #else
#define parent_display dLittleDog_parent_dDog_display
  #endif
#endif
#define dLittleDog_parents_display(somSelf,ev) (\
   dLittleDog_parent_dDog_display(somSelf,ev))
#define SOMPCALLdLittleDog_display
static somMethodProc* dLittleDog_pcall_display_resolved;
#define dLittleDog_pcall_display(somSelf,ev) \
  ((( somTD_dAnimal_display ) \
    dLittleDog_pcall_display_resolved)(somSelf,ev))
static string  SOMLINK dLittleDog_pcallResolve_display(dLittleDog somSelf, Environment *ev)
{
   return ((somTD_dAnimal_display) 
      somPCallResolve(somSelf, _dLittleDog, _SOMMTOKEN_dAnimal(display)))(somSelf,ev);
}


/*
 * New Method: _get_LDweight
 */
SOM_Scope double  SOMLINK _get_LDweight(dLittleDog somSelf, Environment *ev);
/*
 *  Weight of dog in ounces.
 */
#ifndef somId__get_LDweight
#define somId__get_LDweight ((somId)&(__somC_dLittleDog_regIdsArray[__somC_dLittleDog_regIds__get_LDweight]))
#endif
#define SOM_MPR_MINFO__get_LDweight {4, 8, 0}
static somMpRowMethodInfo dLittleDog__get_LDweight_mp_minfoRow = {{0, SOM_MP_ROWTYPE_METHODINFO}, SOM_MPR_MINFO__get_LDweight};
#ifndef DEFINEDdLittleDog__get_LDweight_mp
#define DEFINEDdLittleDog__get_LDweight_mp
/*[ ::dLittleDog::_get_LDweight dLittleDog__get_LDweight_mp ]*/
/* Contract specification:
[CALLTYPE_IDL (2)][RESULT][VERSION 0]
RESULT[out]: Double
*/
static struct { void * rows; unsigned char csr[4]; } dLittleDog__get_LDweight_mp={&dLittleDog__get_LDweight_mp_minfoRow, {
0x86, 0x01, 0x86},
};
#endif
#define _get_LDweight_somMethodInfoValue 0
#define _get_LDweight_somApplyStubValue &dLittleDog__get_LDweight_mp.csr
#define _get_LDweight_somHasMPlan 8

/*
 * New Method: _set_LDweight
 */
SOM_Scope void  SOMLINK _set_LDweight(dLittleDog somSelf, Environment *ev,
		double LDweight);
/*
 *  Weight of dog in ounces.
 */
#ifndef somId__set_LDweight
#define somId__set_LDweight ((somId)&(__somC_dLittleDog_regIdsArray[__somC_dLittleDog_regIds__set_LDweight]))
#endif
static somFloatMap _set_LDweightFloatMap = {
10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, };
#define SOM_MPR_MINFO__set_LDweight {1, 16, &_set_LDweightFloatMap}
static somMpRowMethodInfo dLittleDog__set_LDweight_mp_minfoRow = {{0, SOM_MP_ROWTYPE_METHODINFO}, SOM_MPR_MINFO__set_LDweight};
#ifndef DEFINEDdLittleDog__set_LDweight_mp
#define DEFINEDdLittleDog__set_LDweight_mp
/*[ ::dLittleDog::_set_LDweight dLittleDog__set_LDweight_mp ]*/
/* Contract specification:
[CALLTYPE_IDL (2)][VERSION 0]
ARG 0[in]: Double
*/
static struct { void * rows; unsigned char csr[4]; } dLittleDog__set_LDweight_mp={&dLittleDog__set_LDweight_mp_minfoRow, {
0x82, 0x01, 0x46},
};
#endif
#define _set_LDweight_somMethodInfoValue 0
#define _set_LDweight_somApplyStubValue &dLittleDog__set_LDweight_mp.csr
#define _set_LDweight_somHasMPlan 8

/*
 * Functions for attributes.
 */
SOM_Scope double  SOMLINK _get_LDweight(dLittleDog somSelf, Environment *ev){
    dLittleDogData *somThis = dLittleDogGetData(somSelf);
    SOM_IgnoreWarning(ev);

    return  (somThis->LDweight);
}
SOM_Scope void  SOMLINK _set_LDweight(dLittleDog somSelf, Environment *ev,
		double LDweight){
    dLittleDogData *somThis = dLittleDogGetData(somSelf);
    SOM_IgnoreWarning(ev);

    (somThis->LDweight) = LDweight;
}

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

/*
 * Ancestor_Init Macros
 */
#define dLittleDog_Init_dDog_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_dLittleDog_parentArray[] = {
	NULL,
};
void * __somC_dLittleDog_parentMtabs[1];

somMethodDefn __somC_dLittleDog_newNDMethodsArray[] = {
	{  (0 | _get_LDweight_somHasMPlan), 0, (somMToken)0, (somMethodPtr)_get_LDweight, 
	   0, (somMethodPtr)_get_LDweight_somApplyStubValue, 
	   (somMethodInfo *) _get_LDweight_somMethodInfoValue, &dLittleDogClassData._get_LDweight, 0, 1 },
	{  (0 | _set_LDweight_somHasMPlan), 0, (somMToken)0, (somMethodPtr)_set_LDweight, 
	   0, (somMethodPtr)_set_LDweight_somApplyStubValue, 
	   (somMethodInfo *) _set_LDweight_somMethodInfoValue, &dLittleDogClassData._set_LDweight, 0, 1 }
};

static somOverrideMethod_t2 __somC_dLittleDog_overridesArray[] = {
{ &(__somC_dLittleDog_regIdsArray[__somC_dLittleDog_regIds_display]), 
#ifdef SOMPCALLdLittleDog_display
   (somMethodPtr*)&dLittleDog_pcall_display_resolved, 
   (somMethodPtr)dLittleDog_pcallResolve_display, 
#else
   (somMethodPtr*)0, 
   (somMethodPtr)0, 
#endif
(somMethodPtr)display }
};

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

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

static struct dLittleDogClassDataStructure __somC_dLittleDog_resolvedMTokens;

static void * __somC_dLittleDog_CIB_unsharedClassVariablesPtr = 0;
som3ClassInfoStruct __somC_dLittleDog_ClassInfo; /* C forward reference */

SOM_CIB dLittleDog_ClassInitBlock = {
	1,	/* layoutVersion */
	&__somC_dLittleDog_classVars1,
	&__somC_dLittleDog_CIB_unsharedClassVariablesPtr,	/* unsharedVars */
	dLittleDog_MajorVersion,
	dLittleDog_MinorVersion,
	0x60014,	/* constFlags */
	0xFFFFFFFF,	/* inheritVars */
	0,	/* classMeta */
	(somMethodPtr) __somC_dLittleDog_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_dLittleDog_regIdsArray,	/* regIds */
	(sizeof(struct dLittleDogClassDataStructure) - sizeof(SOMClass *))/sizeof(somMToken),	/* numClassDataEntries */
	(somClassDataStructurePtr)&dLittleDogClassData,
	(somCClassDataStructurePtr)&dLittleDogCClassData,
	&__somC_dLittleDog_ClassInfo,
	1,	/* numParents */
	(SOMClass**)__somC_dLittleDog_parentArray,	/* parents */
	1,	/* numDirectInitClasses */
	(SOMClass**)__somC_dLittleDog_parentArray,	/* directInitClasses */
	0,	/* numNewInitializers */
	0,	/* newInitializerSymbols */
	0,	/* numOvInitializers */
	0,	/* ovInitializerSymbols */
	__somC_dLittleDog_specialOverridesArray,	/* special overrides */
	2,	/* maxNDMethods */
	__somC_dLittleDog_newNDMethodsArray,	/* newNDMethods */
	1,	/* numOverrides */
	__somC_dLittleDog_overridesArray,	/* overrides */
	0,	/* numInheritedSelections */
	0,	/* inheritedSelections */
	0,	/* numMigratedMethods */
	0 	/* migrated methods */
};	/* CIB */

static som3ClassDetails __somC_dLittleDog_ClassDetails = {
	(somMethodTabPtr)NULL,	/* mtab */
	(somMethodTabPtr *)__somC_dLittleDog_parentMtabs,	/* parentMtabs */
	&dLittleDog_ClassInitBlock,	/* CIB pointer */
	(somTD_somRenewNoInitNoZeroThunk)0,	/* somRenewNoInitNoZeroThunk */
	(long)0,	/* instanceSize */
	(somMethodProc**)NULL,	/* resolvedInits */
	(somClassDataStructure *)&__somC_dLittleDog_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_dLittleDog_ClassInfo = {
	0,	/* classObject */
	&__somC_dLittleDog_ClassDetails	/* class details */
};


/*
 * Class Creation and Initialization
 */

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

/* classinit function */
SOM_Scope void SOMLINK __somC_dLittleDog_classInit(SOMClass somSelf)
{
   SOM_IgnoreWarning(somSelf);
   dLittleDog_parent_dDog_display_resolved = 
	somParentNumResolve(dLittleDogCClassData.parentMtab, 1, _SOMMTOKEN_dAnimal(display)); 
}

/* NewClass Function */
SOMEXTERN SOM_IMPORTEXPORT_danimal_dldog SOMClass  SOMLINK dLittleDogNewClass (long reqMajorVersion, long reqMinorVersion)
{
   if (_SOMCLASS_dLittleDog && _somCheckVersion(_SOMCLASS_dLittleDog,reqMajorVersion,reqMinorVersion))
      return _SOMCLASS_dLittleDog;
__somC_dLittleDog_parentArray[0] = (SOMClass *)&_SOMCLASS_dDog;
   /* require parents */
   if (!_SOMCLASS_dDog) dDogNewClass(dDog_MajorVersion,dDog_MinorVersion);
   /* return new class */
   return somBuildClass2( &dLittleDog_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_dLittleDog_ih */
