
/*
 * This file was generated by the SOM Compiler.
 * FileName: danimal.h.
 * Generated using:
 *     SOM Precompiler somipc: 2.29.1.19
 *     SOM Emitter emith.dll: 2.31.1.64
 */

/*
 *    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.11.1.1 src/somples.os2/somd/c/animal/danimal.idl, somples.somd, som3.0 12/2/96 16:59:31 [12/4/96 15:09:01]
 * 
 * 
 * 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.
 */


#ifndef SOM_dAnimal_h
#define SOM_dAnimal_h


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


#include <som.h>
#ifndef SOM_IMPORTEXPORT_danimal_danimal
#ifdef SOM_DLL_danimal
	/* export semantics */
	#if defined(SOM_DEFFILE_danimal)\
	||(defined(SOM_DEFFILE_BY_DEFAULT)&&!defined(SOM_NODEFFILE_danimal))\
	|| !defined(SOM_Module_danimal_Source)
	#define SOM_IMPORTEXPORT_danimal_danimal
	#else
	#define SOM_IMPORTEXPORT_danimal_danimal SOMDLLEXPORT
	#endif
#else
	#define SOM_IMPORTEXPORT_danimal_danimal SOMDLLIMPORT
#endif
#endif

/*
 * -- This emitter treats Method Tokens as Thunks by default.
 * -- Use the sc modifier "nothunks" to change this default
 */
#undef somresolve_
#define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))

/*
 * Define the class name as an object type
 */
#ifndef dAnimal
#define dAnimal SOMObject
#endif

/*
 * Include Parent Bindings
 */
#ifndef SOM_SOMObject_h
#ifdef SOMLOCALINCLUDES
#include "somobj.h"
#else
#include <somobj.h>
#endif
#endif

/*
 * Start of bindings for IDL types
 */

#ifndef SOMClass
    #define SOMClass SOMObject
#endif /* SOMClass */
#ifndef dLocation
    #define dLocation SOMObject
#endif /* dLocation */
#ifndef AnimalFactory
    #define AnimalFactory SOMObject
#endif /* AnimalFactory */

/*
 * End of bindings for IDL types.
 */

#define dAnimal_MajorVersion 0
#define dAnimal_MinorVersion 0

/*
 * Declare the class creation procedure
 */
SOMEXTERN SOM_IMPORTEXPORT_danimal_danimal SOMClass  SOMLINK dAnimalNewClass(integer4 somtmajorVersion,
		integer4 somtminorVersion);

/*
 * Declare the ABI 2 ClassData structure
 */
SOMEXTERN struct dAnimalClassDataStructure {
	SOMClass classObject;
	somMToken _get_name;
	somMToken _set_name;
	somMToken _get_type;
	somMToken _set_type;
	somMToken _get_food;
	somMToken _set_food;
	somMToken _get_loc;
	somMToken _set_loc;
	somMToken _get_buff;
	somMToken _set_buff;
	somMToken display;
} SOM_IMPORTEXPORT_danimal_danimal SOMDLINK dAnimalClassData;

/*
 * Declare the ABI 2 CClassData structure
 */
SOMEXTERN struct dAnimalCClassDataStructure {
	somMethodTabs parentMtab;
	somDToken instanceDataToken;
} SOM_IMPORTEXPORT_danimal_danimal SOMDLINK dAnimalCClassData;

/*
 * Class Object and Method Token Macros
 */
#define _SOMCLASS_dAnimal (dAnimalClassData.classObject)
#ifndef SOMGD_dAnimal
    #if (defined(_dAnimal) || defined(__dAnimal))
        #undef _dAnimal
        #undef __dAnimal
        #define SOMGD_dAnimal 1
    #else
        #define _dAnimal _SOMCLASS_dAnimal
    #endif /* _dAnimal */
#endif /* SOMGD_dAnimal */
#define dAnimal_classObj _SOMCLASS_dAnimal
#define _SOMMTOKEN_dAnimal(method) ((somMToken)dAnimalClassData.method)

/*
 * New and Renew macros for dAnimal
 */
#define dAnimalNew() \
   ( _dAnimal ? \
	_somNew(_dAnimal) \
	: ( dAnimalNewClass(\
		dAnimal_MajorVersion, \
		dAnimal_MinorVersion),\
	   _somNew(_dAnimal)))
#define dAnimalRenew(buf) \
   ( _dAnimal ? \
	_somRenew(_dAnimal, buf) \
	: ( dAnimalNewClass(\
		dAnimal_MajorVersion, \
		dAnimal_MinorVersion),\
	   _somRenew(_dAnimal, buf)))

/*
 * New Method: _get_name
 */
typedef string   SOMLINK somTP_dAnimal__get_name(dAnimal somSelf, Environment *ev);
typedef somTP_dAnimal__get_name *somTD_dAnimal__get_name;
/*
 *  Name of animal.
 */
#define somMD_dAnimal__get_name "::dAnimal::_get_name"
#define dAnimal__get_name(somSelf,ev) \
    (SOM_Resolve(somSelf, dAnimal, _get_name) \
	(somSelf,ev))
#ifndef SOMGD_get_name
    #if (defined(_get_name) || defined(__get_name))
        #undef _get_name
        #undef __get_name
        #define SOMGD_get_name 1
    #else
        #define __get_name dAnimal__get_name
    #endif /* __get_name */
#endif /* SOMGD_get_name */

/*
 * New Method: _set_name
 */
typedef void   SOMLINK somTP_dAnimal__set_name(dAnimal somSelf, Environment *ev, 
		string name);
typedef somTP_dAnimal__set_name *somTD_dAnimal__set_name;
/*
 *  Name of animal.
 */
#define somMD_dAnimal__set_name "::dAnimal::_set_name"
#define dAnimal__set_name(somSelf,ev,name) \
    (SOM_Resolve(somSelf, dAnimal, _set_name) \
	(somSelf,ev,name))
#ifndef SOMGD_set_name
    #if (defined(_set_name) || defined(__set_name))
        #undef _set_name
        #undef __set_name
        #define SOMGD_set_name 1
    #else
        #define __set_name dAnimal__set_name
    #endif /* __set_name */
#endif /* SOMGD_set_name */

/*
 * New Method: _get_type
 */
typedef string   SOMLINK somTP_dAnimal__get_type(dAnimal somSelf, Environment *ev);
typedef somTP_dAnimal__get_type *somTD_dAnimal__get_type;
/*
 *  Type of animal.
 */
#define somMD_dAnimal__get_type "::dAnimal::_get_type"
#define dAnimal__get_type(somSelf,ev) \
    (SOM_Resolve(somSelf, dAnimal, _get_type) \
	(somSelf,ev))
#ifndef SOMGD_get_type
    #if (defined(_get_type) || defined(__get_type))
        #undef _get_type
        #undef __get_type
        #define SOMGD_get_type 1
    #else
        #define __get_type dAnimal__get_type
    #endif /* __get_type */
#endif /* SOMGD_get_type */

/*
 * New Method: _set_type
 */
typedef void   SOMLINK somTP_dAnimal__set_type(dAnimal somSelf, Environment *ev, 
		string type);
typedef somTP_dAnimal__set_type *somTD_dAnimal__set_type;
/*
 *  Type of animal.
 */
#define somMD_dAnimal__set_type "::dAnimal::_set_type"
#define dAnimal__set_type(somSelf,ev,type) \
    (SOM_Resolve(somSelf, dAnimal, _set_type) \
	(somSelf,ev,type))
#ifndef SOMGD_set_type
    #if (defined(_set_type) || defined(__set_type))
        #undef _set_type
        #undef __set_type
        #define SOMGD_set_type 1
    #else
        #define __set_type dAnimal__set_type
    #endif /* __set_type */
#endif /* SOMGD_set_type */

/*
 * New Method: _get_food
 */
typedef string   SOMLINK somTP_dAnimal__get_food(dAnimal somSelf, Environment *ev);
typedef somTP_dAnimal__get_food *somTD_dAnimal__get_food;
/*
 *  Food animal likes to eat.
 */
#define somMD_dAnimal__get_food "::dAnimal::_get_food"
#define dAnimal__get_food(somSelf,ev) \
    (SOM_Resolve(somSelf, dAnimal, _get_food) \
	(somSelf,ev))
#ifndef SOMGD_get_food
    #if (defined(_get_food) || defined(__get_food))
        #undef _get_food
        #undef __get_food
        #define SOMGD_get_food 1
    #else
        #define __get_food dAnimal__get_food
    #endif /* __get_food */
#endif /* SOMGD_get_food */

/*
 * New Method: _set_food
 */
typedef void   SOMLINK somTP_dAnimal__set_food(dAnimal somSelf, Environment *ev, 
		string food);
typedef somTP_dAnimal__set_food *somTD_dAnimal__set_food;
/*
 *  Food animal likes to eat.
 */
#define somMD_dAnimal__set_food "::dAnimal::_set_food"
#define dAnimal__set_food(somSelf,ev,food) \
    (SOM_Resolve(somSelf, dAnimal, _set_food) \
	(somSelf,ev,food))
#ifndef SOMGD_set_food
    #if (defined(_set_food) || defined(__set_food))
        #undef _set_food
        #undef __set_food
        #define SOMGD_set_food 1
    #else
        #define __set_food dAnimal__set_food
    #endif /* __set_food */
#endif /* SOMGD_set_food */

/*
 * New Method: _get_loc
 */
typedef dLocation   SOMLINK somTP_dAnimal__get_loc(dAnimal somSelf, Environment *ev);
typedef somTP_dAnimal__get_loc *somTD_dAnimal__get_loc;
/*
 *  Object with city and state where animal lives.
 */
#define somMD_dAnimal__get_loc "::dAnimal::_get_loc"
#define dAnimal__get_loc(somSelf,ev) \
    (SOM_Resolve(somSelf, dAnimal, _get_loc) \
	(somSelf,ev))
#ifndef SOMGD_get_loc
    #if (defined(_get_loc) || defined(__get_loc))
        #undef _get_loc
        #undef __get_loc
        #define SOMGD_get_loc 1
    #else
        #define __get_loc dAnimal__get_loc
    #endif /* __get_loc */
#endif /* SOMGD_get_loc */

/*
 * New Method: _set_loc
 */
typedef void   SOMLINK somTP_dAnimal__set_loc(dAnimal somSelf, Environment *ev, 
		dLocation loc);
typedef somTP_dAnimal__set_loc *somTD_dAnimal__set_loc;
/*
 *  Object with city and state where animal lives.
 */
#define somMD_dAnimal__set_loc "::dAnimal::_set_loc"
#define dAnimal__set_loc(somSelf,ev,loc) \
    (SOM_Resolve(somSelf, dAnimal, _set_loc) \
	(somSelf,ev,loc))
#ifndef SOMGD_set_loc
    #if (defined(_set_loc) || defined(__set_loc))
        #undef _set_loc
        #undef __set_loc
        #define SOMGD_set_loc 1
    #else
        #define __set_loc dAnimal__set_loc
    #endif /* __set_loc */
#endif /* SOMGD_set_loc */

/*
 * New Method: _get_buff
 */
typedef string   SOMLINK somTP_dAnimal__get_buff(dAnimal somSelf, Environment *ev);
typedef somTP_dAnimal__get_buff *somTD_dAnimal__get_buff;
/*
 *  Work area for display method.
 */
#define somMD_dAnimal__get_buff "::dAnimal::_get_buff"
#define dAnimal__get_buff(somSelf,ev) \
    (SOM_Resolve(somSelf, dAnimal, _get_buff) \
	(somSelf,ev))
#ifndef SOMGD_get_buff
    #if (defined(_get_buff) || defined(__get_buff))
        #undef _get_buff
        #undef __get_buff
        #define SOMGD_get_buff 1
    #else
        #define __get_buff dAnimal__get_buff
    #endif /* __get_buff */
#endif /* SOMGD_get_buff */

/*
 * New Method: _set_buff
 */
typedef void   SOMLINK somTP_dAnimal__set_buff(dAnimal somSelf, Environment *ev, 
		string buff);
typedef somTP_dAnimal__set_buff *somTD_dAnimal__set_buff;
/*
 *  Work area for display method.
 */
#define somMD_dAnimal__set_buff "::dAnimal::_set_buff"
#define dAnimal__set_buff(somSelf,ev,buff) \
    (SOM_Resolve(somSelf, dAnimal, _set_buff) \
	(somSelf,ev,buff))
#ifndef SOMGD_set_buff
    #if (defined(_set_buff) || defined(__set_buff))
        #undef _set_buff
        #undef __set_buff
        #define SOMGD_set_buff 1
    #else
        #define __set_buff dAnimal__set_buff
    #endif /* __set_buff */
#endif /* SOMGD_set_buff */

/*
 * New Method: display
 */
typedef string   SOMLINK somTP_dAnimal_display(dAnimal somSelf, Environment *ev);
typedef somTP_dAnimal_display *somTD_dAnimal_display;
/*
 *  Returns description of animal.
 */
#define somMD_dAnimal_display "::dAnimal::display"
#define dAnimal_display(somSelf,ev) \
    (SOM_Resolve(somSelf, dAnimal, display) \
	(somSelf,ev))
#ifndef SOMGD_display
    #if (defined(_display) || defined(__display))
        #undef _display
        #undef __display
        #define SOMGD_display 1
    #else
        #define _display dAnimal_display
    #endif /* _display */
#endif /* SOMGD_display */

/*
 * Full Names for Inherited Methods
 */
/* overridden methods */
#define dAnimal_somDefaultInit SOMObject_somDefaultInit
#define dAnimal_somDestruct SOMObject_somDestruct

#ifndef SOM_DONT_USE_INHERITED_MACROS
#define dAnimal_somDefaultCopyInit SOMObject_somDefaultCopyInit
#define dAnimal_somDefaultAssign SOMObject_somDefaultAssign
#define dAnimal_somDefaultConstCopyInit SOMObject_somDefaultConstCopyInit
#define dAnimal_somDefaultVCopyInit SOMObject_somDefaultVCopyInit
#define dAnimal_somDefaultConstVCopyInit SOMObject_somDefaultConstVCopyInit
#define dAnimal_somDefaultConstAssign SOMObject_somDefaultConstAssign
#define dAnimal_somDefaultVAssign SOMObject_somDefaultVAssign
#define dAnimal_somDefaultConstVAssign SOMObject_somDefaultConstVAssign
#define dAnimal_somInit SOMObject_somInit
#define dAnimal_somUninit SOMObject_somUninit
#define dAnimal_somFree SOMObject_somFree
#define dAnimal_somGetClass SOMObject_somGetClass
#define dAnimal_somGetClassName SOMObject_somGetClassName
#define dAnimal_somGetSize SOMObject_somGetSize
#define dAnimal_somIsA SOMObject_somIsA
#define dAnimal_somIsInstanceOf SOMObject_somIsInstanceOf
#define dAnimal_somRespondsTo SOMObject_somRespondsTo
#define dAnimal_somDispatch SOMObject_somDispatch
#define dAnimal_somClassDispatch SOMObject_somClassDispatch
#define dAnimal_somCastObj SOMObject_somCastObj
#define dAnimal_somResetObj SOMObject_somResetObj
#define dAnimal_somPrintSelf SOMObject_somPrintSelf
#define dAnimal_somDumpSelf SOMObject_somDumpSelf
#define dAnimal_somDumpSelfInt SOMObject_somDumpSelfInt
#endif /* SOM_DONT_USE_INHERITED_MACROS */

#endif       /* SOM_dAnimal_h */

#ifndef SOM_AnimalFactory_h
#define SOM_AnimalFactory_h


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


#include <som.h>

/*
 * -- This emitter treats Method Tokens as Thunks by default.
 * -- Use the sc modifier "nothunks" to change this default
 */
#undef somresolve_
#define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))

/*
 * Define the class name as an object type
 */
#ifndef AnimalFactory
#define AnimalFactory SOMObject
#endif

/*
 * Include Parent Bindings
 */
#ifndef SOM_SOMObject_h
#ifdef SOMLOCALINCLUDES
#include "somobj.h"
#else
#include <somobj.h>
#endif
#endif

/*
 * Start of bindings for IDL types
 */

#define ex_AnimalFactory_InvalidClassName "::AnimalFactory::InvalidClassName"
#define AnimalFactory_InvalidClassName NULL

#ifndef SOM_DONT_USE_SHORT_NAMES
#ifndef SOMTGD_ex_InvalidClassName
    #ifdef ex_InvalidClassName
        #undef ex_InvalidClassName
        #define SOMTGD_ex_InvalidClassName 1
    #else
        #define ex_InvalidClassName ex_AnimalFactory_InvalidClassName
    #endif /* ex_InvalidClassName */
#endif /* SOMTGD_ex_InvalidClassName */
#ifndef SOMTGD_InvalidClassName
    #ifdef InvalidClassName
        #undef InvalidClassName
        #define SOMTGD_InvalidClassName 1
    #else
        #define InvalidClassName AnimalFactory_InvalidClassName
    #endif /* InvalidClassName */
#endif /* SOMTGD_InvalidClassName */
#endif /* SOM_DONT_USE_SHORT_NAMES */

/*
 * End of bindings for IDL types.
 */

#define AnimalFactory_MajorVersion 0
#define AnimalFactory_MinorVersion 0

/*
 * Declare the class creation procedure
 */
SOMEXTERN SOM_IMPORTEXPORT_danimal_danimal SOMClass  SOMLINK AnimalFactoryNewClass(integer4 somtmajorVersion,
		integer4 somtminorVersion);

/*
 * Declare the ABI 2 ClassData structure
 */
SOMEXTERN struct AnimalFactoryClassDataStructure {
	SOMClass classObject;
	somMToken create_animal;
} SOM_IMPORTEXPORT_danimal_danimal SOMDLINK AnimalFactoryClassData;

/*
 * Declare the ABI 2 CClassData structure
 */
SOMEXTERN struct AnimalFactoryCClassDataStructure {
	somMethodTabs parentMtab;
	somDToken instanceDataToken;
} SOM_IMPORTEXPORT_danimal_danimal SOMDLINK AnimalFactoryCClassData;

/*
 * Class Object and Method Token Macros
 */
#define _SOMCLASS_AnimalFactory (AnimalFactoryClassData.classObject)
#ifndef SOMGD_AnimalFactory
    #if (defined(_AnimalFactory) || defined(__AnimalFactory))
        #undef _AnimalFactory
        #undef __AnimalFactory
        #define SOMGD_AnimalFactory 1
    #else
        #define _AnimalFactory _SOMCLASS_AnimalFactory
    #endif /* _AnimalFactory */
#endif /* SOMGD_AnimalFactory */
#define AnimalFactory_classObj _SOMCLASS_AnimalFactory
#define _SOMMTOKEN_AnimalFactory(method) ((somMToken)AnimalFactoryClassData.method)

/*
 * New and Renew macros for AnimalFactory
 */
#define AnimalFactoryNew() \
   ( _AnimalFactory ? \
	_somNew(_AnimalFactory) \
	: ( AnimalFactoryNewClass(\
		AnimalFactory_MajorVersion, \
		AnimalFactory_MinorVersion),\
	   _somNew(_AnimalFactory)))
#define AnimalFactoryRenew(buf) \
   ( _AnimalFactory ? \
	_somRenew(_AnimalFactory, buf) \
	: ( AnimalFactoryNewClass(\
		AnimalFactory_MajorVersion, \
		AnimalFactory_MinorVersion),\
	   _somRenew(_AnimalFactory, buf)))

/*
 * New Method: create_animal
 */
typedef dAnimal   SOMLINK somTP_AnimalFactory_create_animal(AnimalFactory somSelf, Environment *ev, 
		string className);
typedef somTP_AnimalFactory_create_animal *somTD_AnimalFactory_create_animal;
/*
 *  Creates and returns an instance of the input class name.
 *  The input class name must be a subclass of dAnimal or an exception
 *  will be raised.
 */
#define somMD_AnimalFactory_create_animal "::AnimalFactory::create_animal"
#define AnimalFactory_create_animal(somSelf,ev,className) \
    (SOM_Resolve(somSelf, AnimalFactory, create_animal) \
	(somSelf,ev,className))
#ifndef SOMGD_create_animal
    #if (defined(_create_animal) || defined(__create_animal))
        #undef _create_animal
        #undef __create_animal
        #define SOMGD_create_animal 1
    #else
        #define _create_animal AnimalFactory_create_animal
    #endif /* _create_animal */
#endif /* SOMGD_create_animal */

/*
 * Full Names for Inherited Methods
 */

#ifndef SOM_DONT_USE_INHERITED_MACROS
#define AnimalFactory_somDefaultInit SOMObject_somDefaultInit
#define AnimalFactory_somDestruct SOMObject_somDestruct
#define AnimalFactory_somDefaultCopyInit SOMObject_somDefaultCopyInit
#define AnimalFactory_somDefaultAssign SOMObject_somDefaultAssign
#define AnimalFactory_somDefaultConstCopyInit SOMObject_somDefaultConstCopyInit
#define AnimalFactory_somDefaultVCopyInit SOMObject_somDefaultVCopyInit
#define AnimalFactory_somDefaultConstVCopyInit SOMObject_somDefaultConstVCopyInit
#define AnimalFactory_somDefaultConstAssign SOMObject_somDefaultConstAssign
#define AnimalFactory_somDefaultVAssign SOMObject_somDefaultVAssign
#define AnimalFactory_somDefaultConstVAssign SOMObject_somDefaultConstVAssign
#define AnimalFactory_somInit SOMObject_somInit
#define AnimalFactory_somUninit SOMObject_somUninit
#define AnimalFactory_somFree SOMObject_somFree
#define AnimalFactory_somGetClass SOMObject_somGetClass
#define AnimalFactory_somGetClassName SOMObject_somGetClassName
#define AnimalFactory_somGetSize SOMObject_somGetSize
#define AnimalFactory_somIsA SOMObject_somIsA
#define AnimalFactory_somIsInstanceOf SOMObject_somIsInstanceOf
#define AnimalFactory_somRespondsTo SOMObject_somRespondsTo
#define AnimalFactory_somDispatch SOMObject_somDispatch
#define AnimalFactory_somClassDispatch SOMObject_somClassDispatch
#define AnimalFactory_somCastObj SOMObject_somCastObj
#define AnimalFactory_somResetObj SOMObject_somResetObj
#define AnimalFactory_somPrintSelf SOMObject_somPrintSelf
#define AnimalFactory_somDumpSelf SOMObject_somDumpSelf
#define AnimalFactory_somDumpSelfInt SOMObject_somDumpSelfInt
#endif /* SOM_DONT_USE_INHERITED_MACROS */

#endif       /* SOM_AnimalFactory_h */
