1 // SciTE - Scintilla based Text Editor
2 /** @file PropSetFile.h
3 ** Definition of platform independent base class of editor.
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.
19 typedef std::map
<std::string
, std::string
> mapss
;
21 class PropSetFile
: public PropertyGet
{
23 SString
GetWildUsingStart(const PropSetFile
&psStart
, const char *keybase
, const char *filename
);
24 static bool caseSensitiveFilenames
;
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;
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_
;
55 // copy-value semantics not implemented
56 PropSetFile(const PropSetFile
©
);
57 void operator=(const PropSetFile
&assign
);