// This may look like C code, but it is really -*- C++ -*-
//
//  ${project}  --  Copyright (c) University of Aizu 1994
//
//

// Wrappers protect against including this file more than once

#ifndef SpacePtr_h
#define SpacePtr_h 1

#include <Space.h>
#include <Game.h>
#include <Pointer.h>
#include <SpaceLoop.h>

//  >>> Insert interface definitions here
class SpacePtr : public Pointer {
public:
  SpacePtr(char* key = 0) : Pointer(*(theGame->spaces), key) {}

  // Assignment and Comparison. Note the C++ bureaucracy required to "upgrade"
  // Pointer to SpacePtr.... I exceptionally put the code here so that you can see it.
  int operator==(const SpacePtr& spacep) const 
  {return Pointer::operator==((Pointer&)spacep); }
  SpacePtr& operator=(const SpacePtr& spacep)
  {return (SpacePtr&)Pointer::operator=((Pointer&)spacep); }

  // wrapper for "(Space*)lookup()"
  Space* operator->() const;

  // IO
  virtual char* classname(void) const;

};

// End of wrapper
#endif
// End of file
