Clarisse 4.0 SP10 SDK  4.0.0.0.10
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Classes | Public Member Functions | Static Public Member Functions | Protected 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

virtual const CoreStringget_full_name () const
 return the full name of the object
 
CoreString get_contextual_name () const
 return the contextual name of the object
 
virtual void set_name_dirty ()
 
void set_content_locked (const bool &value)
 
void set_remote (const bool &value)
 
const OfClassget_class () const
 return the class of the object
 
bool is_kindof (const CoreString &class_name) const
 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
 return true if the object is within the given context
 
bool is_external_dependency (const OfContext &context) const
 return true if the object is an external dependency of the given context
 
bool is_child_of (const CoreSet< OfContext * > &parent_contexts) const
 
bool is_embedded_child_of (const CoreSet< OfObject * > &parent_objects) const
 
virtual const GuiIconget_item_icon () const
 Item icon get accessor.
 
int call_action (const CoreString &name, void *data=0)
 call an action with the specified name
 
virtual OfAttradd_attribute (const OfItem::AttrCreationParams &params)
 add an attribute to the object
 
virtual 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")
 
const OfAttrget_attribute (const CoreString &attr) const
 find an attribute by specifying its name
 
OfAttrget_attribute (const CoreString &attr)
 find an attribute by specifying its name
 
const OfAttrget_attribute (const unsigned int &index) const
 return the attribute at the given index
 
OfAttrget_attribute (const unsigned int &index)
 return the attribute at the given index
 
const OfAttrattribute_exists (const CoreString &attr) const
 tell whether an attribute exists by specifying its name
 
OfAttrattribute_exists (const CoreString &attr)
 tell whether an attribute exists by specifying its name
 
const unsigned int & get_attribute_count () const
 return the total number of attribute in the object
 
virtual const unsigned int find_attribute_index (const CoreString &attr_name) const
 returns the index of the attribute in the object if attribute found, -1 otherwise
 
virtual const unsigned int find_attribute_index (const OfAttr &attr) const
 returns the index of the attribute in the object if attribute found, -1 otherwise
 
virtual unsigned int set_attribute_index (const OfAttr &attr, const unsigned int &new_index)
 modifies the index of the specified attribute
 
void remove_all_attributes ()
 remove all the attributes of the object
 
void remove_attribute (const CoreString &name)
 remove the attribute by specifying its name
 
void remove_attribute (OfAttr &attr)
 remove the given attribute from the object
 
void reset_attributes ()
 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
 
ModuleObjectget_module () const
 return the module of the object
 
void * get_module_data () const
 return the module internal data
 
virtual CoreString get_as_string (const OfSerialOptions &options=OfSerialOptions::get_default()) const
 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 ()
 todo
 
void awake (const bool &silent=false)
 todo
 
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
 
virtual bool is_instance () const
 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 is_local () const
 return true if the object is not an instance
 
virtual bool is_source () const
 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
 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
 
void protect (const bool &enable) const
 tag the object to whether it is in use (for rendering for example)
 
bool is_protected () const
 
bool has_protection_flag () const
 
OfObjectadd_embedded_object (const CoreString &obj_name, const CoreString &class_name, const OfObject *source=0)
 
const CoreVector< OfObject * > & get_embedded_objects () const
 
unsigned int get_embedded_object_count () const
 
OfObjectget_embedded_object (const unsigned int &index) const
 
void allow_custom_attributes (const bool &allow)
 
const bool & allow_custom_attributes () const
 
- Public Member Functions inherited from OfItem
void clear_caps ()
 
bool get_flag_is_active (const int &flag) const
 
virtual const int & get_flags () const
 
void clear_flags ()
 
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_zombie () const
 
virtual bool is_overriden () const
 
virtual bool is_external () 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_in_undo_process () const
 
void set_in_undo_process (const bool &flag)
 
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_external (const bool &value)
 
virtual void set_overriden (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
 
void set_name (const CoreString &new_name)
 
bool is_name_dirty () 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)
 
const CoreHashTable
< CoreString, GMathVec3i > & 
get_nodal_properties () const
 
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)
 
void remove_position (const CoreString &position_slot)
 
const CoreStringget_last_changed_position () const
 
void serialize_positions (ParserGroup &group) const
 
void deserialize_positions (const ParserGroup &group)
 
const long unsigned long & get_creation_date () const
 
const long unsigned long & get_modified_date () const
 
virtual size_t get_memory_size () const
 
OfItemget_parent_item () const
 return the immediate parent of the item
 
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 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 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 ()
 Destructor.
 
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.
 
void raise_event (const CoreString &event_id) const
 sends an event
 
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.
 
void raise_event (const EventInfo &event_info) const
 sends an event
 
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.
 
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.
 
bool disconnect (EventObject &sender, const CoreString &event_id, EventMethod event_cb, void *data=0)
 Disconnects this from an object for a specific event.
 
bool disconnect (EventObject &sender, const CoreString &event_id, EventInfoMethod event_cb, void *data=0)
 
unsigned int get_sender_count () const
 
unsigned int get_receiver_count () const
 
- 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
 
CoreString get_class_interface () const
 
const unsigned long & get_class_info_id () const
 
bool is_kindof (const CoreClassInfo &cinfo) const
 
virtual const CoreClassInfoget_class_info () const
 
bool operator== (const CoreBaseObject &obj) 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
 
bool operator== (const CoreBaseType &obj) 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 Public Member Functions inherited from OfItem
static void set_disabled (const CoreVector< OfItem * > &items_to_disable, const bool &disabled_state)
 
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 Public Member Functions inherited from EventObject
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 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 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, 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, EventFunction event_cb, void *data=0)
 Disconnects this from an object for a specific event.
 
static bool disconnect (EventObject &sender, const CoreString &event_id, EventInfoFunction event_cb, void *data=0)
 
- 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 ()
 
static bool ___class_destructor__ (void *instance, const bool &is_array)
 
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 bool ___class_destructor__ (void *instance, const bool &is_array)
 
static const CoreClassInfoclass_info ()
 

Protected Member Functions

bool has_embedded_objects_with_local_attrs () const
 return true if one of the embedded objects has some local attributes
 
bool has_embedded_objects_with_public_local_attrs () const
 
bool has_embedded_objects_with_saveable_local_attrs () const
 
- Protected Member Functions inherited from OfItem
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
 
 OfItem (OfObjectFactory &factory)
 

Friends

class OfContext
 
class OfAttr
 
struct OfAttrValue
 
class OfExpression::Binding
 
class OfAttr::Reference
 
class OfClass
 
class OfModule
 
class OfObjectFactory
 
class OfContextEngine
 
class OfObjectIsCyclicTask
 

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 make_instance (OfObject &source)
 
bool is_instance (const OfObject &source) const
 todo
 
bool is_source (const OfObject &instance) const
 todo
 
bool is_parent (const OfObject &object) const
 todo
 
OfObjectget_top_object () const
 todo
 
const unsigned int & get_dependency_count () const
 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
 
CoreListId get_next_dependency (const CoreListId &dep_id) const
 
OfAttrget_dependency_attr (const CoreListId &dep_id) const
 
const unsigned int get_dependency_attr_value_index (const CoreListId &dep_id) const
 
void get_overrides (CoreArray< OfObject * > &overrides) const
 todo
 
void get_overrides (CoreArray< OfObject * > &overrides, const CoreBitFieldHelper &flags) const
 
const unsigned int & get_instance_count () const
 todo
 
OfObjectget_instance (const unsigned int &index) const
 todo
 
void get_all_instances (CoreVector< OfObject * > &instances, const bool &recurse=false) const
 gather all instances of this object
 
void rename (const CoreString &name)
 
bool is_cyclic_reference (const OfAttr *attr) const
 
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_referenced_objects () const
 return the set of objects referenced by this object
 
void gather_branch (CoreSet< OfObject * > &objects, OfClass *stop_on_class=0) 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 bool & is_object () const
 
const bool & is_context () const
 
const OfObjectto_object () const
 
OfObjectto_object ()
 
const OfContextto_context () const
 
OfContextto_context ()
 
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)
 
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)
 
virtual void set_disabled (const bool &value)
 
virtual void set_parent_disabled (const bool &value)
 
virtual void set_source_disabled (const bool &value)
 
virtual void set_pending (const bool &value)
 
static CoreString get_path_name (const CoreArray< OfObject * > &path, const OfContext &context)
 returns a branch of the dependency graph as string
 
virtual void _set_disabled (const bool &value, CoreSet< OfAttr * > &attrs_to_notify, CoreVector< int > &dependency_types)
 
void _set_parent_disabled (const bool &value, CoreSet< OfAttr * > &attrs_to_notify, CoreVector< int > &dependency_types)
 
void _set_source_disabled (const bool &value, CoreSet< OfAttr * > &attrs_to_notify, CoreVector< int > &dependency_types)
 
void forward_disable_state (const bool &old_value, const bool &new_value, CoreSet< OfAttr * > &attrs_to_notify, CoreVector< int > &dependency_types)
 
virtual void activate_flag (const int &flag)
 
virtual void desactivate_flag (const int &flag)
 
virtual void set_flags (const int &flag)
 

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_UNDO_PROCESS = 1 << 12,
  FLAG_ZOMBIE = 1 << 13,
  FLAG_COUNT = 14
}
 
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 = 10
}
 
enum  State {
  STATE_LIVE = 0,
  STATE_NEW = 1,
  STATE_DELETE = 2,
  STATE_DESERIALIZE = 3
}
 
enum  ItemReadOnlyMask { RO_USER_LOCKED_MASK = 1 << 2 }
 
- 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, 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_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_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_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_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 )
 
- Static Protected Member Functions inherited from OfItem
static void notify_disable_attrs (OfObjectFactory &factory, const CoreSet< OfAttr * > &attrs, const CoreVector< int > &dep_types)
 
- Protected Attributes inherited from OfItem
CoreAtomic64 m_full_name_cached
 
int m_flags
 
OfObjectFactorym_factory
 
CoreHashTable< CoreString,
GMathVec3i > 
m_positions
 

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)
virtual

add an attribute to the object

Parameters
namethe name of the attribute
typespecifies which type the attribute is (ex: OfAttr::TYPE_BOOL, OfAttr::TYPE_DOUBLE...)
is_arraytell whether the attribute is an array or not
visual_hintspecifies how the attribute should be displayed (ex: OfAttr::VISUAL_HINT_COLOR, OfAttr::VISUAL_HINT_PERCENTAGE...)

Implements OfItem.

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
const OfAttr * OfObject::attribute_exists ( const CoreString attr) const
virtual

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 CoreString attr)
virtual

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.

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::get_all_instances ( CoreVector< OfObject * > &  instances,
const bool &  recurse = false 
) const

gather all instances of this object

  • instances the gathered instances
  • recurse set whether to gather instances of instances or not
CoreString OfObject::get_as_string ( const OfSerialOptions options = OfSerialOptions::get_default()) const
virtual

return the serialization of the object

Returns
a stringified version of the serialization

Implements OfItem.

const OfAttr * OfObject::get_attribute ( const CoreString attr) const
virtual

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 CoreString attr)
virtual

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
virtual

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)
virtual

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
const GuiIcon * OfObject::get_item_icon ( ) const
virtual

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
OfObject * OfObject::get_source ( ) const

return the instancing source of the object

Returns
0 if the object is not an instance
bool OfObject::has_embedded_objects_with_local_attrs ( ) const
protected

return true if one of the embedded objects has some local attributes

Note
local attributes are attributes whose values are not inherited
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_external_dependency ( const OfContext context) const

return true if the object is an external dependency of the given context

Parameters
context
Note
return false if the object is inside a instanciated sub-context of the given context but its source is not a sub-context
not very efficient, must be optimized
bool OfObject::is_kindof ( const CoreString class_name) const

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
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_within ( const OfContext context,
const bool &  recursive 
) const

return true if the object is within the given context

Parameters
context
recursivetell to check if the object is within the children contexts
Note
return true if the object is inside a instanciated context under the specified context
not very efficient, must be optimized
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 CoreString name)
virtual

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)
virtual

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 ( )
virtual

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.