GluonEngine::Savable Class Reference

#include <savable.h>

Inheritance diagram for GluonEngine::Savable:
GluonEngine::Scene

List of all members.

Public Member Functions

virtual ~Savable ()
virtual QString contentsToGDL ()=0

Static Public Member Functions

static bool saveToFile (GluonCore::GluonObject *object)

Public Attributes

bool savableDirty

Detailed Description

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.


Constructor & Destructor Documentation

virtual GluonEngine::Savable::~Savable (  )  [inline, virtual]

Definition at line 48 of file savable.h.


Member Function Documentation

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.

Returns:
The serialised contents of the asset

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.

Parameters:
object The instance you wish to save
Returns:
Whether or not the file was successfully saved
See also:
GluonEngine::Asset

Definition at line 34 of file savable.cpp.


Member Data Documentation

Set this to true any time you do anything to the asset which would be considered a change to the data represented by it

Definition at line 74 of file savable.h.


The documentation for this class was generated from the following files:
Generated on Mon Dec 27 13:13:43 2010 for Gluon by  doxygen 1.6.3