10template<
typename T,
typename Owner>
13 std::string valueName,
16 :
TSdlValue(typeName, valueName, typeName, valuePtr)
19template<
typename T,
typename Owner>
22 std::string valueName,
23 std::string typeSignature,
29 std::move(typeSignature))
31 , m_valuePtr(valuePtr)
34 PH_ASSERT(m_valuePtr);
37template<
typename T,
typename Owner>
40 owner.*m_valuePtr = std::move(value);
43template<
typename T,
typename Owner>
46 return &(owner.*m_valuePtr);
49template<
typename T,
typename Owner>
52 return &(owner.*m_valuePtr);
55template<
typename T,
typename Owner>
58 if(m_defaultValue.has_value())
60 setValue(owner, *m_defaultValue);
64template<
typename T,
typename Owner>
67 return m_defaultValue.has_value() ? &(*m_defaultValue) :
nullptr;
70template<
typename T,
typename Owner>
74 m_defaultValue = std::move(defaultValue);
78template<
typename T,
typename Owner>
82 m_defaultValue = std::nullopt;
86template<
typename T,
typename Owner>
90 this->setImportance(importance);
94template<
typename T,
typename Owner>
98 this->setDescription(std::move(descriptionStr));
102template<
typename T,
typename Owner>
109template<
typename T,
typename Owner>
116template<
typename T,
typename Owner>
123template<
typename T,
typename Owner>
127 this->setEnableFallback(isFallbackEnabled);
131template<
typename T,
typename Owner>
134 return owner.*m_valuePtr;
General concept of a SDL value type.
Definition TSdlAbstractValue.h:17
Abstractions for a SDL value type.
Definition TSdlValue.h:25
void setValue(Owner &owner, T value) const override
Store a value.
Definition TSdlValue.ipp:38
TSdlValue & description(std::string descriptionStr)
Definition TSdlValue.ipp:95
const T * getConstValue(const Owner &owner) const override
Get a pointer to the stored value.
Definition TSdlValue.ipp:50
TSdlValue(std::string typeName, std::string valueName, T Owner::*valuePtr)
Definition TSdlValue.ipp:11
const T * getDefaultValue() const
Definition TSdlValue.ipp:65
T * getValue(Owner &owner) const override
Get a pointer to the stored value.
Definition TSdlValue.ipp:44
TSdlValue & optional()
Definition TSdlValue.ipp:103
TSdlValue & defaultTo(T defaultValue)
Definition TSdlValue.ipp:71
T & valueRef(Owner &owner) const
Definition TSdlValue.ipp:132
TSdlValue & noDefault()
Definition TSdlValue.ipp:79
TSdlValue & enableFallback(bool isFallbackEnabled)
Definition TSdlValue.ipp:124
TSdlValue & withImportance(EFieldImportance importance)
Definition TSdlValue.ipp:87
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 TSdlValue.ipp:56
TSdlValue & required()
Definition TSdlValue.ipp:117
TSdlValue & niceToHave()
Definition TSdlValue.ipp:110
The root for all renderer implementations.
Definition EEngineProject.h:6
EFieldImportance
Definition EFieldImportance.h:7