home *** CD-ROM | disk | FTP | other *** search
- //
- // COMPONENT_NAME: somx
- //
- // ORIGINS: 27
- //
- //
- // 10H9767, 10H9769 (C) COPYRIGHT International Business Machines Corp. 1992,1994
- // 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.
- //
-
- /* %Z% %I% %W% %G% %U% [%H% %T%] */
- /*
- * This file was generated by the SOM Compiler and Emitter Framework.
- * Generated using:
- * SOM Emitter emitxtm: 2.37
- */
-
-
-
- #ifndef SOM_Module_ddog_Source
- #define SOM_Module_ddog_Source
- #endif
- #define dDog_Class_Source
-
- #include <stdio.h>
- #include <string.h>
- #include <windows.h>
- #include "ddog.xih"
- #include "nlsutil.h" /* d18953 */
- #include "animal.h" /* d18953 */
- /*
- * Noise dog makes.
- */
-
- SOM_Scope void SOMLINK _set_noise(dDog *somSelf, Environment *ev,
- string noise)
- {
- dDogData *somThis = dDogGetData(somSelf);
- dDogMethodDebug("dDog","_set_noise");
- if (somThis->noise) SOMFree(somThis->noise);
- somThis->noise = (string) SOMMalloc(strlen(noise) + 1);
- strcpy(somThis->noise, noise);
-
- }
-
- /*
- * Trick dog performs.
- */
-
- SOM_Scope void SOMLINK _set_trick(dDog *somSelf, Environment *ev,
- string trick)
- {
- dDogData *somThis = dDogGetData(somSelf);
- dDogMethodDebug("dDog","_set_trick");
- if (somThis->trick) SOMFree(somThis->trick);
- somThis->trick = (string) SOMMalloc(strlen(trick) + 1);
- strcpy(somThis->trick, trick);
-
- }
- SOM_Scope void SOMLINK somDefaultInit(dDog *somSelf, somInitCtrl* ctrl)
- {
- dDogData *somThis; /* set in BeginInitializer */
- Environment *ev;
- somInitCtrl globalCtrl;
- somBooleanVector myMask;
- dDogMethodDebug("dDog","somDefaultInit");
- dDog_BeginInitializer_somDefaultInit;
-
- dDog_Init_dAnimal_somDefaultInit(somSelf,ctrl);
-
- ev = somGetGlobalEnvironment();
- somSelf->_set_noise(ev, NlsMsgGet(UnknownNoiseId));
- somSelf->_set_trick(ev, NlsMsgGet(UnknownTrickId));
- }
-
- SOM_Scope void SOMLINK somDestruct(dDog *somSelf, octet doFree, somDestructCtrl* ctrl)
- {
- dDogData *somThis; /* set in BeginDestructor */
- somDestructCtrl globalCtrl;
- somBooleanVector myMask;
- dDogMethodDebug("dDog","somDestruct");
- dDog_BeginDestructor;
-
- if (somThis->trick) SOMFree (somThis->trick);
- if (somThis->noise) SOMFree (somThis->noise);
- dDog_EndDestructor;
- }
-
- SOM_Scope string SOMLINK display(dDog *somSelf, Environment *ev)
- {
- string mybuff, bp;
-
- dDogData *somThis = dDogGetData(somSelf);
- dDogMethodDebug("dDog","display");
-
- mybuff = parent_display(somSelf, ev);
- bp = mybuff;
- bp += strlen(mybuff);
- wsprintf(bp, NlsMsgGet(MyTrickId), somThis->trick);
- return mybuff;
- }
-
-