Visualization Library

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

vl::LoadWriterManager Class Reference

The LoadWriterManager class loads and writes resources using the registered ResourceLoadWriter objects. More...

#include <LoadWriterManager.hpp>

Inheritance diagram for vl::LoadWriterManager:
vl::Object

List of all members.

Public Member Functions

virtual const char * className ()
 Returns the name of the class.
 LoadWriterManager ()
 LoadWriterManager (const LoadWriterManager &other)
void registerLoadWriter (ResourceLoadWriter *)
Collection< ResourceLoadWriter > * loadWriters ()
 Returns the set of registered ResourceLoadWriter objects.
const Collection
< ResourceLoadWriter > * 
loadWriters () const
 Returns the set of registered ResourceLoadWriter objects.
template<class T >
T * loadWriter ()
 Returns the first ResourceLoadWriter of the specified type found.
bool canLoad (const String &path) const
 Returns true if there is a ResourceLoadWriter registered to load the specified path or extension.
bool canLoad (VirtualFile *file) const
 Returns true if there is a ResourceLoadWriter registered to load the specified file.
bool canWrite (const String &path) const
 Returns true if there is a ResourceLoadWriter registered to write the specified path or extension.
bool canWrite (VirtualFile *file) const
 Returns true if there is a ResourceLoadWriter registered to write the specified file.
const ResourceLoadWriterfindLoader (const String &path) const
 Returns the ResourceLoadWriter that has been registered to load the resource type specified by the given path or extension.
const ResourceLoadWriterfindWriter (const String &path) const
 Returns the ResourceLoadWriter that has been registered to write the resource type specified by the given path or extension.
const ResourceLoadWriterfindLoader (VirtualFile *file) const
 Returns the ResourceLoadWriter that has been registered to load the resource type specified by the given file.
const ResourceLoadWriterfindWriter (VirtualFile *file) const
 Returns the ResourceLoadWriter that has been registered to write the resource type specified by the given file.
ref< ResourceDatabaseloadResource (const String &path, bool quick=true) const
 Loads the resource specified by the given path using the appropriate ResourceLoadWriter.
ref< ResourceDatabaseloadResource (VirtualFile *file, bool quick=true) const
 Loads the resource specified by the given file using the appropriate ResourceLoadWriter.
bool writeResource (const String &path, ResourceDatabase *resource) const
 Writes the resource specified by the given file using the appropriate ResourceLoadWriter.
bool writeResource (VirtualFile *file, ResourceDatabase *resource) const
 Writes the resource specified by the given file using the appropriate ResourceLoadWriter.
const Collection< LoadCallback > * loadCallbacks () const
const Collection< WriteCallback > * writeCallbacks () const
Collection< LoadCallback > * loadCallbacks ()
Collection< WriteCallback > * writeCallbacks ()

Protected Attributes

Collection< ResourceLoadWritermLoadWriters
Collection< LoadCallbackmLoadCallbacks
Collection< WriteCallbackmWriteCallbacks

Detailed Description

The LoadWriterManager class loads and writes resources using the registered ResourceLoadWriter objects.

You can install a LoadCallback to operate on loaded data or you can install a WriteCallback to operate on the data to be written, using the methods loadCallbacks() and writeCallbacks().


Constructor & Destructor Documentation

vl::LoadWriterManager::LoadWriterManager (  ) [inline]
vl::LoadWriterManager::LoadWriterManager ( const LoadWriterManager other ) [inline]

Member Function Documentation

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

Returns the name of the class.

Reimplemented from vl::Object.

void LoadWriterManager::registerLoadWriter ( ResourceLoadWriter load_writer )
Collection<ResourceLoadWriter>* vl::LoadWriterManager::loadWriters (  ) [inline]

Returns the set of registered ResourceLoadWriter objects.

const Collection<ResourceLoadWriter>* vl::LoadWriterManager::loadWriters (  ) const [inline]

Returns the set of registered ResourceLoadWriter objects.

template<class T >
T* vl::LoadWriterManager::loadWriter (  ) [inline]

Returns the first ResourceLoadWriter of the specified type found.

bool vl::LoadWriterManager::canLoad ( const String path ) const [inline]

Returns true if there is a ResourceLoadWriter registered to load the specified path or extension.

bool vl::LoadWriterManager::canLoad ( VirtualFile file ) const [inline]

Returns true if there is a ResourceLoadWriter registered to load the specified file.

bool vl::LoadWriterManager::canWrite ( const String path ) const [inline]

Returns true if there is a ResourceLoadWriter registered to write the specified path or extension.

bool vl::LoadWriterManager::canWrite ( VirtualFile file ) const [inline]

Returns true if there is a ResourceLoadWriter registered to write the specified file.

const ResourceLoadWriter * LoadWriterManager::findLoader ( const String path ) const

Returns the ResourceLoadWriter that has been registered to load the resource type specified by the given path or extension.

const ResourceLoadWriter * LoadWriterManager::findWriter ( const String path ) const

Returns the ResourceLoadWriter that has been registered to write the resource type specified by the given path or extension.

const ResourceLoadWriter * LoadWriterManager::findLoader ( VirtualFile file ) const

Returns the ResourceLoadWriter that has been registered to load the resource type specified by the given file.

const ResourceLoadWriter * LoadWriterManager::findWriter ( VirtualFile file ) const

Returns the ResourceLoadWriter that has been registered to write the resource type specified by the given file.

ref< ResourceDatabase > LoadWriterManager::loadResource ( const String path,
bool  quick = true 
) const

Loads the resource specified by the given path using the appropriate ResourceLoadWriter.

ref< ResourceDatabase > LoadWriterManager::loadResource ( VirtualFile file,
bool  quick = true 
) const

Loads the resource specified by the given file using the appropriate ResourceLoadWriter.

bool LoadWriterManager::writeResource ( const String path,
ResourceDatabase resource 
) const

Writes the resource specified by the given file using the appropriate ResourceLoadWriter.

bool LoadWriterManager::writeResource ( VirtualFile file,
ResourceDatabase resource 
) const

Writes the resource specified by the given file using the appropriate ResourceLoadWriter.

const Collection<LoadCallback>* vl::LoadWriterManager::loadCallbacks (  ) const [inline]
const Collection<WriteCallback>* vl::LoadWriterManager::writeCallbacks (  ) const [inline]
Collection<LoadCallback>* vl::LoadWriterManager::loadCallbacks (  ) [inline]
Collection<WriteCallback>* vl::LoadWriterManager::writeCallbacks (  ) [inline]

Member Data Documentation


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:08:06.
Permission is granted to use this page to write and publish articles regarding Visualization Library.