// $Id: Ram.hh 6142 2007-03-05 10:25:14Z m9710797 $ #ifndef RAM_HH #define RAM_HH #include "openmsx.hh" #include "noncopyable.hh" #include #include #include namespace openmsx { class MSXMotherBoard; class RamDebuggable; class Ram : private noncopyable { public: Ram(MSXMotherBoard& motherBoard, const std::string& name, const std::string& description, unsigned size); virtual ~Ram(); const byte& operator[](unsigned addr) const { assert(addr < size); return ram[addr]; } byte& operator[](unsigned addr) { assert(addr < size); return ram[addr]; } unsigned getSize() const { return size; } const std::string& getName() const; void clear(); private: unsigned size; byte* ram; const std::auto_ptr debuggable; }; } // namespace openmsx #endif