7#include <Common/assertion.h>
8#include <Common/primitive_type.h>
17template<
typename Owner,
typename SdlValueType = TSdlValue<Path, Owner>>
20 static_assert(std::is_base_of_v<TSdlAbstractValue<Path, Owner>, SdlValueType>,
21 "SdlValueType should be a subclass of TSdlAbstractValue.");
24 template<
typename ValueType>
25 TSdlPath(std::string valueName, ValueType Owner::* const valuePtr) :
26 SdlValueType(
"path",
std::move(valueName), valuePtr)
56 out_clause.
value =
'"';
60 out_clause.
value += path->toString();
63 out_clause.
value +=
'"';
General path representation. Does not check whether the target actually exists (e....
Definition Path.h:21
std::string toString() const
Get a string representation of this path in generic format.
Definition Path.cpp:121
Data that SDL input process can rely on.
Definition SdlInputContext.h:19
Definition SdlNativeData.h:88
static SdlNativeData fromSingleElement(ElementType *elementPtr, ESdlDataFormat elementContainer, ESdlDataType elementType, bool canSet=false, bool canDirectAccess=false)
Creates native data for a single element pointer.
Definition SdlNativeData.ipp:86
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
Data that SDL output process can rely on.
Definition SdlOutputContext.h:19
A field class that binds a Path member variable.
Definition TSdlPath.h:19
void saveToSdl(const Owner &owner, SdlOutputClause &out_clause, const SdlOutputContext &ctx) const override
Convert actual value back to SDL value. Saving a loaded value as SDL value should rarely fail–as load...
Definition TSdlPath.h:50
SdlNativeData ownedNativeData(Owner &owner) const override
Direct access to the field memory of an owner. Short-lived owner objects such as function parameter s...
Definition TSdlPath.h:34
TSdlPath(std::string valueName, ValueType Owner::*const valuePtr)
Definition TSdlPath.h:25
std::string valueAsString(const Path &path) const override
Definition TSdlPath.h:29
void loadFromSdl(Owner &owner, const SdlInputClause &clause, const SdlInputContext &ctx) const override
Load SDL value to actual value and store it in the owner's field. Implementations are highly encourag...
Definition TSdlPath.h:42
void setValue(Owner &owner, T value) const override
Store a value.
Definition TSdlValue.ipp:38
const T * getConstValue(const Owner &owner) const override
Get a pointer to the stored value.
Definition TSdlValue.ipp:50
T * getValue(Owner &owner) const override
Get a pointer to the stored value.
Definition TSdlValue.ipp:44
The root for all renderer implementations.
Definition EEngineProject.h:6
Low-level helpers for SDL. Helpers are in an additional sdl namespace.