SubBlock.hh (7454:3a3e8e8cce1b) SubBlock.hh (9208:2451e60d4555)
1/*
2 * Copyright (c) 1999-2008 Mark D. Hill and David A. Wood
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

--- 34 unchanged lines hidden (view full) ---

43 SubBlock(const Address& addr, int size);
44 ~SubBlock() { }
45
46 const Address& getAddress() const { return m_address; }
47 void setAddress(const Address& addr) { m_address = addr; }
48
49 int getSize() const { return m_data.size(); }
50 void resize(int size) { m_data.resize(size); }
1/*
2 * Copyright (c) 1999-2008 Mark D. Hill and David A. Wood
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

--- 34 unchanged lines hidden (view full) ---

43 SubBlock(const Address& addr, int size);
44 ~SubBlock() { }
45
46 const Address& getAddress() const { return m_address; }
47 void setAddress(const Address& addr) { m_address = addr; }
48
49 int getSize() const { return m_data.size(); }
50 void resize(int size) { m_data.resize(size); }
51 uint8 getByte(int offset) const { return m_data[offset]; }
52 void setByte(int offset, uint8 data) { m_data[offset] = data; }
51 uint8_t getByte(int offset) const { return m_data[offset]; }
52 void setByte(int offset, uint8_t data) { m_data[offset] = data; }
53
54 // Shorthands
53
54 // Shorthands
55 uint8 readByte() const { return getByte(0); }
56 void writeByte(uint8 data) { setByte(0, data); }
55 uint8_t readByte() const { return getByte(0); }
56 void writeByte(uint8_t data) { setByte(0, data); }
57
58 // Merging to and from DataBlocks - We only need to worry about
59 // updates when we are using DataBlocks
60 void mergeTo(DataBlock& data) const { internalMergeTo(data); }
61 void mergeFrom(const DataBlock& data) { internalMergeFrom(data); }
62
63 void print(std::ostream& out) const;
64

--- 18 unchanged lines hidden ---
57
58 // Merging to and from DataBlocks - We only need to worry about
59 // updates when we are using DataBlocks
60 void mergeTo(DataBlock& data) const { internalMergeTo(data); }
61 void mergeFrom(const DataBlock& data) { internalMergeFrom(data); }
62
63 void print(std::ostream& out) const;
64

--- 18 unchanged lines hidden ---