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_dloc_Source
- #define SOM_Module_dloc_Source
- #endif
- #define dLocation_Class_Source
-
- #include <string.h>
- #include "dloc.xih"
-
- /*
- * City where animal was born.
- */
-
- SOM_Scope void SOMLINK _set_city(dLocation *somSelf, Environment *ev, string city)
- {
- dLocationData *somThis = dLocationGetData(somSelf);
- dLocationMethodDebug("dLocation","_set_city");
-
- if (somThis->city) SOMFree(somThis->city);
- somThis->city = (string) SOMMalloc(strlen(city) + 1);
- strcpy(somThis->city, city);
- }
-
- /*
- * State where animal was born.
- */
-
- SOM_Scope void SOMLINK _set_state(dLocation *somSelf, Environment *ev, string state)
- {
- dLocationData *somThis = dLocationGetData(somSelf);
- dLocationMethodDebug("dLocation","_set_state");
-
- if (somThis->state) SOMFree(somThis->state);
- somThis->state = (string) SOMMalloc(strlen(state) + 1);
- strcpy(somThis->state, state);
- }
-
- SOM_Scope void SOMLINK somDefaultInit(dLocation *somSelf, somInitCtrl* ctrl)
- {
- dLocationData *somThis; /* set in BeginInitializer */
- Environment *ev;
- somInitCtrl globalCtrl;
- somBooleanVector myMask;
- dLocationMethodDebug("dLocation","somDefaultInit");
- dLocation_BeginInitializer_somDefaultInit;
-
- dLocation_Init_SOMObject_somDefaultInit(somSelf, ctrl);
-
- ev = somGetGlobalEnvironment();
- somSelf->_set_city(ev, "unknown city");
- somSelf->_set_state(ev, "unknown state");
- }
- SOM_Scope void SOMLINK somDestruct(dLocation *somSelf, octet doFree, somDestructCtrl* ctrl)
- {
- dLocationData *somThis; /* set in BeginDestructor */
- somDestructCtrl globalCtrl;
- somBooleanVector myMask;
- dLocationMethodDebug("dLocation","somDestruct");
- dLocation_BeginDestructor;
- if (somThis->city) SOMFree(somThis->city);
- if (somThis->state) SOMFree(somThis->state);
- dLocation_EndDestructor;
- }
-