Provides a buffer which directly access the file's memory if its a memory file, otherwise read to a temporary memory buffer.
Example usage: sReadBufferFromFile buffer(apFile, anSize); if (!ReadBufferAndDoSomethingWithIt(buffer.begin(),buffer.size())) { return eFalse; }
Public Member Functions | |
| sReadBufferFromFile (iFile *apFile, tSize anSize) | |
| ~sReadBufferFromFile () | |
| const tPtr | begin () const |
| const tSize | size () const |
| const tSize | readSize () const |
| const tBool | readAll () const |
Public Attributes | |
| tPtr | _ownedMemory |
| tPtr | _memory |
| tSize | _size |
| tSize | _readSize |
| sReadBufferFromFile | ( | iFile * | apFile, |
| tSize | anSize | ||
| ) |
| ~sReadBufferFromFile | ( | ) |
| const tPtr begin | ( | ) | const |
| const tSize size | ( | ) | const |
| const tSize readSize | ( | ) | const |
| const tBool readAll | ( | ) | const |
| tPtr _ownedMemory |
| tPtr _memory |
| tSize _size |
| tSize _readSize |
1.8.7