summaryrefslogtreecommitdiff
path: root/indra/llui/lltextparser.h
diff options
context:
space:
mode:
authorYuri Chebotarev <ychebotarev@productengine.com>2010-06-04 13:58:18 +0300
committerYuri Chebotarev <ychebotarev@productengine.com>2010-06-04 13:58:18 +0300
commit15711b29afd293acd23d948a51ea65795335c95f (patch)
tree8fdbb8e7275ed5d16a19d8bc3434b69d687b0b61 /indra/llui/lltextparser.h
parent9345f01d4b61f857ed540cf725c8cd0ee1b0ef24 (diff)
parente1189d0e2ee47539edc68c3532e0a5ce64d5dcd1 (diff)
merge
--HG-- branch : product-engine
Diffstat (limited to 'indra/llui/lltextparser.h')
-rw-r--r--indra/llui/lltextparser.h15
1 files changed, 7 insertions, 8 deletions
diff --git a/indra/llui/lltextparser.h b/indra/llui/lltextparser.h
index 072ac0f300..3005822f43 100644
--- a/indra/llui/lltextparser.h
+++ b/indra/llui/lltextparser.h
@@ -35,12 +35,13 @@
#define LL_LLTEXTPARSER_H
#include "llsd.h"
+#include "llsingleton.h"
class LLUUID;
class LLVector3d;
class LLColor4;
-class LLTextParser
+class LLTextParser : public LLSingleton<LLTextParser>
{
public:
typedef enum e_condition_type { CONTAINS, MATCHES, STARTS_WITH, ENDS_WITH } EConditionType;
@@ -48,22 +49,20 @@ public:
typedef enum e_highlight_position { WHOLE, START, MIDDLE, END } EHighlightPosition;
typedef enum e_dialog_action { ACTION_NONE, ACTION_CLOSE, ACTION_ADD, ACTION_COPY, ACTION_UPDATE } EDialogAction;
- static LLTextParser* getInstance();
- LLTextParser(){};
- ~LLTextParser();
+ LLTextParser();
- S32 findPattern(const std::string &text, LLSD highlight);
LLSD parsePartialLineHighlights(const std::string &text,const LLColor4 &color, EHighlightPosition part=WHOLE, S32 index=0);
bool parseFullLineHighlights(const std::string &text, LLColor4 *color);
+private:
+ S32 findPattern(const std::string &text, LLSD highlight);
std::string getFileName();
- LLSD loadFromDisk();
+ void loadKeywords();
bool saveToDisk(LLSD highlights);
public:
LLSD mHighlights;
-private:
- static LLTextParser* sInstance;
+ bool mLoaded;
};
#endif