Orcus
Public Member Functions | List of all members
orcus::tokens Class Reference

Public Member Functions

 tokens (const char **token_names, size_t token_name_count)
 
bool is_valid_token (xml_token_t token) const
 
xml_token_t get_token (const pstring &name) const
 
const char * get_token_name (xml_token_t token) const
 

Member Function Documentation

xml_token_t orcus::tokens::get_token ( const pstring name) const

Get token from a specified name.

Parameters
nametextural token name
Returns
token value representing the given textural token.
const char* orcus::tokens::get_token_name ( xml_token_t  token) const

Get textural token name from a token value.

Parameters
tokennumeric token value
Returns
textural token name, or empty string in case the given token is not valid.
bool orcus::tokens::is_valid_token ( xml_token_t  token) const

Check if a token returned from get_token() method is valid.

Returns
true if valid, false otherwise.