5#include <Common/assertion.h>
20template<
typename T,
typename Owner>
26 std::string valueName,
27 std::optional<T> Owner::* valuePtr);
31 std::string valueName,
32 std::string typeSignature,
33 std::optional<T> Owner::* valuePtr);
38 void setValue(Owner& owner, T value)
const override;
39 T*
getValue(Owner& owner)
const override;
56 std::optional<T>&
valueRef(Owner& owner)
const;
59 std::optional<T> Owner::* m_valuePtr;
Data that SDL input process can rely on.
Definition SdlInputContext.h:19
Definition SdlNativeData.h:88
Carries SDL representation of various data during the output process. Helps to write output data such...
Definition SdlOutputClause.h:14
Data that SDL output process can rely on.
Definition SdlOutputContext.h:19
General concept of a SDL value type.
Definition TSdlAbstractValue.h:17
Abstractions for a SDL value type that can be empty.
Definition TSdlOptionalValue.h:22
SdlNativeData ownedNativeData(Owner &owner) const override=0
Direct access to the field memory of an owner. Short-lived owner objects such as function parameter s...
TSdlOptionalValue(std::string typeName, std::string valueName, std::optional< T > Owner::*valuePtr)
Definition TSdlOptionalValue.ipp:11
void ownedValueToDefault(Owner &owner) const override
Set the value of the field to a default one. Since the field class is templatized by Owner type,...
Definition TSdlOptionalValue.ipp:67
std::optional< T > & valueRef(Owner &owner) const
Definition TSdlOptionalValue.ipp:73
void saveToSdl(const Owner &owner, SdlOutputClause &out_clause, const SdlOutputContext &ctx) const override=0
Convert actual value back to SDL value. Saving a loaded value as SDL value should rarely fail–as load...
std::string valueAsString(const T &value) const override=0
Human-readable representation of the value.
TSdlOptionalValue & description(std::string descriptionStr)
Definition TSdlOptionalValue.ipp:39
void loadFromSdl(Owner &owner, const SdlInputClause &clause, const SdlInputContext &ctx) const override=0
Load SDL value to actual value and store it in the owner's field. Implementations are highly encourag...
void setValue(Owner &owner, T value) const override
Store a value.
Definition TSdlOptionalValue.ipp:47
T * getValue(Owner &owner) const override
Get a pointer to the stored value.
Definition TSdlOptionalValue.ipp:53
const T * getConstValue(const Owner &owner) const override
Get a pointer to the stored value.
Definition TSdlOptionalValue.ipp:60
The root for all renderer implementations.
Definition EEngineProject.h:6