Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members

/users/u3/mtikir/PMaCInstrumentor_v1601/src/Iterator.C

Go to the documentation of this file.
00001 #include <Base.h>
00002 #include <Iterator.h>
00003 
00004 uint64_t AddressIterator::operator++(){ 
00005     currAddress += (unitSize() - (currAddress % unitSize())); 
00006     return currAddress; 
00007 }
00008 uint64_t AddressIterator::operator--(){ 
00009     currAddress -= (currAddress % unitSize() ? currAddress % unitSize() : unitSize());
00010     return currAddress; 
00011 }
00012 uint64_t AddressIterator::operator++(int n) { 
00013     uint64_t ret = currAddress; 
00014     operator++();
00015     return ret; 
00016 }
00017 uint64_t AddressIterator::operator--(int n) { 
00018     uint64_t ret = currAddress; 
00019     operator--();
00020     return ret; 
00021 }
00022 uint64_t AddressIterator::readBytes(char* ptr){ 
00023     uint64_t ret = 0;
00024     if(unitSize() == sizeof(uint32_t)){
00025         uint32_t buff = 0;
00026         memcpy(&buff,ptr,sizeof(uint32_t));
00027         ret = buff;
00028     } else if(unitSize() == sizeof(uint64_t)){
00029         memcpy(&ret,ptr,sizeof(uint64_t));
00030     }
00031     return ret;
00032 }

Generated on Mon Jan 28 11:08:32 2008 for PMaCInstrumentor by doxygen 1.3.5