diff options
author | lordjaxom <lordjaxom> | 2005-01-02 16:54:41 +0000 |
---|---|---|
committer | lordjaxom <lordjaxom> | 2005-01-02 16:54:41 +0000 |
commit | 7c9181bf95fedb7a4b4ab40c31aaa841ead074ed (patch) | |
tree | 8ea4f4368674465ec7263028340585501060e5a5 /xml | |
parent | 6e98a71ded769f729a0cbd865ece36a7334f6404 (diff) | |
download | vdr-plugin-text2skin-7c9181bf95fedb7a4b4ab40c31aaa841ead074ed.tar.gz vdr-plugin-text2skin-7c9181bf95fedb7a4b4ab40c31aaa841ead074ed.tar.bz2 |
*** empty log message ***
Diffstat (limited to 'xml')
-rw-r--r-- | xml/string.c | 21 | ||||
-rw-r--r-- | xml/string.h | 8 |
2 files changed, 27 insertions, 2 deletions
diff --git a/xml/string.c b/xml/string.c index 594b4b6..e0b1303 100644 --- a/xml/string.c +++ b/xml/string.c @@ -1,5 +1,5 @@ /* - * $Id: string.c,v 1.4 2005/01/01 23:44:36 lordjaxom Exp $ + * $Id: string.c,v 1.5 2005/01/02 16:54:41 lordjaxom Exp $ */ #include "xml/string.h" @@ -49,6 +49,25 @@ std::string txToken::Token(const txToken &Token) cxString::cxString(cxSkin *Skin): mSkin(Skin) { + mStrings.push_back(this); +} + +cxString::~cxString() +{ + tStringList::iterator it = mStrings.begin(); + while (it != mStrings.end()) { + if ((*it) == this) { + mStrings.erase(it); + break; + } + } +} + +void cxString::Reparse(void) +{ + tStringList::iterator it = mStrings.begin(); + while (it != mStrings.end()) + (*it)->Parse(); } bool cxString::Parse(const std::string &Text) diff --git a/xml/string.h b/xml/string.h index e97b5d4..fe7149c 100644 --- a/xml/string.h +++ b/xml/string.h @@ -1,5 +1,5 @@ /* - * $Id: string.h,v 1.5 2005/01/01 23:44:36 lordjaxom Exp $ + * $Id: string.h,v 1.6 2005/01/02 16:54:41 lordjaxom Exp $ */ #ifndef VDR_TEXT2SKIN_XML_STRING_H @@ -168,13 +168,19 @@ class cxSkin; class cxString { private: + typedef std::vector<cxString*> tStringList; + static tStringList mStrings; + std::string mText; std::string mOriginal; std::vector<txToken> mTokens; cxSkin *mSkin; public: + static void Reparse(void); + cxString(cxSkin *Skin); + ~cxString(); bool Parse(const std::string &Text); bool Parse(void) { return Parse(mOriginal); } |