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 | Friends

vl::DiskFile Class Reference

A VirtualFile that operates on regular disk files. More...

#include <DiskFile.hpp>

Inheritance diagram for vl::DiskFile:
vl::VirtualFile vl::Object

List of all members.

Public Member Functions

 DiskFile (const String &path=String())
 ~DiskFile ()
virtual const char * className ()
 Returns the name of the class.
bool open (const String &path, EOpenMode mode)
 The specified path is relative to the parent directory. See setPhysicalPath().
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.
virtual long long size () const
 Returns the file size in bytes or -1 on error.
virtual bool exists () const
 Returns true if the file exists.
DiskFileoperator= (const DiskFile &other)
virtual ref< VirtualFileclone () const
 Creates a clone of this class instance.

Protected Member Functions

 DiskFile (const DiskFile &other)
virtual long long read_Implementation (void *buffer, long long byte_count)
virtual long long write_Implementation (const void *buffer, long long byte_count)
virtual long long position_Implementation () const
virtual bool seekSet_Implementation (long long offset)
ref< DiskDirectoryparentDir () const

Protected Attributes

FILE * mHandle

Friends

class DiskDirectory

Detailed Description

A VirtualFile that operates on regular disk files.

See also:

Constructor & Destructor Documentation

vl::DiskFile::DiskFile ( const DiskFile other ) [inline, protected]
DiskFile::DiskFile ( const String path = String() )
DiskFile::~DiskFile (  )

Member Function Documentation

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

Returns the name of the class.

Reimplemented from vl::VirtualFile.

bool DiskFile::open ( const String path,
EOpenMode  mode 
)

The specified path is relative to the parent directory. See setPhysicalPath().

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

Opens the file in the specified mode.

Implements vl::VirtualFile.

bool DiskFile::isOpen (  ) const [virtual]

Returns true if the file has been opened.

Implements vl::VirtualFile.

void DiskFile::close (  ) [virtual]

Closes the file.

Implements vl::VirtualFile.

long long DiskFile::size (  ) const [virtual]

Returns the file size in bytes or -1 on error.

Implements vl::VirtualFile.

bool DiskFile::exists (  ) const [virtual]

Returns true if the file exists.

Implements vl::VirtualFile.

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

Creates a clone of this class instance.

Implements vl::VirtualFile.

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

Implements vl::VirtualFile.

long long DiskFile::write_Implementation ( const void *  buffer,
long long  byte_count 
) [protected, virtual]

Implements vl::VirtualFile.

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

Implements vl::VirtualFile.

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

Implements vl::VirtualFile.

ref<DiskDirectory> vl::DiskFile::parentDir (  ) const [protected]

Friends And Related Function Documentation

friend class DiskDirectory [friend]

Member Data Documentation

FILE* vl::DiskFile::mHandle [protected]

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

Visualization Library v2010.11.1123 Reference Documentation
Copyright 2005-2009 Michele Bosi. All rights reserved.
Updated on Thu Nov 18 2010 02:07:59.
Permission is granted to use this page to write and publish articles regarding Visualization Library.