Clarisse 5.0 SP8 SDK
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
ModuleScriptedClass Class Reference

A Project Item for which the implementation can be scripted. More...

Inheritance diagram for ModuleScriptedClass:
ModuleProjectItem ModuleObject OfModule ResourceUser EventObject CoreCustomData CoreBaseObject CoreBaseType

Public Member Functions

ModuleScriptedClassEngineget_engine () const
 Return the engine associated with the process. The engine is a singleton common to all processes sharing the same class.
ModuleScriptedClassEngineDataget_instance_data () const
 Return the data of the current process instance. The data is the one returned by ModuleScriptedClassEngineData::create_instance_data. Each instance of OfObject of the process class has its own data.

Static Public Member Functions

static bool register_scripted_class (OfApp &app, const CoreString &class_name, ModuleScriptedClassEngine *engine, const CoreString &cid="", bool is_abstract=false)

Protected Member Functions

virtual void on_attribute_change (const OfAttr &attr, int &dirtiness, const int &dirtiness_flags)
- Protected Member Functions inherited from ModuleProjectItem
virtual void module_constructor (OfObject &object) override
- Protected Member Functions inherited from ModuleObject
bool get_builtin_variable_value (const CoreString &var_name, CoreVector< CoreVariant > &value) const
bool get_builtin_variable_value_at (const CoreString &var_name, CoreVector< CoreVariant > &value, const double &time) const
virtual void module_destructor () override
virtual void on_send_event (const CoreString &event) override
virtual ResourceDatacreate_resource (const int &id, void *data) const
virtual void on_resource_update (const int &id, ResourceData *resource)
virtual bool on_new_time (const double &time) override
virtual void * create_eval_data (const CtxEval &eval_ctx) const
virtual void destroy_eval_data (const CtxEval &eval_ctx, void *eval_data) const
virtual void * create_thread_data (const CtxEval &eval_ctx) const
virtual void destroy_thread_data (const CtxEval &eval_ctx, void *thread_data) const
virtual bool has_thread_data () const
virtual ModuleCmacreate_cma (const CtxEval *eval_ctx) const
virtual void destroy_cma (ModuleCma *cma) const
const bool pre_evaluate_begin (const CtxEval &eval_ctx) const
void pre_evaluate_end (const CtxEval &eval_ctx) const
virtual ResourceDataset_resource_data (const int &resource_id, ResourceData *data, const CoreString &key) override
virtual ResourceDataset_resource_data (const int &resource_id, void *data_serial, const size_t &data_serial_size, const CoreString &key) override
virtual unsigned int get_project_resource_count () const override
virtual int get_project_resource_id (const unsigned int &index) const override
virtual ResourceObject * get_project_resource (const unsigned int &index) const override
const OfResourceCustomget_custom_resource (const int &id) const
virtual void get_attr_preset_hints (CoreArray< bool > &hints, const OfAttr &attr) override
- Protected Member Functions inherited from OfModule
void protect_object (const bool &enable) const
virtual void on_deserialize (const CoreVersion &serial_version, const ParserGroup &parser_group, const OfSerialOptions &serial_options)
template<class T_Callbacks >
T_Callbacks * get_callbacks () const
void set_callbacks (OfClassCallbacks *clbk)

Additional Inherited Members

- Public Types inherited from EventObject
typedef void(* EventInfoFunction )(EventObject &, const EventInfo &, void *)
 event callback signature for free functions / static methods.
typedef void(EventObject::* EventInfoMethod )(EventObject &, const EventInfo &, void *)
 event callback signature for methods.
typedef void(* EventFunction )(EventObject &, const CoreString &, void *)
typedef void(EventObject::* EventMethod )(EventObject &, const CoreString &, void *)
- Static Public Attributes inherited from ModuleObject
static constexpr unsigned int null_variation = 0
 Key of the null resource variation.

Detailed Description

A Project Item for which the implementation can be scripted.

Member Function Documentation

bool ModuleScriptedClass::register_scripted_class ( OfApp app,
const CoreString class_name,
ModuleScriptedClassEngine engine,
const CoreString cid = "",
bool  is_abstract = false 

Register a scripted class and its engine.

If the cid parameter contains errors, the class will be created and function will still return true, but the class will be incomplete.
appApplication instance
class_nameName of the scripted class.
engineInstance of the scripted class engine.
cidString defining the scripted class attributes using the CID syntax.
is_abstractIf true, the new class will be abstract and can't be instantiated manually.
true on success, false otherwise.