#include <ClassLoader.h>
Inheritance diagram for Track::ClassLoader< T >:
Public Member Functions | |
ClassLoader (std::string name) | |
Create a ClassLoader for a specific class. | |
virtual boost::shared_ptr< Savable > | create (std::istream &source) const |
Create an object by reading its info from a file. | |
virtual std::string | get_identifier () const |
Get the unique identification string for the class. | |
Protected Attributes | |
std::string | m_name |
The unique identifier for the class. |
Must not be destroyed before a file is loaded, as it is required to decode it then. It registers itself with the SavableClassInstance when created, but does not unregister when destroyed.
T | The class to create. |
Definition at line 192 of file ClassLoader.h.
Track::ClassLoader< T >::ClassLoader | ( | std::string | name | ) | [inline] |
Create a ClassLoader for a specific class.
This must be a global variable, as it must not be deleted before a class is loaded.
name | the Unique name to associate with when loading the class of a file. It is recommended to be the class name including namespace. |
Definition at line 203 of file ClassLoader.h.
virtual boost::shared_ptr<Savable> Track::ClassLoader< T >::create | ( | std::istream & | source | ) | const [inline, virtual] |
Create an object by reading its info from a file.
source | The file to read from. The file will be advanced to the end of the loaded object. |
Implements Track::ClassLoaderBase.
Definition at line 214 of file ClassLoader.h.
virtual std::string Track::ClassLoader< T >::get_identifier | ( | ) | const [inline, virtual] |
Get the unique identification string for the class.
Implements Track::ClassLoaderBase.
Definition at line 221 of file ClassLoader.h.
std::string Track::ClassLoader< T >::m_name [protected] |
Generated at Mon Sep 6 00:41:18 2010 by Doxygen version 1.4.7 for Racer version svn335.