Updated Polish translation
[anjuta-extras.git] / plugins / scintilla / PropSetFile.h
blobc0cdb0505d84ce7003cd4bc3f96738c346a5251e
1 // SciTE - Scintilla based Text Editor
2 /** @file PropSetFile.h
3 ** Definition of platform independent base class of editor.
4 **/
5 // Copyright 1998-2009 by Neil Hodgson <neilh@scintilla.org>
6 // The License.txt file describes the conditions under which this software may be distributed.
8 /**
9 */
11 #include <string>
12 #include <map>
14 #include "PropSet.h"
16 #include "SString.h"
17 #include "FilePath.h"
19 typedef std::map<std::string, std::string> mapss;
21 class PropSetFile : public PropertyGet {
22 bool lowerKeys;
23 SString GetWildUsingStart(const PropSetFile &psStart, const char *keybase, const char *filename);
24 static bool caseSensitiveFilenames;
25 mapss props;
26 std::string enumnext;
27 public:
28 PropSetFile *superPS;
29 PropSetFile(bool lowerKeys_=false);
30 virtual ~PropSetFile();
31 void Set(const char *key, const char *val, int lenKey=-1, int lenVal=-1);
32 void Set(const char *keyVal);
33 void Unset(const char *key, int lenKey=-1);
34 void SetMultiple(const char *s);
35 SString Get(const char *key) const;
36 SString GetExpanded(const char *key) const;
37 SString Expand(const char *withVars, int maxExpands=100) const;
38 int GetInt(const char *key, int defaultValue=0) const;
39 void Clear();
40 char *ToString() const; // Caller must delete[] the return value
42 bool ReadLine(const char *data, bool ifIsTrue, FilePath directoryForImports, FilePath imports[] = 0, int sizeImports = 0);
43 void ReadFromMemory(const char *data, int len, FilePath directoryForImports, FilePath imports[] = 0, int sizeImports = 0);
44 bool Read(FilePath filename, FilePath directoryForImports, FilePath imports[] = 0, int sizeImports = 0);
45 void SetInteger(const char *key, int i);
46 SString GetWild(const char *keybase, const char *filename);
47 SString GetNewExpand(const char *keybase, const char *filename="");
48 bool GetFirst(const char *&key, const char *&val);
49 bool GetNext(const char *&key, const char *&val);
50 static void SetCaseSensitiveFilenames(bool caseSensitiveFilenames_) {
51 caseSensitiveFilenames = caseSensitiveFilenames_;
54 private:
55 // copy-value semantics not implemented
56 PropSetFile(const PropSetFile &copy);
57 void operator=(const PropSetFile &assign);