From e41580f0b55d009d0b82109f60a430fd3fa1a0cf Mon Sep 17 00:00:00 2001 From: mattijs Date: Wed, 10 Sep 2008 12:38:14 +0100 Subject: [PATCH] comparison operator --- .../containers/HashTables/HashSet/HashSet.H | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/OpenFOAM/containers/HashTables/HashSet/HashSet.H b/src/OpenFOAM/containers/HashTables/HashSet/HashSet.H index 654b743add..3985e574fb 100644 --- a/src/OpenFOAM/containers/HashTables/HashSet/HashSet.H +++ b/src/OpenFOAM/containers/HashTables/HashSet/HashSet.H @@ -100,6 +100,17 @@ public: { return HashTable::insert(key, empty()); } + + + // Member Operators + + //- Equality. Two hashtables are equal if all contents of first are + // also in second and vice versa. So does not depend on table size or + // order! + bool operator==(const HashSet&) const; + + //- The opposite of the equality operation. + bool operator!=(const HashSet&) const; }; @@ -112,6 +123,12 @@ typedef HashSet<> wordHashSet; // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +#ifdef NoRepository +# include "HashSet.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + #endif // ************************************************************************* //