Visualization Library 2.0.0-b3

A lightweight C++ OpenGL middleware for 2D/3D graphics

VL     Star     Watch     Fork     Issue

[Download] [Tutorials] [All Classes] [Grouped Classes]
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
vl::VirtualFile Class Referenceabstract

An abstract class representing a file. More...

#include <VirtualFile.hpp>

+ Inheritance diagram for vl::VirtualFile:

Public Member Functions

 VirtualFile ()
 Constructor. More...
 
unsigned int crc32 ()
 Computes the crc32 of the entire file. More...
 
MD5CheckSum md5 ()
 Computes the md5 of the entire file. More...
 
virtual bool open (EOpenMode mode)=0
 Opens the file in the specified mode. More...
 
virtual bool isOpen () const =0
 Returns true if the file has been opened. More...
 
virtual bool exists () const =0
 Returns true if the file exists. More...
 
virtual void close ()=0
 Closes the file. More...
 
virtual long long size () const =0
 Returns the size of the file in bytes. More...
 
virtual ref< VirtualFileclone () const =0
 Creates a clone of this class instance. More...
 
VirtualFileoperator= (const VirtualFile &other)
 
const Stringpath () const
 Returns the path of the file. More...
 
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. More...
 
long long peek (void *buffer, long long byte_count)
 Reads byte_count bytes and returns to the original position. More...
 
long long read (void *buffer, long long byte_count)
 Reads byte_count bytes from a file. Returns the number of bytes actually read. More...
 
long long write (const void *buffer, long long byte_count)
 Writes byte_count bytes to a file. Returns the number of bytes actually written. More...
 
long long position () const
 Returns the current position in the file. More...
 
bool seekSet (long long offset)
 Changes the current read/write position of a file. More...
 
bool seekCur (long long offset)
 Changes the current read/write position of a file. More...
 
bool seekEnd (long long offset)
 Changes the current read/write position of a file. More...
 
bool endOfFile () const
 Returns true if position() >= size() More...
 
long long load (std::vector< char > &data)
 Loads the entire file in the specified vector. More...
 
long long load (void *buffer, long long max=-1)
 Loads the entire file in the specified buffer. More...
 
double readDouble (bool little_endian_data=true)
 Reads single entry. More...
 
float readFloat (bool little_endian_data=true)
 Reads single entry. More...
 
unsigned long long readUInt64 (bool little_endian_data=true)
 Reads single entry. More...
 
long long readSInt64 (bool little_endian_data=true)
 Reads single entry. More...
 
unsigned int readUInt32 (bool little_endian_data=true)
 Reads single entry. More...
 
int readSInt32 (bool little_endian_data=true)
 Reads single entry. More...
 
unsigned short readUInt16 (bool little_endian_data=true)
 Reads single entry. More...
 
short readSInt16 (bool little_endian_data=true)
 Reads single entry. More...
 
unsigned char readUInt8 ()
 Reads single entry. More...
 
char readSInt8 ()
 Reads single entry. More...
 
long long readDouble (double *buffer, long long count, bool little_endian_data=true)
 Reads multiple entries. Returns the number of bytes read. More...
 
long long readFloat (float *buffer, long long count, bool little_endian_data=true)
 Reads multiple entries. Returns the number of bytes read. More...
 
long long readUInt64 (unsigned long long *buffer, long long count, bool little_endian_data=true)
 Reads multiple entries. Returns the number of bytes read. More...
 
long long readSInt64 (long long *buffer, long long count, bool little_endian_data=true)
 Reads multiple entries. Returns the number of bytes read. More...
 
long long readUInt32 (unsigned int *buffer, long long count, bool little_endian_data=true)
 Reads multiple entries. Returns the number of bytes read. More...
 
long long readSInt32 (int *buffer, long long count, bool little_endian_data=true)
 Reads multiple entries. Returns the number of bytes read. More...
 
long long readUInt16 (unsigned short *buffer, long long count, bool little_endian_data=true)
 Reads multiple entries. Returns the number of bytes read. More...
 
long long readSInt16 (short *buffer, long long count, bool little_endian_data=true)
 Reads multiple entries. Returns the number of bytes read. More...
 
long long readUInt8 (unsigned char *buffer, long long count)
 Reads multiple entries. Returns the number of bytes read. More...
 
long long readSInt8 (char *buffer, long long count)
 Reads multiple entries. Returns the number of bytes read. More...
 
long long writeDouble (double data, bool little_endian_data=true)
 Writes a single entry. Returns the number of bytes written. More...
 
long long writeFloat (float data, bool little_endian_data=true)
 Writes a single entry. Returns the number of bytes written. More...
 
long long writeUInt64 (unsigned long long data, bool little_endian_data=true)
 Writes a single entry. Returns the number of bytes written. More...
 
long long writeSInt64 (long long data, bool little_endian_data=true)
 Writes a single entry. Returns the number of bytes written. More...
 
long long writeUInt32 (unsigned int data, bool little_endian_data=true)
 Writes a single entry. Returns the number of bytes written. More...
 
long long writeSInt32 (int data, bool little_endian_data=true)
 Writes a single entry. Returns the number of bytes written. More...
 
long long writeUInt16 (unsigned short data, bool little_endian_data=true)
 Writes a single entry. Returns the number of bytes written. More...
 
long long writeSInt16 (short data, bool little_endian_data=true)
 Writes a single entry. Returns the number of bytes written. More...
 
long long writeUInt8 (unsigned char data)
 Writes a single entry. Returns the number of bytes written. More...
 
long long writeSInt8 (char data)
 Writes a single entry. Returns the number of bytes written. More...
 
long long writeDouble (const double *buffer, long long count, bool little_endian_data=true)
 Writes multiple entries. Returns the number of bytes written. More...
 
long long writeFloat (const float *buffer, long long count, bool little_endian_data=true)
 Writes multiple entries. Returns the number of bytes written. More...
 
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. More...
 
long long writeSInt64 (const long long *buffer, long long count, bool little_endian_data=true)
 Writes multiple entries. Returns the number of bytes written. More...
 
long long writeUInt32 (const unsigned int *buffer, long long count, bool little_endian_data=true)
 Writes multiple entries. Returns the number of bytes written. More...
 
long long writeSInt32 (const int *buffer, long long count, bool little_endian_data=true)
 Writes multiple entries. Returns the number of bytes written. More...
 
long long writeUInt16 (const unsigned short *buffer, long long count, bool little_endian_data=true)
 Writes multiple entries. Returns the number of bytes written. More...
 
long long writeSInt16 (const short *buffer, long long count, bool little_endian_data=true)
 Writes multiple entries. Returns the number of bytes written. More...
 
long long writeUInt8 (const unsigned char *buffer, long long count)
 Writes multiple entries. Returns the number of bytes written. More...
 
long long writeSInt8 (const char *buffer, long long count)
 Writes multiple entries. Returns the number of bytes written. More...
 
- Public Member Functions inherited from vl::Object
 Object ()
 Constructor. More...
 
 Object (const Object &other)
 Copy constructor: copies the name, ref count mutex and user data. More...
 
Objectoperator= (const Object &other)
 Copy operator: copies the object's name, ref count mutex and user data. More...
 
const std::string & objectName () const
 The name of the object, by default set to the object's class name. More...
 
void setObjectName (const char *name)
 The name of the object, by default set to the object's class name in debug builds. More...
 
void setObjectName (const std::string &name)
 The name of the object, by default set to the object's class name in debug builds. More...
 
void setRefCountMutex (IMutex *mutex)
 The mutex used to protect the reference counting of an Object across multiple threads. More...
 
IMutexrefCountMutex ()
 The mutex used to protect the reference counting of an Object across multiple threads. More...
 
const IMutexrefCountMutex () const
 The mutex used to protect the reference counting of an Object across multiple threads. More...
 
int referenceCount () const
 Returns the number of references of an object. More...
 
void incReference () const
 Increments the reference count of an object. More...
 
void decReference ()
 Decrements the reference count of an object and deletes it if both automaticDelete() is true the count reaches 0. More...
 
void setAutomaticDelete (bool autodel_on)
 If set to true the Object is deleted when its reference count reaches 0. More...
 
bool automaticDelete () const
 If set to true the Object is deleted when its reference count reaches 0. More...
 
template<class T >
T * as ()
 Casts an Object to the specified class. More...
 
template<class T >
const T * as () const
 Casts an Object to the specified class. More...
 

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 Member Functions inherited from vl::Object
virtual ~Object ()
 

Protected Attributes

String mPath
 
- Protected Attributes inherited from vl::Object
std::string mObjectName
 
IMutexmRefCountMutex
 
int mReferenceCount
 
bool mAutomaticDelete
 

Detailed Description

An abstract class representing a file.

See also

Definition at line 60 of file VirtualFile.hpp.

Constructor & Destructor Documentation

◆ VirtualFile() [1/2]

vl::VirtualFile::VirtualFile ( const VirtualFile other)
inlineprotected

Definition at line 65 of file VirtualFile.hpp.

◆ VirtualFile() [2/2]

vl::VirtualFile::VirtualFile ( )
inline

Constructor.

Definition at line 69 of file VirtualFile.hpp.

Member Function Documentation

◆ clone()

virtual ref<VirtualFile> vl::VirtualFile::clone ( ) const
pure virtual

Creates a clone of this class instance.

Implemented in vl::ZippedFile, vl::DiskFile, vl::MemoryFile, vl::QtFile, vl::QtFile, and vl::GZipCodec.

◆ close()

virtual void vl::VirtualFile::close ( )
pure virtual

◆ crc32()

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().

◆ endOfFile()

bool vl::VirtualFile::endOfFile ( ) const
inline

Returns true if position() >= size()

Definition at line 126 of file VirtualFile.hpp.

References vl::max().

Referenced by vl::A3DSLoader::parse3DS().

◆ exists()

virtual bool vl::VirtualFile::exists ( ) const
pure virtual

Returns true if the file exists.

Implemented in vl::ZippedFile, vl::DiskFile, vl::QtFile, vl::QtFile, vl::MemoryFile, and vl::GZipCodec.

◆ isOpen()

virtual bool vl::VirtualFile::isOpen ( ) const
pure virtual

◆ load() [1/2]

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().

◆ load() [2/2]

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().

◆ md5()

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().

◆ open()

virtual bool vl::VirtualFile::open ( EOpenMode  mode)
pure virtual

◆ operator=()

VirtualFile& vl::VirtualFile::operator= ( const VirtualFile other)
inline

Definition at line 95 of file VirtualFile.hpp.

References mPath.

◆ path()

const String& vl::VirtualFile::path ( ) const
inline

◆ peek()

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().

◆ position()

long long VirtualFile::position ( ) const

◆ position_Implementation()

virtual long long vl::VirtualFile::position_Implementation ( ) const
protectedpure virtual

◆ read()

long long VirtualFile::read ( void *  buffer,
long long  byte_count 
)

◆ read16() [1/2]

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().

◆ read16() [2/2]

long long VirtualFile::read16 ( void *  buffer,
bool  little_endian_data = true 
)
protected

Definition at line 563 of file VirtualFile.cpp.

References read().

◆ read32() [1/2]

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().

◆ read32() [2/2]

long long VirtualFile::read32 ( void *  buffer,
bool  little_endian_data = true 
)
protected

Definition at line 548 of file VirtualFile.cpp.

References read().

◆ read64() [1/2]

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().

◆ read64() [2/2]

long long VirtualFile::read64 ( void *  buffer,
bool  little_endian_data = true 
)
protected

Definition at line 531 of file VirtualFile.cpp.

References read().

◆ read_Implementation()

virtual long long vl::VirtualFile::read_Implementation ( void *  buffer,
long long  byte_count 
)
protectedpure virtual

◆ readDouble() [1/2]

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().

◆ readDouble() [2/2]

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().

◆ readFloat() [1/2]

float VirtualFile::readFloat ( bool  little_endian_data = true)

◆ readFloat() [2/2]

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().

◆ readSInt16() [1/2]

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().

◆ readSInt16() [2/2]

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().

◆ readSInt32() [1/2]

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().

◆ readSInt32() [2/2]

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().

◆ readSInt64() [1/2]

long long VirtualFile::readSInt64 ( bool  little_endian_data = true)

Reads single entry.

Definition at line 180 of file VirtualFile.cpp.

References read64().

◆ readSInt64() [2/2]

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().

◆ readSInt8() [1/2]

char VirtualFile::readSInt8 ( )

Reads single entry.

Definition at line 222 of file VirtualFile.cpp.

References read().

Referenced by vl::PlyLoader::PlyScalar::read().

◆ readSInt8() [2/2]

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().

◆ readUInt16() [1/2]

unsigned short VirtualFile::readUInt16 ( bool  little_endian_data = true)

◆ readUInt16() [2/2]

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().

◆ readUInt32() [1/2]

unsigned int VirtualFile::readUInt32 ( bool  little_endian_data = true)

◆ readUInt32() [2/2]

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().

◆ readUInt64() [1/2]

unsigned long long VirtualFile::readUInt64 ( bool  little_endian_data = true)

Reads single entry.

Definition at line 173 of file VirtualFile.cpp.

References read64().

◆ readUInt64() [2/2]

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().

◆ readUInt8() [1/2]

unsigned char VirtualFile::readUInt8 ( )

◆ readUInt8() [2/2]

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().

◆ seekCur()

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::ZippedDirectory::init(), and vl::A3DSLoader::skipChunk().

◆ seekEnd()

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().

◆ seekSet()

bool VirtualFile::seekSet ( long long  offset)

◆ seekSet_Implementation()

virtual bool vl::VirtualFile::seekSet_Implementation ( long long  offset)
protectedpure virtual

◆ setPath()

void vl::VirtualFile::setPath ( const String name)
inline

◆ size()

virtual long long vl::VirtualFile::size ( ) const
pure virtual

◆ write()

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().

◆ write16() [1/2]

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().

◆ write16() [2/2]

long long VirtualFile::write16 ( const void *  buffer,
bool  little_endian_data = true 
)
protected

Definition at line 518 of file VirtualFile.cpp.

References write().

◆ write32() [1/2]

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().

◆ write32() [2/2]

long long VirtualFile::write32 ( const void *  buffer,
bool  little_endian_data = true 
)
protected

Definition at line 503 of file VirtualFile.cpp.

References write().

◆ write64() [1/2]

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().

◆ write64() [2/2]

long long VirtualFile::write64 ( const void *  buffer,
bool  little_endian_data = true 
)
protected

Definition at line 486 of file VirtualFile.cpp.

References write().

◆ write_Implementation()

virtual long long vl::VirtualFile::write_Implementation ( const void *  buffer,
long long  byte_count 
)
protectedpure virtual

◆ writeDouble() [1/2]

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().

◆ writeDouble() [2/2]

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().

◆ writeFloat() [1/2]

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().

◆ writeFloat() [2/2]

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().

◆ writeSInt16() [1/2]

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().

◆ writeSInt16() [2/2]

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().

◆ writeSInt32() [1/2]

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().

◆ writeSInt32() [2/2]

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().

◆ writeSInt64() [1/2]

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().

◆ writeSInt64() [2/2]

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().

◆ writeSInt8() [1/2]

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().

◆ writeSInt8() [2/2]

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().

◆ writeUInt16() [1/2]

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().

◆ writeUInt16() [2/2]

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().

◆ writeUInt32() [1/2]

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().

◆ writeUInt32() [2/2]

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().

◆ writeUInt64() [1/2]

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().

◆ writeUInt64() [2/2]

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().

◆ writeUInt8() [1/2]

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().

◆ writeUInt8() [2/2]

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().

Member Data Documentation

◆ mPath

String vl::VirtualFile::mPath
protected

Definition at line 246 of file VirtualFile.hpp.

Referenced by operator=().


The documentation for this class was generated from the following files: