KrisLibrary
1.0.0
|
A basic data type. More...
#include <ResourceLibrary.h>
Public Member Functions | |
BasicResource (const T &val) | |
BasicResource (const T &val, const std::string &name) | |
BasicResource (const T &val, const std::string &name, const std::string &fileName) | |
virtual bool | Load (std::istream &in) |
virtual bool | Save (std::ostream &out) |
virtual bool | Load (const std::string &fn) |
virtual bool | Load () |
virtual bool | Save (const std::string &fn) |
virtual bool | Save () |
virtual const char * | Type () const |
virtual ResourceBase * | Make () |
virtual ResourceBase * | Copy () |
Public Member Functions inherited from ResourceBase | |
ResourceBase (const std::string &name) | |
ResourceBase (const std::string &name, const std::string &fn) | |
virtual bool | Load (TiXmlElement *in) |
virtual bool | Save (TiXmlElement *out) |
virtual bool | Load (AnyCollection &c) |
virtual bool | Save (AnyCollection &c) |
Public Attributes | |
T | data |
Public Attributes inherited from ResourceBase | |
std::string | name |
std::string | fileName |
A basic data type.
Assumes the data type has std::ostream << and std::istream >> overloads.
The type T is by default represented by the string returned to by typeid(T).name(). This is typically a mangled string that is compiler-dependent.
To override this, you must override the template function BasicResourceTypeName<T>().
|
inlinevirtual |
Make a ResourceBase that copies all the contents of this. (Copying the name and fileName are optional)
Reimplemented from ResourceBase.
|
inlinevirtual |
Make a ResourceBase of the same dynamic type as this. ResourceBase instances are their own factories.
Reimplemented from ResourceBase.
|
inlinevirtual |
A unique type string used for type indexing and xml output, only alphanumeric characters allowed.
Reimplemented from ResourceBase.