Photon Engine 2.0.0-beta
A physically based renderer.
Loading...
Searching...
No Matches
ph::sdl_parser Namespace Reference

Functions

bool is_single_name_with_specifier (std::string_view valueToken)
 
auto get_name_with_specifier (std::string_view nameToken) -> std::pair< std::string_view, char >
 Retrieve name and specifier from a single name token.
 
std::string_view get_reference (std::string_view referenceToken)
 Retrieve reference from a single reference token. A reference token is not the same as a reference. Reference token contains additional specifiers such as a persistence indicator (the @ character). For example, @name is a reference token, while name is a reference (with @ being its specifier), and this function will return name given @name.
 
std::string_view get_data_packet_name (std::string_view dataPacketNameToken)
 
std::string_view trim_double_quotes (std::string_view str)
 Remove the enclosing double quotes and whitespaces from str. Note that if only a single double quote exists (not in a pair), it does not count as being enclosed by double quotes and thus will not be removed.
 
bool is_double_quoted (std::string_view str)
 
bool is_specifier (char ch)
 
bool starts_with_specifier (std::string_view valueToken)
 

Variables

constexpr char persistent_specifier = '@'
 
constexpr char cached_specifier = '$'
 

Function Documentation

◆ get_data_packet_name()

std::string_view ph::sdl_parser::get_data_packet_name ( std::string_view dataPacketNameToken)

◆ get_name_with_specifier()

auto ph::sdl_parser::get_name_with_specifier ( std::string_view nameToken) -> std::pair< std::string_view, char >

Retrieve name and specifier from a single name token.

◆ get_reference()

std::string_view ph::sdl_parser::get_reference ( std::string_view referenceToken)

Retrieve reference from a single reference token. A reference token is not the same as a reference. Reference token contains additional specifiers such as a persistence indicator (the @ character). For example, @name is a reference token, while name is a reference (with @ being its specifier), and this function will return name given @name.

◆ is_double_quoted()

bool ph::sdl_parser::is_double_quoted ( std::string_view str)

◆ is_single_name_with_specifier()

bool ph::sdl_parser::is_single_name_with_specifier ( std::string_view valueToken)

◆ is_specifier()

bool ph::sdl_parser::is_specifier ( char ch)
inline

◆ starts_with_specifier()

bool ph::sdl_parser::starts_with_specifier ( std::string_view valueToken)
inline

◆ trim_double_quotes()

std::string_view ph::sdl_parser::trim_double_quotes ( std::string_view str)

Remove the enclosing double quotes and whitespaces from str. Note that if only a single double quote exists (not in a pair), it does not count as being enclosed by double quotes and thus will not be removed.

Returns
The substring with enclosing double quotes and whitespaces removed. If str is not enclosed by double quotes, a trimmed str is returned.

Variable Documentation

◆ cached_specifier

char ph::sdl_parser::cached_specifier = '$'
inlineconstexpr

◆ persistent_specifier

char ph::sdl_parser::persistent_specifier = '@'
inlineconstexpr