Xalan-C++ API Reference  1.12.0
Public Types | Public Member Functions | Static Public Attributes | Protected Member Functions | List of all members
xalanc::StringTokenizer Class Reference

#include <xalanc/PlatformSupport/StringTokenizer.hpp>

Public Types

typedef size_t size_type
 

Public Member Functions

 StringTokenizer (const XalanDOMString &theString, const XalanDOMString &theTokens, bool fReturnTokens=false)
 Constructs a tokenizer for the target string. More...
 
 StringTokenizer (const XalanDOMString &theString, const XalanDOMChar *theTokens=s_defaultTokens, bool fReturnTokens=false)
 Constructs a tokenizer for the target string. More...
 
 StringTokenizer (const XalanDOMChar *theString, const XalanDOMChar *theTokens=s_defaultTokens, bool fReturnTokens=false)
 Constructs a tokenizer for the target string. More...
 
 StringTokenizer (const XalanDOMChar *theString, const XalanDOMString &theTokens, bool fReturnTokens=false)
 Constructs a tokenizer for the target string. More...
 
 ~StringTokenizer ()
 
bool hasMoreTokens () const
 Determine if there are tokens remaining. More...
 
void nextToken (XalanDOMString &theToken)
 Retrieve the next token to be parsed; behavior is undefined if there are no more tokens. More...
 
size_type countTokens () const
 Count the number of tokens yet to be parsed. More...
 
void reset ()
 

Static Public Attributes

static const XalanDOMChar s_defaultTokens []
 

Protected Member Functions

XalanDOMString::size_type FindNextDelimiterIndex (XalanDOMString::size_type theStartIndex) const
 

Detailed Description

Definition at line 40 of file StringTokenizer.hpp.

Member Typedef Documentation

◆ size_type

Definition at line 46 of file StringTokenizer.hpp.

Constructor & Destructor Documentation

◆ StringTokenizer() [1/4]

xalanc::StringTokenizer::StringTokenizer ( const XalanDOMString theString,
const XalanDOMString theTokens,
bool  fReturnTokens = false 
)

Constructs a tokenizer for the target string.

No copies of any input strings are made.

Parameters
theStringstring to tokenize
theTokensstring of delimiters used to parse target, default is " \t\n\r"
fReturnTokensif true, delimiter characters are also returned as tokens, default is false

◆ StringTokenizer() [2/4]

xalanc::StringTokenizer::StringTokenizer ( const XalanDOMString theString,
const XalanDOMChar *  theTokens = s_defaultTokens,
bool  fReturnTokens = false 
)

Constructs a tokenizer for the target string.

No copies of any input strings are made.

Parameters
theStringstring to tokenize
theTokensstring of delimiters used to parse target, default is " \t\n\r"
fReturnTokensif true, delimiter characters are also returned as tokens, default is false

◆ StringTokenizer() [3/4]

xalanc::StringTokenizer::StringTokenizer ( const XalanDOMChar *  theString,
const XalanDOMChar *  theTokens = s_defaultTokens,
bool  fReturnTokens = false 
)

Constructs a tokenizer for the target string.

No copies of any input strings are made.

Parameters
theStringstring to tokenize
theTokensstring of delimiters used to parse target.
fReturnTokensif true, delimiter characters are also returned as tokens, default is false

◆ StringTokenizer() [4/4]

xalanc::StringTokenizer::StringTokenizer ( const XalanDOMChar *  theString,
const XalanDOMString theTokens,
bool  fReturnTokens = false 
)

Constructs a tokenizer for the target string.

No copies of any input strings are made.

Parameters
theStringstring to tokenize
theTokensstring of delimiters used to parse target.
fReturnTokensif true, delimiter characters are also returned as tokens, default is false

◆ ~StringTokenizer()

xalanc::StringTokenizer::~StringTokenizer ( )

Member Function Documentation

◆ countTokens()

size_type xalanc::StringTokenizer::countTokens ( ) const

Count the number of tokens yet to be parsed.

Returns
number of remaining tokens

◆ FindNextDelimiterIndex()

XalanDOMString::size_type xalanc::StringTokenizer::FindNextDelimiterIndex ( XalanDOMString::size_type  theStartIndex) const
protected

◆ hasMoreTokens()

bool xalanc::StringTokenizer::hasMoreTokens ( ) const

Determine if there are tokens remaining.

Returns
true if there are more tokens

◆ nextToken()

void xalanc::StringTokenizer::nextToken ( XalanDOMString theToken)

Retrieve the next token to be parsed; behavior is undefined if there are no more tokens.

Parameters
theTokennext token string

◆ reset()

void xalanc::StringTokenizer::reset ( )
inline

Definition at line 131 of file StringTokenizer.hpp.

Member Data Documentation

◆ s_defaultTokens

const XalanDOMChar xalanc::StringTokenizer::s_defaultTokens[]
static

Definition at line 44 of file StringTokenizer.hpp.


The documentation for this class was generated from the following file: