]>
git.saurik.com Git - wxWidgets.git/blob - src/stc/scintilla/include/PropSet.h
   1 // Scintilla source code edit control 
   3  ** A Java style properties file module. 
   5 // Copyright 1998-2002 by Neil Hodgson <neilh@scintilla.org> 
   6 // The License.txt file describes the conditions under which this software may be distributed. 
  12 bool EqualCaseInsensitive(const char *a
, const char *b
); 
  14 bool isprefix(const char *target
, const char *prefix
); 
  25         Property() : hash(0), key(0), val(0), next(0) {} 
  32         enum { hashRoots
=31 }; 
  33         Property 
*props
[hashRoots
]; 
  36         static unsigned int HashString(const char *s
, size_t len
) { 
  50         void Set(const char *key
, const char *val
, int lenKey
=-1, int lenVal
=-1); 
  51         void Set(const char *keyVal
); 
  52         void Unset(const char *key
, int lenKey
=-1); 
  53         void SetMultiple(const char *s
); 
  54         SString 
Get(const char *key
) const; 
  55         SString 
GetExpanded(const char *key
) const; 
  56         SString 
Expand(const char *withVars
, int maxExpands
=100) const; 
  57         int GetInt(const char *key
, int defaultValue
=0) const; 
  59         char *ToString() const; // Caller must delete[] the return value 
  62         // copy-value semantics not implemented 
  63         PropSet(const PropSet 
©
); 
  64         void operator=(const PropSet 
&assign
); 
  71         // Each word contains at least one character - a empty word acts as sentinel at the end. 
  75         bool onlyLineEnds
;      ///< Delimited by any white space or only line ends 
  78         WordList(bool onlyLineEnds_ 
= false) : 
  79                 words(0), list(0), len(0), onlyLineEnds(onlyLineEnds_
), 
  82         ~WordList() { Clear(); } 
  83         operator bool() { return len 
? true : false; } 
  85         void Set(const char *s
); 
  86         bool InList(const char *s
); 
  87         bool InListAbbreviated(const char *s
, const char marker
); 
  90 inline bool IsAlphabetic(unsigned int ch
) { 
  91         return ((ch 
>= 'A') && (ch 
<= 'Z')) || ((ch 
>= 'a') && (ch 
<= 'z')); 
  99 // Visual C++ doesn't like the private copy idiom for disabling 
 100 // the default copy constructor and operator=, but it's fine. 
 101 #pragma warning(disable: 4511 4512)