/src/tools/lua_debug/scite/src/PropSetFile.h

http://fengine.googlecode.com/ · C Header · 51 lines · 37 code · 5 blank · 9 comment · 0 complexity · 12d67c1e539f400ec4ba7828fe4c2d10 MD5 · raw file

  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.
  7. /**
  8. */
  9. typedef std::map<std::string, std::string> mapss;
  10. class PropSetFile {
  11. bool lowerKeys;
  12. SString GetWildUsingStart(const PropSetFile &psStart, const char *keybase, const char *filename);
  13. static bool caseSensitiveFilenames;
  14. mapss props;
  15. std::string enumnext;
  16. public:
  17. PropSetFile *superPS;
  18. PropSetFile(bool lowerKeys_=false);
  19. virtual ~PropSetFile();
  20. void Set(const char *key, const char *val, int lenKey=-1, int lenVal=-1);
  21. void Set(const char *keyVal);
  22. void Unset(const char *key, int lenKey=-1);
  23. void SetMultiple(const char *s);
  24. SString Get(const char *key) const;
  25. const char *GetString(const char *key) const; //!-add-[FindResultListStyle]
  26. SString GetExpanded(const char *key) const;
  27. SString Expand(const char *withVars, int maxExpands=100) const;
  28. int GetInt(const char *key, int defaultValue=0) const;
  29. void Clear();
  30. char *ToString() const; // Caller must delete[] the return value
  31. bool ReadLine(const char *data, bool ifIsTrue, FilePath directoryForImports, FilePath imports[] = 0, int sizeImports = 0);
  32. void ReadFromMemory(const char *data, int len, FilePath directoryForImports, FilePath imports[] = 0, int sizeImports = 0);
  33. bool Read(FilePath filename, FilePath directoryForImports, FilePath imports[] = 0, int sizeImports = 0);
  34. void SetInteger(const char *key, int i);
  35. SString GetWild(const char *keybase, const char *filename);
  36. SString GetNewExpand(const char *keybase, const char *filename="");
  37. bool GetFirst(const char *&key, const char *&val);
  38. bool GetNext(const char *&key, const char *&val);
  39. static void SetCaseSensitiveFilenames(bool caseSensitiveFilenames_) {
  40. caseSensitiveFilenames = caseSensitiveFilenames_;
  41. }
  42. private:
  43. // copy-value semantics not implemented
  44. PropSetFile(const PropSetFile &copy);
  45. void operator=(const PropSetFile &assign);
  46. };