Photon Engine 2.0.0-beta
A physically based renderer.
Loading...
Searching...
No Matches
sdl_parser.h
Go to the documentation of this file.
1#pragma once
2
3#include <string_view>
4#include <utility>
5
6namespace ph::sdl_parser
7{
8
9inline constexpr char persistent_specifier = '@';
10inline constexpr char cached_specifier = '$';
11
12bool is_specifier(char ch);
13bool starts_with_specifier(std::string_view valueToken);
14bool is_single_name_with_specifier(std::string_view valueToken);
15
18auto get_name_with_specifier(std::string_view nameToken)
19-> std::pair<std::string_view, char>;
20
27std::string_view get_reference(std::string_view referenceToken);
28
29std::string_view get_data_packet_name(std::string_view dataPacketNameToken);
30
37std::string_view trim_double_quotes(std::string_view str);
38
39bool is_double_quoted(std::string_view str);
40
41}// end namespace ph::sdl_parser
42
43#include "SDL/sdl_parser.ipp"
Definition sdl_parser.cpp:8
constexpr char cached_specifier
Definition sdl_parser.h:10
auto get_name_with_specifier(std::string_view nameToken) -> std::pair< std::string_view, char >
Retrieve name and specifier from a single name token.
Definition sdl_parser.cpp:61
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 ...
Definition sdl_parser.cpp:148
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....
Definition sdl_parser.cpp:124
constexpr char persistent_specifier
Definition sdl_parser.h:9
bool is_specifier(char ch)
Definition sdl_parser.ipp:10
bool starts_with_specifier(std::string_view valueToken)
Definition sdl_parser.ipp:15
bool is_single_name_with_specifier(std::string_view valueToken)
Definition sdl_parser.cpp:10
bool is_double_quoted(std::string_view str)
Definition sdl_parser.cpp:162
std::string_view get_data_packet_name(std::string_view dataPacketNameToken)
Definition sdl_parser.cpp:136