LLKeywords Class Reference

#include <llkeywords.h>

Collaboration diagram for LLKeywords:

Collaboration graph
[legend]
List of all members.

Public Types

typedef std::map< LLWString,
LLKeywordToken * > 
word_token_map_t

Public Member Functions

 LLKeywords ()
 ~LLKeywords ()
BOOL loadFromFile (const LLString &filename)
BOOL isLoaded ()
void findSegments (std::vector< LLTextSegment * > *seg_list, const LLWString &text)
void addToken (LLKeywordToken::TOKEN_TYPE type, const LLString &key, const LLColor3 &color, const LLString &tool_tip=LLString::null)

Public Attributes

word_token_map_t mWordTokenMap

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)

Private Attributes

BOOL mLoaded
token_list_t mLineTokenList
token_list_t mDelimiterTokenList

Detailed Description

Definition at line 78 of file llkeywords.h.


Member Typedef Documentation

typedef std::deque<LLKeywordToken*> LLKeywords::token_list_t [private]

Definition at line 109 of file llkeywords.h.

typedef std::map<LLWString, LLKeywordToken*> LLKeywords::word_token_map_t

Definition at line 106 of file llkeywords.h.


Constructor & Destructor Documentation

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.


Member Function Documentation

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().

void LLKeywords::findSegments ( std::vector< LLTextSegment * > *  seg_list,
const LLWString text 
)

Definition at line 236 of file llkeywords.cpp.

References base, 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::insertSegment ( std::vector< LLTextSegment * > *  seg_list,
LLTextSegment new_segment,
S32  text_len 
) [private]

Definition at line 460 of file llkeywords.cpp.

References LLTextSegment::getEnd(), LLTextSegment::getStart(), S32, and LLTextSegment::setEnd().

Referenced by findSegments().

BOOL LLKeywords::isLoaded (  )  [inline]

Definition at line 85 of file llkeywords.h.

References mLoaded.

Referenced by LLTextEditor::updateSegments().

BOOL LLKeywords::loadFromFile ( const LLString filename  ) 

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().

LLColor3 LLKeywords::readColor ( const LLString s  )  [private]

Definition at line 222 of file llkeywords.cpp.

References b, g, llendl, llinfos, r, s, and S32.

Referenced by loadFromFile().


Member Data Documentation

token_list_t LLKeywords::mDelimiterTokenList [private]

Definition at line 111 of file llkeywords.h.

Referenced by addToken(), findSegments(), and ~LLKeywords().

token_list_t LLKeywords::mLineTokenList [private]

Definition at line 110 of file llkeywords.h.

Referenced by addToken(), findSegments(), and ~LLKeywords().

BOOL LLKeywords::mLoaded [private]

Definition at line 104 of file llkeywords.h.

Referenced by isLoaded(), and loadFromFile().

word_token_map_t LLKeywords::mWordTokenMap

Definition at line 107 of file llkeywords.h.

Referenced by addToken(), findSegments(), LLScriptEdCore::onBtnDynamicHelp(), and ~LLKeywords().


The documentation for this class was generated from the following files:
Generated on Thu Jul 1 06:11:27 2010 for Second Life Viewer by  doxygen 1.4.7