From f4b191f0ea396b58465bfba40749977780a3af58 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Wed, 11 Feb 2009 05:29:41 +0000 Subject: Just removing some things that are cluttering up the source tree. --- src/old/tests/ordhash.cpp | 48 ----------------------------------------------- 1 file changed, 48 deletions(-) delete mode 100644 src/old/tests/ordhash.cpp (limited to 'src/old/tests/ordhash.cpp') diff --git a/src/old/tests/ordhash.cpp b/src/old/tests/ordhash.cpp deleted file mode 100644 index f1d96ec..0000000 --- a/src/old/tests/ordhash.cpp +++ /dev/null @@ -1,48 +0,0 @@ -#include "ordhash.h" -#include - -typedef struct eldef -{ - eldef( int a, int b, const std::string &c ) : - id( a ), nSequence( b ), sName( c ) {} - int id; - int nSequence; - std::string sName; -} eldef; - -struct seqcmp -{ - bool operator()( eldef **a, eldef **b ) - { - return (*a)->nSequence < (*b)->nSequence; - } -}; - -struct namcmp -{ - bool operator()( eldef **a, eldef **b ) - { - return (*a)->sName < (*b)->sName; - } -}; - -typedef OrdHash AHash; -//typedef OrdHash AHash; - -int main() -{ - AHash hsh; - hsh[1] = eldef( 0, 43, "Bob"); - hsh[4] = eldef( 1, 443, "Abby"); - hsh[2] = eldef( 2, 1, "Name"); - hsh[5] = eldef( 3, 0, "Catagory"); - hsh[32] = eldef( 4, 12, "Epilogue"); - - for( AHash::iterator i = hsh.begin(); i != hsh.end(); i++ ) - { - eldef e = (*i).second; - printf("%d, %d, %s\n", e.id, e.nSequence, e.sName.c_str() ); - } - -} - -- cgit v1.2.3