exHash.cc
RAVL, Recognition And Vision Library
SOURCE HOME PAGE CLASS LIST CONTENTS

// This file is part of RAVL, Recognition And Vision Library 
// Copyright (C) 2001, University of Surrey
// This code may be redistributed under the terms of the GNU Lesser
// General Public License (LGPL). See the lgpl.licence file for details or
// see http://www.gnu.org/copyleft/lesser.html
// file-header-ends-here
//! rcsid="$Id: exHash.cc,v 1.2 2002/01/31 14:55:29 craftit Exp $"
//! lib=RavlCore
//! file="Ravl/Core/Container/Hash/exHash.cc"

#include "Ravl/Hash.hh"
#include "Ravl/HashIter.hh"

using namespace RavlN;

int main() {

  HashC<int,char *> hashTable;

  hashTable[2] = "a 2.";
  hashTable[3] = "a 3.";
  hashTable[10] = "a 10.";
  
  cout << "Lookup of 3 gives " << hashTable[3] << "\n";
  
  for(HashIterC<int,char *> it(hashTable);it;it++)
    cout << " Key=" << it.Key() << " Data=" << it.Data() << "\n";
  
  return 0;
}

Documentation by CxxDoc: Tue Aug 13 09:59:56 2002