
/*
 * This file was generated by the SOM Compiler.
 * FileName: morder.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-92 Apple Computer, Inc.  All rights reserved.
 * 
 * CLASS_NAME: somf_MOrderableCollectible
 * 
 * DESCRIPTION: MOrderableCollectible should be mixed into objects which
 *              might want to be ordered.
 * 
 */


#ifndef SOM_somf_MOrderableCollectible_xh
#define SOM_somf_MOrderableCollectible_xh

class somf_MOrderableCollectible;

#define somf_MOrderableCollectible_MajorVersion 2
#define somf_MOrderableCollectible_MinorVersion 1

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

/* C++ parent defs */
#ifndef SOM_somf_MCollectible_xh
#include <mcollect.xh>
#endif

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

/*
 * Start of bindings for IDL types
 */

class SOMClass;
class SOMObject;
typedef unsigned long somf_MOrderableCollectible_EComparisonResult;
#define somf_MOrderableCollectible_kLessThan 1UL
#define somf_MOrderableCollectible_kEqual 2UL
#define somf_MOrderableCollectible_kGreaterThan 3UL
typedef
somMToken somf_MOrderableCollectible_somf_MOrderableCompareFn;
typedef
somMToken somf_MOrderableCollectible_somf_MBetterOrderableCompareFn;
typedef
somf_MOrderableCollectible** somf_MOrderableCollectible_somf_MOrderableCollectiblePtr;

#ifndef SOM_DONT_USE_SHORT_NAMES
#ifndef SOMTGD_EComparisonResult
    #ifdef EComparisonResult
        #undef EComparisonResult
        #define SOMTGD_EComparisonResult 1
    #else
        #define EComparisonResult somf_MOrderableCollectible_EComparisonResult
    #endif /* EComparisonResult */
#endif /* SOMTGD_EComparisonResult */

#ifndef SOM_DONT_USE_SHORT_NAMES
#ifndef SOMTGD_somf_MOrderableCompareFn
    #ifdef somf_MOrderableCompareFn
        #undef somf_MOrderableCompareFn
        #define SOMTGD_somf_MOrderableCompareFn 1
    #else
        #define somf_MOrderableCompareFn somf_MOrderableCollectible_somf_MOrderableCompareFn
    #endif /* somf_MOrderableCompareFn */
#endif /* SOMTGD_somf_MOrderableCompareFn */
#endif /* SOM_DONT_USE_SHORT_NAMES */

#ifndef SOM_DONT_USE_SHORT_NAMES
#ifndef SOMTGD_somf_MBetterOrderableCompareFn
    #ifdef somf_MBetterOrderableCompareFn
        #undef somf_MBetterOrderableCompareFn
        #define SOMTGD_somf_MBetterOrderableCompareFn 1
    #else
        #define somf_MBetterOrderableCompareFn somf_MOrderableCollectible_somf_MBetterOrderableCompareFn
    #endif /* somf_MBetterOrderableCompareFn */
#endif /* SOMTGD_somf_MBetterOrderableCompareFn */
#endif /* SOM_DONT_USE_SHORT_NAMES */

#ifndef SOM_DONT_USE_SHORT_NAMES
#ifndef SOMTGD_somf_MOrderableCollectiblePtr
    #ifdef somf_MOrderableCollectiblePtr
        #undef somf_MOrderableCollectiblePtr
        #define SOMTGD_somf_MOrderableCollectiblePtr 1
    #else
        #define somf_MOrderableCollectiblePtr somf_MOrderableCollectible_somf_MOrderableCollectiblePtr
    #endif /* somf_MOrderableCollectiblePtr */
#endif /* SOMTGD_somf_MOrderableCollectiblePtr */
#endif /* SOM_DONT_USE_SHORT_NAMES */
#endif /* SOM_DONT_USE_SHORT_NAMES */

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

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


#define SOMF_CALL_ORDERABLE_COMPARE_FN(obj,token,parameter) (((somTD_somf_MOrderableCollectible_somfIsLessThan) somResolve(obj,token))(obj, ev, parameter))

#define SOMF_CALL_BETTER_ORDERABLE_COMPARE_FN(obj,token,parameter) (((somTD_somf_MOrderableCollectible_somfCompare) somResolve(obj,token))(obj, ev, parameter))


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

/* The API to the somf_MOrderableCollectible class object, and the methods it introduces. */
SOMEXTERN struct somf_MOrderableCollectibleClassDataStructure {
	SOMClass *classObject;
	somMToken somfClone;
	somMToken somfClonePointer;
	somMToken somfHash;
	somMToken somfIsEqual;
	somMToken somfIsSame;
	somMToken somfIsNotEqual;
	somMToken somfIsGreaterThan;
	somMToken somfIsLessThan;
	somMToken somfCompare;
	somMToken somfIsGreaterThanOrEqualTo;
	somMToken somfIsLessThanOrEqualTo;
} SOMDLINK somf_MOrderableCollectibleClassData;
#define _somf_MOrderableCollectible somf_MOrderableCollectibleClassData.classObject

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

/*
 * -- Typedefs for somf_MOrderableCollectible Method Procedures
 */
SOMEXTERN {
typedef boolean   SOMLINK somTP_somf_MOrderableCollectible_somfIsGreaterThan(somf_MOrderableCollectible *somSelf, Environment *ev, 
		somf_MOrderableCollectible* obj);
typedef somTP_somf_MOrderableCollectible_somfIsGreaterThan *somTD_somf_MOrderableCollectible_somfIsGreaterThan;
typedef boolean   SOMLINK somTP_somf_MOrderableCollectible_somfIsLessThan(somf_MOrderableCollectible *somSelf, Environment *ev, 
		somf_MOrderableCollectible* obj);
typedef somTP_somf_MOrderableCollectible_somfIsLessThan *somTD_somf_MOrderableCollectible_somfIsLessThan;
typedef somf_MOrderableCollectible_EComparisonResult   SOMLINK somTP_somf_MOrderableCollectible_somfCompare(somf_MOrderableCollectible *somSelf, Environment *ev, 
		somf_MOrderableCollectible* obj);
typedef somTP_somf_MOrderableCollectible_somfCompare *somTD_somf_MOrderableCollectible_somfCompare;
typedef boolean   SOMLINK somTP_somf_MOrderableCollectible_somfIsGreaterThanOrEqualTo(somf_MOrderableCollectible *somSelf, Environment *ev, 
		somf_MOrderableCollectible* obj);
typedef somTP_somf_MOrderableCollectible_somfIsGreaterThanOrEqualTo *somTD_somf_MOrderableCollectible_somfIsGreaterThanOrEqualTo;
typedef boolean   SOMLINK somTP_somf_MOrderableCollectible_somfIsLessThanOrEqualTo(somf_MOrderableCollectible *somSelf, Environment *ev, 
		somf_MOrderableCollectible* obj);
typedef somTP_somf_MOrderableCollectible_somfIsLessThanOrEqualTo *somTD_somf_MOrderableCollectible_somfIsLessThanOrEqualTo;

/*
 * -- Typedefs for Reintroduced Wrapper Methods
 */
typedef somf_MCollectible*   SOMLINK somTP_somf_MOrderableCollectible_somfClone(somf_MOrderableCollectible *somSelf, Environment *ev);
typedef somTP_somf_MOrderableCollectible_somfClone *somTD_somf_MOrderableCollectible_somfClone;
typedef somf_MCollectible*   SOMLINK somTP_somf_MOrderableCollectible_somfClonePointer(somf_MOrderableCollectible *somSelf, Environment *ev, 
		somf_MCollectible* clonee);
typedef somTP_somf_MOrderableCollectible_somfClonePointer *somTD_somf_MOrderableCollectible_somfClonePointer;
typedef long   SOMLINK somTP_somf_MOrderableCollectible_somfHash(somf_MOrderableCollectible *somSelf, Environment *ev);
typedef somTP_somf_MOrderableCollectible_somfHash *somTD_somf_MOrderableCollectible_somfHash;
typedef boolean   SOMLINK somTP_somf_MOrderableCollectible_somfIsEqual(somf_MOrderableCollectible *somSelf, Environment *ev, 
		somf_MCollectible* obj);
typedef somTP_somf_MOrderableCollectible_somfIsEqual *somTD_somf_MOrderableCollectible_somfIsEqual;
typedef boolean   SOMLINK somTP_somf_MOrderableCollectible_somfIsSame(somf_MOrderableCollectible *somSelf, Environment *ev, 
		somf_MCollectible* obj);
typedef somTP_somf_MOrderableCollectible_somfIsSame *somTD_somf_MOrderableCollectible_somfIsSame;
typedef boolean   SOMLINK somTP_somf_MOrderableCollectible_somfIsNotEqual(somf_MOrderableCollectible *somSelf, Environment *ev, 
		somf_MCollectible* obj);
typedef somTP_somf_MOrderableCollectible_somfIsNotEqual *somTD_somf_MOrderableCollectible_somfIsNotEqual;
typedef void   SOMLINK somTP_somf_MOrderableCollectible_somDefaultInit(somf_MOrderableCollectible *somSelf, 
		som3InitCtrl* ctrl);
typedef somTP_somf_MOrderableCollectible_somDefaultInit *somTD_somf_MOrderableCollectible_somDefaultInit;
typedef void   SOMLINK somTP_somf_MOrderableCollectible_somDestruct(somf_MOrderableCollectible *somSelf, 
		octet doFree, 
		som3DestructCtrl* ctrl);
typedef somTP_somf_MOrderableCollectible_somDestruct *somTD_somf_MOrderableCollectible_somDestruct;
typedef void   SOMLINK somTP_somf_MOrderableCollectible_somDefaultCopyInit(somf_MOrderableCollectible *somSelf, 
		som3InitCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_somf_MOrderableCollectible_somDefaultCopyInit *somTD_somf_MOrderableCollectible_somDefaultCopyInit;
typedef somf_MOrderableCollectible*   SOMLINK somTP_somf_MOrderableCollectible_somDefaultAssign(somf_MOrderableCollectible *somSelf, 
		som3AssignCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_somf_MOrderableCollectible_somDefaultAssign *somTD_somf_MOrderableCollectible_somDefaultAssign;
typedef void   SOMLINK somTP_somf_MOrderableCollectible_somDefaultConstCopyInit(somf_MOrderableCollectible *somSelf, 
		som3InitCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_somf_MOrderableCollectible_somDefaultConstCopyInit *somTD_somf_MOrderableCollectible_somDefaultConstCopyInit;
typedef void   SOMLINK somTP_somf_MOrderableCollectible_somDefaultVCopyInit(somf_MOrderableCollectible *somSelf, 
		som3InitCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_somf_MOrderableCollectible_somDefaultVCopyInit *somTD_somf_MOrderableCollectible_somDefaultVCopyInit;
typedef void   SOMLINK somTP_somf_MOrderableCollectible_somDefaultConstVCopyInit(somf_MOrderableCollectible *somSelf, 
		som3InitCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_somf_MOrderableCollectible_somDefaultConstVCopyInit *somTD_somf_MOrderableCollectible_somDefaultConstVCopyInit;
typedef somf_MOrderableCollectible*   SOMLINK somTP_somf_MOrderableCollectible_somDefaultConstAssign(somf_MOrderableCollectible *somSelf, 
		som3AssignCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_somf_MOrderableCollectible_somDefaultConstAssign *somTD_somf_MOrderableCollectible_somDefaultConstAssign;
typedef somf_MOrderableCollectible*   SOMLINK somTP_somf_MOrderableCollectible_somDefaultVAssign(somf_MOrderableCollectible *somSelf, 
		som3AssignCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_somf_MOrderableCollectible_somDefaultVAssign *somTD_somf_MOrderableCollectible_somDefaultVAssign;
typedef somf_MOrderableCollectible*   SOMLINK somTP_somf_MOrderableCollectible_somDefaultConstVAssign(somf_MOrderableCollectible *somSelf, 
		som3AssignCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_somf_MOrderableCollectible_somDefaultConstVAssign *somTD_somf_MOrderableCollectible_somDefaultConstVAssign;
typedef void   SOMLINK somTP_somf_MOrderableCollectible_somInit(somf_MOrderableCollectible *somSelf);
typedef somTP_somf_MOrderableCollectible_somInit *somTD_somf_MOrderableCollectible_somInit;
typedef void   SOMLINK somTP_somf_MOrderableCollectible_somFree(somf_MOrderableCollectible *somSelf);
typedef somTP_somf_MOrderableCollectible_somFree *somTD_somf_MOrderableCollectible_somFree;
typedef void   SOMLINK somTP_somf_MOrderableCollectible_somUninit(somf_MOrderableCollectible *somSelf);
typedef somTP_somf_MOrderableCollectible_somUninit *somTD_somf_MOrderableCollectible_somUninit;
typedef SOMClass*   SOMLINK somTP_somf_MOrderableCollectible_somGetClass(somf_MOrderableCollectible *somSelf);
typedef somTP_somf_MOrderableCollectible_somGetClass *somTD_somf_MOrderableCollectible_somGetClass;
typedef string   SOMLINK somTP_somf_MOrderableCollectible_somGetClassName(somf_MOrderableCollectible *somSelf);
typedef somTP_somf_MOrderableCollectible_somGetClassName *somTD_somf_MOrderableCollectible_somGetClassName;
typedef long   SOMLINK somTP_somf_MOrderableCollectible_somGetSize(somf_MOrderableCollectible *somSelf);
typedef somTP_somf_MOrderableCollectible_somGetSize *somTD_somf_MOrderableCollectible_somGetSize;
typedef boolean   SOMLINK somTP_somf_MOrderableCollectible_somIsA(somf_MOrderableCollectible *somSelf, 
		SOMClass* aClassObj);
typedef somTP_somf_MOrderableCollectible_somIsA *somTD_somf_MOrderableCollectible_somIsA;
typedef boolean   SOMLINK somTP_somf_MOrderableCollectible_somIsInstanceOf(somf_MOrderableCollectible *somSelf, 
		SOMClass* aClassObj);
typedef somTP_somf_MOrderableCollectible_somIsInstanceOf *somTD_somf_MOrderableCollectible_somIsInstanceOf;
typedef boolean   SOMLINK somTP_somf_MOrderableCollectible_somRespondsTo(somf_MOrderableCollectible *somSelf, 
		somId mId);
typedef somTP_somf_MOrderableCollectible_somRespondsTo *somTD_somf_MOrderableCollectible_somRespondsTo;
typedef boolean   SOMLINK somTP_somf_MOrderableCollectible_somDispatch(somf_MOrderableCollectible *somSelf, 
		somToken* retValue, 
		somId methodId, 
		va_list ap);
typedef somTP_somf_MOrderableCollectible_somDispatch *somTD_somf_MOrderableCollectible_somDispatch;
typedef boolean   SOMLINK somTP_somf_MOrderableCollectible_somClassDispatch(somf_MOrderableCollectible *somSelf, 
		SOMClass* clsObj, 
		somToken* retValue, 
		somId methodId, 
		va_list ap);
typedef somTP_somf_MOrderableCollectible_somClassDispatch *somTD_somf_MOrderableCollectible_somClassDispatch;
typedef boolean   SOMLINK somTP_somf_MOrderableCollectible_somCastObj(somf_MOrderableCollectible *somSelf, 
		SOMClass* cls);
typedef somTP_somf_MOrderableCollectible_somCastObj *somTD_somf_MOrderableCollectible_somCastObj;
typedef boolean   SOMLINK somTP_somf_MOrderableCollectible_somResetObj(somf_MOrderableCollectible *somSelf);
typedef somTP_somf_MOrderableCollectible_somResetObj *somTD_somf_MOrderableCollectible_somResetObj;
typedef void   SOMLINK somTP_somf_MOrderableCollectible_somDispatchV(somf_MOrderableCollectible *somSelf, 
		somId methodId, 
		somId descriptor, 
		va_list ap);
typedef somTP_somf_MOrderableCollectible_somDispatchV *somTD_somf_MOrderableCollectible_somDispatchV;
typedef long   SOMLINK somTP_somf_MOrderableCollectible_somDispatchL(somf_MOrderableCollectible *somSelf, 
		somId methodId, 
		somId descriptor, 
		va_list ap);
typedef somTP_somf_MOrderableCollectible_somDispatchL *somTD_somf_MOrderableCollectible_somDispatchL;
typedef void*   SOMLINK somTP_somf_MOrderableCollectible_somDispatchA(somf_MOrderableCollectible *somSelf, 
		somId methodId, 
		somId descriptor, 
		va_list ap);
typedef somTP_somf_MOrderableCollectible_somDispatchA *somTD_somf_MOrderableCollectible_somDispatchA;
typedef double   SOMLINK somTP_somf_MOrderableCollectible_somDispatchD(somf_MOrderableCollectible *somSelf, 
		somId methodId, 
		somId descriptor, 
		va_list ap);
typedef somTP_somf_MOrderableCollectible_somDispatchD *somTD_somf_MOrderableCollectible_somDispatchD;
typedef SOMObject*   SOMLINK somTP_somf_MOrderableCollectible_somPrintSelf(somf_MOrderableCollectible *somSelf);
typedef somTP_somf_MOrderableCollectible_somPrintSelf *somTD_somf_MOrderableCollectible_somPrintSelf;
typedef void   SOMLINK somTP_somf_MOrderableCollectible_somDumpSelf(somf_MOrderableCollectible *somSelf, 
		long level);
typedef somTP_somf_MOrderableCollectible_somDumpSelf *somTD_somf_MOrderableCollectible_somDumpSelf;
typedef void   SOMLINK somTP_somf_MOrderableCollectible_somDumpSelfInt(somf_MOrderableCollectible *somSelf, 
		long level);
typedef somTP_somf_MOrderableCollectible_somDumpSelfInt *somTD_somf_MOrderableCollectible_somDumpSelfInt;
}

#endif /* somf_MOrderableCollectible_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_MOrderableCollectible
 */
class somf_MOrderableCollectible : public somf_MCollectible
{
public:

// somf_MOrderableCollectible::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_MOrderableCollectible) somf_MOrderableCollectibleNewClass(somf_MOrderableCollectible_MajorVersion,somf_MOrderableCollectible_MinorVersion);
   return (void*)
      SOM_Resolve(_somf_MOrderableCollectible,SOMClass,somNewNoInit)
         ((SOMClass *)((void*)_somf_MOrderableCollectible));
}

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

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

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

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

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


/* method: somfIsGreaterThan */
boolean   somfIsGreaterThan(Environment *ev, 
		somf_MOrderableCollectible* obj)
{
/*
 *  Returns TRUE if obj is "greater than" this.
 */
   return SOM_ResolveD(this,somf_MOrderableCollectible,somf_MOrderableCollectible,somfIsGreaterThan)
	(this, ev,obj);
}


/* method: somfIsLessThan */
boolean   somfIsLessThan(Environment *ev, 
		somf_MOrderableCollectible* obj)
{
/*
 *  Returns TRUE if obj is "less than" this.
 */
   return SOM_ResolveD(this,somf_MOrderableCollectible,somf_MOrderableCollectible,somfIsLessThan)
	(this, ev,obj);
}


/* method: somfCompare */
somf_MOrderableCollectible_EComparisonResult   somfCompare(Environment *ev, 
		somf_MOrderableCollectible* obj)
{
/*
 *  This method compares obj to this.
 */
   return SOM_ResolveD(this,somf_MOrderableCollectible,somf_MOrderableCollectible,somfCompare)
	(this, ev,obj);
}


/* method: somfIsGreaterThanOrEqualTo */
boolean   somfIsGreaterThanOrEqualTo(Environment *ev, 
		somf_MOrderableCollectible* obj)
{
/*
 *  Returns TRUE if obj is "greater than" or "equal to" this.
 */
   return SOM_ResolveD(this,somf_MOrderableCollectible,somf_MOrderableCollectible,somfIsGreaterThanOrEqualTo)
	(this, ev,obj);
}


/* method: somfIsLessThanOrEqualTo */
boolean   somfIsLessThanOrEqualTo(Environment *ev, 
		somf_MOrderableCollectible* obj)
{
/*
 *  Returns TRUE if obj is "less than" or "equal to" this.
 */
   return SOM_ResolveD(this,somf_MOrderableCollectible,somf_MOrderableCollectible,somfIsLessThanOrEqualTo)
	(this, ev,obj);
}


/*
 * Reintroduce inherited methods
 */

/* method: somfClone */
somf_MCollectible*   somfClone(Environment *ev)
{
/*
 *  somfClone provides a general function for creating a new instance of this.
 */
   return SOM_ResolveD(this,somf_MOrderableCollectible,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_MOrderableCollectible,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_MOrderableCollectible,somf_MCollectible,somfHash)
	(this, ev);
}


/* method: somfIsEqual */
boolean   somfIsEqual(Environment *ev, 
		somf_MCollectible* obj)
{
/*
 *  somfIsEqual returns TRUE if obj is isomorphic to this.  The default function
 *  will give you a nasty message.  For example, the somfIsEqual method
 *  for TText objects will do a string comparison.  All of the utility classes
 *  allow you to specify what methods to use when comparing objects for
 *  insertion, deletion, etc.
 */
   return SOM_ResolveD(this,somf_MOrderableCollectible,somf_MCollectible,somfIsEqual)
	(this, ev,obj);
}


/* method: somfIsSame */
boolean   somfIsSame(Environment *ev, 
		somf_MCollectible* obj)
{
/*
 *  The default function for somfIsSame is a pointer comparison
 */
   return SOM_ResolveD(this,somf_MOrderableCollectible,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_MOrderableCollectible,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_MOrderableCollectible,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_MOrderableCollectible,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_MOrderableCollectible,SOMObject,somDefaultCopyInit)
	(this,ctrl,fromObj);
}


/* method: somDefaultAssign */
somf_MOrderableCollectible*  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_MOrderableCollectible,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_MOrderableCollectible,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_MOrderableCollectible,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_MOrderableCollectible,SOMObject,somDefaultConstVCopyInit)
	(this,ctrl,fromObj);
}


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


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


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


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


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


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


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


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


/* method: somGetSize */
long   somGetSize()
{
/*
 *  Return the size of the receiver.
 */
   return SOM_ResolveD(this,somf_MOrderableCollectible,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_MOrderableCollectible,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_MOrderableCollectible,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_MOrderableCollectible,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_MOrderableCollectible_somDispatch(somToken* retValue, 
		somId methodId, 
		va_list ap)
{return SOM_ResolveD(this,somf_MOrderableCollectible,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_MOrderableCollectible,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_MOrderableCollectible_somClassDispatch(SOMClass* clsObj, 
		somToken* retValue, 
		somId methodId, 
		va_list ap)
{return SOM_ResolveD(this,somf_MOrderableCollectible,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_MOrderableCollectible,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_MOrderableCollectible,SOMObject,somCastObj)
	(this,cls);
}


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


/* va_list method: somDispatchV */

/*
 *  Obsolete. Use somDispatch instead.
 */
/* the va_list invocation form */
void   somf_MOrderableCollectible_somDispatchV(somId methodId, 
		somId descriptor, 
		va_list ap)
{   SOM_ResolveD(this,somf_MOrderableCollectible,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_MOrderableCollectible,SOMObject,somDispatchV)
	(this,methodId,descriptor,ap);
   va_end(ap);
}


/* va_list method: somDispatchL */

/*
 *  Obsolete. Use somDispatch instead.
 */
/* the va_list invocation form */
long   somf_MOrderableCollectible_somDispatchL(somId methodId, 
		somId descriptor, 
		va_list ap)
{return SOM_ResolveD(this,somf_MOrderableCollectible,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_MOrderableCollectible,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_MOrderableCollectible_somDispatchA(somId methodId, 
		somId descriptor, 
		va_list ap)
{return SOM_ResolveD(this,somf_MOrderableCollectible,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_MOrderableCollectible,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_MOrderableCollectible_somDispatchD(somId methodId, 
		somId descriptor, 
		va_list ap)
{return SOM_ResolveD(this,somf_MOrderableCollectible,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_MOrderableCollectible,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_MOrderableCollectible,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_MOrderableCollectible,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_MOrderableCollectible,SOMObject,somDumpSelfInt)
	(this,level);
}



};   /* somf_MOrderableCollectible */



#endif       /* SOM_somf_MOrderableCollectible_xh */
