made TxObect::hashCode virtual, added TxObject::equals
git-svn-id: svn://10.0.0.236/trunk@65697 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
e333ebe447
commit
563dcf7154
@ -21,18 +21,16 @@
|
||||
* Keith Visco, kvisco@ziplink.net
|
||||
* -- original author.
|
||||
*
|
||||
* $Id: List.h,v 1.4 2000-04-07 08:58:54 kvisco%ziplink.net Exp $
|
||||
* $Id: List.h,v 1.5 2000-04-12 10:53:21 kvisco%ziplink.net Exp $
|
||||
*/
|
||||
|
||||
#include "baseutils.h"
|
||||
|
||||
#ifndef MITRE_LIST_H
|
||||
#define MITRE_LIST_H
|
||||
#ifndef TRANSFRMX_LIST_H
|
||||
#define TRANSFRMX_LIST_H
|
||||
|
||||
/**
|
||||
* Represents an ordered list of Object pointers. Modeled after a Java 2 List.
|
||||
* @author <a href="mailto:kvisco@ziplink.net">Keith Visco</a>
|
||||
* @version $Revision: 1.4 $ $Date: 2000-04-07 08:58:54 $
|
||||
**/
|
||||
class List {
|
||||
|
||||
@ -107,7 +105,7 @@ private:
|
||||
|
||||
/**
|
||||
* An Iterator for the List Class
|
||||
* @author <a href="mailto:kvisco@mitre.org">Keith Visco</a>
|
||||
* @author <a href="mailto:kvisco@ziplink.net">Keith Visco</a>
|
||||
**/
|
||||
class ListIterator {
|
||||
|
||||
|
||||
@ -19,7 +19,7 @@
|
||||
* Keith Visco, kvisco@ziplink.net
|
||||
* -- original author.
|
||||
*
|
||||
* $Id: TxObject.h,v 1.1 2000-03-02 09:16:44 kvisco%ziplink.net Exp $
|
||||
* $Id: TxObject.h,v 1.2 2000-04-12 10:53:27 kvisco%ziplink.net Exp $
|
||||
*/
|
||||
|
||||
|
||||
@ -45,10 +45,18 @@ class TxObject {
|
||||
/**
|
||||
* Returns the Hashcode for this TxObject
|
||||
**/
|
||||
Int32 hashCode() {
|
||||
virtual Int32 hashCode() {
|
||||
return (Int32)this;
|
||||
} //-- hashCode
|
||||
|
||||
/**
|
||||
* Returns true if the given Object is equal to this object.
|
||||
* By default the comparision operator == is used, but this may
|
||||
* be overridden
|
||||
**/
|
||||
virtual MBool equals(TxObject* obj) {
|
||||
return (MBool)(obj == this);
|
||||
} //-- equals
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user