From 7bb399de4c4afa30fe016d25260a105448476374 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sat, 28 Mar 2015 12:53:07 +0000 Subject: - crash fix; - code cleaning git-svn-id: http://svn.miranda-ng.org/main/trunk@12534 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/IEView/src/TextToken.h | 53 ++++++++++++++++++++++-------------------- 1 file changed, 28 insertions(+), 25 deletions(-) (limited to 'plugins/IEView/src/TextToken.h') diff --git a/plugins/IEView/src/TextToken.h b/plugins/IEView/src/TextToken.h index 3789ce9350..6f3c9fc1a3 100644 --- a/plugins/IEView/src/TextToken.h +++ b/plugins/IEView/src/TextToken.h @@ -60,30 +60,33 @@ public: TextToken(int type, const char *text, int len); TextToken(int type, const wchar_t *wtext, int len); ~TextToken(); - int getType(); - const char * getText(); - const wchar_t* getTextW(); - const char * getLink(); - const wchar_t * getLinkW(); - void setLink(const char *link); - void setLink(const wchar_t *wlink); - int getTag(); - void setTag(int); - bool isEnd(); - void setEnd(bool); - TextToken * getNext(); - void setNext(TextToken *); - // void toString(char **str, int *sizeAlloced); - void toString(wchar_t **str, int *sizeAlloced); - // static char * htmlEncode(const char *str); - // static char * urlEncode2(const char *str); - // static TextToken* tokenizeLinks(const char *text); - // static TextToken* tokenizeSmileys(const char *proto, const char *text); - // UNICODE - wchar_t * htmlEncode(const wchar_t *str); - static TextToken* tokenizeLinks(const wchar_t *wtext); - static TextToken* tokenizeSmileys(MCONTACT hContact, const char *proto, const wchar_t *wtext, bool isSent); - static TextToken* tokenizeBBCodes(const wchar_t *text); - static TextToken* tokenizeChatFormatting(const wchar_t *text); + + __inline int getType() const { return type; } + __inline int getTag() const { return tag; } + + __inline TextToken* getNext() const { return next; } + + __inline const char* getText() const { return text; } + __inline const wchar_t* getTextW() const { return wtext; } + + __inline const char* getLink() const { return link; } + __inline const wchar_t* getLinkW() const { return wlink; } + + __inline bool isEnd() const { return end; } + + __inline void setTag(int _val) { tag = _val; } + __inline void setEnd(bool _val) { end = _val; } + __inline void setNext(TextToken *_val) { next = _val; } + + void setLink(const char *link); + void setLink(const wchar_t *wlink); + + void toString(wchar_t **str, int *sizeAlloced); + wchar_t* htmlEncode(const wchar_t *str); + + static TextToken* tokenizeLinks(const wchar_t *wtext); + static TextToken* tokenizeSmileys(MCONTACT hContact, const char *proto, const wchar_t *wtext, bool isSent); + static TextToken* tokenizeBBCodes(const wchar_t *text); + static TextToken* tokenizeChatFormatting(const wchar_t *text); }; #endif -- cgit v1.2.3