Plasma Engine  2.0
Loading...
Searching...
No Matches
OpenDdlUtils.h
1#pragma once
2
3#include <Foundation/Basics.h>
4#include <Foundation/IO/OpenDdlParser.h>
5
9
10namespace plOpenDdlUtils
11{
19 PL_FOUNDATION_DLL plResult ConvertToColor(const plOpenDdlReaderElement* pElement, plColor& out_result); // [tested]
20
28 PL_FOUNDATION_DLL plResult ConvertToColorGamma(const plOpenDdlReaderElement* pElement, plColorGammaUB& out_result); // [tested]
29
34 PL_FOUNDATION_DLL plResult ConvertToTime(const plOpenDdlReaderElement* pElement, plTime& out_result); // [tested]
35
40 PL_FOUNDATION_DLL plResult ConvertToVec2(const plOpenDdlReaderElement* pElement, plVec2& out_vResult); // [tested]
41
46 PL_FOUNDATION_DLL plResult ConvertToVec3(const plOpenDdlReaderElement* pElement, plVec3& out_vResult); // [tested]
47
52 PL_FOUNDATION_DLL plResult ConvertToVec4(const plOpenDdlReaderElement* pElement, plVec4& out_vResult); // [tested]
53
58 PL_FOUNDATION_DLL plResult ConvertToVec2I(const plOpenDdlReaderElement* pElement, plVec2I32& out_vResult); // [tested]
59
64 PL_FOUNDATION_DLL plResult ConvertToVec3I(const plOpenDdlReaderElement* pElement, plVec3I32& out_vResult); // [tested]
65
70 PL_FOUNDATION_DLL plResult ConvertToVec4I(const plOpenDdlReaderElement* pElement, plVec4I32& out_vResult); // [tested]
71
76 PL_FOUNDATION_DLL plResult ConvertToVec2U(const plOpenDdlReaderElement* pElement, plVec2U32& out_vResult); // [tested]
77
82 PL_FOUNDATION_DLL plResult ConvertToVec3U(const plOpenDdlReaderElement* pElement, plVec3U32& out_vResult); // [tested]
83
88 PL_FOUNDATION_DLL plResult ConvertToVec4U(const plOpenDdlReaderElement* pElement, plVec4U32& out_vResult); // [tested]
89
95 PL_FOUNDATION_DLL plResult ConvertToMat3(const plOpenDdlReaderElement* pElement, plMat3& out_mResult); // [tested]
96
102 PL_FOUNDATION_DLL plResult ConvertToMat4(const plOpenDdlReaderElement* pElement, plMat4& out_mResult); // [tested]
103
110 PL_FOUNDATION_DLL plResult ConvertToTransform(const plOpenDdlReaderElement* pElement, plTransform& out_result); // [tested]
111
116 PL_FOUNDATION_DLL plResult ConvertToQuat(const plOpenDdlReaderElement* pElement, plQuat& out_qResult); // [tested]
117
122 PL_FOUNDATION_DLL plResult ConvertToUuid(const plOpenDdlReaderElement* pElement, plUuid& out_result); // [tested]
123
129 PL_FOUNDATION_DLL plResult ConvertToAngle(const plOpenDdlReaderElement* pElement, plAngle& out_result); // [tested]
130
135 PL_FOUNDATION_DLL plResult ConvertToHashedString(const plOpenDdlReaderElement* pElement, plHashedString& out_sResult); // [tested]
136
141 PL_FOUNDATION_DLL plResult ConvertToTempHashedString(const plOpenDdlReaderElement* pElement, plTempHashedString& out_sResult); // [tested]
142
148 PL_FOUNDATION_DLL plResult ConvertToVariant(const plOpenDdlReaderElement* pElement, plVariant& out_result); // [tested]
149
153
155 PL_FOUNDATION_DLL void StoreColor(plOpenDdlWriter& ref_writer, const plColor& value, plStringView sName = {}, bool bGlobalName = false); // [tested]
156
158 PL_FOUNDATION_DLL void StoreColorGamma(plOpenDdlWriter& ref_writer, const plColorGammaUB& value, plStringView sName = {}, bool bGlobalName = false); // [tested]
159
161 PL_FOUNDATION_DLL void StoreTime(plOpenDdlWriter& ref_writer, const plTime& value, plStringView sName = {}, bool bGlobalName = false); // [tested]
162
164 PL_FOUNDATION_DLL void StoreVec2(plOpenDdlWriter& ref_writer, const plVec2& value, plStringView sName = {}, bool bGlobalName = false); // [tested]
165
167 PL_FOUNDATION_DLL void StoreVec3(plOpenDdlWriter& ref_writer, const plVec3& value, plStringView sName = {}, bool bGlobalName = false); // [tested]
168
170 PL_FOUNDATION_DLL void StoreVec4(plOpenDdlWriter& ref_writer, const plVec4& value, plStringView sName = {}, bool bGlobalName = false); // [tested]
171
173 PL_FOUNDATION_DLL void StoreVec2I(plOpenDdlWriter& ref_writer, const plVec2I32& value, plStringView sName = {}, bool bGlobalName = false); // [tested]
174
176 PL_FOUNDATION_DLL void StoreVec3I(plOpenDdlWriter& ref_writer, const plVec3I32& value, plStringView sName = {}, bool bGlobalName = false); // [tested]
177
179 PL_FOUNDATION_DLL void StoreVec4I(plOpenDdlWriter& ref_writer, const plVec4I32& value, plStringView sName = {}, bool bGlobalName = false); // [tested]
180
182 PL_FOUNDATION_DLL void StoreVec2U(plOpenDdlWriter& ref_writer, const plVec2U32& value, plStringView sName = {}, bool bGlobalName = false); // [tested]
183
185 PL_FOUNDATION_DLL void StoreVec3U(plOpenDdlWriter& ref_writer, const plVec3U32& value, plStringView sName = {}, bool bGlobalName = false); // [tested]
186
188 PL_FOUNDATION_DLL void StoreVec4U(plOpenDdlWriter& ref_writer, const plVec4U32& value, plStringView sName = {}, bool bGlobalName = false); // [tested]
189
191 PL_FOUNDATION_DLL void StoreMat3(plOpenDdlWriter& ref_writer, const plMat3& value, plStringView sName = {}, bool bGlobalName = false); // [tested]
192
194 PL_FOUNDATION_DLL void StoreMat4(plOpenDdlWriter& ref_writer, const plMat4& value, plStringView sName = {}, bool bGlobalName = false); // [tested]
195
197 PL_FOUNDATION_DLL void StoreTransform(plOpenDdlWriter& ref_writer, const plTransform& value, plStringView sName = {}, bool bGlobalName = false); // [tested]
198
200 PL_FOUNDATION_DLL void StoreQuat(plOpenDdlWriter& ref_writer, const plQuat& value, plStringView sName = {}, bool bGlobalName = false); // [tested]
201
203 PL_FOUNDATION_DLL void StoreUuid(plOpenDdlWriter& ref_writer, const plUuid& value, plStringView sName = {}, bool bGlobalName = false); // [tested]
204
206 PL_FOUNDATION_DLL void StoreAngle(plOpenDdlWriter& ref_writer, const plAngle& value, plStringView sName = {}, bool bGlobalName = false); // [tested]
207
209 PL_FOUNDATION_DLL void StoreHashedString(plOpenDdlWriter& ref_writer, const plHashedString& value, plStringView sName = {}, bool bGlobalName = false); // [tested]
210
212 PL_FOUNDATION_DLL void StoreTempHashedString(plOpenDdlWriter& ref_writer, const plTempHashedString& value, plStringView sName = {}, bool bGlobalName = false); // [tested]
213
215 PL_FOUNDATION_DLL void StoreVariant(plOpenDdlWriter& ref_writer, const plVariant& value, plStringView sName = {}, bool bGlobalName = false); // [tested]
216
218 PL_FOUNDATION_DLL void StoreString(plOpenDdlWriter& ref_writer, const plStringView& value, plStringView sName = {}, bool bGlobalName = false); // [tested]
219
221 PL_FOUNDATION_DLL void StoreBool(plOpenDdlWriter& ref_writer, bool value, plStringView sName = {}, bool bGlobalName = false); // [tested]
222
224 PL_FOUNDATION_DLL void StoreFloat(plOpenDdlWriter& ref_writer, float value, plStringView sName = {}, bool bGlobalName = false); // [tested]
225
227 PL_FOUNDATION_DLL void StoreDouble(plOpenDdlWriter& ref_writer, double value, plStringView sName = {}, bool bGlobalName = false); // [tested]
228
230 PL_FOUNDATION_DLL void StoreInt8(plOpenDdlWriter& ref_writer, plInt8 value, plStringView sName = {}, bool bGlobalName = false); // [tested]
231
233 PL_FOUNDATION_DLL void StoreInt16(plOpenDdlWriter& ref_writer, plInt16 value, plStringView sName = {}, bool bGlobalName = false); // [tested]
234
236 PL_FOUNDATION_DLL void StoreInt32(plOpenDdlWriter& ref_writer, plInt32 value, plStringView sName = {}, bool bGlobalName = false); // [tested]
237
239 PL_FOUNDATION_DLL void StoreInt64(plOpenDdlWriter& ref_writer, plInt64 value, plStringView sName = {}, bool bGlobalName = false); // [tested]
240
242 PL_FOUNDATION_DLL void StoreUInt8(plOpenDdlWriter& ref_writer, plUInt8 value, plStringView sName = {}, bool bGlobalName = false); // [tested]
243
245 PL_FOUNDATION_DLL void StoreUInt16(plOpenDdlWriter& ref_writer, plUInt16 value, plStringView sName = {}, bool bGlobalName = false); // [tested]
246
248 PL_FOUNDATION_DLL void StoreUInt32(plOpenDdlWriter& ref_writer, plUInt32 value, plStringView sName = {}, bool bGlobalName = false); // [tested]
249
251 PL_FOUNDATION_DLL void StoreUInt64(plOpenDdlWriter& ref_writer, plUInt64 value, plStringView sName = {}, bool bGlobalName = false); // [tested]
252
254 PL_FOUNDATION_DLL void StoreInvalid(plOpenDdlWriter& ref_writer, plStringView sName = {}, bool bGlobalName = false);
255} // namespace plOpenDdlUtils
Float wrapper struct for a safe usage and conversions of angles.
Definition Angle.h:10
A 8bit per channel unsigned normalized (values interpreted as 0-1) color storage format that represen...
Definition Color8UNorm.h:99
plColor represents an RGBA color in linear color space. Values are stored as float,...
Definition Color.h:44
This class is optimized to take nearly no memory (sizeof(void*)) and to allow very fast checks whethe...
Definition HashedString.h:25
Represents a single 'object' in a DDL document, e.g. either a custom type or a primitives list.
Definition OpenDdlReader.h:11
An OpenDDL reader parses an entire DDL document and creates an in-memory representation of the docume...
Definition OpenDdlReader.h:118
The base class for OpenDDL writers.
Definition OpenDdlWriter.h:13
plStringView represent a read-only sub-string of a larger string, as it can store a dedicated string ...
Definition StringView.h:34
A class to use together with plHashedString for quick comparisons with temporary strings that need no...
Definition HashedString.h:151
This data type is the abstraction for 128-bit Uuid (also known as GUID) instances.
Definition Uuid.h:11
plVariant is a class that can store different types of variables, which is useful in situations where...
Definition Variant.h:44
Default enum for returning failure or success, instead of using a bool.
Definition Types.h:54
The time class encapsulates a double value storing the time in seconds.
Definition Time.h:12