|
BDE 4.39.x Production Release
|
#include <bdlb_tokenizer.h>
This component-private class is used to hold delimiter information. Each Tokenizer object will have, as a private data member, an object of this class, and will pass the address of that member to the (private) constructor of each TokenizerIterator object it issues:
See bdlb_tokenizer
Public Member Functions | |
| Tokenizer_Data (const bsl::string_view &softDelimiters) | |
| Tokenizer_Data (const bsl::string_view &softDelimiters, const bsl::string_view &hardDelimiters) | |
| int | inputType (char character) const |
|
explicit |
Create a Tokenizer_Data object and load the d_charTypes data member such that it has the same value as if this (overly prescriptive) algorithm were used: (I) initialize each entry in d_charTypes array to a value indicating that the character having that index as its (e.g., ASCII) representation is a token character; (II) then, for each character in the specified softDelimiters sequence, overwrite the element at the corresponding index in d_charTypes with a value that indicates that the character is a soft delimiter character; (III) finally, for each character in the specified hardDelimiters sequence, overwrite the element at the corresponding index with a distinct value that indicates the character is a hard delimiter* character.
| bdlb::Tokenizer_Data::Tokenizer_Data | ( | const bsl::string_view & | softDelimiters, |
| const bsl::string_view & | hardDelimiters | ||
| ) |
|
inline |
Return the input type of the specified character: 0 for token, 1 for soft delimiter, 2 for hard delimiter.