CrystalSpace

Public API Reference

iSaver Struct Reference

This interface is used to serialize the engine contents. More...

#include <imap/saver.h>

Inheritance diagram for iSaver:
iBase

List of all members.

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< iStringSaveMapFile ()=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< iStringSaveCollection (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.

Detailed Description

This interface is used to serialize the engine contents.

Definition at line 38 of file saver.h.


Member Function Documentation

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.

Parameters:
portalThe camera position to save
parentThe 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.

Parameters:
collectionThe collection to save
filenameThe VFS name of the file where to save the collection
filetypeThe 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.

Parameters:
collectionThe collection to save
filetypeThe 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.
rootThe 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.

Parameters:
collectionThe collection to save
filenameThe VFS name of the file where to save the collection
filetypeThe 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.

Parameters:
portalThe portal to save
parentThe document node where the description of the portal will be added

The documentation for this struct was generated from the following file:

Generated for Crystal Space 2.0 by doxygen 1.7.6.1