aboutsummaryrefslogtreecommitdiffhomepage
path: root/lexlib/WordList.cxx
diff options
context:
space:
mode:
authornyamatongwe <unknown>2013-05-08 18:50:12 +1000
committernyamatongwe <unknown>2013-05-08 18:50:12 +1000
commit2ab494b49811d760154a2640416a2cab5708b8c0 (patch)
tree37d9d45da8efd75ae1e688dc217568fe06f1b670 /lexlib/WordList.cxx
parentfb9f49fcaf224a3df72a85ffd37072f0cd282769 (diff)
downloadscintilla-mirror-2ab494b49811d760154a2640416a2cab5708b8c0.tar.gz
Hide implementation of WordList.
Diffstat (limited to 'lexlib/WordList.cxx')
-rw-r--r--lexlib/WordList.cxx21
1 files changed, 21 insertions, 0 deletions
diff --git a/lexlib/WordList.cxx b/lexlib/WordList.cxx
index 07ca015e3..049bf6ec0 100644
--- a/lexlib/WordList.cxx
+++ b/lexlib/WordList.cxx
@@ -64,6 +64,18 @@ static char **ArrayFromWordList(char *wordlist, int *len, bool onlyLineEnds = fa
return keywords;
}
+WordList::WordList(bool onlyLineEnds_) :
+ words(0), list(0), len(0), onlyLineEnds(onlyLineEnds_) {
+}
+
+WordList::~WordList() {
+ Clear();
+}
+
+WordList::operator bool() const {
+ return len ? true : false;
+}
+
bool WordList::operator!=(const WordList &other) const {
if (len != other.len)
return true;
@@ -74,6 +86,10 @@ bool WordList::operator!=(const WordList &other) const {
return false;
}
+int WordList::Length() const {
+ return len;
+}
+
void WordList::Clear() {
if (words) {
delete []list;
@@ -213,3 +229,8 @@ bool WordList::InListAbbreviated(const char *s, const char marker) const {
}
return false;
}
+
+const char *WordList::WordAt(int n) const {
+ return words[n];
+}
+