openMSX
Main Page
Namespaces
Classes
Files
File List
File Members
memory
Ram.hh
Go to the documentation of this file.
1
#ifndef RAM_HH
2
#define RAM_HH
3
4
#include "
MemBuffer.hh
"
5
#include "
openmsx.hh
"
6
#include "
noncopyable.hh
"
7
#include <string>
8
#include <memory>
9
10
namespace
openmsx {
11
12
class
XMLElement
;
13
class
DeviceConfig;
14
class
RamDebuggable;
15
16
class
Ram
:
private
noncopyable
17
{
18
public
:
20
Ram
(
const
DeviceConfig
& config,
const
std::string& name,
21
const
std::string& description,
unsigned
size
);
22
24
Ram
(
const
DeviceConfig
& config,
unsigned
size);
25
26
~Ram
();
27
28
const
byte
&
operator[]
(
unsigned
addr)
const
{
29
return
ram[addr];
30
}
31
byte
&
operator[]
(
unsigned
addr) {
32
return
ram[addr];
33
}
34
unsigned
getSize
()
const
{
35
return
unsigned(ram.
size
());
36
}
37
38
const
std::string&
getName
()
const
;
39
void
clear
(
byte
c = 0xff);
40
41
template
<
typename
Archive>
42
void
serialize
(Archive& ar,
unsigned
version);
43
44
private
:
45
const
XMLElement
& xml;
46
MemBuffer<byte>
ram;
47
const
std::unique_ptr<RamDebuggable> debuggable;
48
};
49
50
}
// namespace openmsx
51
52
#endif
Generated on Mon May 20 2013 12:16:59 for openMSX by
1.8.1.2