/*****************************************************************************
 * $Source: /expand6/cvsroot/charm/src/Common/ck-core/debug-object.h,v $
 * $Author: milind $
 * $Date: 2000/03/02 11:36:06 $
 * $Revision: 2.4 $
 *****************************************************************************/

#ifndef _OBJECTDATA_H
#define _OBJECTDATA_H

#include "charm++.h"

#if CMK_DEBUG_MODE

#define PRIME 17  // prime number for hash table

extern char* getObjectList(void);
extern char* getObjectContents(void);

extern "C" void  CpdInitializeObjectTable(void);

struct HashTableElement {
  Chare* charePtr;
  int chareIndex;
  HashTableElement *next;
};

class HashTable{
 public:
  HashTable();
  ~HashTable();
  void putObject(Chare* charePtr);
  void removeObject(Chare* charePtr);
  char* getObjectList(void);
  char* getObjectContents(int chareIndex);
 private:
  HashTableElement *array[PRIME];
};

#endif
#endif
