Visualization Library

A lightweight C++ OpenGL middleware for 2D/3D graphics
[Home] [Tutorials] [All Classes] [Grouped Classes]
Public Member Functions | Protected Member Functions | Protected Attributes

vl::MemoryFile Class Reference

A VirtualFile to manipulate files stored in memory. More...

#include <MemoryFile.hpp>

Inheritance diagram for vl::MemoryFile:
vl::VirtualFile vl::Object

List of all members.

Public Member Functions

virtual const char * className ()
 Returns the name of the class.
 MemoryFile ()
const Bufferbuffer () const
Bufferbuffer ()
void setBuffer (Buffer *buffer)
 This is useful when you want to point more MemoryFiles to the same Buffer object.
unsigned char * ptr ()
virtual bool exists () const
 A MemoryFile always exists.
virtual bool open (EOpenMode mode)
 Opens the file in the specified mode.
virtual bool isOpen () const
 Returns true if the file has been opened.
virtual void close ()
 Closes the file.
void allocateBuffer (long long byte_count)
virtual long long size () const
 Returns the size of the file in bytes.
void copy (VirtualFile *file)
 Copies the data of any kind of VirtualFile.
MemoryFileoperator= (const MemoryFile &other)
ref< VirtualFileclone () const
 Creates a clone of this class instance.

Protected Member Functions

virtual long long position_Implementation () const
virtual long long read_Implementation (void *buffer, long long byte_count)
virtual long long write_Implementation (const void *, long long)
virtual bool seekSet_Implementation (long long offset)

Protected Attributes

ref< BuffermBuffer
long long mPtr
bool mIsOpen

Detailed Description

A VirtualFile to manipulate files stored in memory.

See also:

Constructor & Destructor Documentation

MemoryFile::MemoryFile (  )

Member Function Documentation

virtual const char* vl::MemoryFile::className (  ) [inline, virtual]

Returns the name of the class.

Reimplemented from vl::VirtualFile.

const Buffer* vl::MemoryFile::buffer (  ) const [inline]
Buffer* vl::MemoryFile::buffer (  ) [inline]
void vl::MemoryFile::setBuffer ( Buffer buffer ) [inline]

This is useful when you want to point more MemoryFiles to the same Buffer object.

unsigned char* vl::MemoryFile::ptr (  ) [inline]
virtual bool vl::MemoryFile::exists (  ) const [inline, virtual]

A MemoryFile always exists.

Implements vl::VirtualFile.

bool MemoryFile::open ( EOpenMode  mode ) [virtual]

Opens the file in the specified mode.

Implements vl::VirtualFile.

virtual bool vl::MemoryFile::isOpen (  ) const [inline, virtual]

Returns true if the file has been opened.

Implements vl::VirtualFile.

virtual void vl::MemoryFile::close (  ) [inline, virtual]

Closes the file.

Implements vl::VirtualFile.

void vl::MemoryFile::allocateBuffer ( long long  byte_count ) [inline]
virtual long long vl::MemoryFile::size (  ) const [inline, virtual]

Returns the size of the file in bytes.

Implements vl::VirtualFile.

void MemoryFile::copy ( VirtualFile file )

Copies the data of any kind of VirtualFile.

MemoryFile& vl::MemoryFile::operator= ( const MemoryFile other ) [inline]
ref< VirtualFile > MemoryFile::clone (  ) const [virtual]

Creates a clone of this class instance.

Implements vl::VirtualFile.

long long MemoryFile::position_Implementation (  ) const [protected, virtual]

Implements vl::VirtualFile.

long long MemoryFile::read_Implementation ( void *  buffer,
long long  byte_count 
) [protected, virtual]

Implements vl::VirtualFile.

virtual long long vl::MemoryFile::write_Implementation ( const void *  ,
long long   
) [inline, protected, virtual]

Implements vl::VirtualFile.

bool MemoryFile::seekSet_Implementation ( long long  offset ) [protected, virtual]

Implements vl::VirtualFile.


Member Data Documentation

long long vl::MemoryFile::mPtr [protected]
bool vl::MemoryFile::mIsOpen [protected]

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

Visualization Library v2010.11.1125 Reference Documentation
Copyright 2005-2009 Michele Bosi. All rights reserved.
Updated on Fri Nov 26 2010 10:33:47.
Permission is granted to use this page to write and publish articles regarding Visualization Library.