![]() |
Public API Reference |
![]() |
This interface is used to serialize the engine contents. More...
#include <imap/saver.h>
Public Member Functions | |
Whole world saving | |
virtual bool | SaveMapFile (const char *filename)=0 |
Save the current engine contents to the file with VFS name filename . | |
virtual csRef< iString > | SaveMapFile ()=0 |
Return the current engine contents as a string. | |
virtual bool | SaveMapFile (csRef< iDocumentNode > &root)=0 |
Save the current engine contents as a world file in a DocumentNode. | |
virtual bool | SaveAllCollections ()=0 |
Save all collections to their respective files. | |
virtual bool | SaveCollectionFile (iCollection *collection, const char *filename, int filetype)=0 |
Save a collection to the given file. | |
virtual csRef< iString > | SaveCollection (iCollection *collection, int filetype)=0 |
Return the collection contents as a string. | |
virtual bool | SaveCollection (iCollection *collection, int filetype, csRef< iDocumentNode > &root)=0 |
Save the collection to the given document node. | |
Fine-grained saving | |
virtual bool | SavePortal (iPortal *portal, iDocumentNode *parent)=0 |
Save a portal to the given document node. | |
virtual bool | SaveCameraPosition (iCameraPosition *position, iDocumentNode *parent)=0 |
Save a camera position to the given document node. |
virtual bool iSaver::SaveAllCollections | ( | ) | [pure virtual] |
Save all collections to their respective files.
Collections that do not have any iSaverFile attached will not be saved.
virtual bool iSaver::SaveCameraPosition | ( | iCameraPosition * | position, |
iDocumentNode * | parent | ||
) | [pure virtual] |
Save a camera position to the given document node.
This will create a 'start
' node below parent
.
portal | The camera position to save |
parent | The document node where the description of the camera position will be added |
virtual csRef<iString> iSaver::SaveCollection | ( | iCollection * | collection, |
int | filetype | ||
) | [pure virtual] |
Return the collection contents as a string.
collection | The collection to save |
filename | The VFS name of the file where to save the collection |
filetype | The type of CS file to be saved. It can be one of CS_SAVER_FILE_WORLD, CS_SAVER_FILE_LIBRARY, CS_SAVER_FILE_MESHFACT and CS_SAVER_FILE_PARAMS. |
virtual bool iSaver::SaveCollection | ( | iCollection * | collection, |
int | filetype, | ||
csRef< iDocumentNode > & | root | ||
) | [pure virtual] |
Save the collection to the given document node.
collection | The collection to save |
filetype | The type of CS file to be saved. It can be one of CS_SAVER_FILE_WORLD, CS_SAVER_FILE_LIBRARY, CS_SAVER_FILE_MESHFACT and CS_SAVER_FILE_PARAMS. |
root | The document node where the description of the collection will be added |
virtual bool iSaver::SaveCollectionFile | ( | iCollection * | collection, |
const char * | filename, | ||
int | filetype | ||
) | [pure virtual] |
Save a collection to the given file.
collection | The collection to save |
filename | The VFS name of the file where to save the collection |
filetype | The type of CS file to be saved. It can be one of CS_SAVER_FILE_WORLD, CS_SAVER_FILE_LIBRARY, CS_SAVER_FILE_MESHFACT and CS_SAVER_FILE_PARAMS. |
virtual bool iSaver::SaveMapFile | ( | const char * | filename | ) | [pure virtual] |
Save the current engine contents to the file with VFS name filename
.
virtual csRef<iString> iSaver::SaveMapFile | ( | ) | [pure virtual] |
Return the current engine contents as a string.
virtual bool iSaver::SaveMapFile | ( | csRef< iDocumentNode > & | root | ) | [pure virtual] |
Save the current engine contents as a world file in a DocumentNode.
virtual bool iSaver::SavePortal | ( | iPortal * | portal, |
iDocumentNode * | parent | ||
) | [pure virtual] |
Save a portal to the given document node.
This will create a 'portal
' node below parent
.
portal | The portal to save |
parent | The document node where the description of the portal will be added |