This class provides a C++‐standards‐conforming input iterator over the tokens in the input string suppled at construction (along with the designation of soft and hard delimiter characters) to a Tokenizer object. Tokens are returned, using a bslstl::StringRef ‐‐ by value ‐‐ that means the iterated references remain valid until the underlying input string itself is modified or destroyed. Note that all iterators are invalidated whenever the input string in the parent Tokenizer change.
Synopsis
Declared in <bdlb_tokenizer.h>
class TokenizerIterator;
Type Aliases
Name |
Description |
Signed type used to represent distances between iterators. |
|
Tag identifying this type as an input iterator. |
|
Proxy type returned by |
|
Reference type returned by |
|
Element type yielded by this iterator ( |
Member Functions
Name |
Description |
|
Create a |
Assign to this object the value of the specified |
|
Return a reference to the non‐modifiable current token (i.e., maximal sequence of non‐delimiter characters) in the input string. The returned reference remains valid so long as the underlying input is not modified or destroyed ‐‐ irrespective of the state (or existence) of this object. The behavior is undefined unless the iteration state of this object is initially valid, or if the underlying input has been modified or destroyed since this object was created. |
|
Advance the iteration state of this object to refer to the next token in the underlying input sequence, and return a reference providing modifiable access to this object. The behavior is undefined unless the iteration state of this object is initially valid, or if the underlying input has been modified or destroyed since this object was created. |
|
Return a proxy object containing the non‐modifiable current token (i.e., maximal sequence of non‐delimiter characters) in the input string. The returned proxy remains valid so long as the underlying input is not modified or destroyed ‐‐ irrespective of the state (or existence) of this object. The behavior is undefined unless the iteration state of this object is initially valid, or if the underlying input has been modified or destroyed since this object was created. |
Friends
Name |
Description |
Return |
|
Return |
|
This class provides (read‐only) sequential access to tokens delimited by two user‐supplied character sets consisting, respectively, of soft and hard delimiters characters. Access to the previous and current (trailing) delimiter, as well as to the current token itself, is provided efficiently via |
Non-Member Functions
Name |
Description |
Advance the iteration state of the specified |
Created with MrDocs