Photon Engine 2.0.0-beta
A physically based renderer.
Loading...
Searching...
No Matches
SdlOutputClause.h
Go to the documentation of this file.
1#pragma once
2
3#include "SDL/sdl_helpers.h"
4
5#include <string>
6
7namespace ph
8{
9
13class SdlOutputClause final
14{
15public:
16 std::string type;
17
21 std::string name;
22
29 std::string value;
30
31 std::string tag;
32
38
41 bool isEmpty = false;
42
46
47 // TODO: support binary data
48
49public:
50 SdlOutputClause() = default;
51
52 void clear();
53 bool hasTag() const;
54
55 std::string toString() const;
56};
57
59{
60 type.clear();
61 name.clear();
62 value.clear();
63 tag.clear();
64
66 isEmpty = false;
68}
69
70inline bool SdlOutputClause::hasTag() const
71{
72 return !tag.empty();
73}
74
75inline std::string SdlOutputClause::toString() const
76{
77 return "type: " + type + ", name: " + name + ", value: " + value + (tag.empty() ? "" : ", tag: " + tag);
78}
79
80}// end namespace ph
Carries SDL representation of various data during the output process. Helps to write output data such...
Definition SdlOutputClause.h:14
std::string value
Stores stringified data of a clause. As the output clause generator knows best how its data look like...
Definition SdlOutputClause.h:29
std::string name
Stores a name for the data. May refer to some output clauses. See isUsingNamedOutputClauses.
Definition SdlOutputClause.h:21
std::string tag
Definition SdlOutputClause.h:31
bool isEmpty
If the clause carries no data and does not need to be written.
Definition SdlOutputClause.h:41
bool isUsingNamedOutputClauses
If the carried name refers to some output clauses.
Definition SdlOutputClause.h:45
bool hasTag() const
Definition SdlOutputClause.h:70
std::string toString() const
Definition SdlOutputClause.h:75
ESdlClauseValue valueType
Type of the carried value. For identifying the type of the value string only. Does not check whether ...
Definition SdlOutputClause.h:37
std::string type
Definition SdlOutputClause.h:16
void clear()
Definition SdlOutputClause.h:58
SdlOutputClause()=default
The root for all renderer implementations.
Definition EEngineProject.h:6
ESdlClauseValue
Meta information for the value in a clause.
Definition sdl_fwd.h:43
@ General
Definition sdl_fwd.h:45
Low-level helpers for SDL. Helpers are in an additional sdl namespace.