# Visualization Library A lightweight C++ OpenGL middleware for 2D/3D graphics | [Home] [Tutorials] [All Classes] [Grouped Classes]

# 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:

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 ResourceLoadWriter * | 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 * | 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 * | findLoader (VirtualFile *file) const
| Returns the ResourceLoadWriter that has been registered to load the resource type specified by the given file.
const ResourceLoadWriter * | findWriter (VirtualFile *file) const
| Returns the ResourceLoadWriter that has been registered to write the resource type specified by the given file.
ref< ResourceDatabase > | loadResource (const String &path, bool quick=true) const
| Loads the resource specified by the given path using the appropriate ResourceLoadWriter.
ref< ResourceDatabase > | loadResource (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< ResourceLoadWriter > | mLoadWriters
Collection< LoadCallback > | mLoadCallbacks
Collection< WriteCallback > | mWriteCallbacks

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

Collection<ResourceLoadWriter> vl::LoadWriterManager::mLoadWriters`[protected]`

Collection<LoadCallback> vl::LoadWriterManager::mLoadCallbacks`[protected]`

Collection<WriteCallback> vl::LoadWriterManager::mWriteCallbacks`[protected]`

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

- E:/VisualizationLibrary/BuildSystem/VL_DISTRO/Visualization_Library_SDK/src/vl/LoadWriterManager.hpp
- E:/VisualizationLibrary/BuildSystem/VL_DISTRO/Visualization_Library_SDK/src/vl/LoadWriterManager.cpp

Visualization Library v2009.08 Reference Documentation
Copyright 2005-2009 Michele Bosi. All rights reserved.
Updated on Sun Nov 8 14:28:59 2009.
Permission is granted to use this page to write and publish articles regarding Visualization Library.