Source Code (Use browser search to find items of interest.)

Class Index

kdevelop'HlKeyword (./kdevelop/kdevelop/kwrite/highlight.h:101)

class HlKeyword : public HlItemWw {
  public:
    HlKeyword(int attribute, int context);
    virtual ~HlKeyword();
    void addWord(const QString &);
    void addList(const char **);
    virtual const QChar *checkHgl(const QChar *);
  protected:
    QStringList words;
};


kdevelop'HlKeyword::HlKeyword() (./kdevelop/kdevelop/kwrite/highlight.cpp:256)

HlKeyword::HlKeyword(int attribute, int context)
  : HlItemWw(attribute,context) {
//  words.setAutoDelete(true);
}


kdevelop'HlKeyword::~HlKeyword() (./kdevelop/kdevelop/kwrite/highlight.cpp:261)

HlKeyword::~HlKeyword() {
}



kdevelop'HlKeyword::addWord() (./kdevelop/kdevelop/kwrite/highlight.cpp:265)

void HlKeyword::addWord(const QString &word) {
//  KeywordData *word;
//  word = new KeywordData(s);
  words.append(word);
}


kdevelop'HlKeyword::addList() (./kdevelop/kdevelop/kwrite/highlight.cpp:271)

void HlKeyword::addList(const char **list) {

  while (*list) {
    words.append(*list);
//    addWord(*list);
    list++;
  }
}


kdevelop'HlKeyword::checkHgl() (./kdevelop/kdevelop/kwrite/highlight.cpp:280)

const QChar *HlKeyword::checkHgl(const QChar *s) {
    
  for (QStringList::Iterator it = words.begin(); it != words.end(); ++it) {
    if (memcmp(s, (*it).unicode(), (*it).length()*sizeof(QChar)) == 0) {
      return s + (*it).length();
    }
  }
  return 0L;
}