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

Object framework class definition. More...

Inheritance diagram for OfClass:
CoreCustomData CoreBaseObject CoreBaseType

Classes

struct  Resource
 Stores the definition of a resource: its attribute dependencies, other resources deps, etc. More...
 

Public Types

enum  Flag {
  FLAG_ABSTRACT = 0x0001,
  FLAG_EMBEDDED_ONLY = 0x0002,
  FLAG_COUNT = 2
}
 
enum  ReleaseStage {
  RELEASE_STAGE_DO_NOT_RELEASE,
  RELEASE_STAGE_PROTOTYPE,
  RELEASE_STAGE_BETA,
  RELEASE_STAGE_CANDIDATE,
  RELEASE_STAGE_RELEASE,
  RELEASE_STAGE_DEPRECATED,
  RELEASE_STAGE_OBSOLETE,
  RELEASE_STAGE_COUNT
}
 
enum  AttributeBindingMode {
  ATTRIBUTE_BINDING_MODE_WEAK =0,
  ATTRIBUTE_BINDING_MODE_TYPE =1,
  ATTRIBUTE_BINDING_MODE_DIM =2,
  ATTRIBUTE_BINDING_MODE_STRONG =3
}
 

Public Member Functions

const DsoFileget_dso () const
 
const CoreStringget_dso_filename () const
 
void * resolve_callback (const CoreString &callback) const
 
const CoreStringget_name () const
 
bool matches_name (const CoreString &name) const
 
bool matches_name (const char *name) const
 
const CoreStringget_ui_name () const
 
const CoreStringget_object_default_name () const
 
const CoreStringget_base_name () const
 
const CoreStringget_category () const
 
void set_category (const CoreString &category)
 
bool is_kindof (const CoreString &class_name) const
 
bool is_kindof (const OfClass &cls) const
 
bool is_abstract () const
 
bool is_embedded_only () const
 
bool is_under_licensed () const
 
const int & get_flags () const
 
void set_default_object_name (const char *name)
 
OfClassFactoryget_factory () const
 
OfClassget_base_class () const
 
const CoreList< OfClass * > & get_children () const
 
void get_children (CoreList< const OfClass * > &class_list, const bool &recurse=false) const
 
const CoreList< OfObject * > & get_objects () const
 
const CoreList< OfObject * > & get_embedded_objects () const
 
OfObjectget_proto () const
 
const GuiIconget_icon () const
 
void set_icon (const GuiIcon *icon)
 
const CoreStringget_icon_file () const
 
OfAttradd_attribute (const CoreString &attr, const OfAttr::Type &type, const OfAttr::Container &container, const OfAttr::VisualHint &visual_hint, const CoreString &group_name="general")
 
const OfAttrget_attribute (const CoreBasicString &attr) const
 
OfAttrget_attribute (const CoreBasicString &attr)
 
const OfAttrget_attribute (const unsigned int &index) const
 
OfAttrget_attribute (const unsigned int &index)
 
const OfAttrattribute_exists (const CoreBasicString &attr) const
 
OfAttrattribute_exists (const CoreBasicString &attr)
 
const unsigned int & get_attribute_count () const
 
void remove_all_attributes ()
 
void remove_attribute (const CoreBasicString &name)
 
void remove_attribute (OfAttr &attr)
 
void sync_children_attr (const CoreBasicString &name)
 
void sync_children_attr (OfAttr &attr)
 
const OfOutputadd_output (const CoreString &name, OfAttr::Type type, unsigned int dim=1, OfAttr::VisualHint visual_hint=OfAttr::VISUAL_HINT_DEFAULT)
 
void remove_output (const CoreString &name)
 
unsigned int get_output_count () const
 
const OfOutputget_output (unsigned int index) const
 
const OfOutputget_output (const CoreString &name) const
 
const OfOutputoutput_exists (const CoreString &name, bool recursive=false) const
 
AttributeBindingMode get_attribute_binding_mode () const
 
void set_attribute_binding_mode (AttributeBindingMode m)
 
bool add_resource (const int &id, const CoreBasicArray< CoreString > &attributes, const CoreBasicArray< int > &deps, OfResourceCustom *resource_custom=0)
 
bool add_resource (const int &id, const CoreBasicArray< OfAttrNameDirtiness > &attributes, const CoreBasicArray< int > &deps, OfResourceCustom *resource_custom=0)
 
bool set_resource_attrs (const int &id, const CoreBasicArray< CoreString > &attributes)
 
bool set_resource_attrs (const int &id, const CoreBasicArray< OfAttrNameDirtiness > &attributes)
 
bool set_resource_deps (const int &id, const CoreBasicArray< int > &resources)
 
bool set_resource_user_key (int id, bool user_key) const
 
bool share_resource (const int &id, const int &target_id)
 
const CoreBasicArray
< OfClass::Resource * > & 
get_resources () const
 
const OfResourceCustomget_resource_custom (const int &id) const
 
ParserEntryserialize () const
 
const CoreVersionget_version () const
 
const OfFactoryId & get_factory_id () const
 
const CoreStringget_class_doc (const bool &recursive=true) const
 
const CoreStringget_group_doc (const CoreString &group_name, const bool &recursive=true) const
 
const CoreStringget_attr_doc (const CoreString &attr_name, const bool &recursive=true) const
 
const CoreStringget_output_doc (const CoreString &output_name, const bool &recursive=true) const
 
void set_attr_doc (const CoreString &attr_name, const CoreString &doc)
 
bool attr_doc_exists (const CoreString &attr_name) const
 
void set_output_doc (const CoreString &output_name, const CoreString &doc)
 
bool output_doc_exists (const CoreString &output_name) const
 
const CoreStringget_unit_base (const CoreString &attr_name, const bool &recursive=true) const
 
const CoreStringget_unit_system (const CoreString &attr_name, const bool &recursive=true) const
 
CoreString get_attr_custom_ui (const CoreString &attr_name, const bool &recursive=true) const
 
const CoreVector< CoreString > & get_aliases () const
 
double get_ui_weight () const
 Used to sort classes within category.
 
const OfClassget_group_owner (const CoreString &group_name) const
 Returns the base class that declared the group.
 
bool is_group_ui_collapsed (const CoreString &group_name, const bool &recursive=true) const
 
void set_group_ui_collapsed (const CoreString &group_name, bool collapsed)
 
void unset_group_ui_collapsed (const CoreString &group_name)
 
bool is_group_ui_weighted (const CoreString &group_name, double &weight, const bool &recursive=true) const
 
void set_group_ui_weight (const CoreString &group_name, double weight)
 
void unset_group_ui_weight (const CoreString &group_name)
 
void set_ui_creatable (const bool &state)
 
bool is_ui_creatable () const
 
virtual size_t get_memory_size () const override
 
void set_attr_custom_ui (const CoreString &attr, const CoreString &attr_custom_ui)
 
OfClassCallbacksget_callbacks () const
 
void set_callbacks (OfClassCallbacks &clbks)
 
- Public Member Functions inherited from CoreCustomData
 CoreCustomData (const CoreCustomData &src)
 
void add_custom_data (void *key, const bool &data)
 
void add_custom_data (void *key, const int &data)
 
void add_custom_data (void *key, const unsigned int &data)
 
void add_custom_data (void *key, const char *data)
 
void add_custom_data (void *key, const CoreString &data)
 
void add_custom_data (void *key, const double &data)
 
void add_custom_data (void *key, void *data)
 
void remove_custom_data (void *key)
 
void remove_all_custom_data ()
 
void set_custom_data (void *key, const bool &data)
 
void set_custom_data (void *key, const int &data)
 
void set_custom_data (void *key, const unsigned int &data)
 
void set_custom_data (void *key, const double &data)
 
void set_custom_data (void *key, const char *data)
 
void set_custom_data (void *key, const CoreString &data)
 
void set_custom_data (void *key, void *data)
 
void get_custom_data (void *key, bool &data) const
 
void get_custom_data (void *key, int &data) const
 
void get_custom_data (void *key, unsigned int &data) const
 
void get_custom_data (void *key, double &data) const
 
void get_custom_data (void *key, CoreString &data) const
 
void get_custom_data (void *key, void *&data) const
 
- Public Member Functions inherited from CoreBaseObject
bool is_kindof (const CoreBaseObject &object) const
 
CoreString get_class_info_name () const
 
const unsigned long & get_class_info_id () const
 
virtual bool is_kindof (const CoreClassInfo &cinfo) const
 
virtual const CoreClassInfoget_class_info () const
 
template<class T >
T * cast ()
 
template<class T >
const T * cast () const
 
- Public Member Functions inherited from CoreBaseType
bool is_kindof (const CoreClassInfo &cinfo) const
 

Static Public Member Functions

static CoreString get_flag_name (const Flag &flag)
 
static const Flag & get_flag (const unsigned int &index)
 
static bool get_flag_default_value (const Flag &flag)
 
static CoreString get_release_stage_name (const ReleaseStage &stage)
 
- Static Public Member Functions inherited from CoreCustomData
static void * get_custom_data_key (const CoreString &key)
 
- Static Public Member Functions inherited from CoreBaseObject
static const CoreClassInfoclass_info ()
 
template<class T >
static T * cast (CoreBaseObject *object)
 
template<class T >
static const T * cast (const CoreBaseObject *object)
 
- Static Public Member Functions inherited from CoreBaseType
static const CoreClassInfoclass_info ()
 Get the type descriptor of this instance.
 

Friends

class OfClassFactory
 
class OfObjectFactory
 
class OfContext
 
class OfObject
 
class OfCid
 

Detailed Description

Object framework class definition.


Class Documentation

struct OfClass::Resource

Stores the definition of a resource: its attribute dependencies, other resources deps, etc.

Class Members
CoreArray< OfAttrNameDirtiness > attributes Flags used to customize resources The attributes used to compute the hash of the resource
CoreArray< int > deps The other resources this one depends on.
int id The ID of the resource.
int source The source resource id (used on shared resources, see OfClass::share_resource)
bool user_key If true, the resource key will be manually handled.

Member Function Documentation

bool OfClass::matches_name ( const CoreString name) const

Returns true if name is this class's name, or one of its alias.

bool OfClass::matches_name ( const char *  name) const

Returns true if name is this class's name, or one of its alias.

bool OfClass::set_resource_user_key ( int  id,
bool  user_key 
) const

Set whether the given resource's hash key is user controlled or automatically handled (using attributes and dependencies) If user_key is true, the ModuleObject's callback cb_get_resource_key will be used every time a resource's key is needed, and the resource will not have any attributes nor dependencies, and its source will be set to -1.