File interface.
Base | |
| virtual iFileBase * | GetFileBase () const =0 |
| Get the file base. {Property}. More... | |
| virtual const achar * | GetSourcePath () const =0 |
| Get the path from where this file has been opened. More... | |
| virtual tBool | Seek (tI64 offset)=0 |
| Moves the file pointer from the current position. More... | |
| virtual tBool | SeekSet (tI64 offset)=0 |
| Set the file pointer position from the begining of the file. More... | |
| virtual tSize | ReadRaw (void *pOut, tSize nSize)=0 |
| Read data from the file. More... | |
| virtual tSize | WriteRaw (const void *pIn, tSize nSize)=0 |
| Write data in the file. More... | |
| virtual tI64 | Tell ()=0 |
| Tell the current cursor position in the file in bytes. More... | |
| virtual tI64 | GetSize () const =0 |
| Get the size of the file. More... | |
| virtual tBool | SeekEnd (tI64 offset)=0 |
| Moves the file pointer from the end of the file. More... | |
| virtual tBool | Flush ()=0 |
| Flush the file content. More... | |
| virtual tBool | GetTime (eFileTime aFileTime, iTime *apTime) const =0 |
| Get the file time. More... | |
| virtual tBool | SetTime (eFileTime aFileTime, const iTime *apTime)=0 |
| Set the file time. More... | |
| virtual tBool | Resize (tI64 newSize)=0 |
| Resize the file. More... | |
| virtual tPtr | GetBase () const =0 |
| Get the base pointer. More... | |
| virtual tPtr | GetHere () const =0 |
| Get the here/current position pointer. More... | |
| virtual tPtr | GetStop () const =0 |
| Get the stop/end pointer. More... | |
| virtual tBool | SetMemPtr (tPtr apMem, tSize anSize, tBool abFree, tBool abKeepHere)=0 |
| Set the memory buffer to use with this file. More... | |
| virtual void | Reset ()=0 |
| Reset the file. Put it at the begining, and set the memory size to 0 if it's a dynamic memory file. More... | |
| virtual tI64 | WriteFile (iFileBase *apFile, tI64 anSize=0)=0 |
| Write another file in this file. More... | |
Flags | |
| virtual tFileFlags | GetFileFlags () const =0 |
| Get the file flags. {Property}. More... | |
| virtual tBool | GetCanRead () const =0 |
| Check whether file can be read. {Property}. More... | |
| virtual tBool | GetCanWrite () const =0 |
| Check whether File can be written. {Property}. More... | |
| virtual tBool | GetCanSeek () const =0 |
| Check whether the file supports seeking. {Property}. More... | |
| virtual tBool | GetPartialRead () const =0 |
| Check whether the previous read operation could not read all bytes. {Property}. More... | |
| virtual tBool | GetPartialWrite () const =0 |
| Check whether the previous write operation could not write all bytes to the file. More... | |
| virtual tBool | GetIsEncoder () const =0 |
| Check whether the file is an encoder/decoder. {Property}. More... | |
| virtual tBool | GetIsDummy () const =0 |
| Check whether the file is a dummy. {Property}. More... | |
| virtual tBool | GetIsMemory () const =0 |
| Check if the file is a memory file (implements iFileMemory). {Property}. More... | |
| virtual tBool | GetIsStream () const =0 |
| Check whether the file is a stream. {Property}. More... | |
Reading functions. | |
| virtual tF32 | ReadF32 ()=0 |
| Read a 32 bits float and move the file pointer forward of 4 bytes. More... | |
| virtual tF64 | ReadF64 ()=0 |
| Read a 64 bits float and move the file pointer forward of 8 bytes. More... | |
| virtual tU8 | Read8 ()=0 |
| Read a single byte (8 bits integer) and move the file pointer forward of 1 byte. More... | |
| virtual tU16 | ReadLE16 ()=0 |
| Read a 16 bits little endian interger and move the file pointer forward of 2 bytes. More... | |
| virtual tU16 | ReadBE16 ()=0 |
| Read a 16 bits big endian interger and move the file pointer forward of 2 bytes. More... | |
| virtual tU32 | ReadLE32 ()=0 |
| Read a 32 bits little endian interger and move the file pointer forward of 4 bytes. More... | |
| virtual tU32 | ReadBE32 ()=0 |
| Read a 32 bits big endian interger and move the file pointer forward of 4 bytes. More... | |
| virtual tU64 | ReadLE64 ()=0 |
| Read a 64 bits little endian interger and move the file pointer forward of 8 bytes. More... | |
| virtual tU64 | ReadBE64 ()=0 |
| Read a 64 bits big endian interger and move the file pointer forward of 8 bytes. More... | |
| virtual tSize | ReadF32Array (tF32 *apOut, tSize anNumElements)=0 |
| Read a 32 bits float array and move the file pointer forward of 4 bytes * anNumElements. More... | |
| virtual tSize | ReadF64Array (tF64 *apOut, tSize anNumElements)=0 |
| Read a 64 bits float array and move the file pointer forward of 8 bytes * anNumElements. More... | |
| virtual tSize | ReadLE16Array (tU16 *apOut, tSize anNumElements)=0 |
| Read a 16 bits little endian interger array and move the file pointer forward of 2 bytes * anNumElements. More... | |
| virtual tSize | ReadBE16Array (tU16 *apOut, tSize anNumElements)=0 |
| Read a 16 bits big endian interger array and move the file pointer forward of 2 bytes * anNumElements. More... | |
| virtual tSize | ReadLE32Array (tU32 *apOut, tSize anNumElements)=0 |
| Read a 32 bits little endian interger array and move the file pointer forward of 4 bytes * anNumElements. More... | |
| virtual tSize | ReadBE32Array (tU32 *apOut, tSize anNumElements)=0 |
| Read a 32 bits big endian interger array and move the file pointer forward of 4 bytes * anNumElements. More... | |
| virtual tSize | ReadLE64Array (tU64 *apOut, tSize anNumElements)=0 |
| Read a 64 bits little endian interger array and move the file pointer forward of 8 bytes * anNumElements. More... | |
| virtual tSize | ReadBE64Array (tU64 *apOut, tSize anNumElements)=0 |
| Read a 64 bits big endian interger array and move the file pointer forward of 8 bytes * anNumElements. More... | |
Writting functions. | |
| virtual tSize | WriteF32 (tF32 v)=0 |
| Write a 32 bits float and move the file pointer forward of 4 bytes. More... | |
| virtual tSize | WriteF64 (tF64 v)=0 |
| Write a 64 bits float and move the file pointer forward of 8 bytes. More... | |
| virtual tSize | Write8 (tU8 v)=0 |
| Write a single byte (8 bits integer) and move the file pointer forward of one byte. More... | |
| virtual tSize | WriteLE16 (tU16 v)=0 |
| Write a little endian 16 bits integer and move the file pointer forward of 2 bytes. More... | |
| virtual tSize | WriteBE16 (tU16 v)=0 |
| Write a big endian 16 bits integer and move the file pointer forward of 2 bytes. More... | |
| virtual tSize | WriteLE32 (tU32 v)=0 |
| Write a little endian 32 bits integer and move the file pointer forward of 4 bytes. More... | |
| virtual tSize | WriteBE32 (tU32 v)=0 |
| Write a big endian 32 bits integer and move the file pointer forward of 4 bytes. More... | |
| virtual tSize | WriteLE64 (tU64 v)=0 |
| Write a little endian 64 bits integer and move the file pointer forward of 8 bytes. More... | |
| virtual tSize | WriteBE64 (tU64 v)=0 |
| Write a big endian 64 bits integer and move the file pointer forward of 8 bytes. More... | |
| virtual tSize | WriteF32Array (const tF32 *apIn, tU32 anNumElements)=0 |
| Write a 32 bits float array and move the file pointer forward of 4 bytes * anNumElements. More... | |
| virtual tSize | WriteF64Array (const tF64 *apIn, tU32 anNumElements)=0 |
| Write a 64 bits float and move the file pointer forward of 8 bytes * anNumElements. More... | |
| virtual tSize | WriteLE16Array (const tU16 *apIn, tU32 anNumElements)=0 |
| Write a little endian 16 bits integer and move the file pointer forward of 2 bytes * anNumElements. More... | |
| virtual tSize | WriteBE16Array (const tU16 *apIn, tU32 anNumElements)=0 |
| Write a big endian 16 bits integer and move the file pointer forward of 2 bytes * anNumElements. More... | |
| virtual tSize | WriteLE32Array (const tU32 *apIn, tU32 anNumElements)=0 |
| Write a little endian 32 bits integer and move the file pointer forward of 4 bytes * anNumElements. More... | |
| virtual tSize | WriteBE32Array (const tU32 *apIn, tU32 anNumElements)=0 |
| Write a big endian 32 bits integer and move the file pointer forward of 4 bytes * anNumElements. More... | |
| virtual tSize | WriteLE64Array (const tU64 *apIn, tU32 anNumElements)=0 |
| Write a little endian 64 bits integer and move the file pointer forward of 8 bytes * anNumElements. More... | |
| virtual tSize | WriteBE64Array (const tU64 *apIn, tU32 anNumElements)=0 |
| Write a big endian 64 bits integer and move the file pointer forward of 8 bytes * anNumElements. More... | |
Text | |
| virtual eTextEncodingFormat | GetTextEncodingFormat ()=0 |
| Get the text encoding format. More... | |
| virtual void | SetTextEncodingFormat (eTextEncodingFormat aFormat)=0 |
| Set the text encoding format. More... | |
| virtual tBool | BeginTextFileRead (tBool abSeekSetZero=eTrue)=0 |
| Read text file header. More... | |
| virtual tBool | BeginTextFileWrite (eTextEncodingFormat aFormat=eTextEncodingFormat_UTF8, tBool abSeekSetZero=eTrue)=0 |
| Write text file header. More... | |
| virtual cString | ReadString ()=0 |
| Read a string. More... | |
| virtual cString | ReadStringLine ()=0 |
| Read a string line. More... | |
| virtual tSize | WriteString (const achar *aaszString)=0 |
| Write a string. More... | |
| virtual tSize | WriteStringZ (const achar *aaszString)=0 |
| Write a string with a end zero. More... | |
| virtual tU32 | ReadChar ()=0 |
| Read a character with the current encoding. More... | |
| virtual tSize | WriteChar (tU32 anChar)=0 |
| Write a character with the current encoding. More... | |
| virtual cString | ReadStringEx (eTextEncodingFormat aFmt)=0 |
| Read a string. More... | |
| virtual cString | ReadStringLineEx (eTextEncodingFormat aFmt)=0 |
| Read a string line. More... | |
| virtual tSize | WriteStringEx (eTextEncodingFormat aFmt, const achar *aaszString)=0 |
| Write a string. More... | |
| virtual tSize | WriteStringZEx (eTextEncodingFormat aFmt, const achar *aaszString)=0 |
| Write a string with a end zero. More... | |
| virtual tU32 | ReadCharEx (eTextEncodingFormat aFmt)=0 |
| Read a character with the current encoding. More... | |
| virtual tSize | WriteCharEx (eTextEncodingFormat aFmt, tU32 anChar)=0 |
| Write a character with the current encoding. More... | |
Bit stream | |
| virtual void | BeginWriteBits ()=0 |
| virtual tSize | EndWriteBits ()=0 |
| virtual tBool | IsWriteBitsBegan ()=0 |
| virtual void | WriteBit (tBool abBit)=0 |
| virtual void | WriteBits (tPtr apData, tU32 anBits, tBool abInvertBytesOrder)=0 |
| virtual void | WriteBits8 (tU8 anData, tU32 anBits)=0 |
| virtual void | WriteBits16 (tU16 anData, tU32 anBits)=0 |
| virtual void | WriteBits32 (tU32 anData, tU32 anBits)=0 |
| virtual void | WriteBits64 (tU64 anData, tU32 anBits)=0 |
| virtual void | BeginReadBits ()=0 |
| virtual tSize | EndReadBits ()=0 |
| virtual tBool | IsReadBitsBegan ()=0 |
| virtual tBool | ReadBit ()=0 |
| virtual void | ReadBits (tPtr apData, tU32 anBits, tBool abInvertBytesOrder)=0 |
| virtual tU8 | ReadBitsU8 (tU32 anBits)=0 |
| virtual tU16 | ReadBitsU16 (tU32 anBits)=0 |
| virtual tU32 | ReadBitsU32 (tU32 anBits)=0 |
| virtual tU64 | ReadBitsU64 (tU32 anBits)=0 |
| virtual tI8 | ReadBitsI8 (tU32 anBits)=0 |
| virtual tI16 | ReadBitsI16 (tU32 anBits)=0 |
| virtual tI32 | ReadBitsI32 (tU32 anBits)=0 |
| virtual tI64 | ReadBitsI64 (tU32 anBits)=0 |
| virtual tU32 | GetMinNumBitsU32 (tU32 anNumber)=0 |
| virtual tU32 | GetMinNumBitsI32 (tI32 anNumber)=0 |
| virtual tU32 | GetMinNumBitsU64 (tU64 anNumber)=0 |
| virtual tU32 | GetMinNumBitsI64 (tI64 anNumber)=0 |
| virtual void | WriteBitsPackedU64 (tU64 anNumber)=0 |
| virtual void | WriteBitsPackedU48 (tU64 anNumber)=0 |
| virtual void | WriteBitsPackedU32 (tU32 anNumber)=0 |
| virtual void | WriteBitsPackedU24 (tU32 anNumber)=0 |
| virtual void | WriteBitsPackedU16 (tU16 anNumber)=0 |
| virtual void | WriteBitsPackedU8 (tU8 anNumber)=0 |
| virtual tU64 | ReadBitsPackedU64 ()=0 |
| virtual tU64 | ReadBitsPackedU48 ()=0 |
| virtual tU32 | ReadBitsPackedU32 ()=0 |
| virtual tU32 | ReadBitsPackedU24 ()=0 |
| virtual tU16 | ReadBitsPackedU16 ()=0 |
| virtual tU8 | ReadBitsPackedU8 ()=0 |
| virtual void | WriteBitsPackedI64 (tI64 anNumber)=0 |
| virtual void | WriteBitsPackedI48 (tI64 anNumber)=0 |
| virtual void | WriteBitsPackedI32 (tI32 anNumber)=0 |
| virtual void | WriteBitsPackedI24 (tI32 anNumber)=0 |
| virtual void | WriteBitsPackedI16 (tI16 anNumber)=0 |
| virtual void | WriteBitsPackedI8 (tI8 anNumber)=0 |
| virtual tI64 | ReadBitsPackedI64 ()=0 |
| virtual tI64 | ReadBitsPackedI48 ()=0 |
| virtual tI32 | ReadBitsPackedI32 ()=0 |
| virtual tI32 | ReadBitsPackedI24 ()=0 |
| virtual tI16 | ReadBitsPackedI16 ()=0 |
| virtual tI8 | ReadBitsPackedI8 ()=0 |
| virtual cString | ReadBitsString ()=0 |
| virtual tSize | WriteBitsString (const achar *aaszIn)=0 |
Variant | |
| virtual tBool | WriteVar (const Var &aVar)=0 |
| Write a variant. More... | |
| virtual Var | ReadVar ()=0 |
| Read a variant. More... | |
| virtual tBool | ReadVarEx (Var &aVar)=0 |
| Read a variant. {NoAutomation}. More... | |
| virtual tBool | WriteBitsPackedVar (const Var &aVar)=0 |
| Write a variant. More... | |
| virtual Var | ReadBitsPackedVar ()=0 |
| Read a variant. More... | |
| virtual tBool | ReadBitsPackedVarEx (Var &aVar)=0 |
| Read a variant. {NoAutomation}. More... | |
Encoding/Decoding | |
| virtual cString | ReadRawToString (eRawToStringEncoding aFormat, tInt anNumBytes)=0 |
| Reads the specified number of bytes and return them encoded as a string. More... | |
| virtual tInt | WriteRawFromString (eRawToStringEncoding aFormat, const achar *aaszString)=0 |
| Write bytes encoded in a string. More... | |
| virtual ni::cString | ReadQuotedLine ()=0 |
| Reads a line of text that potentially use quotes " and escaped quotes ""
& \" to join a single 'line' with embedded newlines inside. More... | |
Additional Inherited Members | |
Public Member Functions inherited from iUnknown | |
| virtual tBool | IsOK () const =0 |
| Check if the object is valid. More... | |
| virtual tI32 | AddRef ()=0 |
| Signal that one more reference of the object has been created. More... | |
| virtual tI32 | Release ()=0 |
| Release a reference of the object. More... | |
| virtual void | DeleteThis ()=0 |
| Bypass any reference counting and delete this object. More... | |
| virtual void | Invalidate ()=0 |
| Invalidate the object. More... | |
| virtual iUnknown * | QueryInterface (const tUUID &aIID)=0 |
| Query an interface. More... | |
| virtual void | ListInterfaces (iMutableCollection *apLst, tU32 anFlags) const =0 |
| Fill a UUID list containing the UUIDs of the implemented interfaces. More... | |
| virtual tI32 | SetNumRefs (tI32 anNumRefs)=0 |
| Set the reference counter directly. More... | |
| virtual tI32 | GetNumRefs () const =0 |
| Get the number of references to this object. More... | |
|
pure virtual |
Get the file base. {Property}.
|
pure virtual |
Get the path from where this file has been opened.
Moves the file pointer from the current position.
| offset | is the number of bytes to add to the current position. |
Set the file pointer position from the begining of the file.
| offset | is the position, in bytes, from the begining of the file. |
Read data from the file.
| pOut | is the buffer where the data will be copied. |
| nSize | is the number of bytes to read from the file. |
Write data in the file.
| pIn | is the source buffer which contain the data to write. |
| nSize | is the number of bytes to write in the file. Usually the size of the pIn buffer. |
|
pure virtual |
Tell the current cursor position in the file in bytes.
|
pure virtual |
Get the size of the file.
Moves the file pointer from the end of the file.
| offset | is the number of bytes to move from the end of the file. By example if you pass 4, the cursor will be passed four bytes before the end of the file. |
|
pure virtual |
Flush the file content.
Get the file time.
Set the file time.
Resize the file.
|
pure virtual |
Get the base pointer.
|
pure virtual |
Get the here/current position pointer.
|
pure virtual |
Get the stop/end pointer.
Set the memory buffer to use with this file.
|
pure virtual |
Reset the file. Put it at the begining, and set the memory size to 0 if it's a dynamic memory file.
Write another file in this file.
|
pure virtual |
Get the file flags. {Property}.
|
pure virtual |
Check whether file can be read. {Property}.
|
pure virtual |
Check whether File can be written. {Property}.
|
pure virtual |
Check whether the file supports seeking. {Property}.
|
pure virtual |
Check whether the previous read operation could not read all bytes. {Property}.
|
pure virtual |
Check whether the previous write operation could not write all bytes to the file.
|
pure virtual |
Check whether the file is an encoder/decoder. {Property}.
|
pure virtual |
Check whether the file is a dummy. {Property}.
|
pure virtual |
Check if the file is a memory file (implements iFileMemory). {Property}.
|
pure virtual |
Check whether the file is a stream. {Property}.
|
pure virtual |
Read a 32 bits float and move the file pointer forward of 4 bytes.
|
pure virtual |
Read a 64 bits float and move the file pointer forward of 8 bytes.
|
pure virtual |
Read a single byte (8 bits integer) and move the file pointer forward of 1 byte.
|
pure virtual |
Read a 16 bits little endian interger and move the file pointer forward of 2 bytes.
|
pure virtual |
Read a 16 bits big endian interger and move the file pointer forward of 2 bytes.
|
pure virtual |
Read a 32 bits little endian interger and move the file pointer forward of 4 bytes.
|
pure virtual |
Read a 32 bits big endian interger and move the file pointer forward of 4 bytes.
|
pure virtual |
Read a 64 bits little endian interger and move the file pointer forward of 8 bytes.
|
pure virtual |
Read a 64 bits big endian interger and move the file pointer forward of 8 bytes.
Read a 32 bits float array and move the file pointer forward of 4 bytes * anNumElements.
Read a 64 bits float array and move the file pointer forward of 8 bytes * anNumElements.
Read a 16 bits little endian interger array and move the file pointer forward of 2 bytes * anNumElements.
Read a 16 bits big endian interger array and move the file pointer forward of 2 bytes * anNumElements.
Read a 32 bits little endian interger array and move the file pointer forward of 4 bytes * anNumElements.
Read a 32 bits big endian interger array and move the file pointer forward of 4 bytes * anNumElements.
Read a 64 bits little endian interger array and move the file pointer forward of 8 bytes * anNumElements.
Read a 64 bits big endian interger array and move the file pointer forward of 8 bytes * anNumElements.
Write a 32 bits float and move the file pointer forward of 4 bytes.
| v | is the 32 bits float to write. |
Write a 64 bits float and move the file pointer forward of 8 bytes.
| v | is the 64 bits float to write. |
Write a single byte (8 bits integer) and move the file pointer forward of one byte.
| v | is the byte to write. |
Write a little endian 16 bits integer and move the file pointer forward of 2 bytes.
| v | is the little endian 16 bits integer to write. |
Write a big endian 16 bits integer and move the file pointer forward of 2 bytes.
| v | is the big endian 16 bits integer to write. |
Write a little endian 32 bits integer and move the file pointer forward of 4 bytes.
| v | is the little endian 32 bits integer to write. |
Write a big endian 32 bits integer and move the file pointer forward of 4 bytes.
| v | is the big endian 32 bits integer to write. |
Write a little endian 64 bits integer and move the file pointer forward of 8 bytes.
| v | is the little endian 64 bits integer to write. |
Write a big endian 64 bits integer and move the file pointer forward of 8 bytes.
| v | is the big endian 64 bits integer to write. |
Write a 32 bits float array and move the file pointer forward of 4 bytes * anNumElements.
Write a 64 bits float and move the file pointer forward of 8 bytes * anNumElements.
Write a little endian 16 bits integer and move the file pointer forward of 2 bytes * anNumElements.
Write a big endian 16 bits integer and move the file pointer forward of 2 bytes * anNumElements.
Write a little endian 32 bits integer and move the file pointer forward of 4 bytes * anNumElements.
Write a big endian 32 bits integer and move the file pointer forward of 4 bytes * anNumElements.
Write a little endian 64 bits integer and move the file pointer forward of 8 bytes * anNumElements.
Write a big endian 64 bits integer and move the file pointer forward of 8 bytes * anNumElements.
|
pure virtual |
Get the text encoding format.
|
pure virtual |
Set the text encoding format.
|
pure virtual |
Write text file header.
|
pure virtual |
Read a string.
|
pure virtual |
Read a string line.
|
pure virtual |
Read a character with the current encoding.
|
pure virtual |
Read a string.
|
pure virtual |
Read a string line.
|
pure virtual |
Write a string.
|
pure virtual |
Write a string with a end zero.
|
pure virtual |
Read a character with the current encoding.
|
pure virtual |
Write a character with the current encoding.
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
Read a variant.
|
pure virtual |
Read a variant.
|
pure virtual |
Reads the specified number of bytes and return them encoded as a string.
|
pure virtual |
Write bytes encoded in a string.
|
pure virtual |
Reads a line of text that potentially use quotes " and escaped quotes "" & \" to join a single 'line' with embedded newlines inside.
1.8.7