21template<
typename T,
typename Owner>
25 TSdlReferenceArray(std::string valueName, std::vector<std::shared_ptr<T>> Owner::* valuePtr);
35 std::vector<const ISdlResource*>& out_resources)
const override;
39 void setValueVec(Owner& owner, std::vector<std::shared_ptr<T>> value)
const;
40 const std::vector<std::shared_ptr<T>>&
getValueVec(
const Owner& owner)
const;
48 template<
typename ResourceType = T>
65 std::vector<std::shared_ptr<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
Abstraction for a value that is owned by some owner type. Governs how a field should be initialized o...
Definition TSdlOwnedField.h:15
A value that points to an array of SDL resources.
Definition TSdlReferenceArray.h:23
static std::vector< std::shared_ptr< T > > loadReferenceArray(const SdlInputClause &clause, const SdlInputContext &ctx)
Definition TSdlReferenceArray.ipp:175
TSdlReferenceArray & description(std::string descriptionStr)
Definition TSdlReferenceArray.ipp:229
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 TSdlReferenceArray.ipp:70
void ownedValueToDefault(Owner &owner) const override
By default, default value of the array is empty.
Definition TSdlReferenceArray.ipp:41
TSdlReferenceArray & optional()
Definition TSdlReferenceArray.ipp:237
const std::vector< std::shared_ptr< T > > & getValueVec(const Owner &owner) const
Definition TSdlReferenceArray.ipp:107
TSdlReferenceArray(std::string valueName, std::vector< std::shared_ptr< T > > Owner::*valuePtr)
Definition TSdlReferenceArray.ipp:24
void ownedResources(const Owner &owner, std::vector< const ISdlResource * > &out_resources) const override
Get all SDL resources associated by owner.
Definition TSdlReferenceArray.ipp:58
TSdlReferenceArray & niceToHave()
Definition TSdlReferenceArray.ipp:244
std::string valueToString(const Owner &owner) const override
Convert the value of the field to human-readable string.
Definition TSdlReferenceArray.ipp:48
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 TSdlReferenceArray.ipp:132
void setValueVec(Owner &owner, std::vector< std::shared_ptr< T > > value) const
Definition TSdlReferenceArray.ipp:99
TSdlReferenceArray & withImportance(EFieldImportance importance)
Definition TSdlReferenceArray.ipp:221
TSdlReferenceArray & required()
Definition TSdlReferenceArray.ipp:251
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 TSdlReferenceArray.ipp:114
The root for all renderer implementations.
Definition EEngineProject.h:6
EFieldImportance
Definition EFieldImportance.h:7