Keos::CMediaManager Class Reference

Media manager. More...

#include <KeosMediaManager.h>

Inheritance diagram for Keos::CMediaManager:

Inheritance graph
[legend]
List of all members.

Public Member Functions

void AddSearchPath (const String &strPath)
 Add a search path directory for the media.
template<class T>
void RegisterLoader (ILoader< T > *pLoader, const String &strExtensions)
 Register a new T loader.
template<class T>
T * LoadMediaFromFile (const CFile &Filename) const
 Load a T object from a file.
template<class T>
void SaveMediaToFile (const T *pObject, const CFile &Filename) const
 Save a T object in a file.
CFile FindMedia (const CFile &Filename) const
 Find a file in the search path directories.

Detailed Description

Media manager.

Inherit from a CMediaHolder for every managed media

Definition at line 50 of file KeosMediaManager.h.


Member Function Documentation

void Keos::CMediaManager::AddSearchPath ( const String strPath  ) 

Add a search path directory for the media.

Definition at line 45 of file KeosMediaManager.cpp.

template<class T>
void Keos::CMediaManager::RegisterLoader ( ILoader< T > *  pLoader,
const String strExtensions 
) [inline]

Register a new T loader.

Parameters:
pLoader Pointer on the loader.
strExtensions Extensions associated to the loader.

Definition at line 108 of file KeosMediaManager.h.

References Keos::CStringUtil::Split(), and Keos::CStringUtil::ToLower().

template<class T>
T * Keos::CMediaManager::LoadMediaFromFile ( const CFile Filename  )  const [inline]

Load a T object from a file.

Parameters:
Filename Path of the file.
Returns:
Pointer on T loaded.

Definition at line 122 of file KeosMediaManager.h.

References FindMedia(), and Keos::CFile::Fullname().

template<class T>
void Keos::CMediaManager::SaveMediaToFile ( const T *  pObject,
const CFile Filename 
) const [inline]

Save a T object in a file.

Parameters:
pObject Pointer on the object to be saved.
Filename Path of the file.

Definition at line 133 of file KeosMediaManager.h.

References Keos::CFile::Fullname().

CFile Keos::CMediaManager::FindMedia ( const CFile Filename  )  const

Find a file in the search path directories.

Definition at line 54 of file KeosMediaManager.cpp.

References Keos::CFile::Fullname(), and LOADINGFAILED_EXCEPT.

Referenced by LoadMediaFromFile().


The documentation for this class was generated from the following files:
Generated on Fri Mar 9 14:29:25 2007 for Keos by  doxygen 1.5.1-p1