#include <savable.h>
Public Member Functions | |
virtual | ~Savable () |
virtual QString | contentsToGDL ()=0 |
Static Public Member Functions | |
static bool | saveToFile (GluonCore::GluonObject *object) |
Public Attributes | |
bool | savableDirty |
The Savable class decorates any GluonObject to allow for saving it to a GDL file (the filename it has).
Note that you should only ever inherit Savable in a class which also has a property called "file" which is of QVariant type QUrl.
It is designed with the GluonEngine::Asset class in mind, but can handle any class with the above requirement in order.
Definition at line 45 of file savable.h.
virtual GluonEngine::Savable::~Savable | ( | ) | [inline, virtual] |
virtual QString GluonEngine::Savable::contentsToGDL | ( | ) | [pure virtual] |
Serialise the contents of the asset to GDL. This function should be implemented in a way which returns the GDL for what the asset contains.
Implemented in GluonEngine::Scene.
bool Savable::saveToFile | ( | GluonCore::GluonObject * | object | ) | [static] |
Saves the passed asset to the filename indicated by the GluonObject's file property.
object | The instance you wish to save |
Definition at line 34 of file savable.cpp.