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

/*
 *    COMPONENT_NAME: some
 * 
 *    ORIGINS: 27
 * 
 * 
 *     25H7912  (C)  COPYRIGHT International Business Machines Corp. 1992,1994,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.
 * 
 */


#ifndef SOM_SOMStringTableC_h
#define SOM_SOMStringTableC_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_some_somstrt
#ifdef SOM_DLL_some
	/* export semantics */
	#if defined(SOM_DEFFILE_some)\
	||(defined(SOM_DEFFILE_BY_DEFAULT)&&!defined(SOM_NODEFFILE_some))\
	|| !defined(SOM_Module_somstrt_Source)
	#define SOM_IMPORTEXPORT_some_somstrt
	#else
	#define SOM_IMPORTEXPORT_some_somstrt SOMDLLEXPORT
	#endif
#else
	#define SOM_IMPORTEXPORT_some_somstrt 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 SOMStringTableC
#define SOMStringTableC SOMObject
#endif
/*
 *  Objects of the SOMStringTableC class are symbol tables that map null
 *  terminated strings to null terminated strings.  While any instance
 *  of this class can hold an indefinite number of sysbols, performance
 *  will be inproved if the instance is created with an appropriate
 *  maximum target capacity.
 */

/*
 * 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 */

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

/*
 * Passthru lines: File: "C.h", "after"
 */
extern char * SOMLINK somstDupStr(char *str);

#define SOMStringTableC_MajorVersion 2
#define SOMStringTableC_MinorVersion 1

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

/*
 * Declare the ABI 2 ClassData structure
 */
SOMEXTERN struct SOMStringTableCClassDataStructure {
	SOMClass classObject;
	somMToken _get_somstTargetCapacity;
	somMToken _set_somstTargetCapacity;
	somMToken _get_somstAssociationsCount;
	somMToken somstAssociate;
	somMToken somstAssociateCopyKey;
	somMToken somstAssociateCopyValue;
	somMToken somstAssociateCopyBoth;
	somMToken somstGetAssociation;
	somMToken somstClearAssociation;
	somMToken somstGetIthKey;
	somMToken somstGetIthValue;
} SOM_IMPORTEXPORT_some_somstrt SOMDLINK SOMStringTableCClassData;

/*
 * Declare the ABI 2 CClassData structure
 */
SOMEXTERN struct SOMStringTableCCClassDataStructure {
	somMethodTabs parentMtab;
	somDToken instanceDataToken;
} SOM_IMPORTEXPORT_some_somstrt SOMDLINK SOMStringTableCCClassData;

/*
 * Class Object and Method Token Macros
 */
#define _SOMCLASS_SOMStringTableC (SOMStringTableCClassData.classObject)
#ifndef SOMGD_SOMStringTableC
    #if (defined(_SOMStringTableC) || defined(__SOMStringTableC))
        #undef _SOMStringTableC
        #undef __SOMStringTableC
        #define SOMGD_SOMStringTableC 1
    #else
        #define _SOMStringTableC _SOMCLASS_SOMStringTableC
    #endif /* _SOMStringTableC */
#endif /* SOMGD_SOMStringTableC */
#define SOMStringTableC_classObj _SOMCLASS_SOMStringTableC
#define _SOMMTOKEN_SOMStringTableC(method) ((somMToken)SOMStringTableCClassData.method)

/*
 * New and Renew macros for SOMStringTableC
 */
#define SOMStringTableCNew() \
   ( _SOMStringTableC ? \
	_somNew(_SOMStringTableC) \
	: ( SOMStringTableCNewClass(\
		SOMStringTableC_MajorVersion, \
		SOMStringTableC_MinorVersion),\
	   _somNew(_SOMStringTableC)))
#define SOMStringTableCRenew(buf) \
   ( _SOMStringTableC ? \
	_somRenew(_SOMStringTableC, buf) \
	: ( SOMStringTableCNewClass(\
		SOMStringTableC_MajorVersion, \
		SOMStringTableC_MinorVersion),\
	   _somRenew(_SOMStringTableC, buf)))

/*
 * New Method: _get_somstTargetCapacity
 */
typedef unsigned long   SOMLINK somTP_SOMStringTableC__get_somstTargetCapacity(SOMStringTableC somSelf);
typedef somTP_SOMStringTableC__get_somstTargetCapacity *somTD_SOMStringTableC__get_somstTargetCapacity;
/*
 *  The expected maximum number of associations for this table.
 *  Accuracy can result in improved performance.  A low target may
 *  result in some storage saving, but at the cost of performance.
 *  Note: this attribute must be set before any strings are added to
 *  the string table or it will not be setable.
 */
#define somMD_SOMStringTableC__get_somstTargetCapacity "::SOMStringTableC::_get_somstTargetCapacity"
#define SOMStringTableC__get_somstTargetCapacity(somSelf) \
    (SOM_Resolve(somSelf, SOMStringTableC, _get_somstTargetCapacity) \
	(somSelf))
#ifndef SOMGD_get_somstTargetCapacity
    #if (defined(_get_somstTargetCapacity) || defined(__get_somstTargetCapacity))
        #undef _get_somstTargetCapacity
        #undef __get_somstTargetCapacity
        #define SOMGD_get_somstTargetCapacity 1
    #else
        #define __get_somstTargetCapacity SOMStringTableC__get_somstTargetCapacity
    #endif /* __get_somstTargetCapacity */
#endif /* SOMGD_get_somstTargetCapacity */

/*
 * New Method: _set_somstTargetCapacity
 */
typedef void   SOMLINK somTP_SOMStringTableC__set_somstTargetCapacity(SOMStringTableC somSelf, 
		unsigned long somstTargetCapacity);
typedef somTP_SOMStringTableC__set_somstTargetCapacity *somTD_SOMStringTableC__set_somstTargetCapacity;
/*
 *  The expected maximum number of associations for this table.
 *  Accuracy can result in improved performance.  A low target may
 *  result in some storage saving, but at the cost of performance.
 *  Note: this attribute must be set before any strings are added to
 *  the string table or it will not be setable.
 */
#define somMD_SOMStringTableC__set_somstTargetCapacity "::SOMStringTableC::_set_somstTargetCapacity"
#define SOMStringTableC__set_somstTargetCapacity(somSelf,somstTargetCapacity) \
    (SOM_Resolve(somSelf, SOMStringTableC, _set_somstTargetCapacity) \
	(somSelf,somstTargetCapacity))
#ifndef SOMGD_set_somstTargetCapacity
    #if (defined(_set_somstTargetCapacity) || defined(__set_somstTargetCapacity))
        #undef _set_somstTargetCapacity
        #undef __set_somstTargetCapacity
        #define SOMGD_set_somstTargetCapacity 1
    #else
        #define __set_somstTargetCapacity SOMStringTableC__set_somstTargetCapacity
    #endif /* __set_somstTargetCapacity */
#endif /* SOMGD_set_somstTargetCapacity */

/*
 * New Method: _get_somstAssociationsCount
 */
typedef unsigned long   SOMLINK somTP_SOMStringTableC__get_somstAssociationsCount(SOMStringTableC somSelf);
typedef somTP_SOMStringTableC__get_somstAssociationsCount *somTD_SOMStringTableC__get_somstAssociationsCount;
/*
 *  The number of associations currently in this table
 */
#define somMD_SOMStringTableC__get_somstAssociationsCount "::SOMStringTableC::_get_somstAssociationsCount"
#define SOMStringTableC__get_somstAssociationsCount(somSelf) \
    (SOM_Resolve(somSelf, SOMStringTableC, _get_somstAssociationsCount) \
	(somSelf))
#ifndef SOMGD_get_somstAssociationsCount
    #if (defined(_get_somstAssociationsCount) || defined(__get_somstAssociationsCount))
        #undef _get_somstAssociationsCount
        #undef __get_somstAssociationsCount
        #define SOMGD_get_somstAssociationsCount 1
    #else
        #define __get_somstAssociationsCount SOMStringTableC__get_somstAssociationsCount
    #endif /* __get_somstAssociationsCount */
#endif /* SOMGD_get_somstAssociationsCount */

/*
 * New Method: somstAssociate
 */
typedef short   SOMLINK somTP_SOMStringTableC_somstAssociate(SOMStringTableC somSelf, 
		string key, 
		string value);
typedef somTP_SOMStringTableC_somstAssociate *somTD_SOMStringTableC_somstAssociate;
/*
 *  Associates <key> and <value>.  After this call, whenever <key> is
 *  lookedup, <value> will be returned.
 *  Zero will be returned if the association cannot be accomplished
 *  (<key> is null, or memory is not available), -1 will be returned
 *  if the association suceeds, but <key> had a previous association,
 *  and 1 is returned if the association suceeds and <key> had no
 *  previous association.
 *  Note: the string table takes over ownership of both <key> and
 *  <value>.
 */
#define somMD_SOMStringTableC_somstAssociate "::SOMStringTableC::somstAssociate"
#define SOMStringTableC_somstAssociate(somSelf,key,value) \
    (SOM_Resolve(somSelf, SOMStringTableC, somstAssociate) \
	(somSelf,key,value))
#ifndef SOMGD_somstAssociate
    #if (defined(_somstAssociate) || defined(__somstAssociate))
        #undef _somstAssociate
        #undef __somstAssociate
        #define SOMGD_somstAssociate 1
    #else
        #define _somstAssociate SOMStringTableC_somstAssociate
    #endif /* _somstAssociate */
#endif /* SOMGD_somstAssociate */

/*
 * New Method: somstAssociateCopyKey
 */
typedef short   SOMLINK somTP_SOMStringTableC_somstAssociateCopyKey(SOMStringTableC somSelf, 
		string key, 
		string value);
typedef somTP_SOMStringTableC_somstAssociateCopyKey *somTD_SOMStringTableC_somstAssociateCopyKey;
/*
 *  Same as <somstAssociate> except don't take ownership of <key>.
 */
#define somMD_SOMStringTableC_somstAssociateCopyKey "::SOMStringTableC::somstAssociateCopyKey"
#define SOMStringTableC_somstAssociateCopyKey(somSelf,key,value) \
    (SOM_Resolve(somSelf, SOMStringTableC, somstAssociateCopyKey) \
	(somSelf,key,value))
#ifndef SOMGD_somstAssociateCopyKey
    #if (defined(_somstAssociateCopyKey) || defined(__somstAssociateCopyKey))
        #undef _somstAssociateCopyKey
        #undef __somstAssociateCopyKey
        #define SOMGD_somstAssociateCopyKey 1
    #else
        #define _somstAssociateCopyKey SOMStringTableC_somstAssociateCopyKey
    #endif /* _somstAssociateCopyKey */
#endif /* SOMGD_somstAssociateCopyKey */

/*
 * New Method: somstAssociateCopyValue
 */
typedef short   SOMLINK somTP_SOMStringTableC_somstAssociateCopyValue(SOMStringTableC somSelf, 
		string key, 
		string value);
typedef somTP_SOMStringTableC_somstAssociateCopyValue *somTD_SOMStringTableC_somstAssociateCopyValue;
/*
 *  Same as <somstAssociate> except don't take ownership of <value>.
 */
#define somMD_SOMStringTableC_somstAssociateCopyValue "::SOMStringTableC::somstAssociateCopyValue"
#define SOMStringTableC_somstAssociateCopyValue(somSelf,key,value) \
    (SOM_Resolve(somSelf, SOMStringTableC, somstAssociateCopyValue) \
	(somSelf,key,value))
#ifndef SOMGD_somstAssociateCopyValue
    #if (defined(_somstAssociateCopyValue) || defined(__somstAssociateCopyValue))
        #undef _somstAssociateCopyValue
        #undef __somstAssociateCopyValue
        #define SOMGD_somstAssociateCopyValue 1
    #else
        #define _somstAssociateCopyValue SOMStringTableC_somstAssociateCopyValue
    #endif /* _somstAssociateCopyValue */
#endif /* SOMGD_somstAssociateCopyValue */

/*
 * New Method: somstAssociateCopyBoth
 */
typedef short   SOMLINK somTP_SOMStringTableC_somstAssociateCopyBoth(SOMStringTableC somSelf, 
		string key, 
		string value);
typedef somTP_SOMStringTableC_somstAssociateCopyBoth *somTD_SOMStringTableC_somstAssociateCopyBoth;
/*
 *  Same as <somstAssociate> except don't take ownership of <key> or
 *  <value>.
 */
#define somMD_SOMStringTableC_somstAssociateCopyBoth "::SOMStringTableC::somstAssociateCopyBoth"
#define SOMStringTableC_somstAssociateCopyBoth(somSelf,key,value) \
    (SOM_Resolve(somSelf, SOMStringTableC, somstAssociateCopyBoth) \
	(somSelf,key,value))
#ifndef SOMGD_somstAssociateCopyBoth
    #if (defined(_somstAssociateCopyBoth) || defined(__somstAssociateCopyBoth))
        #undef _somstAssociateCopyBoth
        #undef __somstAssociateCopyBoth
        #define SOMGD_somstAssociateCopyBoth 1
    #else
        #define _somstAssociateCopyBoth SOMStringTableC_somstAssociateCopyBoth
    #endif /* _somstAssociateCopyBoth */
#endif /* SOMGD_somstAssociateCopyBoth */

/*
 * New Method: somstGetAssociation
 */
typedef string   SOMLINK somTP_SOMStringTableC_somstGetAssociation(SOMStringTableC somSelf, 
		string key);
typedef somTP_SOMStringTableC_somstGetAssociation *somTD_SOMStringTableC_somstGetAssociation;
/*
 *  The string associated with <key> is returned if there is one and
 *  NULL is returned if <key> has no association.
 *  The string table will maintain ownership of any returned value.
 */
#define somMD_SOMStringTableC_somstGetAssociation "::SOMStringTableC::somstGetAssociation"
#define SOMStringTableC_somstGetAssociation(somSelf,key) \
    (SOM_Resolve(somSelf, SOMStringTableC, somstGetAssociation) \
	(somSelf,key))
#ifndef SOMGD_somstGetAssociation
    #if (defined(_somstGetAssociation) || defined(__somstGetAssociation))
        #undef _somstGetAssociation
        #undef __somstGetAssociation
        #define SOMGD_somstGetAssociation 1
    #else
        #define _somstGetAssociation SOMStringTableC_somstGetAssociation
    #endif /* _somstGetAssociation */
#endif /* SOMGD_somstGetAssociation */

/*
 * New Method: somstClearAssociation
 */
typedef boolean   SOMLINK somTP_SOMStringTableC_somstClearAssociation(SOMStringTableC somSelf, 
		string key);
typedef somTP_SOMStringTableC_somstClearAssociation *somTD_SOMStringTableC_somstClearAssociation;
/*
 *  The association for <key>, if any, is removed.
 *  1 is returned if <key> had an association, and 0 is returned if
 *  it did not.
 */
#define somMD_SOMStringTableC_somstClearAssociation "::SOMStringTableC::somstClearAssociation"
#define SOMStringTableC_somstClearAssociation(somSelf,key) \
    (SOM_Resolve(somSelf, SOMStringTableC, somstClearAssociation) \
	(somSelf,key))
#ifndef SOMGD_somstClearAssociation
    #if (defined(_somstClearAssociation) || defined(__somstClearAssociation))
        #undef _somstClearAssociation
        #undef __somstClearAssociation
        #define SOMGD_somstClearAssociation 1
    #else
        #define _somstClearAssociation SOMStringTableC_somstClearAssociation
    #endif /* _somstClearAssociation */
#endif /* SOMGD_somstClearAssociation */

/*
 * New Method: somstGetIthKey
 */
typedef string   SOMLINK somTP_SOMStringTableC_somstGetIthKey(SOMStringTableC somSelf, 
		unsigned long i);
typedef somTP_SOMStringTableC_somstGetIthKey *somTD_SOMStringTableC_somstGetIthKey;
/*
 *  Returns the key part of the <i> association in this string table
 *  if there is one and null otherwise.
 *  The order of associations in a string table is not specified, but
 *  will not change unless changes are made in the table.
 *  Ownership of the key is retained, the pointer returned is valid
 *  until any changes are made in the table.
 */
#define somMD_SOMStringTableC_somstGetIthKey "::SOMStringTableC::somstGetIthKey"
#define SOMStringTableC_somstGetIthKey(somSelf,i) \
    (SOM_Resolve(somSelf, SOMStringTableC, somstGetIthKey) \
	(somSelf,i))
#ifndef SOMGD_somstGetIthKey
    #if (defined(_somstGetIthKey) || defined(__somstGetIthKey))
        #undef _somstGetIthKey
        #undef __somstGetIthKey
        #define SOMGD_somstGetIthKey 1
    #else
        #define _somstGetIthKey SOMStringTableC_somstGetIthKey
    #endif /* _somstGetIthKey */
#endif /* SOMGD_somstGetIthKey */

/*
 * New Method: somstGetIthValue
 */
typedef string   SOMLINK somTP_SOMStringTableC_somstGetIthValue(SOMStringTableC somSelf, 
		unsigned long i);
typedef somTP_SOMStringTableC_somstGetIthValue *somTD_SOMStringTableC_somstGetIthValue;
/*
 *  Returns the value part of the <i> association in this string table
 *  if there is one and null otherwise.
 *  The order of associations in a string table is not specified, but
 *  will not change unless changes are made in the table.
 *  Ownership of the value is retained, the pointer returned is valid
 *  until any changes are made in the table.
 */
#define somMD_SOMStringTableC_somstGetIthValue "::SOMStringTableC::somstGetIthValue"
#define SOMStringTableC_somstGetIthValue(somSelf,i) \
    (SOM_Resolve(somSelf, SOMStringTableC, somstGetIthValue) \
	(somSelf,i))
#ifndef SOMGD_somstGetIthValue
    #if (defined(_somstGetIthValue) || defined(__somstGetIthValue))
        #undef _somstGetIthValue
        #undef __somstGetIthValue
        #define SOMGD_somstGetIthValue 1
    #else
        #define _somstGetIthValue SOMStringTableC_somstGetIthValue
    #endif /* _somstGetIthValue */
#endif /* SOMGD_somstGetIthValue */

/*
 * Full Names for Inherited Methods
 */
/* overridden methods */
#define SOMStringTableC_somInit SOMObject_somInit
#define SOMStringTableC_somUninit SOMObject_somUninit
#define SOMStringTableC_somPrintSelf SOMObject_somPrintSelf
#define SOMStringTableC_somDumpSelfInt SOMObject_somDumpSelfInt

#ifndef SOM_DONT_USE_INHERITED_MACROS
#define SOMStringTableC_somDefaultInit SOMObject_somDefaultInit
#define SOMStringTableC_somDestruct SOMObject_somDestruct
#define SOMStringTableC_somDefaultCopyInit SOMObject_somDefaultCopyInit
#define SOMStringTableC_somDefaultAssign SOMObject_somDefaultAssign
#define SOMStringTableC_somDefaultConstCopyInit SOMObject_somDefaultConstCopyInit
#define SOMStringTableC_somDefaultVCopyInit SOMObject_somDefaultVCopyInit
#define SOMStringTableC_somDefaultConstVCopyInit SOMObject_somDefaultConstVCopyInit
#define SOMStringTableC_somDefaultConstAssign SOMObject_somDefaultConstAssign
#define SOMStringTableC_somDefaultVAssign SOMObject_somDefaultVAssign
#define SOMStringTableC_somDefaultConstVAssign SOMObject_somDefaultConstVAssign
#define SOMStringTableC_somFree SOMObject_somFree
#define SOMStringTableC_somGetClass SOMObject_somGetClass
#define SOMStringTableC_somGetClassName SOMObject_somGetClassName
#define SOMStringTableC_somGetSize SOMObject_somGetSize
#define SOMStringTableC_somIsA SOMObject_somIsA
#define SOMStringTableC_somIsInstanceOf SOMObject_somIsInstanceOf
#define SOMStringTableC_somRespondsTo SOMObject_somRespondsTo
#define SOMStringTableC_somDispatch SOMObject_somDispatch
#define SOMStringTableC_somClassDispatch SOMObject_somClassDispatch
#define SOMStringTableC_somCastObj SOMObject_somCastObj
#define SOMStringTableC_somResetObj SOMObject_somResetObj
#define SOMStringTableC_somDumpSelf SOMObject_somDumpSelf
#endif /* SOM_DONT_USE_INHERITED_MACROS */

#endif       /* SOM_SOMStringTableC_h */
