std::string PrintTokens( const TokenSet& setTokens ) { std::string strTokens( " " ); for ( TokenSet::const_iterator i = setTokens.begin() ; i != setTokens.end() ; i++ ) strTokens += PrintToken( *i, true ) + " "; return strTokens; }
TokenSet Union( const TokenSet& setTokens1, const TokenSet& setTokens2 ) { TokenSet setResult( setTokens1 ); for ( TokenSet::const_iterator i = setTokens2.begin() ; i != setTokens2.end() ; ++i ) setResult.insert( *i ); return setResult; }
bool Contains( const TokenSet& setTokens1, const TokenSet& setTokens2 ) { if ( setTokens2.empty() ) return setTokens1.empty(); for ( TokenSet::const_iterator i = setTokens2.begin() ; i != setTokens2.end() ; ++i ) if ( ! Contains( setTokens1, *i ) ) return false; return true; }
int RouteNode::matchRoute(TokenSet tokens,Json::Value& pathValues){ return matchRoute(tokens.begin(),tokens.end(),pathValues); }
void RouteNode::addRoute(TokenSet tokens,int matchId){ addRoute(tokens.begin(),tokens.end(),matchId); }