Bitstream Interpretation Library (BIL)  0.1
Register.cpp
Go to the documentation of this file.
1 
8 
9 using namespace bil;
10 
11 
12 Register::Register(RegisterAddress::address_t address, const std::string& name, bool writable, bool readable):
13  m_name(name),
14  m_address(address),
15  m_writable(writable),
16  m_readable(readable)
17 {
18 
19 }
20 
21 
23 {
24 
25 }
26 
27 
29 {
30  return m_address;
31 }
32 
33 
34 const std::string& Register::name() const
35 {
36  return m_name;
37 }
38 
39 
40 bool Register::writable() const
41 {
42  return m_writable;
43 }
44 
45 
46 bool Register::readable() const
47 {
48  return m_readable;
49 }
50 
51 
52 void Register::write(const boost::uint32_t*, size_t)
53 {
54  if (!m_writable) throw Exception();
55 }
56 
57 
58 void Register::read(boost::uint32_t*, size_t) const
59 {
60  if (!m_readable) throw Exception();
61 }