ArchiveFile.cpp File Reference
Go to the source code of this file.
Defines | |
| #define | READMACRO() |
Define Documentation
| #define READMACRO | ( | ) |
Value:
/* Calculate the total number of bytes to be read */ \ int totalSize=sizeof(*value)*count; \ /* Make sure we're not trying to read more bytes than there is */ \ if (position_+totalSize>size_) \ { \ count=(size_-position_)/sizeof(*value); \ totalSize=sizeof(*value)*count; \ } \ /* Read the actual data */ \ if (buffer_) \ { \ buffer_->SetPosition(offset_+position_); \ buffer_->Read(value,count); \ } \ if (file_) \ { \ file_->SetPosition(offset_+position_); \ file_->Read(value,count); \ } \ /* Update the current position */ \ position_+=totalSize; \ /* Return the number of elements written */ \ return count; \
Definition at line 140 of file ArchiveFile.cpp.
Reproduction/republishing of any material on this site without permission is strictly prohibited.
