#include <llkeywords.h>
Public Types | |
typedef std::map< LLWString, LLKeywordToken * > | word_token_map_t |
typedef word_token_map_t::const_iterator | keyword_iterator_t |
Public Member Functions | |
LLKeywords () | |
~LLKeywords () | |
BOOL | loadFromFile (const LLString &filename) |
BOOL | isLoaded () const |
void | findSegments (std::vector< LLTextSegment * > *seg_list, const LLWString &text, const LLColor4 &defaultColor) |
void | addToken (LLKeywordToken::TOKEN_TYPE type, const LLString &key, const LLColor3 &color, const LLString &tool_tip=LLString::null) |
keyword_iterator_t | begin () const |
keyword_iterator_t | end () const |
Private Types | |
typedef std::deque < LLKeywordToken * > | token_list_t |
Private Member Functions | |
LLColor3 | readColor (const LLString &s) |
void | insertSegment (std::vector< LLTextSegment * > *seg_list, LLTextSegment *new_segment, S32 text_len, const LLColor4 &defaultColor) |
Private Attributes | |
BOOL | mLoaded |
word_token_map_t | mWordTokenMap |
token_list_t | mLineTokenList |
token_list_t | mDelimiterTokenList |
Definition at line 77 of file llkeywords.h.
typedef std::map<LLWString, LLKeywordToken*> LLKeywords::word_token_map_t |
Definition at line 94 of file llkeywords.h.
typedef word_token_map_t::const_iterator LLKeywords::keyword_iterator_t |
Definition at line 95 of file llkeywords.h.
typedef std::deque<LLKeywordToken*> LLKeywords::token_list_t [private] |
Definition at line 109 of file llkeywords.h.
LLKeywords::LLKeywords | ( | ) |
Definition at line 61 of file llkeywords.cpp.
LLKeywords::~LLKeywords | ( | ) |
Definition at line 65 of file llkeywords.cpp.
References mDelimiterTokenList, mLineTokenList, and mWordTokenMap.
Definition at line 72 of file llkeywords.cpp.
References addToken(), BUFFER_SIZE, FALSE, KEYWORD_FILE_CURRENT_VERSION, LLKeywordToken::LINE, llendl, llifstream, llinfos, mLoaded, NULL, LLKeywordToken::ONE_SIDED_DELIMITER, readColor(), LLStringBase< char >::replaceChar(), S32, LLStringBase< char >::trim(), TRUE, LLKeywordToken::TWO_SIDED_DELIMITER, and LLKeywordToken::WORD.
Referenced by LLTextEditor::loadKeywords().
BOOL LLKeywords::isLoaded | ( | ) | const [inline] |
Definition at line 84 of file llkeywords.h.
References mLoaded.
Referenced by LLTextEditor::updateSegments().
void LLKeywords::findSegments | ( | std::vector< LLTextSegment * > * | seg_list, | |
const LLWString & | text, | |||
const LLColor4 & | defaultColor | |||
) |
Definition at line 236 of file llkeywords.cpp.
References FALSE, LLKeywordToken::getColor(), LLKeywordToken::getLength(), LLKeywordToken::getType(), insertSegment(), LLKeywordToken::isHead(), llassert, mDelimiterTokenList, mLineTokenList, mWordTokenMap, NULL, LLKeywordToken::ONE_SIDED_DELIMITER, p, S32, LLTextSegment::setToken(), TRUE, and LLKeywordToken::TWO_SIDED_DELIMITER.
Referenced by LLTextEditor::loadKeywords(), and LLTextEditor::updateSegments().
void LLKeywords::addToken | ( | LLKeywordToken::TOKEN_TYPE | type, | |
const LLString & | key, | |||
const LLColor3 & | color, | |||
const LLString & | tool_tip = LLString::null | |||
) |
Definition at line 195 of file llkeywords.cpp.
References LLKeywordToken::LINE, llassert, mDelimiterTokenList, mLineTokenList, mWordTokenMap, LLKeywordToken::ONE_SIDED_DELIMITER, LLKeywordToken::TWO_SIDED_DELIMITER, utf8str_to_wstring(), and LLKeywordToken::WORD.
Referenced by loadFromFile(), and LLTextEditor::loadKeywords().
keyword_iterator_t LLKeywords::begin | ( | ) | const [inline] |
Definition at line 96 of file llkeywords.h.
References mWordTokenMap.
Referenced by LLTextEditor::keywordsBegin().
keyword_iterator_t LLKeywords::end | ( | ) | const [inline] |
Definition at line 97 of file llkeywords.h.
References mWordTokenMap.
Referenced by LLTextEditor::keywordsEnd().
Definition at line 222 of file llkeywords.cpp.
References llendl, llinfos, r, and S32.
Referenced by loadFromFile().
void LLKeywords::insertSegment | ( | std::vector< LLTextSegment * > * | seg_list, | |
LLTextSegment * | new_segment, | |||
S32 | text_len, | |||
const LLColor4 & | defaultColor | |||
) | [private] |
Definition at line 460 of file llkeywords.cpp.
References LLTextSegment::getEnd(), LLTextSegment::getStart(), S32, and LLTextSegment::setEnd().
Referenced by findSegments().
BOOL LLKeywords::mLoaded [private] |
word_token_map_t LLKeywords::mWordTokenMap [private] |
Definition at line 108 of file llkeywords.h.
Referenced by addToken(), begin(), end(), findSegments(), and ~LLKeywords().
token_list_t LLKeywords::mLineTokenList [private] |
Definition at line 110 of file llkeywords.h.
Referenced by addToken(), findSegments(), and ~LLKeywords().
token_list_t LLKeywords::mDelimiterTokenList [private] |
Definition at line 111 of file llkeywords.h.
Referenced by addToken(), findSegments(), and ~LLKeywords().