165 else p->
escPassSet.insert(StringSet::value_type(findString));
182 p->
escSubMap.insert(DualStringMap::value_type(buf, replaceString));
185 else p->
escSubMap.insert(DualStringMap::value_type(findString, replaceString));
197 DualStringMap::iterator it;
209 buf += it->second.
c_str();
224 StringSet::iterator it;
254 DualStringMap::iterator it;
256 if (*escString ==
'#') {
274 buf += it->second.
c_str();
292 stdstr(&(this->escStart), escStart);
298 stdstr(&(this->escEnd), escEnd);
304 stdstr(&(this->tokenStart), tokenStart);
310 stdstr(&(this->tokenEnd), tokenEnd);
319 bool intoken =
false;
321 int escStartPos = 0, escEndPos = 0;
322 int tokenStartPos = 0, tokenEndPos = 0;
337 for (;*from; from++) {
353 else tokenStartPos++;
357 if (*from ==
escStart[escStartPos]) {
371 if (*from ==
escEnd[escEndPos]) {
373 intoken = inEsc =
false;
381 escEndPos = escStartPos = tokenEndPos = tokenStartPos = 0;
389 if (*from ==
tokenEnd[tokenEndPos]) {
398 escEndPos = escStartPos = tokenEndPos = tokenStartPos = 0;
410 token[tokpos++] = *from;
420 lastTextNode.
append(*from);
#define SWORD_NAMESPACE_START
static const char PRECHAR
void removeAllowedEscapeString(const char *findString)
void setTokenEnd(const char *tokenEnd)
void addAllowedEscapeString(const char *findString)
static const char POSTCHAR
virtual char processText(SWBuf &text, const SWKey *key=0, const SWModule *module=0)
void setPassThruUnknownToken(bool val)
virtual bool handleToken(SWBuf &buf, const char *token, BasicFilterUserData *userData)
virtual bool handleEscapeString(SWBuf &buf, const char *escString, BasicFilterUserData *userData)
void setTokenCaseSensitive(bool val)
void setEscapeStart(const char *escStart)
bool passThruUnknownToken
virtual bool handleNumericEscapeString(SWBuf &buf, const char *escString)
bool substituteToken(SWBuf &buf, const char *token)
void addEscapeStringSubstitute(const char *findString, const char *replaceString)
SWORD_NAMESPACE_START char * stdstr(char **ipstr, const char *istr, unsigned int memPadFactor=1)
void setTokenStart(const char *tokenStart)
static const char FINALIZE
void removeTokenSubstitute(const char *findString)
const char * c_str() const
BasicFilterUserData(const SWModule *module, const SWKey *key)
SWBuf & append(const char *str, long max=-1)
void setPassThruNumericEscapeString(bool val)
void setPassThruUnknownEscapeString(bool val)
SWORD_NAMESPACE_START typedef std::map< SWBuf, SWBuf > DualStringMap
virtual bool processStage(char, SWBuf &, char *&, BasicFilterUserData *)
virtual BasicFilterUserData * createUserData(const SWModule *module, const SWKey *key)
bool substituteEscapeString(SWBuf &buf, const char *escString)
#define SWDYNAMIC_CAST(className, object)
unsigned long size() const
static const char INITIALIZE
bool escStringCaseSensitive
DualStringMap tokenSubMap
bool passAllowedEscapeString(SWBuf &buf, const char *escString)
bool supressAdjacentWhitespace
void setEscapeStringCaseSensitive(bool val)
void addTokenSubstitute(const char *findString, const char *replaceString)
char * toupperstr(char *t, unsigned int max=0)
void setEscapeEnd(const char *escEnd)
#define SWORD_NAMESPACE_END
std::set< SWBuf > StringSet
void removeEscapeStringSubstitute(const char *findString)
void appendEscapeString(SWBuf &buf, const char *escString)