TalanSoft Toolkits  201707
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Groups Pages
Public Member Functions | Public Attributes | List of all members
sReadBufferFromFile Struct Reference

Detailed Description

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
 

Constructor & Destructor Documentation

sReadBufferFromFile ( iFile apFile,
tSize  anSize 
)

Member Function Documentation

const tPtr begin ( ) const
const tSize size ( ) const
const tSize readSize ( ) const
const tBool readAll ( ) const

Member Data Documentation

tPtr _ownedMemory
tPtr _memory
tSize _size
tSize _readSize