Show ksaveddatamanager.h syntax highlighted
/*
Copyright (C) 2003, 2004 by Luca Cappa
Written by Luca Cappa groton@users.sourceforge.net
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef __KSAVEDDATAMANAGER_H__
#define __KSAVEDDATAMANAGER_H__
struct iDocument;
struct iDocumentSystem;
struct iDocumentNode;
#include "ikxmlwriter.h"
#include "ikxmlreader.h"
#include "csutil\stringarray.h"
/*
<levels>
<level name="">
<block name="" x="" z="" orientation="" blockid="" />
</level>
<level name="">
...
</level>
...
</levels>
*/
class KSavedDataManager : public iBase
{
SCF_DECLARE_IBASE;
csRef<iDocumentSystem> m_docSys;
csRef<iVFS> m_vfs;
static char* s_fileLevels;
static char* s_filePaths;
static char* s_fileInitPoss;
static char* s_fileLandmarks;
void CreateErrorMessage (iString* p_error, const char* p_format, ...)
const;
csPtr<iDocument> ParseFile (const char*, iString*, bool =false) const;
public:
KSavedDataManager ();
virtual ~KSavedDataManager ()
{
};
bool AddLevel (const char*, iKXMLWriter*, iString*);
bool AddLandmarksList (const char*, iKXMLWriter*, iString*);
bool AddInitPos (const char*, iKXMLWriter*, iString*);
bool AddPath (const char*, iKXMLWriter*, iString*);
bool RemoveLevel (const char* p_name, iString* = 0);
bool RemoveLandmarksList (const char* p_name, iString* = 0);
bool RemoveInitPos (const char* p_name, iString* = 0);
bool RemovePath (const char* p_name, iString* = 0);
bool RetrieveInitPos (const char*, iKXMLReader*, iString* = 0) const;
bool RetrieveLevel (const char*, iKXMLReader*, iString* = 0) const;
bool RetrieveLandmarksList (const char*, iKXMLReader*, iString* = 0)
const;
bool RetrieveLandmark (const char* p_name, iKXMLReader* p_reader,
iString* p_error) const;
bool RetrievePath (const char*, iKXMLReader*, iString* = 0) const;
bool RetrieveInitPossList (csStringArray& l_p, iString* =0) const;
bool RetrieveLevelsList (csStringArray& l_p, iString* =0) const;
bool RetrieveLandmarksListList (csStringArray& l_p, iString* =0) const;
bool RetrievePathsList (csStringArray& l_p, iString* =0) const;
bool KSavedDataManager::RetrieveDefaultLandmarksList (csStringArray& l_p,
iString* p_error) const;
};
#endif //__KSAVEDDATAMANAGER_H__
See more files for this project here