Visualization Library v1.0.3A lightweight C++ OpenGL middleware for 2D/3D graphics |
[Download] [Tutorials] [All Classes] [Grouped Classes] |
An abstract class representing a file. More...
#include <VirtualFile.hpp>
Public Member Functions | |
VirtualFile () | |
Constructor. | |
unsigned int | crc32 () |
Computes the crc32 of the entire file. | |
MD5CheckSum | md5 () |
Computes the md5 of the entire file. | |
virtual bool | open (EOpenMode mode)=0 |
Opens the file in the specified mode. | |
virtual bool | isOpen () const =0 |
Returns true if the file has been opened. | |
virtual bool | exists () const =0 |
Returns true if the file exists. | |
virtual void | close ()=0 |
Closes the file. | |
virtual long long | size () const =0 |
Returns the size of the file in bytes. | |
virtual ref< VirtualFile > | clone () const =0 |
Creates a clone of this class instance. | |
VirtualFile & | operator= (const VirtualFile &other) |
const String & | path () const |
Returns the path of the file. | |
void | setPath (const String &name) |
Changes the path bound to a VirtualFile. Use carefully this function, you shouldn't rename a VirtualFile managed by a VirtualDirectory. | |
long long | peek (void *buffer, long long byte_count) |
Reads byte_count bytes and returns to the original position. | |
long long | read (void *buffer, long long byte_count) |
Reads byte_count bytes from a file. Returns the number of bytes actually read. | |
long long | write (const void *buffer, long long byte_count) |
Writes byte_count bytes to a file. Returns the number of bytes actually written. | |
long long | position () const |
Returns the current position in the file. | |
bool | seekSet (long long offset) |
Changes the current read/write position of a file. | |
bool | seekCur (long long offset) |
Changes the current read/write position of a file. | |
bool | seekEnd (long long offset) |
Changes the current read/write position of a file. | |
bool | endOfFile () const |
Returns true if position() >= size() | |
long long | load (std::vector< char > &data) |
Loads the entire file in the specified vector. | |
long long | load (void *buffer, long long max=-1) |
Loads the entire file in the specified buffer. | |
double | readDouble (bool little_endian_data=true) |
Reads single entry. | |
float | readFloat (bool little_endian_data=true) |
Reads single entry. | |
unsigned long long | readUInt64 (bool little_endian_data=true) |
Reads single entry. | |
long long | readSInt64 (bool little_endian_data=true) |
Reads single entry. | |
unsigned int | readUInt32 (bool little_endian_data=true) |
Reads single entry. | |
int | readSInt32 (bool little_endian_data=true) |
Reads single entry. | |
unsigned short | readUInt16 (bool little_endian_data=true) |
Reads single entry. | |
short | readSInt16 (bool little_endian_data=true) |
Reads single entry. | |
unsigned char | readUInt8 () |
Reads single entry. | |
char | readSInt8 () |
Reads single entry. | |
long long | readDouble (double *buffer, long long count, bool little_endian_data=true) |
Reads multiple entries. Returns the number of bytes read. | |
long long | readFloat (float *buffer, long long count, bool little_endian_data=true) |
Reads multiple entries. Returns the number of bytes read. | |
long long | readUInt64 (unsigned long long *buffer, long long count, bool little_endian_data=true) |
Reads multiple entries. Returns the number of bytes read. | |
long long | readSInt64 (long long *buffer, long long count, bool little_endian_data=true) |
Reads multiple entries. Returns the number of bytes read. | |
long long | readUInt32 (unsigned int *buffer, long long count, bool little_endian_data=true) |
Reads multiple entries. Returns the number of bytes read. | |
long long | readSInt32 (int *buffer, long long count, bool little_endian_data=true) |
Reads multiple entries. Returns the number of bytes read. | |
long long | readUInt16 (unsigned short *buffer, long long count, bool little_endian_data=true) |
Reads multiple entries. Returns the number of bytes read. | |
long long | readSInt16 (short *buffer, long long count, bool little_endian_data=true) |
Reads multiple entries. Returns the number of bytes read. | |
long long | readUInt8 (unsigned char *buffer, long long count) |
Reads multiple entries. Returns the number of bytes read. | |
long long | readSInt8 (char *buffer, long long count) |
Reads multiple entries. Returns the number of bytes read. | |
long long | writeDouble (double data, bool little_endian_data=true) |
Writes a single entry. Returns the number of bytes written. | |
long long | writeFloat (float data, bool little_endian_data=true) |
Writes a single entry. Returns the number of bytes written. | |
long long | writeUInt64 (unsigned long long data, bool little_endian_data=true) |
Writes a single entry. Returns the number of bytes written. | |
long long | writeSInt64 (long long data, bool little_endian_data=true) |
Writes a single entry. Returns the number of bytes written. | |
long long | writeUInt32 (unsigned int data, bool little_endian_data=true) |
Writes a single entry. Returns the number of bytes written. | |
long long | writeSInt32 (int data, bool little_endian_data=true) |
Writes a single entry. Returns the number of bytes written. | |
long long | writeUInt16 (unsigned short data, bool little_endian_data=true) |
Writes a single entry. Returns the number of bytes written. | |
long long | writeSInt16 (short data, bool little_endian_data=true) |
Writes a single entry. Returns the number of bytes written. | |
long long | writeUInt8 (unsigned char data) |
Writes a single entry. Returns the number of bytes written. | |
long long | writeSInt8 (char data) |
Writes a single entry. Returns the number of bytes written. | |
long long | writeDouble (const double *buffer, long long count, bool little_endian_data=true) |
Writes multiple entries. Returns the number of bytes written. | |
long long | writeFloat (const float *buffer, long long count, bool little_endian_data=true) |
Writes multiple entries. Returns the number of bytes written. | |
long long | writeUInt64 (const unsigned long long *buffer, long long count, bool little_endian_data=true) |
Writes multiple entries. Returns the number of bytes written. | |
long long | writeSInt64 (const long long *buffer, long long count, bool little_endian_data=true) |
Writes multiple entries. Returns the number of bytes written. | |
long long | writeUInt32 (const unsigned int *buffer, long long count, bool little_endian_data=true) |
Writes multiple entries. Returns the number of bytes written. | |
long long | writeSInt32 (const int *buffer, long long count, bool little_endian_data=true) |
Writes multiple entries. Returns the number of bytes written. | |
long long | writeUInt16 (const unsigned short *buffer, long long count, bool little_endian_data=true) |
Writes multiple entries. Returns the number of bytes written. | |
long long | writeSInt16 (const short *buffer, long long count, bool little_endian_data=true) |
Writes multiple entries. Returns the number of bytes written. | |
long long | writeUInt8 (const unsigned char *buffer, long long count) |
Writes multiple entries. Returns the number of bytes written. | |
long long | writeSInt8 (const char *buffer, long long count) |
Writes multiple entries. Returns the number of bytes written. | |
Protected Member Functions | |
VirtualFile (const VirtualFile &other) | |
virtual long long | read_Implementation (void *buffer, long long byte_count)=0 |
virtual long long | write_Implementation (const void *buffer, long long byte_count)=0 |
virtual long long | position_Implementation () const =0 |
virtual bool | seekSet_Implementation (long long offset)=0 |
long long | write64 (const void *buffer, long long count, bool little_endian_data=true) |
long long | write32 (const void *buffer, long long count, bool little_endian_data=true) |
long long | write16 (const void *buffer, long long count, bool little_endian_data=true) |
long long | read64 (void *buffer, long long count, bool little_endian_data=true) |
long long | read32 (void *buffer, long long count, bool little_endian_data=true) |
long long | read16 (void *buffer, long long count, bool little_endian_data=true) |
long long | write64 (const void *buffer, bool little_endian_data=true) |
long long | write32 (const void *buffer, bool little_endian_data=true) |
long long | write16 (const void *buffer, bool little_endian_data=true) |
long long | read64 (void *buffer, bool little_endian_data=true) |
long long | read32 (void *buffer, bool little_endian_data=true) |
long long | read16 (void *buffer, bool little_endian_data=true) |
Protected Attributes | |
String | mPath |
An abstract class representing a file.
Definition at line 60 of file VirtualFile.hpp.
vl::VirtualFile::VirtualFile | ( | const VirtualFile & | other ) | [inline, protected] |
Definition at line 65 of file VirtualFile.hpp.
vl::VirtualFile::VirtualFile | ( | ) | [inline] |
Constructor.
Definition at line 69 of file VirtualFile.hpp.
unsigned int VirtualFile::crc32 | ( | ) |
Computes the crc32 of the entire file.
Definition at line 43 of file VirtualFile.cpp.
References close(), vl::CRC32CheckSum::compute(), vl::OM_ReadOnly, and open().
MD5CheckSum VirtualFile::md5 | ( | ) |
Computes the md5 of the entire file.
Definition at line 57 of file VirtualFile.cpp.
References close(), vl::MD5CheckSum::compute(), vl::OM_ReadOnly, and open().
virtual bool vl::VirtualFile::open | ( | EOpenMode | mode ) | [pure virtual] |
Opens the file in the specified mode.
Implemented in vl::DiskFile, vl::GZipCodec, vl::MemoryFile, and vl::ZippedFile.
Referenced by vl::MemoryFile::copy(), crc32(), vl::isBMP(), vl::isDAT(), vl::isDDS(), vl::isDICOM(), vl::isJPG(), vl::isPNG(), vl::isTGA(), vl::isTIFF(), vl::isVLB(), vl::isVLT(), load(), vl::loadBMP(), vl::loadDAT(), vl::loadDDS(), vl::loadDICOM(), vl::loadJPG(), vl::loadMD2(), vl::loadPNG(), vl::loadRAW(), vl::LoadWriterManager::loadResource(), vl::STLLoader::loadSTL(), vl::loadTGA(), vl::loadTIFF(), md5(), vl::VLXParserVLB::parse(), vl::A3DSLoader::parse3DS(), vl::saveDICOM(), vl::saveJPG(), vl::savePNG(), vl::saveTGA(), vl::saveTIFF(), vl::VLXSerializer::saveVLT(), vl::VLXVisitorExportToVLB::setOutputFile(), and vl::GZipCodec::uncompressedSize().
virtual bool vl::VirtualFile::isOpen | ( | ) | const [pure virtual] |
Returns true
if the file has been opened.
Implemented in vl::DiskFile, vl::GZipCodec, vl::MemoryFile, and vl::ZippedFile.
Referenced by vl::MemoryFile::copy(), vl::loadImage(), vl::loadRAW(), and peek().
virtual bool vl::VirtualFile::exists | ( | ) | const [pure virtual] |
Returns true
if the file exists.
Implemented in vl::DiskFile, vl::GZipCodec, vl::MemoryFile, and vl::ZippedFile.
virtual void vl::VirtualFile::close | ( | ) | [pure virtual] |
Closes the file.
Implemented in vl::DiskFile, vl::GZipCodec, vl::MemoryFile, and vl::ZippedFile.
Referenced by vl::ZippedFile::close(), vl::GZipCodec::close(), vl::MemoryFile::copy(), crc32(), vl::isBMP(), vl::isDAT(), vl::isDDS(), vl::isDICOM(), vl::isJPG(), vl::isPNG(), vl::isTGA(), vl::isTIFF(), vl::isVLB(), vl::isVLT(), load(), vl::loadBMP(), vl::loadDAT(), vl::loadDDS(), vl::loadDICOM(), vl::loadImage(), vl::loadJPG(), vl::loadMD2(), vl::loadMOL2(), vl::PlyLoader::loadPly(), vl::loadPNG(), vl::LoadWriterManager::loadResource(), vl::STLLoader::loadSTL(), vl::String::loadText(), vl::loadTGA(), vl::loadTIFF(), vl::VLXSerializer::loadVLB(), vl::VLXSerializer::loadVLT(), md5(), vl::ZippedFile::open(), vl::VLXParserVLB::parse(), vl::A3DSLoader::parse3DS(), vl::saveDICOM(), vl::saveJPG(), vl::savePNG(), vl::saveTGA(), vl::saveTIFF(), vl::VLXSerializer::saveVLB(), vl::VLXSerializer::saveVLT(), vl::VLXVisitorExportToVLB::setOutputFile(), vl::GZipCodec::setStream(), and vl::GZipCodec::uncompressedSize().
virtual long long vl::VirtualFile::size | ( | ) | const [pure virtual] |
Returns the size of the file in bytes.
Implemented in vl::DiskFile, vl::GZipCodec, vl::MemoryFile, and vl::ZippedFile.
Referenced by vl::MemoryFile::copy(), load(), vl::LoadWriterManager::loadResource(), vl::GZipCodec::open(), vl::A3DSLoader::read_3D_EDITOR_CHUNK(), vl::A3DSLoader::read_MATERIAL_BLOCK(), vl::A3DSLoader::read_OBJECT_BLOCK(), vl::A3DSLoader::read_TRIANGULAR_MESH(), vl::A3DSLoader::readColChunk(), vl::A3DSLoader::readMapChunk(), seekEnd(), and seekSet().
virtual ref<VirtualFile> vl::VirtualFile::clone | ( | ) | const [pure virtual] |
Creates a clone of this class instance.
Implemented in vl::DiskFile, vl::GZipCodec, vl::MemoryFile, and vl::ZippedFile.
VirtualFile& vl::VirtualFile::operator= | ( | const VirtualFile & | other ) | [inline] |
Definition at line 95 of file VirtualFile.hpp.
References mPath.
const String& vl::VirtualFile::path | ( | ) | const [inline] |
Returns the path
of the file.
Definition at line 98 of file VirtualFile.hpp.
Referenced by vl::MemoryDirectory::addFile(), vl::LoadWriterManager::canLoad(), vl::LoadWriterManager::canWrite(), vl::DiskFile::exists(), vl::LoadWriterManager::findLoader(), vl::LoadWriterManager::findWriter(), vl::isDAT(), vl::isDDS(), vl::isJPG(), vl::isTGA(), vl::DaeLoader::load(), load(), vl::loadAC3D(), vl::loadBMP(), vl::loadDAT(), vl::loadDDS(), vl::loadDICOM(), vl::loadImage(), vl::loadJPG(), vl::loadMD2(), vl::loadMOL2(), vl::ObjLoader::loadOBJ(), vl::ObjLoader::loadObjMaterials(), vl::loadPNG(), vl::loadRAW(), vl::LoadWriterManager::loadResource(), vl::loadTGA(), vl::VLXSerializer::loadVLB(), vl::VLXSerializer::loadVLT(), vl::GZipCodec::open(), vl::DiskFile::open(), vl::A3DSLoader::parse3DS(), vl::A3DSLoader::readMapChunk(), vl::MemoryDirectory::removeFile(), vl::saveImage(), vl::saveJPG(), vl::savePNG(), vl::saveTGA(), vl::saveTIFF(), vl::VLXSerializer::saveVLT(), vl::GZipCodec::seekSet_Implementation(), vl::GZipCodec::setStream(), vl::DiskFile::size(), vl::LoadWriterVLX::writeResource(), and vl::LoadWriterManager::writeResource().
void vl::VirtualFile::setPath | ( | const String & | name ) | [inline] |
Changes the path bound to a VirtualFile. Use carefully this function, you shouldn't rename a VirtualFile managed by a VirtualDirectory.
Definition at line 101 of file VirtualFile.hpp.
References vl::String::normalizeSlashes().
Referenced by vl::MemoryDirectory::addFile(), vl::DiskFile::DiskFile(), vl::GZipCodec::GZipCodec(), vl::DiskFile::open(), and vl::GZipCodec::setStream().
long long VirtualFile::peek | ( | void * | buffer, |
long long | byte_count | ||
) |
Reads byte_count bytes and returns to the original position.
Returns the number of bytes read.
Definition at line 68 of file VirtualFile.cpp.
References vl::Log::error(), isOpen(), position(), read(), and seekSet().
long long VirtualFile::read | ( | void * | buffer, |
long long | byte_count | ||
) |
Reads byte_count
bytes from a file. Returns the number of bytes actually read.
Definition at line 82 of file VirtualFile.cpp.
References read_Implementation().
Referenced by vl::MD5CheckSum::compute(), vl::CRC32CheckSum::compute(), vl::MemoryFile::copy(), vl::BufferedStream< char, 128 *1024 >::fillBuffer(), vl::ZippedFile::fillUncompressedBuffer(), vl::GZipCodec::fillUncompressedBuffer(), vl::isBMP(), vl::isDDS(), vl::isDICOM(), vl::isJPG(), vl::isPNG(), vl::isTGA(), vl::isTIFF(), vl::isVLB(), vl::isVLT(), load(), vl::STLLoader::loadBinary(), vl::loadBMP(), vl::loadDDS(), vl::loadDICOM(), vl::loadMD2(), vl::loadPNG(), vl::loadRAW(), vl::LoadWriterManager::loadResource(), vl::STLLoader::loadSTL(), vl::loadTGA(), vl::VLXParserVLB::parseHeader(), peek(), read16(), read32(), read64(), vl::ZippedFile::read_Implementation(), vl::A3DSLoader::read_TRIANGULAR_MESH(), vl::VLXParserVLB::readChunk(), vl::VLXParserVLB::readInteger(), readSInt8(), vl::VLXParserVLB::readString(), readUInt8(), vl::VLXParserVLB::readValue(), vl::ZippedFile::seekSet_Implementation(), and vl::GZipCodec::seekSet_Implementation().
long long VirtualFile::write | ( | const void * | buffer, |
long long | byte_count | ||
) |
Writes byte_count
bytes to a file. Returns the number of bytes actually written.
Definition at line 90 of file VirtualFile.cpp.
References write_Implementation().
Referenced by vl::GZipCodec::close(), vl::saveDICOM(), vl::saveTGA(), vl::saveTIFF(), vl::VLXSerializer::saveVLT(), write16(), write32(), write64(), vl::GZipCodec::write_Implementation(), writeSInt8(), and writeUInt8().
long long VirtualFile::position | ( | ) | const |
Returns the current position in the file.
Definition at line 98 of file VirtualFile.cpp.
References position_Implementation().
Referenced by vl::ZippedFile::fillUncompressedBuffer(), vl::GZipCodec::fillUncompressedBuffer(), vl::loadBMP(), peek(), vl::DiskFile::position_Implementation(), vl::A3DSLoader::read_3D_EDITOR_CHUNK(), vl::A3DSLoader::read_MATERIAL_BLOCK(), vl::A3DSLoader::read_OBJECT_BLOCK(), vl::A3DSLoader::read_TRIANGULAR_MESH(), vl::A3DSLoader::readColChunk(), vl::A3DSLoader::readMapChunk(), seekCur(), vl::ZippedFile::seekSet_Implementation(), vl::GZipCodec::seekSet_Implementation(), vl::DiskFile::seekSet_Implementation(), and vl::GZipCodec::uncompressedSize().
bool VirtualFile::seekSet | ( | long long | offset ) |
Changes the current read/write position of a file.
Definition at line 103 of file VirtualFile.cpp.
References vl::Log::error(), seekSet_Implementation(), and size().
Referenced by vl::isDICOM(), vl::loadBMP(), vl::loadMD2(), vl::loadRAW(), vl::STLLoader::loadSTL(), vl::loadTGA(), vl::ZippedFile::open(), peek(), vl::PlyLoader::readElements(), vl::BufferedStream< char, 128 *1024 >::seek(), seekCur(), seekEnd(), and vl::GZipCodec::uncompressedSize().
bool VirtualFile::seekCur | ( | long long | offset ) |
Changes the current read/write position of a file.
Definition at line 121 of file VirtualFile.cpp.
References position(), and seekSet().
Referenced by vl::A3DSLoader::skipChunk().
bool VirtualFile::seekEnd | ( | long long | offset ) |
Changes the current read/write position of a file.
Definition at line 126 of file VirtualFile.cpp.
References seekSet(), and size().
Referenced by vl::isTGA(), and vl::GZipCodec::uncompressedSize().
bool vl::VirtualFile::endOfFile | ( | ) | const [inline] |
Returns true if position()
>= size()
Definition at line 126 of file VirtualFile.hpp.
Referenced by vl::A3DSLoader::parse3DS().
long long VirtualFile::load | ( | std::vector< char > & | data ) |
Loads the entire file in the specified vector.
Returns the number of bytes read. The file must be closed before calling this function.
Definition at line 131 of file VirtualFile.cpp.
References size().
Referenced by vl::DaeLoader::load(), and vl::String::loadText().
long long VirtualFile::load | ( | void * | buffer, |
long long | max = -1 |
||
) |
Loads the entire file in the specified buffer.
Returns the number of bytes read. The file must be closed before calling this function.
Definition at line 140 of file VirtualFile.cpp.
References close(), vl::Log::error(), vl::OM_ReadOnly, open(), path(), read(), and size().
double VirtualFile::readDouble | ( | bool | little_endian_data = true ) |
Reads single entry.
Definition at line 159 of file VirtualFile.cpp.
References read64().
Referenced by vl::PlyLoader::PlyScalar::read(), and vl::VLXParserVLB::readValue().
float VirtualFile::readFloat | ( | bool | little_endian_data = true ) |
Reads single entry.
Definition at line 166 of file VirtualFile.cpp.
References read32().
Referenced by vl::STLLoader::loadBinary(), vl::PlyLoader::PlyScalar::read(), vl::A3DSLoader::read_TRIANGULAR_MESH(), vl::A3DSLoader::readColFloat3(), vl::A3DSLoader::readFloatPercent(), vl::A3DSLoader::readMapChunk(), vl::VLXParserVLB::readValue(), and vl::A3DSLoader::readVec3().
unsigned long long VirtualFile::readUInt64 | ( | bool | little_endian_data = true ) |
long long VirtualFile::readSInt64 | ( | bool | little_endian_data = true ) |
unsigned int VirtualFile::readUInt32 | ( | bool | little_endian_data = true ) |
Reads single entry.
Definition at line 187 of file VirtualFile.cpp.
References read32().
Referenced by vl::isDDS(), vl::STLLoader::loadBinary(), vl::A3DSLoader::parse3DS(), vl::PlyLoader::PlyScalar::read(), vl::A3DSLoader::read_TRIANGULAR_MESH(), vl::A3DSLoader::readChunk(), and vl::GZipCodec::uncompressedSize().
int VirtualFile::readSInt32 | ( | bool | little_endian_data = true ) |
Reads single entry.
Definition at line 194 of file VirtualFile.cpp.
References read32().
Referenced by vl::PlyLoader::PlyScalar::read().
unsigned short VirtualFile::readUInt16 | ( | bool | little_endian_data = true ) |
Reads single entry.
Definition at line 201 of file VirtualFile.cpp.
References read16().
Referenced by vl::isTIFF(), vl::STLLoader::loadBinary(), vl::PlyLoader::PlyScalar::read(), vl::A3DSLoader::read_TRIANGULAR_MESH(), vl::A3DSLoader::readChunk(), vl::A3DSLoader::readMapChunk(), and vl::A3DSLoader::readWordPercent().
short VirtualFile::readSInt16 | ( | bool | little_endian_data = true ) |
Reads single entry.
Definition at line 208 of file VirtualFile.cpp.
References read16().
Referenced by vl::PlyLoader::PlyScalar::read().
unsigned char VirtualFile::readUInt8 | ( | ) |
Reads single entry.
Definition at line 215 of file VirtualFile.cpp.
References read().
Referenced by vl::VLXParserVLB::parseHeader(), vl::PlyLoader::PlyScalar::read(), vl::A3DSLoader::readColByte3(), vl::PlyLoader::readElements(), vl::A3DSLoader::readLine(), and vl::VLXParserVLB::readValue().
char VirtualFile::readSInt8 | ( | ) |
Reads single entry.
Definition at line 222 of file VirtualFile.cpp.
References read().
Referenced by vl::PlyLoader::PlyScalar::read().
long long VirtualFile::readDouble | ( | double * | buffer, |
long long | count, | ||
bool | little_endian_data = true |
||
) |
Reads multiple entries. Returns the number of bytes read.
Definition at line 231 of file VirtualFile.cpp.
References read64().
long long VirtualFile::readFloat | ( | float * | buffer, |
long long | count, | ||
bool | little_endian_data = true |
||
) |
Reads multiple entries. Returns the number of bytes read.
Definition at line 236 of file VirtualFile.cpp.
References read32().
long long VirtualFile::readUInt64 | ( | unsigned long long * | buffer, |
long long | count, | ||
bool | little_endian_data = true |
||
) |
Reads multiple entries. Returns the number of bytes read.
Definition at line 241 of file VirtualFile.cpp.
References read64().
long long VirtualFile::readSInt64 | ( | long long * | buffer, |
long long | count, | ||
bool | little_endian_data = true |
||
) |
Reads multiple entries. Returns the number of bytes read.
Definition at line 246 of file VirtualFile.cpp.
References read64().
long long VirtualFile::readUInt32 | ( | unsigned int * | buffer, |
long long | count, | ||
bool | little_endian_data = true |
||
) |
Reads multiple entries. Returns the number of bytes read.
Definition at line 251 of file VirtualFile.cpp.
References read32().
long long VirtualFile::readSInt32 | ( | int * | buffer, |
long long | count, | ||
bool | little_endian_data = true |
||
) |
Reads multiple entries. Returns the number of bytes read.
Definition at line 256 of file VirtualFile.cpp.
References read32().
long long VirtualFile::readUInt16 | ( | unsigned short * | buffer, |
long long | count, | ||
bool | little_endian_data = true |
||
) |
Reads multiple entries. Returns the number of bytes read.
Definition at line 261 of file VirtualFile.cpp.
References read16().
long long VirtualFile::readSInt16 | ( | short * | buffer, |
long long | count, | ||
bool | little_endian_data = true |
||
) |
Reads multiple entries. Returns the number of bytes read.
Definition at line 266 of file VirtualFile.cpp.
References read16().
long long VirtualFile::readUInt8 | ( | unsigned char * | buffer, |
long long | count | ||
) |
Reads multiple entries. Returns the number of bytes read.
Definition at line 271 of file VirtualFile.cpp.
References read().
long long VirtualFile::readSInt8 | ( | char * | buffer, |
long long | count | ||
) |
Reads multiple entries. Returns the number of bytes read.
Definition at line 276 of file VirtualFile.cpp.
References read().
long long VirtualFile::writeDouble | ( | double | data, |
bool | little_endian_data = true |
||
) |
Writes a single entry. Returns the number of bytes written.
Definition at line 283 of file VirtualFile.cpp.
References write64().
long long VirtualFile::writeFloat | ( | float | data, |
bool | little_endian_data = true |
||
) |
Writes a single entry. Returns the number of bytes written.
Definition at line 288 of file VirtualFile.cpp.
References write32().
long long VirtualFile::writeUInt64 | ( | unsigned long long | data, |
bool | little_endian_data = true |
||
) |
Writes a single entry. Returns the number of bytes written.
Definition at line 293 of file VirtualFile.cpp.
References write64().
long long VirtualFile::writeSInt64 | ( | long long | data, |
bool | little_endian_data = true |
||
) |
Writes a single entry. Returns the number of bytes written.
Definition at line 298 of file VirtualFile.cpp.
References write64().
long long VirtualFile::writeUInt32 | ( | unsigned int | data, |
bool | little_endian_data = true |
||
) |
Writes a single entry. Returns the number of bytes written.
Definition at line 303 of file VirtualFile.cpp.
References write32().
Referenced by vl::saveTGA(), and vl::saveTIFF().
long long VirtualFile::writeSInt32 | ( | int | data, |
bool | little_endian_data = true |
||
) |
Writes a single entry. Returns the number of bytes written.
Definition at line 308 of file VirtualFile.cpp.
References write32().
long long VirtualFile::writeUInt16 | ( | unsigned short | data, |
bool | little_endian_data = true |
||
) |
Writes a single entry. Returns the number of bytes written.
Definition at line 313 of file VirtualFile.cpp.
References write16().
Referenced by vl::saveTIFF().
long long VirtualFile::writeSInt16 | ( | short | data, |
bool | little_endian_data = true |
||
) |
Writes a single entry. Returns the number of bytes written.
Definition at line 318 of file VirtualFile.cpp.
References write16().
long long VirtualFile::writeUInt8 | ( | unsigned char | data ) |
Writes a single entry. Returns the number of bytes written.
Definition at line 323 of file VirtualFile.cpp.
References write().
long long VirtualFile::writeSInt8 | ( | char | data ) |
Writes a single entry. Returns the number of bytes written.
Definition at line 328 of file VirtualFile.cpp.
References write().
long long VirtualFile::writeDouble | ( | const double * | buffer, |
long long | count, | ||
bool | little_endian_data = true |
||
) |
Writes multiple entries. Returns the number of bytes written.
Definition at line 335 of file VirtualFile.cpp.
References write64().
long long VirtualFile::writeFloat | ( | const float * | buffer, |
long long | count, | ||
bool | little_endian_data = true |
||
) |
Writes multiple entries. Returns the number of bytes written.
Definition at line 340 of file VirtualFile.cpp.
References write32().
long long VirtualFile::writeUInt64 | ( | const unsigned long long * | buffer, |
long long | count, | ||
bool | little_endian_data = true |
||
) |
Writes multiple entries. Returns the number of bytes written.
Definition at line 345 of file VirtualFile.cpp.
References write64().
long long VirtualFile::writeSInt64 | ( | const long long * | buffer, |
long long | count, | ||
bool | little_endian_data = true |
||
) |
Writes multiple entries. Returns the number of bytes written.
Definition at line 350 of file VirtualFile.cpp.
References write64().
long long VirtualFile::writeUInt32 | ( | const unsigned int * | buffer, |
long long | count, | ||
bool | little_endian_data = true |
||
) |
Writes multiple entries. Returns the number of bytes written.
Definition at line 355 of file VirtualFile.cpp.
References write32().
long long VirtualFile::writeSInt32 | ( | const int * | buffer, |
long long | count, | ||
bool | little_endian_data = true |
||
) |
Writes multiple entries. Returns the number of bytes written.
Definition at line 360 of file VirtualFile.cpp.
References write32().
long long VirtualFile::writeUInt16 | ( | const unsigned short * | buffer, |
long long | count, | ||
bool | little_endian_data = true |
||
) |
Writes multiple entries. Returns the number of bytes written.
Definition at line 365 of file VirtualFile.cpp.
References write16().
long long VirtualFile::writeSInt16 | ( | const short * | buffer, |
long long | count, | ||
bool | little_endian_data = true |
||
) |
Writes multiple entries. Returns the number of bytes written.
Definition at line 370 of file VirtualFile.cpp.
References write16().
long long VirtualFile::writeUInt8 | ( | const unsigned char * | buffer, |
long long | count | ||
) |
Writes multiple entries. Returns the number of bytes written.
Definition at line 375 of file VirtualFile.cpp.
References write().
long long VirtualFile::writeSInt8 | ( | const char * | buffer, |
long long | count | ||
) |
Writes multiple entries. Returns the number of bytes written.
Definition at line 380 of file VirtualFile.cpp.
References write().
virtual long long vl::VirtualFile::read_Implementation | ( | void * | buffer, |
long long | byte_count | ||
) | [protected, pure virtual] |
Implemented in vl::DiskFile, vl::GZipCodec, vl::MemoryFile, and vl::ZippedFile.
Referenced by read().
virtual long long vl::VirtualFile::write_Implementation | ( | const void * | buffer, |
long long | byte_count | ||
) | [protected, pure virtual] |
Implemented in vl::DiskFile, vl::GZipCodec, vl::MemoryFile, and vl::ZippedFile.
Referenced by write().
virtual long long vl::VirtualFile::position_Implementation | ( | ) | const [protected, pure virtual] |
Implemented in vl::DiskFile, vl::GZipCodec, vl::MemoryFile, and vl::ZippedFile.
Referenced by position().
virtual bool vl::VirtualFile::seekSet_Implementation | ( | long long | offset ) | [protected, pure virtual] |
Implemented in vl::DiskFile, vl::GZipCodec, vl::MemoryFile, and vl::ZippedFile.
Referenced by seekSet().
long long VirtualFile::write64 | ( | const void * | buffer, |
long long | count, | ||
bool | little_endian_data = true |
||
) | [protected] |
Definition at line 387 of file VirtualFile.cpp.
References write().
Referenced by writeDouble(), writeSInt64(), and writeUInt64().
long long VirtualFile::write32 | ( | const void * | buffer, |
long long | count, | ||
bool | little_endian_data = true |
||
) | [protected] |
Definition at line 402 of file VirtualFile.cpp.
References write().
Referenced by writeFloat(), writeSInt32(), and writeUInt32().
long long VirtualFile::write16 | ( | const void * | buffer, |
long long | count, | ||
bool | little_endian_data = true |
||
) | [protected] |
Definition at line 417 of file VirtualFile.cpp.
References write().
Referenced by writeSInt16(), and writeUInt16().
long long VirtualFile::read64 | ( | void * | buffer, |
long long | count, | ||
bool | little_endian_data = true |
||
) | [protected] |
Definition at line 432 of file VirtualFile.cpp.
References read().
Referenced by readDouble(), readSInt64(), and readUInt64().
long long VirtualFile::read32 | ( | void * | buffer, |
long long | count, | ||
bool | little_endian_data = true |
||
) | [protected] |
Definition at line 452 of file VirtualFile.cpp.
References read().
Referenced by readFloat(), readSInt32(), and readUInt32().
long long VirtualFile::read16 | ( | void * | buffer, |
long long | count, | ||
bool | little_endian_data = true |
||
) | [protected] |
Definition at line 470 of file VirtualFile.cpp.
References read().
Referenced by readSInt16(), and readUInt16().
long long VirtualFile::write64 | ( | const void * | buffer, |
bool | little_endian_data = true |
||
) | [protected] |
Definition at line 486 of file VirtualFile.cpp.
References write().
long long VirtualFile::write32 | ( | const void * | buffer, |
bool | little_endian_data = true |
||
) | [protected] |
Definition at line 503 of file VirtualFile.cpp.
References write().
long long VirtualFile::write16 | ( | const void * | buffer, |
bool | little_endian_data = true |
||
) | [protected] |
Definition at line 518 of file VirtualFile.cpp.
References write().
long long VirtualFile::read64 | ( | void * | buffer, |
bool | little_endian_data = true |
||
) | [protected] |
Definition at line 531 of file VirtualFile.cpp.
References read().
long long VirtualFile::read32 | ( | void * | buffer, |
bool | little_endian_data = true |
||
) | [protected] |
Definition at line 548 of file VirtualFile.cpp.
References read().
long long VirtualFile::read16 | ( | void * | buffer, |
bool | little_endian_data = true |
||
) | [protected] |
Definition at line 563 of file VirtualFile.cpp.
References read().
String vl::VirtualFile::mPath [protected] |
Definition at line 246 of file VirtualFile.hpp.
Referenced by operator=().