|
using | MapType = std::array< size_t, 1<< CHAR_BIT > |
| A convenient alias for the internal type of the map.
|
|
using | TokenType = int |
| The type of the token that the dictionary stores.
|
|
|
| StringEncodingDictionary () |
| Construct the default class.
|
|
bool | HasToken (const int token) const |
| The function returns true if the dictionary contains the given token. More...
|
|
size_t | AddToken (const int token) |
| The function adds the given token to the dictionary and assigns a label to the token. More...
|
|
size_t | Value (const int token) const |
| The function returns the label assigned to the given token. More...
|
|
size_t | Size () const |
| Get the size of the dictionary.
|
|
void | Clear () |
| Clear the dictionary.
|
|
const MapType & | Mapping () const |
| Get the mapping.
|
|
MapType & | Mapping () |
| Modify the mapping.
|
|
template<typename Archive > |
void | serialize (Archive &ar, const uint32_t) |
| Serialize the class to the given archive.
|
|
◆ AddToken()
The function adds the given token to the dictionary and assigns a label to the token.
The token must belong to [0, 255]; otherwise the behavior is undefined. The label is equal to the resulting size of the dictionary. The function returns the assigned label.
- Parameters
-
◆ HasToken()
The function returns true if the dictionary contains the given token.
The token must belong to [0, 255]; otherwise the behavior is undefined.
- Parameters
-
◆ Value()
The function returns the label assigned to the given token.
The function doesn't verify that the dictionary contains the token. The token must belong to [0, 255]; otherwise the behavior is undefined.
- Parameters
-
The documentation for this class was generated from the following file: