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

/*
 *   This class is adapted from the book
 *     Class Construction in C and C++, Object Oriented Fundamentals
 *     by Roger Sessions, Copyright (c) 1992 Prentice Hall.
 *   Reprinted with permission.
 */


#ifndef SOM_word_h
#define SOM_word_h


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


/*
 * Passthru lines: File: "C.h", "before"
 */
void showWordStats();

#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 word
#define word SOMObject
#endif

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

/*
 * Start of bindings for IDL types
 */

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

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

#define word_MajorVersion 0
#define word_MinorVersion 0

/*
 * Declare the class creation procedure
 */
SOMEXTERN 
#if defined(SOM_Module_word_Source)
        SOMDLLEXPORT
#else
    SOMDLLIMPORT
#endif
 SOMClass  SOMLINK wordNewClass(integer4 somtmajorVersion,
		integer4 somtminorVersion);

/*
 * Declare the ABI 2 ClassData structure
 */
SOMEXTERN struct wordClassDataStructure {
	SOMClass classObject;
	somMToken wordInit1;
	somMToken wordInit2;
	somMToken _get_length;
	somMToken wordToInt;
	somMToken wrdReplace;
} 
#if defined(SOM_Module_word_Source)
        SOMDLLEXPORT
#else
    SOMDLLIMPORT
#endif
 SOMDLINK wordClassData;

/*
 * Declare the ABI 2 CClassData structure
 */
SOMEXTERN struct wordCClassDataStructure {
	somMethodTabs parentMtab;
	somDToken instanceDataToken;
} 
#if defined(SOM_Module_word_Source)
        SOMDLLEXPORT
#else
    SOMDLLIMPORT
#endif
 SOMDLINK wordCClassData;

/*
 * Class Object and Method Token Macros
 */
#define _SOMCLASS_word (wordClassData.classObject)
#ifndef SOMGD_word
    #if (defined(_word) || defined(__word))
        #undef _word
        #undef __word
        #define SOMGD_word 1
    #else
        #define _word _SOMCLASS_word
    #endif /* _word */
#endif /* SOMGD_word */
#define word_classObj _SOMCLASS_word
#define _SOMMTOKEN_word(method) ((somMToken)wordClassData.method)

/*
 * New and Renew macros for word
 */
#define wordNew() \
   ( _word ? \
	_somNew(_word) \
	: ( wordNewClass(\
		word_MajorVersion, \
		word_MinorVersion),\
	   _somNew(_word)))
#define wordRenew(buf) \
   ( _word ? \
	_somRenew(_word, buf) \
	: ( wordNewClass(\
		word_MajorVersion, \
		word_MinorVersion),\
	   _somRenew(_word, buf)))

/*
 * New Method: wordInit1
 */
typedef word   SOMLINK somTP_word_wordInit1(word somSelf, 
		string newWord);
typedef somTP_word_wordInit1 *somTD_word_wordInit1;
/*
 *  Initialize a word with a character string.
 */
#define somMD_word_wordInit1 "::word::wordInit1"
#define word_wordInit1(somSelf,newWord) \
    (SOM_Resolve(somSelf, word, wordInit1) \
	(somSelf,newWord))
#ifndef SOMGD_wordInit1
    #if (defined(_wordInit1) || defined(__wordInit1))
        #undef _wordInit1
        #undef __wordInit1
        #define SOMGD_wordInit1 1
    #else
        #define _wordInit1 word_wordInit1
    #endif /* _wordInit1 */
#endif /* SOMGD_wordInit1 */

/*
 * New Method: wordInit2
 */
typedef word   SOMLINK somTP_word_wordInit2(word somSelf, 
		char newChar, 
		long count);
typedef somTP_word_wordInit2 *somTD_word_wordInit2;
/*
 *  Initialize a word with a character and
 *  count.  The new word will contain a null
 *  terminated buffer containing count number of
 *  newChars.
 */
#define somMD_word_wordInit2 "::word::wordInit2"
#define word_wordInit2(somSelf,newChar,count) \
    (SOM_Resolve(somSelf, word, wordInit2) \
	(somSelf,newChar,count))
#ifndef SOMGD_wordInit2
    #if (defined(_wordInit2) || defined(__wordInit2))
        #undef _wordInit2
        #undef __wordInit2
        #define SOMGD_wordInit2 1
    #else
        #define _wordInit2 word_wordInit2
    #endif /* _wordInit2 */
#endif /* SOMGD_wordInit2 */

/*
 * New Method: _get_length
 */
typedef long   SOMLINK somTP_word__get_length(word somSelf);
typedef somTP_word__get_length *somTD_word__get_length;
/*
 *  The length of a word.
 */
#define somMD_word__get_length "::word::_get_length"
#define word__get_length(somSelf) \
    (SOM_Resolve(somSelf, word, _get_length) \
	(somSelf))
#ifndef SOMGD_get_length
    #if (defined(_get_length) || defined(__get_length))
        #undef _get_length
        #undef __get_length
        #define SOMGD_get_length 1
    #else
        #define __get_length word__get_length
    #endif /* __get_length */
#endif /* SOMGD_get_length */

/*
 * New Method: wordToInt
 */
typedef long   SOMLINK somTP_word_wordToInt(word somSelf);
typedef somTP_word_wordToInt *somTD_word_wordToInt;
/*
 *  Translate a word to an integer, such as "123" to 123.
 */
#define somMD_word_wordToInt "::word::wordToInt"
#define word_wordToInt(somSelf) \
    (SOM_Resolve(somSelf, word, wordToInt) \
	(somSelf))
#ifndef SOMGD_wordToInt
    #if (defined(_wordToInt) || defined(__wordToInt))
        #undef _wordToInt
        #undef __wordToInt
        #define SOMGD_wordToInt 1
    #else
        #define _wordToInt word_wordToInt
    #endif /* _wordToInt */
#endif /* SOMGD_wordToInt */

/*
 * New Method: wrdReplace
 */
typedef void   SOMLINK somTP_word_wrdReplace(word somSelf, 
		string newWord);
typedef somTP_word_wrdReplace *somTD_word_wrdReplace;
/*
 *  Replace the contents of a word by another word.
 */
#define somMD_word_wrdReplace "::word::wrdReplace"
#define word_wrdReplace(somSelf,newWord) \
    (SOM_Resolve(somSelf, word, wrdReplace) \
	(somSelf,newWord))
#ifndef SOMGD_wrdReplace
    #if (defined(_wrdReplace) || defined(__wrdReplace))
        #undef _wrdReplace
        #undef __wrdReplace
        #define SOMGD_wrdReplace 1
    #else
        #define _wrdReplace word_wrdReplace
    #endif /* _wrdReplace */
#endif /* SOMGD_wrdReplace */

/*
 * Full Names for Inherited Methods
 */
/* overridden methods */
#define word_match baseType_match
#define word_print baseType_print
#define word_somInit SOMObject_somInit
#define word_somUninit SOMObject_somUninit
#define word_somDumpSelfInt SOMObject_somDumpSelfInt

#ifndef SOM_DONT_USE_INHERITED_MACROS
#define word_somDefaultInit SOMObject_somDefaultInit
#define word_somDestruct SOMObject_somDestruct
#define word_somDefaultCopyInit SOMObject_somDefaultCopyInit
#define word_somDefaultAssign SOMObject_somDefaultAssign
#define word_somDefaultConstCopyInit SOMObject_somDefaultConstCopyInit
#define word_somDefaultVCopyInit SOMObject_somDefaultVCopyInit
#define word_somDefaultConstVCopyInit SOMObject_somDefaultConstVCopyInit
#define word_somDefaultConstAssign SOMObject_somDefaultConstAssign
#define word_somDefaultVAssign SOMObject_somDefaultVAssign
#define word_somDefaultConstVAssign SOMObject_somDefaultConstVAssign
#define word_somFree SOMObject_somFree
#define word_somGetClass SOMObject_somGetClass
#define word_somGetClassName SOMObject_somGetClassName
#define word_somGetSize SOMObject_somGetSize
#define word_somIsA SOMObject_somIsA
#define word_somIsInstanceOf SOMObject_somIsInstanceOf
#define word_somRespondsTo SOMObject_somRespondsTo
#define word_somDispatch SOMObject_somDispatch
#define word_somClassDispatch SOMObject_somClassDispatch
#define word_somCastObj SOMObject_somCastObj
#define word_somResetObj SOMObject_somResetObj
#define word_somPrintSelf SOMObject_somPrintSelf
#define word_somDumpSelf SOMObject_somDumpSelf
#endif /* SOM_DONT_USE_INHERITED_MACROS */

#endif       /* SOM_word_h */
