
/*
 * This file was generated by the SOM Compiler.
 * FileName: tset.xh.
 * Generated using:
 *     SOM Precompiler somipc: 2.29.1.17
 *     SOM Emitter emitxh: 2.47
 */

/*
 *    COMPONENT_NAME: somuc
 * 
 *    ORIGINS: 82, 81, 27
 * 
 * 
 *     25H7912  (C)  COPYRIGHT International Business Machines Corp. 1992,1996,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.
 * 
 *    Copyright © 1988, 1989 Apple Computer, Inc. All rights reserved.
 * 
 * CLASS_NAME: somf_TSet
 * 
 * DESCRIPTION: The somf_TSet class is a subclass of somf_TCollection.  It
 *              represents an unordered collection of objects in which objects
 *              can appear only once.  Objects which are inserted into the
 *              somf_TSet should override the Hash() method and the IsSame() or
 *              IsEqual() method.
 * 
 *  This file was generated by the SOM Compiler.
 *  FileName: TSet.id2.
 *  Generated using:
 *      SOM Precompiler spc: 6.13
 *      SOM Emitter emitidl.dll: 6.18
 */


#ifndef SOM_somf_TSet_xh
#define SOM_somf_TSet_xh

class somf_TSet;

#define somf_TSet_MajorVersion 2
#define somf_TSet_MinorVersion 1

/* C++ SOM defs */
#include <somcls.xh>
#include <somcm.xh>

/* C++ parent defs */
#ifndef SOM_somf_TCollection_xh
#include <tcollect.xh>
#endif

#ifndef somf_TSet_API
#define somf_TSet_API
/*
 * -- The Class API
 */

/*
 * Start of bindings for IDL types
 */

class SOMClass;
class SOMObject;
class somf_TIterator;
class TSAssoc;
typedef unsigned long somf_TSet_ESetClassification;
#define somf_TSet_kUnchecked 1UL
#define somf_TSet_kNormal 2UL
#define somf_TSet_kFast 3UL

#ifndef SOM_DONT_USE_SHORT_NAMES
#ifndef SOMTGD_ESetClassification
    #ifdef ESetClassification
        #undef ESetClassification
        #define SOMTGD_ESetClassification 1
    #else
        #define ESetClassification somf_TSet_ESetClassification
    #endif /* ESetClassification */
#endif /* SOMTGD_ESetClassification */
#endif /* SOM_DONT_USE_SHORT_NAMES */

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

/*
 * Passthru lines: File: "C.xh", "after"
 */


#include <titeratr.xh>
#include <mcollect.xh>

/* A procedure to create the somf_TSet Class */
SOMEXTERN SOMClass * SOMLINK somf_TSetNewClass(
		integer4 majorVersion,
		integer4 minorVersion);

/* The API to the somf_TSet class object, and the methods it introduces. */
SOMEXTERN struct somf_TSetClassDataStructure {
	SOMClass *classObject;
	somMToken somfDifferenceS;
	somMToken somfDifferenceSS;
	somMToken somfIntersectionS;
	somMToken somfIntersectionSS;
	somMToken somfUnionS;
	somMToken somfUnionSS;
	somMToken somfXorS;
	somMToken somfXorSS;
	somMToken somfSetHashFunction;
	somMToken somfGetHashFunction;
	somMToken somfRehash;
	somMToken somfFind;
	somMToken somfMakeNewTable;
	somMToken somfCopyIn;
	somMToken somfGrow;
	somMToken somfAssign;
	somMToken somfTSetInitFL;
	somMToken somfTSetInitF;
	somMToken somfTSetInitLF;
	somMToken somfTSetInitL;
	somMToken somfTSetInitS;
} SOMDLINK somf_TSetClassData;
#define _somf_TSet somf_TSetClassData.classObject

/* The API to parentMtabs for somf_TSet, and the instance data it introduces. */
SOMEXTERN struct somf_TSetCClassDataStructure {
	somMethodTabs parentMtab;
	somDToken              instanceDataToken;
} SOMDLINK somf_TSetCClassData;

/*
 * -- Typedefs for somf_TSet Method Procedures
 */
SOMEXTERN {
typedef somf_TSet*   SOMLINK somTP_somf_TSet_somfTSetInitFL(somf_TSet *somSelf, Environment *ev, 
		somf_MCollectible_somf_MCollectibleCompareFn testfn, 
		long setSizeHint);
typedef somTP_somf_TSet_somfTSetInitFL *somTD_somf_TSet_somfTSetInitFL;
typedef somf_TSet*   SOMLINK somTP_somf_TSet_somfTSetInitF(somf_TSet *somSelf, Environment *ev, 
		somf_MCollectible_somf_MCollectibleCompareFn testfn);
typedef somTP_somf_TSet_somfTSetInitF *somTD_somf_TSet_somfTSetInitF;
typedef somf_TSet*   SOMLINK somTP_somf_TSet_somfTSetInitLF(somf_TSet *somSelf, Environment *ev, 
		long setSizeHint, 
		somf_MCollectible_somf_MCollectibleCompareFn testfn);
typedef somTP_somf_TSet_somfTSetInitLF *somTD_somf_TSet_somfTSetInitLF;
typedef somf_TSet*   SOMLINK somTP_somf_TSet_somfTSetInitL(somf_TSet *somSelf, Environment *ev, 
		long setSizeHint);
typedef somTP_somf_TSet_somfTSetInitL *somTD_somf_TSet_somfTSetInitL;
typedef somf_TSet*   SOMLINK somTP_somf_TSet_somfTSetInitS(somf_TSet *somSelf, Environment *ev, 
		somf_TSet* s);
typedef somTP_somf_TSet_somfTSetInitS *somTD_somf_TSet_somfTSetInitS;
typedef void   SOMLINK somTP_somf_TSet_somfAssign(somf_TSet *somSelf, Environment *ev, 
		somf_TSet* source);
typedef somTP_somf_TSet_somfAssign *somTD_somf_TSet_somfAssign;
typedef void   SOMLINK somTP_somf_TSet_somfDifferenceS(somf_TSet *somSelf, Environment *ev, 
		somf_TSet* set1);
typedef somTP_somf_TSet_somfDifferenceS *somTD_somf_TSet_somfDifferenceS;
typedef void   SOMLINK somTP_somf_TSet_somfDifferenceSS(somf_TSet *somSelf, Environment *ev, 
		somf_TSet* set1, 
		somf_TSet* resultSet);
typedef somTP_somf_TSet_somfDifferenceSS *somTD_somf_TSet_somfDifferenceSS;
typedef void   SOMLINK somTP_somf_TSet_somfIntersectionS(somf_TSet *somSelf, Environment *ev, 
		somf_TSet* set1);
typedef somTP_somf_TSet_somfIntersectionS *somTD_somf_TSet_somfIntersectionS;
typedef void   SOMLINK somTP_somf_TSet_somfIntersectionSS(somf_TSet *somSelf, Environment *ev, 
		somf_TSet* set1, 
		somf_TSet* resultSet);
typedef somTP_somf_TSet_somfIntersectionSS *somTD_somf_TSet_somfIntersectionSS;
typedef void   SOMLINK somTP_somf_TSet_somfUnionS(somf_TSet *somSelf, Environment *ev, 
		somf_TSet* set1);
typedef somTP_somf_TSet_somfUnionS *somTD_somf_TSet_somfUnionS;
typedef void   SOMLINK somTP_somf_TSet_somfUnionSS(somf_TSet *somSelf, Environment *ev, 
		somf_TSet* set1, 
		somf_TSet* resultSet);
typedef somTP_somf_TSet_somfUnionSS *somTD_somf_TSet_somfUnionSS;
typedef void   SOMLINK somTP_somf_TSet_somfXorS(somf_TSet *somSelf, Environment *ev, 
		somf_TSet* set1);
typedef somTP_somf_TSet_somfXorS *somTD_somf_TSet_somfXorS;
typedef void   SOMLINK somTP_somf_TSet_somfXorSS(somf_TSet *somSelf, Environment *ev, 
		somf_TSet* set1, 
		somf_TSet* resultSet);
typedef somTP_somf_TSet_somfXorSS *somTD_somf_TSet_somfXorSS;
typedef void   SOMLINK somTP_somf_TSet_somfSetHashFunction(somf_TSet *somSelf, Environment *ev, 
		somf_MCollectible_somf_MCollectibleHashFn fn);
typedef somTP_somf_TSet_somfSetHashFunction *somTD_somf_TSet_somfSetHashFunction;
typedef somf_MCollectible_somf_MCollectibleHashFn   SOMLINK somTP_somf_TSet_somfGetHashFunction(somf_TSet *somSelf, Environment *ev);
typedef somTP_somf_TSet_somfGetHashFunction *somTD_somf_TSet_somfGetHashFunction;
typedef void   SOMLINK somTP_somf_TSet_somfRehash(somf_TSet *somSelf, Environment *ev);
typedef somTP_somf_TSet_somfRehash *somTD_somf_TSet_somfRehash;

/*
 * -- Typedefs for Reintroduced Wrapper Methods
 */
typedef somf_MCollectible*   SOMLINK somTP_somf_TSet_somfAdd(somf_TSet *somSelf, Environment *ev, 
		somf_MCollectible* obj);
typedef somTP_somf_TSet_somfAdd *somTD_somf_TSet_somfAdd;
typedef void   SOMLINK somTP_somf_TSet_somfAddAll(somf_TSet *somSelf, Environment *ev, 
		somf_TCollection* col);
typedef somTP_somf_TSet_somfAddAll *somTD_somf_TSet_somfAddAll;
typedef somf_MCollectible*   SOMLINK somTP_somf_TSet_somfRemove(somf_TSet *somSelf, Environment *ev, 
		somf_MCollectible* obj);
typedef somTP_somf_TSet_somfRemove *somTD_somf_TSet_somfRemove;
typedef void   SOMLINK somTP_somf_TSet_somfRemoveAll(somf_TSet *somSelf, Environment *ev);
typedef somTP_somf_TSet_somfRemoveAll *somTD_somf_TSet_somfRemoveAll;
typedef void   SOMLINK somTP_somf_TSet_somfDeleteAll(somf_TSet *somSelf, Environment *ev);
typedef somTP_somf_TSet_somfDeleteAll *somTD_somf_TSet_somfDeleteAll;
typedef long   SOMLINK somTP_somf_TSet_somfCount(somf_TSet *somSelf, Environment *ev);
typedef somTP_somf_TSet_somfCount *somTD_somf_TSet_somfCount;
typedef somf_MCollectible*   SOMLINK somTP_somf_TSet_somfMember(somf_TSet *somSelf, Environment *ev, 
		somf_MCollectible* obj);
typedef somTP_somf_TSet_somfMember *somTD_somf_TSet_somfMember;
typedef somf_TIterator*   SOMLINK somTP_somf_TSet_somfCreateIterator(somf_TSet *somSelf, Environment *ev);
typedef somTP_somf_TSet_somfCreateIterator *somTD_somf_TSet_somfCreateIterator;
typedef somf_MCollectible_somf_MCollectibleCompareFn   SOMLINK somTP_somf_TSet_somfTestFunction(somf_TSet *somSelf, Environment *ev);
typedef somTP_somf_TSet_somfTestFunction *somTD_somf_TSet_somfTestFunction;
typedef void   SOMLINK somTP_somf_TSet_somfSetTestFunction(somf_TSet *somSelf, Environment *ev, 
		somf_MCollectible_somf_MCollectibleCompareFn testfn);
typedef somTP_somf_TSet_somfSetTestFunction *somTD_somf_TSet_somfSetTestFunction;
typedef somf_TCollection*   SOMLINK somTP_somf_TSet_somfTCollectionInit(somf_TSet *somSelf, Environment *ev, 
		somf_MCollectible_somf_MCollectibleCompareFn testfn);
typedef somTP_somf_TSet_somfTCollectionInit *somTD_somf_TSet_somfTCollectionInit;
typedef boolean   SOMLINK somTP_somf_TSet_somfIsEqual(somf_TSet *somSelf, Environment *ev, 
		somf_MCollectible* obj);
typedef somTP_somf_TSet_somfIsEqual *somTD_somf_TSet_somfIsEqual;
typedef somf_MCollectible*   SOMLINK somTP_somf_TSet_somfClone(somf_TSet *somSelf, Environment *ev);
typedef somTP_somf_TSet_somfClone *somTD_somf_TSet_somfClone;
typedef somf_MCollectible*   SOMLINK somTP_somf_TSet_somfClonePointer(somf_TSet *somSelf, Environment *ev, 
		somf_MCollectible* clonee);
typedef somTP_somf_TSet_somfClonePointer *somTD_somf_TSet_somfClonePointer;
typedef long   SOMLINK somTP_somf_TSet_somfHash(somf_TSet *somSelf, Environment *ev);
typedef somTP_somf_TSet_somfHash *somTD_somf_TSet_somfHash;
typedef boolean   SOMLINK somTP_somf_TSet_somfIsSame(somf_TSet *somSelf, Environment *ev, 
		somf_MCollectible* obj);
typedef somTP_somf_TSet_somfIsSame *somTD_somf_TSet_somfIsSame;
typedef boolean   SOMLINK somTP_somf_TSet_somfIsNotEqual(somf_TSet *somSelf, Environment *ev, 
		somf_MCollectible* obj);
typedef somTP_somf_TSet_somfIsNotEqual *somTD_somf_TSet_somfIsNotEqual;
typedef void   SOMLINK somTP_somf_TSet_somDefaultInit(somf_TSet *somSelf, 
		som3InitCtrl* ctrl);
typedef somTP_somf_TSet_somDefaultInit *somTD_somf_TSet_somDefaultInit;
typedef void   SOMLINK somTP_somf_TSet_somDestruct(somf_TSet *somSelf, 
		octet doFree, 
		som3DestructCtrl* ctrl);
typedef somTP_somf_TSet_somDestruct *somTD_somf_TSet_somDestruct;
typedef void   SOMLINK somTP_somf_TSet_somDefaultCopyInit(somf_TSet *somSelf, 
		som3InitCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_somf_TSet_somDefaultCopyInit *somTD_somf_TSet_somDefaultCopyInit;
typedef somf_TSet*   SOMLINK somTP_somf_TSet_somDefaultAssign(somf_TSet *somSelf, 
		som3AssignCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_somf_TSet_somDefaultAssign *somTD_somf_TSet_somDefaultAssign;
typedef void   SOMLINK somTP_somf_TSet_somDefaultConstCopyInit(somf_TSet *somSelf, 
		som3InitCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_somf_TSet_somDefaultConstCopyInit *somTD_somf_TSet_somDefaultConstCopyInit;
typedef void   SOMLINK somTP_somf_TSet_somDefaultVCopyInit(somf_TSet *somSelf, 
		som3InitCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_somf_TSet_somDefaultVCopyInit *somTD_somf_TSet_somDefaultVCopyInit;
typedef void   SOMLINK somTP_somf_TSet_somDefaultConstVCopyInit(somf_TSet *somSelf, 
		som3InitCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_somf_TSet_somDefaultConstVCopyInit *somTD_somf_TSet_somDefaultConstVCopyInit;
typedef somf_TSet*   SOMLINK somTP_somf_TSet_somDefaultConstAssign(somf_TSet *somSelf, 
		som3AssignCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_somf_TSet_somDefaultConstAssign *somTD_somf_TSet_somDefaultConstAssign;
typedef somf_TSet*   SOMLINK somTP_somf_TSet_somDefaultVAssign(somf_TSet *somSelf, 
		som3AssignCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_somf_TSet_somDefaultVAssign *somTD_somf_TSet_somDefaultVAssign;
typedef somf_TSet*   SOMLINK somTP_somf_TSet_somDefaultConstVAssign(somf_TSet *somSelf, 
		som3AssignCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_somf_TSet_somDefaultConstVAssign *somTD_somf_TSet_somDefaultConstVAssign;
typedef void   SOMLINK somTP_somf_TSet_somInit(somf_TSet *somSelf);
typedef somTP_somf_TSet_somInit *somTD_somf_TSet_somInit;
typedef void   SOMLINK somTP_somf_TSet_somFree(somf_TSet *somSelf);
typedef somTP_somf_TSet_somFree *somTD_somf_TSet_somFree;
typedef void   SOMLINK somTP_somf_TSet_somUninit(somf_TSet *somSelf);
typedef somTP_somf_TSet_somUninit *somTD_somf_TSet_somUninit;
typedef SOMClass*   SOMLINK somTP_somf_TSet_somGetClass(somf_TSet *somSelf);
typedef somTP_somf_TSet_somGetClass *somTD_somf_TSet_somGetClass;
typedef string   SOMLINK somTP_somf_TSet_somGetClassName(somf_TSet *somSelf);
typedef somTP_somf_TSet_somGetClassName *somTD_somf_TSet_somGetClassName;
typedef long   SOMLINK somTP_somf_TSet_somGetSize(somf_TSet *somSelf);
typedef somTP_somf_TSet_somGetSize *somTD_somf_TSet_somGetSize;
typedef boolean   SOMLINK somTP_somf_TSet_somIsA(somf_TSet *somSelf, 
		SOMClass* aClassObj);
typedef somTP_somf_TSet_somIsA *somTD_somf_TSet_somIsA;
typedef boolean   SOMLINK somTP_somf_TSet_somIsInstanceOf(somf_TSet *somSelf, 
		SOMClass* aClassObj);
typedef somTP_somf_TSet_somIsInstanceOf *somTD_somf_TSet_somIsInstanceOf;
typedef boolean   SOMLINK somTP_somf_TSet_somRespondsTo(somf_TSet *somSelf, 
		somId mId);
typedef somTP_somf_TSet_somRespondsTo *somTD_somf_TSet_somRespondsTo;
typedef boolean   SOMLINK somTP_somf_TSet_somDispatch(somf_TSet *somSelf, 
		somToken* retValue, 
		somId methodId, 
		va_list ap);
typedef somTP_somf_TSet_somDispatch *somTD_somf_TSet_somDispatch;
typedef boolean   SOMLINK somTP_somf_TSet_somClassDispatch(somf_TSet *somSelf, 
		SOMClass* clsObj, 
		somToken* retValue, 
		somId methodId, 
		va_list ap);
typedef somTP_somf_TSet_somClassDispatch *somTD_somf_TSet_somClassDispatch;
typedef boolean   SOMLINK somTP_somf_TSet_somCastObj(somf_TSet *somSelf, 
		SOMClass* cls);
typedef somTP_somf_TSet_somCastObj *somTD_somf_TSet_somCastObj;
typedef boolean   SOMLINK somTP_somf_TSet_somResetObj(somf_TSet *somSelf);
typedef somTP_somf_TSet_somResetObj *somTD_somf_TSet_somResetObj;
typedef void   SOMLINK somTP_somf_TSet_somDispatchV(somf_TSet *somSelf, 
		somId methodId, 
		somId descriptor, 
		va_list ap);
typedef somTP_somf_TSet_somDispatchV *somTD_somf_TSet_somDispatchV;
typedef long   SOMLINK somTP_somf_TSet_somDispatchL(somf_TSet *somSelf, 
		somId methodId, 
		somId descriptor, 
		va_list ap);
typedef somTP_somf_TSet_somDispatchL *somTD_somf_TSet_somDispatchL;
typedef void*   SOMLINK somTP_somf_TSet_somDispatchA(somf_TSet *somSelf, 
		somId methodId, 
		somId descriptor, 
		va_list ap);
typedef somTP_somf_TSet_somDispatchA *somTD_somf_TSet_somDispatchA;
typedef double   SOMLINK somTP_somf_TSet_somDispatchD(somf_TSet *somSelf, 
		somId methodId, 
		somId descriptor, 
		va_list ap);
typedef somTP_somf_TSet_somDispatchD *somTD_somf_TSet_somDispatchD;
typedef SOMObject*   SOMLINK somTP_somf_TSet_somPrintSelf(somf_TSet *somSelf);
typedef somTP_somf_TSet_somPrintSelf *somTD_somf_TSet_somPrintSelf;
typedef void   SOMLINK somTP_somf_TSet_somDumpSelf(somf_TSet *somSelf, 
		long level);
typedef somTP_somf_TSet_somDumpSelf *somTD_somf_TSet_somDumpSelf;
typedef void   SOMLINK somTP_somf_TSet_somDumpSelfInt(somf_TSet *somSelf, 
		long level);
typedef somTP_somf_TSet_somDumpSelfInt *somTD_somf_TSet_somDumpSelfInt;
}

#endif /* somf_TSet_API */


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

/*
 * -- The C++ Wrapper Class for somf_TSet
 */
class somf_TSet : public somf_TCollection
{
public:

// somf_TSet::new creates the class object if necessary, and then uses somNewNoInit
// to allocate memory and create the object. Initialization is in ctors.
void *operator new(size_t)
{
   if (!_somf_TSet) somf_TSetNewClass(somf_TSet_MajorVersion,somf_TSet_MinorVersion);
   return (void*)
      SOM_Resolve(_somf_TSet,SOMClass,somNewNoInit)
         ((SOMClass *)((void*)_somf_TSet));
}

// somf_TSet::delete uses somDestruct.
void operator delete(void * obj)
{
   if (obj && *(void**)obj) {
      SOM_Resolve(obj,SOMObject,somFree)
         ((SOMObject*)obj);
   }
}

somf_TSet& operator=(somf_TSet& fromObj)
{
   this->somDefaultAssign(0,(SOMObject*)((void*)&fromObj));
   return *this;
}

somf_TSet()
{
   if (*(void**)this != 
       ((somParentMtabStructPtr)
        (somf_TSetCClassData.parentMtab))->mtab)
      return;
   ((SOMObject*)((void*)this))->somDefaultInit(0);
}

somf_TSet(somf_TSet* fromObj)
{
   if (*(void**)this != 
       ((somParentMtabStructPtr)
        (somf_TSetCClassData.parentMtab))->mtab)
      return;
   ((SOMObject*)((void*)this))->somDefaultCopyInit(0,((SOMObject*)((void*)fromObj)));
}

#ifdef __IBMCPP__
#pragma info(nocnv,nopar)
#endif
somf_TSet(const somf_TSet* fromObj)
{
   if (*(void**)this != 
       ((somParentMtabStructPtr)
        (somf_TSetCClassData.parentMtab))->mtab)
      return;
   ((SOMObject*)((void*)this))->somDefaultConstCopyInit(0,((SOMObject*)((void*)fromObj)));
}
#ifdef __IBMCPP__
#pragma info(restore)
#endif


/* method: somfTSetInitFL */
somf_TSet*   somfTSetInitFL(Environment *ev, 
		somf_MCollectible_somf_MCollectibleCompareFn testfn, 
		long setSizeHint)
{
/*
 *  Initializes the new set.
 */
   return SOM_ResolveD(this,somf_TSet,somf_TSet,somfTSetInitFL)
	(this, ev,testfn,setSizeHint);
}


/* method: somfTSetInitF */
somf_TSet*   somfTSetInitF(Environment *ev, 
		somf_MCollectible_somf_MCollectibleCompareFn testfn)
{
/*
 *  Initializes the new set.
 */
   return SOM_ResolveD(this,somf_TSet,somf_TSet,somfTSetInitF)
	(this, ev,testfn);
}


/* method: somfTSetInitLF */
somf_TSet*   somfTSetInitLF(Environment *ev, 
		long setSizeHint, 
		somf_MCollectible_somf_MCollectibleCompareFn testfn)
{
/*
 *  Initializes the new set.
 */
   return SOM_ResolveD(this,somf_TSet,somf_TSet,somfTSetInitLF)
	(this, ev,setSizeHint,testfn);
}


/* method: somfTSetInitL */
somf_TSet*   somfTSetInitL(Environment *ev, 
		long setSizeHint)
{
/*
 *  Initializes the new set.
 */
   return SOM_ResolveD(this,somf_TSet,somf_TSet,somfTSetInitL)
	(this, ev,setSizeHint);
}


/* method: somfTSetInitS */
somf_TSet*   somfTSetInitS(Environment *ev, 
		somf_TSet* s)
{
/*
 *  Initializes the new set.
 */
   return SOM_ResolveD(this,somf_TSet,somf_TSet,somfTSetInitS)
	(this, ev,s);
}


/* method: somfAssign */
void   somfAssign(Environment *ev, 
		somf_TSet* source)
{
/*
 *  Assign the instance of this equal to the instance of source.
 */
   SOM_ResolveD(this,somf_TSet,somf_TSet,somfAssign)
	(this, ev,source);
}


/* method: somfDifferenceS */
void   somfDifferenceS(Environment *ev, 
		somf_TSet* set1)
{
/*
 *  Destructively modify this to contain a set of elements of this that do not
 *  appear in set1
 */
   SOM_ResolveD(this,somf_TSet,somf_TSet,somfDifferenceS)
	(this, ev,set1);
}


/* method: somfDifferenceSS */
void   somfDifferenceSS(Environment *ev, 
		somf_TSet* set1, 
		somf_TSet* resultSet)
{
/*
 *  After this function is called, resultSet will contain a set of elements of
 *  this that do not appear in set1
 */
   SOM_ResolveD(this,somf_TSet,somf_TSet,somfDifferenceSS)
	(this, ev,set1,resultSet);
}


/* method: somfIntersectionS */
void   somfIntersectionS(Environment *ev, 
		somf_TSet* set1)
{
/*
 *  Destructively modify this to contain everything that is an element of set1
 *  and this.
 */
   SOM_ResolveD(this,somf_TSet,somf_TSet,somfIntersectionS)
	(this, ev,set1);
}


/* method: somfIntersectionSS */
void   somfIntersectionSS(Environment *ev, 
		somf_TSet* set1, 
		somf_TSet* resultSet)
{
/*
 *  After this function is called, resultSet will contain everything that is an
 *  element of set1 and this.
 */
   SOM_ResolveD(this,somf_TSet,somf_TSet,somfIntersectionSS)
	(this, ev,set1,resultSet);
}


/* method: somfUnionS */
void   somfUnionS(Environment *ev, 
		somf_TSet* set1)
{
/*
 *  Destructively modify this to contain everything that is an element of either
 *  set1 or this.
 */
   SOM_ResolveD(this,somf_TSet,somf_TSet,somfUnionS)
	(this, ev,set1);
}


/* method: somfUnionSS */
void   somfUnionSS(Environment *ev, 
		somf_TSet* set1, 
		somf_TSet* resultSet)
{
/*
 *  After this function is called, resultSet will contain everything that is an
 *  element of either set1 or this.
 */
   SOM_ResolveD(this,somf_TSet,somf_TSet,somfUnionSS)
	(this, ev,set1,resultSet);
}


/* method: somfXorS */
void   somfXorS(Environment *ev, 
		somf_TSet* set1)
{
/*
 *  Destructively modify this to contain everything that is an element of either
 *  set1 or this, but not both.
 */
   SOM_ResolveD(this,somf_TSet,somf_TSet,somfXorS)
	(this, ev,set1);
}


/* method: somfXorSS */
void   somfXorSS(Environment *ev, 
		somf_TSet* set1, 
		somf_TSet* resultSet)
{
/*
 *  After this function is called, resultSet will contain everything that is an
 *  element of either set1 or this, but not both.
 */
   SOM_ResolveD(this,somf_TSet,somf_TSet,somfXorSS)
	(this, ev,set1,resultSet);
}


/* method: somfSetHashFunction */
void   somfSetHashFunction(Environment *ev, 
		somf_MCollectible_somf_MCollectibleHashFn fn)
{
/*
 *  Set the hash function to fn.
 */
   SOM_ResolveD(this,somf_TSet,somf_TSet,somfSetHashFunction)
	(this, ev,fn);
}


/* method: somfGetHashFunction */
somf_MCollectible_somf_MCollectibleHashFn   somfGetHashFunction(Environment *ev)
{
/*
 *  Return the hash function.
 */
   return SOM_ResolveD(this,somf_TSet,somf_TSet,somfGetHashFunction)
	(this, ev);
}


/* method: somfRehash */
void   somfRehash(Environment *ev)
{
/*
 *  Rehash the set, cleaning up for any entries marked for deletion.
 */
   SOM_ResolveD(this,somf_TSet,somf_TSet,somfRehash)
	(this, ev);
}


/*
 * Reintroduce inherited methods
 */

/* method: somfAdd */
somf_MCollectible*   somfAdd(Environment *ev, 
		somf_MCollectible* obj)
{
/*
 *  Add obj to this.
 */
   return SOM_ResolveD(this,somf_TSet,somf_TCollection,somfAdd)
	(this, ev,obj);
}


/* method: somfAddAll */
void   somfAddAll(Environment *ev, 
		somf_TCollection* col)
{
/*
 *  Add all of the objects in collection to this.  Essentially this is
 *  equivalent to getting an iterator for the collection passed in and adding
 *  each element in the collection to this.
 */
   SOM_ResolveD(this,somf_TSet,somf_TCollection,somfAddAll)
	(this, ev,col);
}


/* method: somfRemove */
somf_MCollectible*   somfRemove(Environment *ev, 
		somf_MCollectible* obj)
{
/*
 *  Remove obj from this.  Return the object which was actually removed
 *  (which if you are using an IsEqual test function may not be the same as the
 *  object passed in only "equal")
 */
   return SOM_ResolveD(this,somf_TSet,somf_TCollection,somfRemove)
	(this, ev,obj);
}


/* method: somfRemoveAll */
void   somfRemoveAll(Environment *ev)
{
/*
 *  Remove all of the objects from this.
 */
   SOM_ResolveD(this,somf_TSet,somf_TCollection,somfRemoveAll)
	(this, ev);
}


/* method: somfDeleteAll */
void   somfDeleteAll(Environment *ev)
{
/*
 *  Remove all of the objects from this and deallocate the storage that these
 *  objects might have owned (that is, the destructor function is called
 *  for each object in the collection).
 */
   SOM_ResolveD(this,somf_TSet,somf_TCollection,somfDeleteAll)
	(this, ev);
}


/* method: somfCount */
long   somfCount(Environment *ev)
{
/*
 *  Return the number of objects in this.
 */
   return SOM_ResolveD(this,somf_TSet,somf_TCollection,somfCount)
	(this, ev);
}


/* method: somfMember */
somf_MCollectible*   somfMember(Environment *ev, 
		somf_MCollectible* obj)
{
/*
 *  Each object in this is compared to obj using the function testFn.  Return the
 *  object for which testFn returned TRUE.  Return SOMF_NIL if not object was found.
 */
   return SOM_ResolveD(this,somf_TSet,somf_TCollection,somfMember)
	(this, ev,obj);
}


/* method: somfCreateIterator */
somf_TIterator*   somfCreateIterator(Environment *ev)
{
/*
 *  This method returns a new iterator which is suitable for use in iterating
 *  over the objects in this collection.
 */
   return SOM_ResolveD(this,somf_TSet,somf_TCollection,somfCreateIterator)
	(this, ev);
}


/* method: somfTestFunction */
somf_MCollectible_somf_MCollectibleCompareFn   somfTestFunction(Environment *ev)
{
/*
 *  Return the test function.  This is usually either IsSame or IsEqual.
 */
   return SOM_ResolveD(this,somf_TSet,somf_TCollection,somfTestFunction)
	(this, ev);
}


/* method: somfSetTestFunction */
void   somfSetTestFunction(Environment *ev, 
		somf_MCollectible_somf_MCollectibleCompareFn testfn)
{
/*
 *  Set the test function.
 */
   SOM_ResolveD(this,somf_TSet,somf_TCollection,somfSetTestFunction)
	(this, ev,testfn);
}


/* method: somfTCollectionInit */
somf_TCollection*   somfTCollectionInit(Environment *ev, 
		somf_MCollectible_somf_MCollectibleCompareFn testfn)
{
/*
 *  Initialize the somf_TCollection test function to testfn.
 */
   return SOM_ResolveD(this,somf_TSet,somf_TCollection,somfTCollectionInit)
	(this, ev,testfn);
}


/* method: somfIsEqual */
boolean   somfIsEqual(Environment *ev, 
		somf_MCollectible* obj)
{
   return SOM_ResolveD(this,somf_TSet,somf_MCollectible,somfIsEqual)
	(this, ev,obj);
}


/* method: somfClone */
somf_MCollectible*   somfClone(Environment *ev)
{
/*
 *  somfClone provides a general function for creating a new instance of this.
 */
   return SOM_ResolveD(this,somf_TSet,somf_MCollectible,somfClone)
	(this, ev);
}


/* method: somfClonePointer */
somf_MCollectible*   somfClonePointer(Environment *ev, 
		somf_MCollectible* clonee)
{
/*
 *  somfClonePointer returns a pointer to a Clone
 */
   return SOM_ResolveD(this,somf_TSet,somf_MCollectible,somfClonePointer)
	(this, ev,clonee);
}


/* method: somfHash */
long   somfHash(Environment *ev)
{
/*
 *  somfHash returns a value suitable for use as a hashing probe for this.
 *  The default function will simply return the address of the object.
 *  The default function is almost certainly not adequate if you are overriding
 *  somfIsEqual because you need to make sure that all objects that "are equal"
 *  to each other return the same hash value.  For example, a TText object would
 *  return a hash value computed using the characters in the string instead of
 *  the address of the string.
 */
   return SOM_ResolveD(this,somf_TSet,somf_MCollectible,somfHash)
	(this, ev);
}


/* method: somfIsSame */
boolean   somfIsSame(Environment *ev, 
		somf_MCollectible* obj)
{
/*
 *  The default function for somfIsSame is a pointer comparison
 */
   return SOM_ResolveD(this,somf_TSet,somf_MCollectible,somfIsSame)
	(this, ev,obj);
}


/* method: somfIsNotEqual */
boolean   somfIsNotEqual(Environment *ev, 
		somf_MCollectible* obj)
{
/*
 *  somfIsNotEqual returns TRUE if obj is NOT isomorphic to this.  It uses
 *  somfIsEqual, so overriding somfIsEqual will handle the logic of somfIsNotEqual too.
 */
   return SOM_ResolveD(this,somf_TSet,somf_MCollectible,somfIsNotEqual)
	(this, ev,obj);
}


/* initializer method: somDefaultInit */
void   somDefaultInit(som3InitCtrl* ctrl)
{
/*
 *  A default initializer for a SOM object. Passing a null ctrl
 *  indicates to the receiver that its class is the class of the
 *  object being initialized, whereby the initializer will determine
 *  an appropriate control structure.
 */
   SOM_ResolveD(this,somf_TSet,SOMObject,somDefaultInit)
	(this,ctrl);
}


/* method: somDestruct */
void   somDestruct(octet doFree, 
		som3DestructCtrl* ctrl)
{
/*
 *  The default destructor for a SOM object. A nonzero <doFree>
 *  indicates that the object storage should be freed by the
 *  object's class (via somDeallocate) after uninitialization.
 *  As with somDefaultInit, a null ctrl can be passed.
 */
   SOM_ResolveD(this,somf_TSet,SOMObject,somDestruct)
	(this,doFree,ctrl);
}


/* initializer method: somDefaultCopyInit */
void   somDefaultCopyInit(som3InitCtrl* ctrl, 
		SOMObject* fromObj)
{
/*
 *  A default copy constructor. Use this to make copies of objects for
 *  calling methods with "by-value" argument semantics.
 */
   SOM_ResolveD(this,somf_TSet,SOMObject,somDefaultCopyInit)
	(this,ctrl,fromObj);
}


/* method: somDefaultAssign */
somf_TSet*  somDefaultAssign(som3AssignCtrl* ctrl, 
		SOMObject* fromObj)
{
/*
 *  A default assignment operator. Use this to "assign" the state of one
 *  object to another.
 */
   return SOM_ResolveD(this,somf_TSet,SOMObject,somDefaultAssign)
	(this,ctrl,fromObj);
}


/* initializer method: somDefaultConstCopyInit */
void   somDefaultConstCopyInit(som3InitCtrl* ctrl, 
		SOMObject* fromObj)
{
/*
 *  A default copy constructor that uses a const fromObj.
 */
   SOM_ResolveD(this,somf_TSet,SOMObject,somDefaultConstCopyInit)
	(this,ctrl,fromObj);
}


/* initializer method: somDefaultVCopyInit */
void   somDefaultVCopyInit(som3InitCtrl* ctrl, 
		SOMObject* fromObj)
{
/*
 *  A default copy constructor that uses a volatile fromObj.
 */
   SOM_ResolveD(this,somf_TSet,SOMObject,somDefaultVCopyInit)
	(this,ctrl,fromObj);
}


/* initializer method: somDefaultConstVCopyInit */
void   somDefaultConstVCopyInit(som3InitCtrl* ctrl, 
		SOMObject* fromObj)
{
/*
 *  A default copy constructor that uses a const volatile fromObj.
 */
   SOM_ResolveD(this,somf_TSet,SOMObject,somDefaultConstVCopyInit)
	(this,ctrl,fromObj);
}


/* method: somDefaultConstAssign */
somf_TSet*  somDefaultConstAssign(som3AssignCtrl* ctrl, 
		SOMObject* fromObj)
{
/*
 *  A default assignment operator that uses a const fromObj.
 */
   return SOM_ResolveD(this,somf_TSet,SOMObject,somDefaultConstAssign)
	(this,ctrl,fromObj);
}


/* method: somDefaultVAssign */
somf_TSet*  somDefaultVAssign(som3AssignCtrl* ctrl, 
		SOMObject* fromObj)
{
/*
 *  A default assignment operator that uses a volatile fromObj.
 */
   return SOM_ResolveD(this,somf_TSet,SOMObject,somDefaultVAssign)
	(this,ctrl,fromObj);
}


/* method: somDefaultConstVAssign */
somf_TSet*  somDefaultConstVAssign(som3AssignCtrl* ctrl, 
		SOMObject* fromObj)
{
/*
 *  A default assignment operator that uses a const volatile fromObj.
 */
   return SOM_ResolveD(this,somf_TSet,SOMObject,somDefaultConstVAssign)
	(this,ctrl,fromObj);
}


/* method: somInit */
void   somInit()
{
/*
 *  Obsolete but still supported. Override somDefaultInit instead of somInit.
 */
   SOM_ResolveD(this,somf_TSet,SOMObject,somInit)
	(this);
}


/* method: somFree */
void   somFree()
{
/*
 *  Use as directed by framework implementations.
 */
   SOM_ResolveD(this,somf_TSet,SOMObject,somFree)
	(this);
}


/* method: somUninit */
void   somUninit()
{
/*
 *  Obsolete but still supported. Override somDestruct instead of somUninit.
 */
   SOM_ResolveD(this,somf_TSet,SOMObject,somUninit)
	(this);
}


/* method: somGetClass */
SOMClass*   somGetClass()
{
/*
 *  Return the receiver's class.
 */
   return SOM_ResolveD(this,somf_TSet,SOMObject,somGetClass)
	(this);
}


/* method: somGetClassName */
string   somGetClassName()
{
/*
 *  Return the name of the receiver's class.
 */
   return SOM_ResolveD(this,somf_TSet,SOMObject,somGetClassName)
	(this);
}


/* method: somGetSize */
long   somGetSize()
{
/*
 *  Return the size of the receiver.
 */
   return SOM_ResolveD(this,somf_TSet,SOMObject,somGetSize)
	(this);
}


/* method: somIsA */
boolean   somIsA(SOMClass* aClassObj)
{
/*
 *  Returns 1 (true) if the receiver responds to methods
 *  introduced by <aClassObj>, and 0 (false) otherwise.
 */
   return SOM_ResolveD(this,somf_TSet,SOMObject,somIsA)
	(this,aClassObj);
}


/* method: somIsInstanceOf */
boolean   somIsInstanceOf(SOMClass* aClassObj)
{
/*
 *  Returns 1 (true) if the receiver is an instance of
 *  <aClassObj> and 0 (false) otherwise.
 */
   return SOM_ResolveD(this,somf_TSet,SOMObject,somIsInstanceOf)
	(this,aClassObj);
}


/* method: somRespondsTo */
boolean   somRespondsTo(somId mId)
{
/*
 *  Returns 1 (true) if the indicated method can be invoked
 *  on the receiver and 0 (false) otherwise.
 */
   return SOM_ResolveD(this,somf_TSet,SOMObject,somRespondsTo)
	(this,mId);
}


/* va_list method: somDispatch */

/*
 *  This method provides a generic, class-specific dispatch mechanism.
 *  It accepts as input <retValue> a pointer to the memory area to be
 *  loaded with the result of dispatching the method indicated by
 *  <methodId> using the arguments in <ap>. <ap> contains the object
 *  on which the method is to be invoked as the first argument.
 */
/* the va_list invocation form */
boolean   somf_TSet_somDispatch(somToken* retValue, 
		somId methodId, 
		va_list ap)
{return SOM_ResolveD(this,somf_TSet,SOMObject,somDispatch)
	(this,retValue,methodId,ap);
}

/* the varargs invocation form */
boolean   somDispatch(somToken* retValue, 
		somId methodId, 
		...)
{
/*
 *  This method provides a generic, class-specific dispatch mechanism.
 *  It accepts as input <retValue> a pointer to the memory area to be
 *  loaded with the result of dispatching the method indicated by
 *  <methodId> using the arguments in <ap>. <ap> contains the object
 *  on which the method is to be invoked as the first argument.
 */
   va_list ap;
   va_start(ap, methodId);
   boolean __somResult = 
      SOM_ResolveD(this,somf_TSet,SOMObject,somDispatch)
	(this,retValue,methodId,ap);
   va_end(ap);
   return __somResult;
}


/* va_list method: somClassDispatch */

/*
 *  Like somDispatch, but method resolution for static methods is done
 *  according to the clsObj instance method table.
 */
/* the va_list invocation form */
boolean   somf_TSet_somClassDispatch(SOMClass* clsObj, 
		somToken* retValue, 
		somId methodId, 
		va_list ap)
{return SOM_ResolveD(this,somf_TSet,SOMObject,somClassDispatch)
	(this,clsObj,retValue,methodId,ap);
}

/* the varargs invocation form */
boolean   somClassDispatch(SOMClass* clsObj, 
		somToken* retValue, 
		somId methodId, 
		...)
{
/*
 *  Like somDispatch, but method resolution for static methods is done
 *  according to the clsObj instance method table.
 */
   va_list ap;
   va_start(ap, methodId);
   boolean __somResult = 
      SOM_ResolveD(this,somf_TSet,SOMObject,somClassDispatch)
	(this,clsObj,retValue,methodId,ap);
   va_end(ap);
   return __somResult;
}


/* method: somCastObj */
boolean   somCastObj(SOMClass* cls)
{
/*
 *  cast the receiving object to cls (which must be an ancestor of the
 *  objects true class. Returns true on success.
 */
   return SOM_ResolveD(this,somf_TSet,SOMObject,somCastObj)
	(this,cls);
}


/* method: somResetObj */
boolean   somResetObj()
{
/*
 *  reset an object to its true class. Returns true always.
 */
   return SOM_ResolveD(this,somf_TSet,SOMObject,somResetObj)
	(this);
}


/* va_list method: somDispatchV */

/*
 *  Obsolete. Use somDispatch instead.
 */
/* the va_list invocation form */
void   somf_TSet_somDispatchV(somId methodId, 
		somId descriptor, 
		va_list ap)
{   SOM_ResolveD(this,somf_TSet,SOMObject,somDispatchV)
	(this,methodId,descriptor,ap);
}

/* the varargs invocation form */
void   somDispatchV(somId methodId, 
		somId descriptor, 
		...)
{
/*
 *  Obsolete. Use somDispatch instead.
 */
   va_list ap;
   va_start(ap, descriptor);
   SOM_ResolveD(this,somf_TSet,SOMObject,somDispatchV)
	(this,methodId,descriptor,ap);
   va_end(ap);
}


/* va_list method: somDispatchL */

/*
 *  Obsolete. Use somDispatch instead.
 */
/* the va_list invocation form */
long   somf_TSet_somDispatchL(somId methodId, 
		somId descriptor, 
		va_list ap)
{return SOM_ResolveD(this,somf_TSet,SOMObject,somDispatchL)
	(this,methodId,descriptor,ap);
}

/* the varargs invocation form */
long   somDispatchL(somId methodId, 
		somId descriptor, 
		...)
{
/*
 *  Obsolete. Use somDispatch instead.
 */
   va_list ap;
   va_start(ap, descriptor);
   long __somResult = 
      SOM_ResolveD(this,somf_TSet,SOMObject,somDispatchL)
	(this,methodId,descriptor,ap);
   va_end(ap);
   return __somResult;
}


/* va_list method: somDispatchA */

/*
 *  Obsolete. Use somDispatch instead.
 */
/* the va_list invocation form */
void*   somf_TSet_somDispatchA(somId methodId, 
		somId descriptor, 
		va_list ap)
{return SOM_ResolveD(this,somf_TSet,SOMObject,somDispatchA)
	(this,methodId,descriptor,ap);
}

/* the varargs invocation form */
void*   somDispatchA(somId methodId, 
		somId descriptor, 
		...)
{
/*
 *  Obsolete. Use somDispatch instead.
 */
   va_list ap;
   va_start(ap, descriptor);
   void* __somResult = 
      SOM_ResolveD(this,somf_TSet,SOMObject,somDispatchA)
	(this,methodId,descriptor,ap);
   va_end(ap);
   return __somResult;
}


/* va_list method: somDispatchD */

/*
 *  Obsolete. Use somDispatch instead.
 */
/* the va_list invocation form */
double   somf_TSet_somDispatchD(somId methodId, 
		somId descriptor, 
		va_list ap)
{return SOM_ResolveD(this,somf_TSet,SOMObject,somDispatchD)
	(this,methodId,descriptor,ap);
}

/* the varargs invocation form */
double   somDispatchD(somId methodId, 
		somId descriptor, 
		...)
{
/*
 *  Obsolete. Use somDispatch instead.
 */
   va_list ap;
   va_start(ap, descriptor);
   double __somResult = 
      SOM_ResolveD(this,somf_TSet,SOMObject,somDispatchD)
	(this,methodId,descriptor,ap);
   va_end(ap);
   return __somResult;
}


/* method: somPrintSelf */
SOMObject*   somPrintSelf()
{
/*
 *  Uses <SOMOutCharRoutine> to write a brief string with identifying
 *  information about this object.  The default implementation just gives
 *  the object's class name and its address in memory.
 *  <self> is returned.
 */
   return SOM_ResolveD(this,somf_TSet,SOMObject,somPrintSelf)
	(this);
}


/* method: somDumpSelf */
void   somDumpSelf(long level)
{
/*
 *  Uses <SOMOutCharRoutine> to write a detailed description of this object
 *  and its current state.
 * 
 *  <level> indicates the nesting level for describing compound objects
 *  it must be greater than or equal to zero.  All lines in the
 *  description will be preceeded by <2*level> spaces.
 * 
 *  This routine only actually writes the data that concerns the object
 *  as a whole, such as class, and uses <somDumpSelfInt> to describe
 *  the object's current state.  This approach allows readable
 *  descriptions of compound objects to be constructed.
 * 
 *  Generally it is not necessary to override this method, if it is
 *  overriden it generally must be completely replaced.
 */
   SOM_ResolveD(this,somf_TSet,SOMObject,somDumpSelf)
	(this,level);
}


/* method: somDumpSelfInt */
void   somDumpSelfInt(long level)
{
/*
 *  Uses <SOMOutCharRoutine> to write in the current state of this object.
 *  Generally this method will need to be overridden.  When overriding
 *  it, begin by calling the parent class form of this method and then
 *  write in a description of your class's instance data. This will
 *  result in a description of all the object's instance data going
 *  from its root ancestor class to its specific class.
 */
   SOM_ResolveD(this,somf_TSet,SOMObject,somDumpSelfInt)
	(this,level);
}



};   /* somf_TSet */



#endif       /* SOM_somf_TSet_xh */
