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

Class defining Object Factory objects. They have inner properties and contain OfAttr attributes. More...

Inheritance diagram for OfObject:
OfItem EventObject CoreCustomData CoreBaseObject CoreBaseType

Public Member Functions

const CoreStringget_full_name () const override
 return the full name of the object
 
CoreString get_contextual_name () const
 return the contextual name of the object
 
void set_name_dirty () override
 
void set_content_locked (const bool &value) override
 
void set_remote (const bool &value) override
 
OfClassget_class () const
 Get the class of the object.
 
const CoreStringget_type () const override
 get the object type name (generic type from OfItem)
 
bool is_kindof (const CoreString &class_name) const override
 return true if the object's kind matches the specified class
 
bool is_kindof (const OfClass &cls) const
 return true if the object's kind matches the specified class
 
const CoreStringget_class_name () const
 return the class name of the object
 
bool is_within (const OfContext &context, const bool &recursive) const
 
bool is_child_of (const OfContext &context) const
 
bool is_child_of (const CoreSet< OfContext * > &contexts) const
 
bool is_embedded_child_of (const CoreSet< OfObject * > &parent_objects) const
 
const GuiIconget_item_icon () const override
 Item icon get accessor.
 
int call_action (const CoreString &name, void *data=0)
 call an action with the specified name
 
OfAttrTable get_table (const CoreBasicString &table_name) const
 
OfAttrTable get_table (const OfAttr &attr) const
 
void add_custom_table (const CoreBasicString &table_name, CoreBasicArray< OfAttr * > columns)
 
void add_custom_table_metadata (const CoreBasicString &table_name, CoreStringView metadata_name, const CoreVariant &metadata_value, unsigned int column_index=CORE_INVALID_INDEX)
 
OfAttradd_attribute (const OfItem::AttrCreationParams &params) override
 
OfAttradd_attribute (const CoreString &attr, const OfAttr::Type &type, const OfAttr::Container &container=OfAttr::CONTAINER_SINGLE, const OfAttr::VisualHint &visual_hint=OfAttr::VISUAL_HINT_DEFAULT, const CoreString &group_name="general") override
 add an attribute to the object
 
const OfAttrget_attribute (const CoreBasicString &attr) const override
 find an attribute by specifying its name
 
OfAttrget_attribute (const CoreBasicString &attr) override
 find an attribute by specifying its name
 
const OfAttrget_attribute (const unsigned int &index) const override
 return the attribute at the given index
 
OfAttrget_attribute (const unsigned int &index) override
 return the attribute at the given index
 
const OfAttrattribute_exists (const CoreBasicString &attr) const override
 tell whether an attribute exists by specifying its name
 
OfAttrattribute_exists (const CoreBasicString &attr) override
 tell whether an attribute exists by specifying its name
 
const unsigned int & get_attribute_count () const override
 return the total number of attribute in the object
 
const unsigned int find_attribute_index (const CoreBasicString &attr_name) const override
 returns the index of the attribute in the object if attribute found, -1 otherwise
 
const unsigned int find_attribute_index (const OfAttr &attr) const override
 returns the index of the attribute in the object if attribute found, -1 otherwise
 
unsigned int set_attribute_index (const OfAttr &attr, const unsigned int &new_index) override
 modifies the index of the specified attribute
 
void remove_all_attributes () override
 remove all the attributes of the object
 
void remove_attribute (const CoreBasicString &name) override
 remove the attribute by specifying its name
 
void remove_attribute (OfAttr &attr) override
 remove the given attribute from the object
 
void reset_attributes () override
 reset the values of class attributes as if the object was just created
 
CoreVector< OfAttr * > get_group_attributes (const CoreString &group_name)
 return all attributes in a specified group
 
const OfOutputadd_output (const CoreString &name, OfAttr::Type type, unsigned int dim, OfAttr::VisualHint visual_hint)
 
void remove_output (const CoreString &name)
 
unsigned int get_output_count () const
 
OfOutputget_output (unsigned int index) const
 
OfOutputget_output (const CoreString &name) const
 
OfOutputoutput_exists (const CoreString &name) const
 
unsigned int find_output_index (const CoreString &name) const
 
OfModuleget_module () const
 return the module of the object
 
void * get_module_data () const
 return the module internal data. It will create it if necessary.
 
bool is_module_data_set () const
 Returns true if the module internal data has been created, false otherwise.
 
template<class T >
T * get_module () const
 
OfItemHandle get_traversal_item () override
 
CoreString get_as_string (const OfSerialOptions &options=OfSerialOptions::get_default()) const override
 return the serialization of the object
 
ParserEntryserialize (const OfSerialOptions &options=OfSerialOptions::get_default()) const
 
bool deserialize (const ParserEntry &entry, const OfSerialOptions &options=OfSerialOptions::get_default(), const bool &create_embedded_objects=true, CoreVector< OfAttr * > *custom_attrs=0)
 set the object attrbute and properties by deserializing a parser compatible serialization
 
CoreVersion pre_deserialize (ParserGroup &group)
 
void pre_process_override (OfOverrides &overrides, const CoreString &obj_key)
 
void asleep (bool silent=false)
 Call OfAttr::asleep on every attributes of this object.
 
void awake (const bool &silent=false)
 Call OfAttr::awake on every attributes of this object.
 
void propagate_dirtiness (const int &dirtiness, const int &dirtiness_flags, OfAttr *attr=0)
 todo
 
void dirty_attributes_revert (const bool &dirty=true)
 dirty all attribute revert states
 
OfObjectget_source () const
 return the instancing source of the object
 
bool is_instance () const override
 return true if the object is an instance
 
bool has_local_attrs () const
 return true if the object has some local attributes
 
bool has_public_local_attrs () const
 return true if the object has some public local attributes
 
bool has_saveable_local_attrs () const
 
bool has_auto_local_attrs () const
 
bool has_cam_driven_attrs () const
 
bool is_local () const
 return true if the object is not an instance
 
bool is_source () const override
 return true if the object is an instancing source
 
bool is_proto () const
 return true if the object is a class prototype
 
bool is_embedded () const override
 return true if the object is embedded inside another object
 
const OfFactoryId & get_factory_id () const
 
OfAttrget_parent_attribute () const
 
const unsigned int & get_parent_attribute_index () const
 todo
 
const OfAttrget_changing_attr () const
 
OfObjectget_localization () const
 
const short & get_dirtiness () const
 
const short & get_dirtiness_flags () const
 
const bool & is_override () const
 
CoreList< OfObject * > & get_instances ()
 Get the list of instances for this object.
 
const CoreList< OfObject * > & get_instances () const
 Get the list of instances for this object.
 
const unsigned int & get_instance_count () const
 
OfObjectget_instance (const unsigned int &index) const
 
void rename (const CoreString &name) override
 
void protect (const bool &enable) const
 tag the object to whether it is in use (for rendering for example)
 
bool is_protected () const override
 
bool has_protection_flag () const
 
OfObjectadd_embedded_object (const CoreString &obj_name, const CoreString &class_name, const OfObject *source=0)
 
OfObjectget_embedded_object (const unsigned int &index) const
 
unsigned int get_embedded_object_index (OfObject *object) const
 
void allow_custom_attributes (const bool &allow)
 
const bool & allow_custom_attributes () const
 
void set_disabled (const bool &value) override
 
void set_parent_disabled (const bool &value) override
 
void set_source_disabled (const bool &value) override
 
void set_shadowed (const bool &value) override
 
void set_parent_shadowed (const bool &value) override
 
void set_source_shadowed (const bool &value) override
 
void dirty_referenced_objects ()
 dirty the cache of references
 
- Public Member Functions inherited from OfItem
void clear_caps ()
 
void clear_flags ()
 
bool get_flag_is_active (const int &flag) const
 
virtual bool is_private () const
 
virtual bool is_static () const
 
virtual bool is_remote () const
 
virtual bool is_content_locked () const
 
bool is_user_locked () const
 
virtual bool is_pending () const
 
virtual bool is_scene_assembly_temp () const
 
virtual bool is_overridden_in_scene_assembly () const
 
virtual bool is_missing () const
 
virtual bool is_zombie () const
 
virtual bool is_disable_cyclic_check () const
 
virtual bool is_overriden () const
 
virtual bool is_external () const
 
virtual bool is_added () const
 
virtual bool is_removed () const
 
bool is_shadowed () const
 
bool is_source_disabled () const
 
bool is_parent_disabled () const
 
bool is_enabled () const
 
bool is_disabled () const
 
bool is_read_only () const
 Returns true if this item has been flagged read_only ! for more complex usage see is_editable.
 
bool is_external_dependency (const OfContext &context) const
 
bool is_in_undo_process () const
 
void set_in_undo_process (const bool &flag)
 
virtual bool is_kindof (const CoreClassInfo &class_info) const override
 
bool is_implicit () const
 
bool is_explicit () const
 
bool is_build_visible () const
 
bool is_build_package_read_only () const
 Returns true if this item is in a read only build package (no active layer)
 
bool is_editable (const int &read_only_mask=RO_ALL_MASK) const
 
virtual void set_read_only (const bool &value)
 
virtual void set_private (const bool &value)
 
virtual void set_static (const bool &value)
 
virtual void set_user_locked (const bool &value)
 
virtual void set_zombie (const bool &value)
 
virtual void set_disable_cyclic_check (const bool &value)
 
virtual void set_external (const bool &value)
 
virtual void set_overriden (const bool &value)
 
virtual void set_missing (const bool &value)
 
virtual void set_added (const bool &value)
 
virtual void set_removed (const bool &value)
 
virtual void set_scene_assembly_temp (const bool &value)
 
virtual void set_overriden_in_scene_assembly (const bool &value)
 
bool get_can_delete () const
 
bool get_can_copy () const
 
bool get_can_paste () const
 
bool get_can_move () const
 
bool get_can_instantiate () const
 
bool get_can_localize () const
 
bool get_can_rename () const
 
bool is_shadowable () const
 
void set_name (const CoreString &new_name)
 
bool is_name_dirty () const
 
CoreString get_project_full_name () const
 
const CoreStringget_name () const
 
OfObjectFactoryget_factory () const
 return the object factory
 
OfChannelManagerget_channel_manager () const
 
OfAppget_application () const
 return the application
 
bool has_position (const CoreString &pos_slot) const
 
void set_position (const CoreString &pos_slot, const GMathVec2i &pos)
 
void set_position (const CoreString &pos_slot, const GMathVec3i &pos)
 
void set_position (const CoreString &pos_slot, const int &x, const int &y, const int &property=-1)
 
bool get_position (const CoreString &pos_slot, GMathVec2i &pos) const
 
bool get_position (const CoreString &pos_slot, GMathVec3i &pos) const
 
bool get_nodal_property (const CoreString &pos_slot, int &value) const
 
void set_nodal_property (const CoreString &pos_slot, const int &value)
 
const CoreStringget_last_changed_position () const
 
void serialize_positions (ParserGroup &group) const
 
void deserialize_positions (const ParserGroup &group)
 
int get_node_status () const
 
const long unsigned long & get_creation_date () const
 
const long unsigned long & get_modified_date () const
 
OfItemget_parent_item () const
 
OfContextget_context ()
 return the context of the item
 
const OfContextget_context () const
 return the context of the item
 
OfItemget_source () const
 return the source of the instance
 
const OfItemget_scene_assembly_source_item () const
 return the first real item from which the item was created from in the scene assembly
 
OfItemget_scene_assembly_source_item ()
 return the first real item from which the item was created from in the scene assembly
 
const State & get_state () const
 
void set_state (const State &new_state)
 
CoreString set_comment (const CoreString &comment)
 sets comment value
 
CoreString get_comment () const
 
CoreString set_colortag (const CoreString &tag)
 sets tag value
 
CoreString get_colortag () const
 
bool test_flags (const CoreBitFieldHelper &flags)
 
const int & get_internal_flags () const
 
bool is_cap_delete () const
 
bool is_cap_rename () const
 
bool is_cap_copy () const
 
bool is_cap_paste () const
 
bool is_cap_move () const
 
bool is_cap_instantiate () const
 
bool is_cap_localize () const
 
bool is_cap_localize_attributes () const
 
bool is_cap_display () const
 
void set_cap_delete (bool is_active)
 
void set_cap_rename (bool is_active)
 
void set_cap_copy (bool is_active)
 
void set_cap_paste (bool is_active)
 
void set_cap_move (bool is_active)
 
void set_cap_instantiate (bool is_active)
 
void set_cap_localize (bool is_active)
 
void set_cap_localize_attributes (bool is_active)
 
void set_cap_display (bool is_active)
 
- Public Member Functions inherited from EventObject
 EventObject ()
 Constructor.
 
 EventObject (const EventObject &src)
 Copy Constructor.
 
virtual ~EventObject () override
 Destructor.
 
void connect (EventObject &sender, const CoreString &event_id, EventInfoMethod event_cb, void *data=0)
 Connects this to an object to listen to a specific event.
 
void connect (EventObject &sender, EventInfoMethod event_cb, void *data=0)
 Connects this to an object to listen any of its events.
 
bool disconnect (EventObject &sender, const CoreString &event_id, EventInfoMethod event_cb, void *data=0)
 
bool disconnect_all (EventObject &sender)
 Disconnects from all objects sender was listening on.
 
void disconnect_all ()
 Disconnects from all objects we were listening on.
 
void remove_all_connection ()
 Disconnects object from other objects it is listening to, and also disconnects all objects listening to it.
 
void raise_event (const CoreString &event_id) const
 sends an event
 
void raise_event (const EventInfo &event_info) const
 sends an event
 
bool is_connected (EventObject &sender, const CoreString &event_id, void *data)
 
void set_mute (const bool &mute)
 Asks for object muting. This will increase or decrease the muting counter. Unmuting may not be immediat since it will happen only when counter reaches 0.
 
bool is_mute () const
 Returns if object is muted.
 
CoreArray< EventObject * > get_senders () const
 
unsigned int get_sender_count () const
 
unsigned int get_receiver_count () const
 
void connect (EventObject &sender, const CoreString &event_id, EventMethod event_cb, void *data=0)
 Connects this to an object to listen to a specific event.
 
void connect (EventObject &sender, EventMethod event_cb, void *data=0)
 Connects this to an object to listen any of its events.
 
bool disconnect (EventObject &sender, const CoreString &event_id, EventMethod event_cb, void *data=0)
 Disconnects this from an object for a specific event.
 
- 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 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 void pre_delete (OfObject **objects, const unsigned int &count=1)
 
static void pre_delete_already_gathered (OfObject **objects, const unsigned int &count)
 
static bool should_serialize_attribute (const OfAttr *attr, const OfSerialOptions &options=OfSerialOptions::get_default())
 return the serialization of the object
 
static bool is_serialization_keyword (const CoreString &keyword)
 
static bool is_valid_serial (const ParserEntry *serial)
 
- Static Public Member Functions inherited from OfItem
static void set_disabled (const CoreVector< OfItem * > &items_to_disable, const bool &disabled_state)
 
static void set_shadowed (const CoreVector< OfItem * > &items_to_shadow, const bool &shadow_state)
 
static bool is_valid_serial (const ParserEntry *serial)
 
static const CoreStringget_name (const ParserEntry *serial)
 
static void make_creation_params (const OfItem::AttrCreationParams &creation_params, CoreVector< CoreString > &additionnal_params, CoreVector< CoreString > &additionnal_params_values)
 
static void extract_creation_params (const CoreBasicArray< CoreString > &additionnal_params, const CoreBasicArray< CoreString > &additionnal_params_values, OfItem::AttrCreationParams &creation_params)
 
static unsigned int is_item_property_event (const CoreString &event)
 
static unsigned int is_item_property_name (const CoreString &name)
 
static const CoreStringget_item_property_name (unsigned int property_id)
 
static void register_item_property (const CoreString &name, const CoreString &event, PropertyExtractor get, PropertyIntegrator set)
 Declare a new property for all OfItems.
 
static bool serialize_item_property (unsigned int property_id, const OfItem &item, ParserEntry *serial)
 Retrieve item's current property value as serial data.
 
static bool deserialize_item_property (unsigned int property_id, OfItem &item, const ParserEntry *serial)
 Set item's property value from serial data.
 
- Static Public Member Functions inherited from EventObject
static void connect (EventObject &sender, const CoreString &event_id, EventObject &receiver, EventInfoMethod event_cb, void *data=0)
 Static version of the above function.
 
static void connect (EventObject &sender, EventObject &receiver, EventInfoMethod event_cb, void *data=0)
 Static version of the above function.
 
static void connect (EventObject &sender, const CoreString &event_id, EventInfoFunction event_cb, void *data=0)
 Connects to an object to listen to a specific event.
 
static void connect (EventObject &sender, EventInfoFunction event_cb, void *data=0)
 Connects to an object to listen any of its events.
 
static bool disconnect (EventObject &sender, const CoreString &event_id, EventInfoFunction event_cb, void *data=0)
 
static void raise_event (EventObject &sender, const CoreString &event_id)
 Sends an event.
 
static void raise_event (EventObject &sender, const EventInfo &event_info)
 Sends an event.
 
static void connect (EventObject &sender, const CoreString &event_id, EventFunction event_cb, void *data=0)
 Connects to an object to listen to a specific event.
 
static void connect (EventObject &sender, EventFunction event_cb, void *data=0)
 Connects to an object to listen any of its events.
 
static void connect (EventObject &sender, const CoreString &event_id, EventObject &receiver, EventMethod event_cb, void *data=0)
 Static version of the above function.
 
static void connect (EventObject &sender, EventObject &receiver, EventMethod event_cb, void *data=0)
 Static version of the above function.
 
static bool disconnect (EventObject &sender, const CoreString &event_id, EventFunction event_cb, void *data=0)
 Disconnects this from an object for a specific event.
 
- 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 OfContext
 
class OfContextImpl
 
class OfAttr
 
struct OfAttrValue
 
class OfExpression::Binding
 
class OfAttr::Reference
 
class OfClass
 
class OfModule
 
class OfObjectFactory
 
class OfSceneAssemblyContextEngine
 
class OfContextEngine
 
class OfObjectIsCyclicTask
 
class OfCid
 
template<bool >
class OfBaseItemHandle
 
template<bool >
class OfBaseObjectHandle
 

the new name for this object

rename this object

OfContextget_context () const
 return the context of this object
 
void set_context (OfContext &context)
 reparent this object to the specicified context
 
bool make_local (bool keep_values=true)
 
bool make_instance (OfObject &source)
 
const OfObjectget_scene_assembly_source_object () const
 return the first real object from which the object was created from in the scene assembly
 
OfObjectget_scene_assembly_source_object ()
 
bool is_instance (const OfObject &source) const
 todo
 
bool is_source (const OfObject &instance) const
 todo
 
bool is_child_of (const OfObject &object) const
 todo
 
bool is_traversal () const override
 
bool is_referenceable () const override
 
bool can_serialize (const int &serial_mode) const override
 
OfObjectget_top_object () const
 todo
 
const unsigned int & get_dependency_count () const override
 todo
 
OfAttrget_dependency (const unsigned int &index) const
 
const unsigned int get_dependency_attr_value_index (const unsigned int &index) const
 
void get_dependency_objects (CoreSet< OfObject * > &dep_objects, const bool &recurse=false)
 
bool is_weak_reference_dependency (const unsigned int &index) const
 
CoreListId get_first_dependency () const override
 
CoreListId get_next_dependency (const CoreListId &dep_id) const override
 
OfAttrget_dependency_attr (const CoreListId &dep_id) const override
 
const unsigned int get_dependency_attr_value_index (const CoreListId &dep_id) const override
 
void get_overrides (CoreArray< OfObject * > &overrides) const
 todo
 
void get_overrides (CoreArray< OfObject * > &overrides, const CoreBitFieldHelper &flags) const
 
void get_all_instances (CoreVector< OfObject * > &instances, const bool &recurse=false) const
 gather all instances of this object
 
bool is_cyclic_reference (const OfAttr *attr) const override
 
bool diagnostic_cyclic_reference (const OfAttr *attr, CoreVector< CoreString > &cycle_path) const
 
void get_paths (CoreArray< CoreArray< OfObject * > > &paths) const
 todo
 
OfObjectlocalize (const CoreArray< OfObject * > &path)
 todo
 
OfObjectunlocalize ()
 destroys the override and returns its source
 
void compute_referenced_objects (CoreSet< OfObject * > &referenced_objects, bool include_disabled=false) const
 
const CoreSet< OfObject * > & get_raw_referenced_objects () const
 return the set of objects referenced by the real object
 
void get_referenced_objects (CoreArray< OfObject * > &referenced_objects) const
 
const unsigned int & get_referenced_objects_count () const
 
OfObjectget_raw_referenced_object (const unsigned int &index) const
 
OfObjectget_referenced_object (const unsigned int &index) const
 
void gather_branch (CoreSet< OfObject * > &objects, OfClass *stop_on_class=0, bool gather_traversal_objects=false) const
 return the object's branch under this object
 
void gather_branch (CoreSet< OfObject * > &objects, const CoreBasicArray< OfClass * > &stop_on_classes, bool gather_traversal_objects=false) const
 return the object's branch under this object
 
OfObjectget_parent () const
 return the object embeddeding this object.
 
OfObjectadd_embedded_object (const CoreString &obj_name, const CoreString &class_name, const OfObject *source, const int &flags)
 add an embedded object to this object
 
OfObjectadd_embedded_object (ParserEntry &entry, const OfSerialOptions &options=OfSerialOptions::get_default())
 add an embedded object by specifying its serialization
 
void remove_embedded_object (const CoreString &obj_name)
 
void remove_embedded_object (OfObject &object)
 
void remove_all_embedded_objects ()
 
OfObjectget_embedded_object (const CoreString &name, const CoreBitFieldHelper &flags) const
 return an embedded object contained by this object by name
 
OfObjectembedded_object_exists (const CoreString &name, const CoreBitFieldHelper &flags) const
 return an embedded object contained by this object by name
 
void get_embedded_objects (CoreVector< OfObject * > &objects, const CoreBitFieldHelper &flags) const
 
const CoreVector< OfObject * > & get_embedded_objects () const
 
unsigned int get_embedded_object_count () const
 
const bool & is_object () const override
 
const bool & is_context () const override
 
const OfObjectto_object () const override
 
OfObjectto_object () override
 
const OfContextto_context () const override
 
OfContextto_context () override
 
const CoreHashTable< unsigned
int, OfObjectVariableValue * > & 
get_local_variables () const
 get the variables of the object
 
OfObjectVariableValuebind_local_variable (const CoreString &var_name, OfExpressionWrapper *expression)
 
void unbind_local_variable (OfObjectVariableValue *local_variable, OfExpressionWrapper *expression)
 
size_t get_memory_size () const override
 
void get_statistics (SysStatistic &stats) const
 
void replace_dependencies (OfObject &object)
 The specified object is used as reference or texture for all this object dependencies.
 
bool has_enabled_shading_variable (const bool &recurse_on_inputs)
 
void set_pending (const bool &value) override
 
static CoreString get_path_name (const CoreArray< OfObject * > &path, const OfContext &context)
 returns a branch of the dependency graph as string
 

Additional Inherited Members

- Public Types inherited from OfItem
enum  Flag {
  FLAG_NONE = 0,
  FLAG_READ_ONLY = 1 << 0,
  FLAG_PRIVATE = 1 << 1,
  FLAG_STATIC = 1 << 2,
  FLAG_REMOTE = 1 << 3,
  FLAG_CONTENT_LOCKED = 1 << 4,
  FLAG_USER_LOCKED = 1 << 5,
  FLAG_PENDING = 1 << 6,
  FLAG_OVERRIDEN = 1 << 7,
  FLAG_EXTERNAL = 1 << 8,
  FLAG_DISABLED = 1 << 9,
  FLAG_PARENT_DISABLED = 1 << 10,
  FLAG_SOURCE_DISABLED = 1 << 11,
  FLAG_SHADOWED = 1 << 12,
  FLAG_PARENT_SHADOWED = 1 << 13,
  FLAG_SOURCE_SHADOWED = 1 << 14,
  FLAG_UNDO_PROCESS = 1 << 15,
  FLAG_MISSING = 1 << 16,
  FLAG_SCENE_ASSEMBLY_TEMP = 1 << 17,
  FLAG_SCENE_ASSEMBLY_OVERRIDE = 1 << 18,
  FLAG_ZOMBIE = 1 << 19,
  FLAG_OVERRIDE_PDIR = 1 << 20,
  FLAG_ADDED = 1 << 21,
  FLAG_REMOVED = 1 << 22,
  FLAG_DISABLE_CYCLIC_CHECK = 1 << 23,
  FLAG_COUNT = 24
}
 
enum  Caps {
  CAPS_NONE = 0,
  CAPS_DELETE = 1 << 0,
  CAPS_RENAME = 1 << 1,
  CAPS_COPY = 1 << 2,
  CAPS_PASTE = 1 << 3,
  CAPS_MOVE = 1 << 4,
  CAPS_INSTANTIATE = 1 << 5,
  CAPS_LOCALIZE = 1 << 6,
  CAPS_DISPLAY = 1 << 7,
  CAPS_LOCALIZE_ATTRIBUTES = 1 << 8,
  CAPS_ALL = 0xFFFFFFFF,
  CAPS_COUNT = 11
}
 
enum  State {
  STATE_LIVE = 0,
  STATE_NEW = 1,
  STATE_DELETE = 2,
  STATE_DESERIALIZE = 3
}
 
enum  ItemReadOnlyMask {
  RO_USER_LOCKED_MASK = 1 << 2,
  RO_BUILD_MASK = 1 << 3,
  RO_BUILD_PACKAGE_MASK = 1 << 4
}
 
typedef CoreFunction< void(OfItem
*item, const ParserEntry
*serial) > 
PropertyIntegrator
 
typedef CoreFunction< void(const
OfItem *item, ParserEntry
*serial) > 
PropertyExtractor
 
- Static Public Attributes inherited from OfItem
static CoreBitFieldHelper empty_flags_mask = CoreBitFieldHelper( OfItem::FLAG_NONE, OfItem::FLAG_NONE, CoreBitFieldHelper::MODE_DISABLE, CoreBitFieldHelper::MODE_DISABLE )
 
static CoreBitFieldHelper enabled_flags_mask = CoreBitFieldHelper( OfItem::FLAG_NONE, OfItem::FLAG_DISABLED | OfItem::FLAG_PARENT_DISABLED | OfItem::FLAG_SOURCE_DISABLED | OfItem::FLAG_EXTERNAL | OfItem::FLAG_PENDING | OfItem::FLAG_SHADOWED | OfItem::FLAG_PARENT_SHADOWED | OfItem::FLAG_SOURCE_SHADOWED, CoreBitFieldHelper::MODE_DISABLE, CoreBitFieldHelper::MODE_ONE_BIT )
 
static CoreBitFieldHelper enabled_but_static_flags_mask = CoreBitFieldHelper( OfItem::FLAG_NONE, OfItem::FLAG_DISABLED | OfItem::FLAG_PARENT_DISABLED | OfItem::FLAG_SOURCE_DISABLED | OfItem::FLAG_EXTERNAL | OfItem::FLAG_PENDING | OfItem::FLAG_SHADOWED | OfItem::FLAG_PARENT_SHADOWED | OfItem::FLAG_SOURCE_SHADOWED | OfItem::FLAG_STATIC, CoreBitFieldHelper::MODE_DISABLE, CoreBitFieldHelper::MODE_ONE_BIT )
 
static CoreBitFieldHelper enabled_but_private_flags_mask = CoreBitFieldHelper( OfItem::FLAG_NONE, OfItem::FLAG_DISABLED | OfItem::FLAG_PARENT_DISABLED | OfItem::FLAG_SOURCE_DISABLED | OfItem::FLAG_EXTERNAL | OfItem::FLAG_PENDING | OfItem::FLAG_SHADOWED | OfItem::FLAG_PARENT_SHADOWED | OfItem::FLAG_SOURCE_SHADOWED | OfItem::FLAG_PRIVATE, CoreBitFieldHelper::MODE_DISABLE, CoreBitFieldHelper::MODE_ONE_BIT )
 
static CoreBitFieldHelper enabled_but_static_and_private_flags_mask = CoreBitFieldHelper( OfItem::FLAG_NONE, OfItem::FLAG_DISABLED | OfItem::FLAG_PARENT_DISABLED | OfItem::FLAG_SOURCE_DISABLED | OfItem::FLAG_EXTERNAL | OfItem::FLAG_PENDING | OfItem::FLAG_SHADOWED | OfItem::FLAG_PARENT_SHADOWED | OfItem::FLAG_SOURCE_SHADOWED | OfItem::FLAG_PRIVATE | OfItem::FLAG_STATIC, CoreBitFieldHelper::MODE_DISABLE, CoreBitFieldHelper::MODE_ONE_BIT )
 
static CoreBitFieldHelper enabled_but_static_and_read_only_flags_mask = CoreBitFieldHelper( OfItem::FLAG_NONE, OfItem::FLAG_DISABLED | OfItem::FLAG_PARENT_DISABLED | OfItem::FLAG_SOURCE_DISABLED | OfItem::FLAG_EXTERNAL | OfItem::FLAG_PENDING | OfItem::FLAG_SHADOWED | OfItem::FLAG_PARENT_SHADOWED | OfItem::FLAG_SOURCE_SHADOWED | OfItem::FLAG_READ_ONLY | OfItem::FLAG_STATIC, CoreBitFieldHelper::MODE_DISABLE, CoreBitFieldHelper::MODE_ONE_BIT )
 
static CoreBitFieldHelper no_static_and_read_only_flags_mask = CoreBitFieldHelper( OfItem::FLAG_NONE, OfItem::FLAG_READ_ONLY | OfItem::FLAG_STATIC, CoreBitFieldHelper::MODE_DISABLE, CoreBitFieldHelper::MODE_ONE_BIT )
 
- Protected Member Functions inherited from OfItem
const int & get_flags () const
 
unsigned int get_caps () const
 
void set_caps (unsigned int caps)
 
bool is_cap_active (OfItem::Caps cap) const
 
void set_cap_active (OfItem::Caps cap, bool is_active)
 
void set_creation_date (const long unsigned long &creation_date) const
 set the item creation date
 
void set_modified_date (const long unsigned long &modified_date) const
 set the item modification date
 
bool _is_disabled () const
 
CoreString get_project_full_name (const OfContext &parent_context) const
 returns the path of the item (name included) inside its root context
 
bool is_external_dependency (const OfContext &parent_context, const OfContext &context) const
 return true if the item is an external dependency of the given context
 
bool is_implicit (const OfContext &parent_context) const
 
bool is_explicit (const OfContext &parent_context) const
 
OfItemget_parent_item (const OfContext &parent_context) const
 return the immediate parent of the item
 
bool get_can_delete (const OfContext &parent_context) const
 
bool get_can_move (const OfContext &parent_context) const
 
bool get_can_localize (const OfContext &parent_context) const
 
bool get_can_rename (const OfContext &parent_context) const
 
bool is_build_visible (const OfContext &parent_context) const
 Returns true if this item is visible in the build, i.e it is at the first level of the build or in the current Vizroot.
 
 OfItem (OfObjectFactory &factory)
 
- Static Protected Member Functions inherited from OfItem
static const int get_pending_flags ()
 
static void notify_disable_attrs (OfObjectFactory &factory, const CoreSet< OfAttr * > &attrs, const CoreVector< int > &dep_types)
 
- Protected Attributes inherited from OfItem
CoreString m_name
 
CoreString m_last_changed_position
 created in version 0.91
 
CoreAtomic64 m_full_name_cached
 
OfObjectFactorym_factory
 
long unsigned long m_creation_date
 
long unsigned long m_modified_date
 
int m_flags
 
unsigned int m_caps
 
CoreHashTable< CoreString,
GMathVec3i > 
m_positions
 
State m_state
 

Detailed Description

Class defining Object Factory objects. They have inner properties and contain OfAttr attributes.

Member Function Documentation

OfAttr * OfObject::add_attribute ( const OfItem::AttrCreationParams params)
overridevirtual

add an attribute to the object.

Parameters
paramsobject containing all the options to set the new attribute

Implements OfItem.

OfAttr * OfObject::add_attribute ( const CoreString attr,
const OfAttr::Type type,
const OfAttr::Container container = OfAttr::CONTAINER_SINGLE,
const OfAttr::VisualHint visual_hint = OfAttr::VISUAL_HINT_DEFAULT,
const CoreString group_name = "general" 
)
overridevirtual

add an attribute to the object

Parameters
attrname of the attribute
typetype of the attribute
containeroptional container type of the attribute. OfAttr::CONTAINER_SINGLE by default
visual_hintoptional visual hint. OfAttr::VISUAL_HINT_DEFAULT by default
group_nameoptional group in which this attribute should be put. "general" by default

Implements OfItem.

void OfObject::add_custom_table ( const CoreBasicString table_name,
CoreBasicArray< OfAttr * >  columns 
)

Create a new table on this object.

Parameters
table_nameName of the table
columnsThe column attributes for the new table. They must belong to this object.
void OfObject::add_custom_table_metadata ( const CoreBasicString table_name,
CoreStringView  metadata_name,
const CoreVariant metadata_value,
unsigned int  column_index = CORE_INVALID_INDEX 
)

Set the metadata of a table or a table column, allowing to customize its presentation (width, disable checkbox, etc ...)

Parameters
table_nameName of the table.
metadata_nameName of the metadata. This must be one of OfCid::KEYWORD_* keywords related to tables.
metadata_valueValue of the metadata.
column_indexIf not specified, the metadata is set in the table definition, otherwise, it is set in the specified column.
OfObject * OfObject::add_embedded_object ( const CoreString obj_name,
const CoreString class_name,
const OfObject source,
const int &  flags 
)

add an embedded object to this object

Parameters
obj_namethe name of the embedded object
class_namethe class name of the embedded object
sourcethe instancing source of the embedded object if we want to create an instance
Returns
the newly created embedded object or the already existing object having the same name
OfObject * OfObject::add_embedded_object ( ParserEntry entry,
const OfSerialOptions options = OfSerialOptions::get_default() 
)

add an embedded object by specifying its serialization

Parameters
entrythe object serialization
Returns
the created object
Note
the object is first created (the class is given by the serialization) and then deserialized
void OfObject::asleep ( bool  silent = false)

Call OfAttr::asleep on every attributes of this object.

See Also
OfAttr::asleep
const OfAttr * OfObject::attribute_exists ( const CoreBasicString attr) const
overridevirtual

tell whether an attribute exists by specifying its name

Returns
the attribute of 0 if the attribute does not exist
Note
const method: the attrbute is read-only

Implements OfItem.

OfAttr * OfObject::attribute_exists ( const CoreBasicString attr)
overridevirtual

tell whether an attribute exists by specifying its name

Returns
the attribute of 0 if the attribute does not exist
Note
non-const method: the attrbute can be edited

Implements OfItem.

void OfObject::awake ( const bool &  silent = false)

Call OfAttr::awake on every attributes of this object.

See Also
OfAttr::awake
OfObjectVariableValue * OfObject::bind_local_variable ( const CoreString var_name,
OfExpressionWrapper *  expression 
)

Bind an expression to a local variable. If the local variable doesn't exist, it's created.

int OfObject::call_action ( const CoreString name,
void *  data = 0 
)

call an action with the specified name

Parameters
nameName of the action
dataOptional data passed to the action
Returns
the result of the action (0 if failed)
bool OfObject::deserialize ( const ParserEntry entry,
const OfSerialOptions options = OfSerialOptions::get_default(),
const bool &  create_embedded_objects = true,
CoreVector< OfAttr * > *  custom_attrs = 0 
)

set the object attrbute and properties by deserializing a parser compatible serialization

Parameters
entryparser compatible serialization
create_embedded_objectstell whether to create embedded objects or not
Returns
false if the serialization failed, true otherwise
OfObject * OfObject::embedded_object_exists ( const CoreString name,
const CoreBitFieldHelper flags 
) const

return an embedded object contained by this object by name

  • name the name of the embedded object \ note does not log a warning if the object does not exist
void OfObject::gather_branch ( CoreSet< OfObject * > &  objects,
OfClass stop_on_class = 0,
bool  gather_traversal_objects = false 
) const

return the object's branch under this object

Parameters
objectsthe object's branch under this object
stop_on_classstop the gathering of objects if this class is encountered during the recursion
gather_traversal_objectsif true, traversal objects will be added to the result, else there will be taken into account in the gathering recursion but not added to the result
void OfObject::gather_branch ( CoreSet< OfObject * > &  objects,
const CoreBasicArray< OfClass * > &  stop_on_classes,
bool  gather_traversal_objects = false 
) const

return the object's branch under this object

Parameters
objectsthe object's branch under this object
stop_on_classesstop the gathering of objects if one of these classes is encountered during the recursion
gather_traversal_objectsif true, traversal objects will be added to the result, else there will be taken into account in the gathering recursion but not added to the result
void OfObject::get_all_instances ( CoreVector< OfObject * > &  instances,
const bool &  recurse = false 
) const

gather all instances of this object

Parameters
instancesthe gathered instances
recurseset whether to gather instances of instances or not
CoreString OfObject::get_as_string ( const OfSerialOptions options = OfSerialOptions::get_default()) const
overridevirtual

return the serialization of the object

Returns
a stringified version of the serialization

Implements OfItem.

const OfAttr * OfObject::get_attribute ( const CoreBasicString attr) const
overridevirtual

find an attribute by specifying its name

Returns
0 if the attribute is not found
Note
const method: the attrbute is read-only

Implements OfItem.

OfAttr * OfObject::get_attribute ( const CoreBasicString attr)
overridevirtual

find an attribute by specifying its name

Returns
0 if the attribute is not found
Note
non-const method: the attribute can be edited

Implements OfItem.

const OfAttr * OfObject::get_attribute ( const unsigned int &  index) const
overridevirtual

return the attribute at the given index

Note
const method: the attrbute is read-only

Implements OfItem.

OfAttr * OfObject::get_attribute ( const unsigned int &  index)
overridevirtual

return the attribute at the given index

Note
non-const method: the attrbute can be edited

Implements OfItem.

CoreString OfObject::get_contextual_name ( ) const

return the contextual name of the object

Note
the contextual name is the name of the object in its context, neither its full name nor its embedded name
OfObject * OfObject::get_embedded_object ( const CoreString name,
const CoreBitFieldHelper flags 
) const

return an embedded object contained by this object by name

  • name the name of the embedded object
    Note
    log a warning if the object does not exist
OfObject* OfObject::get_instance ( const unsigned int &  index) const
inline

Get an instance of this object by index.

Note
Please avoid using this method to iterate on instances by index. This is highly inefficient. Instead, prefer iterating directly on the list returned by get_instances using a for-range loop or iterators.
const unsigned int& OfObject::get_instance_count ( ) const
inline

Get the number of instances for this object.

Note
Please avoid using this method to iterate on instances by index. This is highly inefficient. Instead, prefer iterating directly on the list returned by get_instances using a for-range loop or iterators.
const GuiIcon * OfObject::get_item_icon ( ) const
overridevirtual

Item icon get accessor.

Returns
a const pointer on the icon

Implements OfItem.

const CoreHashTable< unsigned int, OfObjectVariableValue * > & OfObject::get_local_variables ( ) const

get the variables of the object

Returns
returns the hash table of variable name key and variable value handle

Get the currently registered local variables

OfObject * OfObject::get_parent ( ) const

return the object embeddeding this object.

Note
if this object is not an embedded object, it returns a null pointer.
OfAttr * OfObject::get_parent_attribute ( ) const

Get the attribute which stores the OfObject which own this one. This is only used for embeded objects.

CoreString OfObject::get_path_name ( const CoreArray< OfObject * > &  path,
const OfContext context 
)
static

returns a branch of the dependency graph as string

Parameters
paththe array of objects defining the path
contextthe context from which the string of each object in the path will be serialized
const OfObject * OfObject::get_scene_assembly_source_object ( ) const

return the first real object from which the object was created from in the scene assembly

Returns
this if the object was not created in the scene assembly
OfObject * OfObject::get_source ( ) const

return the instancing source of the object

Returns
0 if the object is not an instance
OfAttrTable OfObject::get_table ( const CoreBasicString table_name) const

Get a table by name.

Parameters
table_nameName of the table
Returns
A table wrapper. If table_index was incorrect, the returned instance will not be valid. See OfAttrTable::is_valid
OfAttrTable OfObject::get_table ( const OfAttr attr) const

Get the table owning the given attribute.

Parameters
attrThe attribute
Returns
A table wrapper. If the attr was part of a table, it's valid and initialized to that table, otherwise it's invalid.
bool OfObject::has_cam_driven_attrs ( ) const
Returns
true if any attribute is CAM-driven.
bool OfObject::has_local_attrs ( ) const

return true if the object has some local attributes

Note
local attributes are attributes whose values are not inherited
bool OfObject::has_public_local_attrs ( ) const

return true if the object has some public local attributes

Note
public local attributes are attributes that are available to users and whose values are not inherited
bool OfObject::is_kindof ( const CoreString class_name) const
overridevirtual

return true if the object's kind matches the specified class

Parameters
class_namethe name of the class that defines the kind of the object

Implements OfItem.

bool OfObject::is_kindof ( const OfClass cls) const

return true if the object's kind matches the specified class

Parameters
clsthe class that defines the kind of the object
bool OfObject::is_local ( ) const

return true if the object is not an instance

Note
this is the counterpart of is_instance() method
bool OfObject::is_module_data_set ( ) const

Returns true if the module internal data has been created, false otherwise.

Note
Even if the module data has been set doesn't mean the result from get_module_data will not be nullptr: it just means a call to create_module_data has already been made.
bool OfObject::is_referenceable ( ) const
overridevirtual

Returns true if this object can be referenced by an attribute of type reference

Implements OfItem.

void OfObject::pre_delete_already_gathered ( OfObject **  objects,
const unsigned int &  count 
)
static

doing this way wont inform instances, considers that instances are already providden to the object list, but what if not ? need refact a bit to ensure they always are processed with sources

void OfObject::remove_attribute ( const CoreBasicString name)
overridevirtual

remove the attribute by specifying its name

Note
does nothing if no attribute matches the given name

Implements OfItem.

void OfObject::remove_attribute ( OfAttr attr)
overridevirtual

remove the given attribute from the object

Parameters
attrthe attribute to be removed
Note
the attribute to remove must be an attribute of the object

Implements OfItem.

void OfObject::reset_attributes ( )
overridevirtual

reset the values of class attributes as if the object was just created

Note
if the object is an instance, the attribute is unlocalized to match the source object attribute value
custom attributes cannot be reset as there is no default value to match

Implements OfItem.

bool OfObject::should_serialize_attribute ( const OfAttr attr,
const OfSerialOptions options = OfSerialOptions::get_default() 
)
static

return the serialization of the object

Returns
a parser version of the serialization
void OfObject::unbind_local_variable ( OfObjectVariableValue local_variable,
OfExpressionWrapper *  expression 
)

Unbind an expression from an existing local variable. If the local variable doesn't use any expression, it's deleted and removed.