DataBlock.hh (6355:79464d8a4d2f) DataBlock.hh (6367:c4e91b8e3da3)
1
2/*
3 * Copyright (c) 1999-2008 Mark D. Hill and David A. Wood
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are
8 * met: redistributions of source code must retain the above copyright

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

103 return !memcmp(m_data, obj.m_data, RubySystem::getBlockSizeBytes());
104}
105
106inline
107void DataBlock::print(ostream& out) const
108{
109 int size = RubySystem::getBlockSizeBytes();
110 out << "[ ";
1
2/*
3 * Copyright (c) 1999-2008 Mark D. Hill and David A. Wood
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are
8 * met: redistributions of source code must retain the above copyright

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

103 return !memcmp(m_data, obj.m_data, RubySystem::getBlockSizeBytes());
104}
105
106inline
107void DataBlock::print(ostream& out) const
108{
109 int size = RubySystem::getBlockSizeBytes();
110 out << "[ ";
111 for (int i = 0; i < size; i+=4) {
112 out << hex << *((uint32*)(&(m_data[i]))) << " ";
111 for (int i = 0; i < size; i++) {
112 out << setw(2) << setfill('0') << hex << "0x" << (int)m_data[i] << " ";
113 }
114 out << dec << "]" << flush;
115}
116
117inline
118uint8 DataBlock::getByte(int whichByte) const
119{
120 return m_data[whichByte];

--- 46 unchanged lines hidden ---
113 }
114 out << dec << "]" << flush;
115}
116
117inline
118uint8 DataBlock::getByte(int whichByte) const
119{
120 return m_data[whichByte];

--- 46 unchanged lines hidden ---