|
BDE 4.39.x Production Release
|
#include <bdlb_tokenizer.h>
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.
Tokenizer change. Public Types | |
| typedef bslstl::StringRef | value_type |
| typedef int | difference_type |
| typedef Tokenizer_Proxy | pointer |
| typedef const bslstl::StringRef | reference |
| typedef bsl::input_iterator_tag | iterator_category |
Public Member Functions | |
| TokenizerIterator () | |
| TokenizerIterator (const TokenizerIterator &origin) | |
| TokenizerIterator & | operator= (const TokenizerIterator &rhs) |
| TokenizerIterator & | operator++ () |
| const bslstl::StringRef | operator* () const |
| Tokenizer_Proxy | operator-> () const |
Friends | |
| class | Tokenizer |
| bool | operator== (const TokenizerIterator &, const TokenizerIterator &) |
| bool | operator!= (const TokenizerIterator &, const TokenizerIterator &) |
| typedef int bdlb::TokenizerIterator::difference_type |
| typedef bsl::input_iterator_tag bdlb::TokenizerIterator::iterator_category |
Defines a type alias for the tag type that represents the iterator concept this class models.
| typedef const bslstl::StringRef bdlb::TokenizerIterator::reference |
| bdlb::TokenizerIterator::TokenizerIterator | ( | ) |
Create a TokenizerIterator object having the value of the specified origin iterator.
| bdlb::TokenizerIterator::TokenizerIterator | ( | const TokenizerIterator & | origin | ) |
|
inline |
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.
| TokenizerIterator & bdlb::TokenizerIterator::operator++ | ( | ) |
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.
|
inline |
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.
| TokenizerIterator & bdlb::TokenizerIterator::operator= | ( | const TokenizerIterator & | rhs | ) |
Assign to this object the value of the specified rhs iterator, and return a reference providing modifiable access to this object.
|
friend |
Return true if the specified lhs and rhs objects do not have the same value, and false otherwise.
Tokenizer object, or if the underlying input has been modified or destroyed since any of those objects were created.
|
friend |
Return true if the specified lhs and rhs objects have the same value, and false otherwise. Two TokenizerIterator objects have the same value if both of them are pointing to the same token within the same tokenized string or if they both point past the tokenized string.
Tokenizer object, or if the underlying input has been modified or destroyed since any of those objects were created.
|
friend |