summaryrefslogtreecommitdiff
path: root/tests/Hash_Map_Manager_Test.h
blob: 5be8cb975c14b7226700ab837e9d880d2bd1de19 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
/* -*- C++ -*- */
// $Id$

// ============================================================================
// = FILENAME
//    Hash_Map_Manager_Test.h
//
// = DESCRIPTION
//    This file contains the definition of Dumb_String.  Some compilers
//    need it in a .h file for template instantiation (such as AIX C Set ++)
//
// = AUTHOR
//    James Hu, Steve Huston
//
// ============================================================================

#ifndef HASH_MAP_MANAGER_TEST_H
#define HASH_MAP_MANAGER_TEST_H

class Dumb_String
{
  // = DESCRIPTION
  //     Desperate times call for desperate measures.  Bug your
  //     compiler vendor to support template specialization.
public:
  Dumb_String (char *s = 0);
  // Default constructor

  Dumb_String (const Dumb_String &ds);
  // Copy constructor

  ~Dumb_String (void);
  // Default destructor

  u_long hash (void) const;
  // To satisfy Hash_Map_Manager

  int operator== (const Dumb_String &ds) const;
  // To satisfy Hash_Map_Manager

  char *operator= (const Dumb_String &ds);
  // To satisfy Hash_Map_Manager

  int operator== (char const * s) const;
  operator char * (void) const;
  // These make life a little easier

private:
  char *s_;
  // The string.

  int &copy_;
  // Reference counter.

  int junk_;
  // default reference counter initializer.
};

#endif /* HASH_MAP_MANAGER_TEST_H */