9#include <Common/config.h>
21template<
typename Owner,
typename FieldSet = TSdlBruteForceFieldSet<TSdlOwnedField<Owner>>>
45 std::string_view funcName,
52 std::vector<const ISdlResource*>& out_resources)
const override;
79 template<
typename SdlFieldType>
82 template<
typename StructType>
85 template<
typename StructType>
87 StructType Owner::* structObjPtr,
114 void setFieldsToDefaults(Owner& owner)
const;
120 template<
typename DstType,
typename SrcType>
121 DstType* castTo(SrcType* srcInstance)
const;
Interface for all SDL resource.
Definition ISdlResource.h:22
bool allowCreateFromClass() const
Whether a resource can be created by calling createResource(). This attribute is useful to decide whe...
Definition SdlClass.h:138
Definition SdlFunction.h:18
Data that SDL input process can rely on.
Definition SdlInputContext.h:19
Definition SdlOutputClauses.h:14
Data that SDL output process can rely on.
Definition SdlOutputContext.h:19
Definition SdlStructFieldStump.h:12
Abstraction for a value that is owned by some owner type. Governs how a field should be initialized o...
Definition TSdlOwnedField.h:15
SDL binding type for a canonical SDL resource class.
Definition TSdlOwnerClass.h:23
void initDefaultResource(ISdlResource &resource) const override
Initialize a resource to default values. Default values are defined by the resource class's SDL defin...
Definition TSdlOwnerClass.ipp:74
const TSdlOwnedField< Owner > * getOwnedField(std::size_t index) const
Definition TSdlOwnerClass.ipp:190
TSdlOwnerClass & addStruct(StructType Owner::*structObjPtr, const SdlStructFieldStump &structFieldStump)
void referencedResources(const ISdlResource *targetResource, std::vector< const ISdlResource * > &out_resources) const override
Get all SDL resources referenced by targetResource.
Definition TSdlOwnerClass.ipp:144
auto docName(std::string docName) -> TSdlOwnerClass &
Definition TSdlOwnerClass.ipp:327
std::shared_ptr< ISdlResource > createResource() const override
Definition TSdlOwnerClass.ipp:32
TSdlOwnerClass & addStruct(StructType Owner::*structObjPtr)
void saveFieldsToSdl(const Owner &owner, SdlOutputClauses &clauses, const SdlOutputContext &ctx) const
Definition TSdlOwnerClass.ipp:303
void loadFieldsFromSdl(Owner &owner, SdlInputClauses &clauses, const SdlInputContext &ctx) const
Definition TSdlOwnerClass.ipp:249
void initResource(ISdlResource &resource, SdlInputClauses &clauses, const SdlInputContext &ctx) const override
Initialize a resource from value clauses. How the resource will be initialized depends on the resourc...
Definition TSdlOwnerClass.ipp:57
TSdlOwnerClass(std::string displayName)
Definition TSdlOwnerClass.ipp:21
bool allowCreateFromClass() const
Whether a resource can be created by calling createResource(). This attribute is useful to decide whe...
Definition SdlClass.h:138
const SdlField * getField(std::size_t index) const override
Definition TSdlOwnerClass.ipp:172
void call(std::string_view funcName, ISdlResource *resource, SdlInputClauses &clauses, const SdlInputContext &ctx) const override
Definition TSdlOwnerClass.ipp:106
Owner OwnerType
Definition TSdlOwnerClass.h:25
auto description(std::string descriptionStr) -> TSdlOwnerClass &
Definition TSdlOwnerClass.ipp:319
TSdlOwnerClass & addField(SdlFieldType sdlField)
auto baseOn() -> TSdlOwnerClass &
Set another SDL class as the base of this class.
Definition TSdlOwnerClass.ipp:336
TSdlOwnerClass & addFunction()
Adds a function that can later be called.
std::size_t numFields() const override
Definition TSdlOwnerClass.ipp:166
void saveResource(const ISdlResource &resource, SdlOutputClauses &clauses, const SdlOutputContext &ctx) const override
Definition TSdlOwnerClass.ipp:88
const SdlFunction * getFunction(std::size_t index) const override
Definition TSdlOwnerClass.ipp:184
std::size_t numFunctions() const override
Definition TSdlOwnerClass.ipp:178
The root for all renderer implementations.
Definition EEngineProject.h:6