vegastrike  0.5.1.r1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
save_util.h
Go to the documentation of this file.
1 #ifndef __SAVE_UTIL_H__
2 #define __SAVE_UTIL_H__
3 
4 #include <string>
5 using std::string;
6 
7 extern const char *mission_key;
8 
9 Unit * DockToSavedBases( int playernum, QVector &safevec );
10 
11 
12 /*
13  * C++ versions of some useful and comfy Python API
14  */
15 
16 float getSaveData( int whichcp, const std::string &key, unsigned int num );
17 const std::vector< float >& getSaveData( int whichcp, const std::string &key );
18 std::string getSaveString( int whichcp, const std::string &key, unsigned int num );
19 unsigned int getSaveDataLength( int whichcp, const std::string &key );
20 unsigned int getSaveStringLength( int whichcp, const std::string &key );
21 unsigned int pushSaveData( int whichcp, const std::string &key, float val );
22 unsigned int eraseSaveData( int whichcp, const std::string &key, unsigned int index );
23 unsigned int clearSaveData( int whichcp, const std::string &key );
24 unsigned int pushSaveString( int whichcp, const std::string &key, const std::string &value );
25 void putSaveString( int whichcp, const std::string &key, unsigned int num, const std::string &val );
26 void putSaveData( int whichcp, const std::string &key, unsigned int num, float val );
27 unsigned int eraseSaveString( int whichcp, const std::string &key, unsigned int index );
28 unsigned int clearSaveString( int whichcp, const std::string &key );
29 std::vector< std::string >loadStringList( int playernum, const std::string &mykey );
30 const std::vector< std::string >& getStringList( int playernum, const std::string &mykey );
31 void saveStringList( int playernum, const std::string &mykey, const std::vector< std::string > &names );
32 void saveDataList( int playernum, const std::string &mykey, const std::vector< float > &values );
33 
34 #endif
35