|
| TSdlOwnerClass (std::string displayName) |
|
std::shared_ptr< ISdlResource > | createResource () const override |
|
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 resource class's SDL definition.
|
|
void | initDefaultResource (ISdlResource &resource) const override |
| Initialize a resource to default values. Default values are defined by the resource class's SDL definition.
|
|
void | saveResource (const ISdlResource &resource, SdlOutputClauses &clauses, const SdlOutputContext &ctx) const override |
|
void | call (std::string_view funcName, ISdlResource *resource, SdlInputClauses &clauses, const SdlInputContext &ctx) const override |
|
void | referencedResources (const ISdlResource *targetResource, std::vector< const ISdlResource * > &out_resources) const override |
| Get all SDL resources referenced by targetResource .
|
|
std::size_t | numFields () const override |
|
const SdlField * | getField (std::size_t index) const override |
|
std::size_t | numFunctions () const override |
|
const SdlFunction * | getFunction (std::size_t index) const override |
|
void | loadFieldsFromSdl (Owner &owner, SdlInputClauses &clauses, const SdlInputContext &ctx) const |
|
void | saveFieldsToSdl (const Owner &owner, SdlOutputClauses &clauses, const SdlOutputContext &ctx) const |
|
const TSdlOwnedField< Owner > * | getOwnedField (std::size_t index) const |
|
template<typename SdlFieldType > |
TSdlOwnerClass & | addField (SdlFieldType sdlField) |
|
template<typename StructType > |
TSdlOwnerClass & | addStruct (StructType Owner::*structObjPtr) |
|
template<typename StructType > |
TSdlOwnerClass & | addStruct (StructType Owner::*structObjPtr, const SdlStructFieldStump &structFieldStump) |
|
template<typename T > |
TSdlOwnerClass & | addFunction () |
| Adds a function that can later be called.
|
|
auto | description (std::string descriptionStr) -> TSdlOwnerClass & |
|
auto | docName (std::string docName) -> TSdlOwnerClass & |
|
template<typename T > |
auto | baseOn () -> TSdlOwnerClass & |
| Set another SDL class as the base of this class.
|
|
auto | allowCreateFromClass (bool allowCreateFromClass) -> TSdlOwnerClass & |
|
template<typename SdlFieldType > |
auto | addField (SdlFieldType sdlField) -> TSdlOwnerClass & |
|
template<typename StructType > |
auto | addStruct (StructType Owner::*const structObjPtr) -> TSdlOwnerClass & |
|
template<typename StructType > |
auto | addStruct (StructType Owner::*const structObjPtr, const SdlStructFieldStump &structFieldStump) -> TSdlOwnerClass & |
|
template<typename T > |
auto | addFunction () -> TSdlOwnerClass & |
|
bool | allowCreateFromClass () const |
| Whether a resource can be created by calling createResource(). This attribute is useful to decide whether the resource need custom construction routines to create them. A true return value does not mean createResource() always return a valid resource, e.g., a blueprint class or some error occurs.
|
|
| SdlClass (ESdlTypeCategory category, const std::string &typeName) |
|
std::string_view | getTypeName () const override |
|
std::string_view | getDescription () const override |
|
bool | isBlueprint () const |
| Whether the class is for building other classes only. A blueprint class cannot be instantiated as a SDL resource. Note that blueprint class is semantically different to abstract class; nevertheless, they often are closely related.
|
|
bool | allowCreateFromClass () const |
| Whether a resource can be created by calling createResource(). This attribute is useful to decide whether the resource need custom construction routines to create them. A true return value does not mean createResource() always return a valid resource, e.g., a blueprint class or some error occurs.
|
|
std::string | genPrettyName () const |
|
std::string | genCategoryName () const |
|
ESdlTypeCategory | getCategory () const |
|
std::string_view | getDocName () const |
|
const SdlClass * | getBase () const |
|
bool | isDerived () const |
|
bool | hasField () const |
|
bool | hasFunction () const |
|
virtual | ~ISdlInstantiable ()=default |
|
template<typename Owner, typename FieldSet = TSdlBruteForceFieldSet<TSdlOwnedField<Owner>>>
class ph::TSdlOwnerClass< Owner, FieldSet >
SDL binding type for a canonical SDL resource class.