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 | Static Public Attributes | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Friends | List of all members
OfItem Class Referenceabstract
Inheritance diagram for OfItem:
EventObject CoreCustomData CoreBaseObject CoreBaseType OfContext OfObject

Classes

struct  AttrCreationParams
 

Public Types

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
 
- Public Types inherited from EventObject
typedef void(* EventInfoFunction )(EventObject &, const EventInfo &, void *)
 event callback signature for free functions / static methods.
 
typedef void(EventObject::* EventInfoMethod )(EventObject &, const EventInfo &, void *)
 event callback signature for methods.
 
typedef void(* EventFunction )(EventObject &, const CoreString &, void *)
 
typedef void(EventObject::* EventMethod )(EventObject &, const CoreString &, void *)
 

Public Member Functions

void clear_caps ()
 
virtual const unsigned int & get_dependency_count () const =0
 
virtual void update_dep_index (const CoreListId &id, const unsigned int &new_index)=0
 
virtual void remove_dep (const CoreListId &id)=0
 
virtual CoreListId add_dep (OfAttr *attr, const int &type, const unsigned int &index)=0
 
virtual CoreListId get_first_dependency () const =0
 
virtual CoreListId get_next_dependency (const CoreListId &dep_id) const =0
 
virtual OfAttrget_dependency_attr (const CoreListId &dep_id) const =0
 
virtual const unsigned int get_dependency_attr_value_index (const CoreListId &dep_id) const =0
 
virtual bool is_cyclic_reference (const OfAttr *attr) const =0
 
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
 
virtual bool is_embedded () const =0
 
bool is_in_undo_process () const
 
void set_in_undo_process (const bool &flag)
 
virtual bool is_kindof (const CoreString &type_name) const =0
 
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_remote (const bool &value)
 
virtual void set_content_locked (const bool &value)
 
virtual void set_user_locked (const bool &value)
 
virtual void set_zombie (const bool &value)
 
virtual void set_pending (const bool &value)=0
 
virtual void set_disable_cyclic_check (const bool &value)
 
virtual void set_external (const bool &value)
 
virtual void set_disabled (const bool &value)=0
 
virtual void set_parent_disabled (const bool &value)=0
 
virtual void set_source_disabled (const bool &value)=0
 
virtual void set_shadowed (const bool &value)=0
 
virtual void set_parent_shadowed (const bool &value)=0
 
virtual void set_source_shadowed (const bool &value)=0
 
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
 
virtual bool is_referenceable () const =0
 
virtual bool can_serialize (const int &serial_mode) const =0
 
bool is_shadowable () const
 
virtual void set_name_dirty ()
 
void set_name (const CoreString &new_name)
 
bool is_name_dirty () const
 
virtual const CoreStringget_full_name () const =0
 
CoreString get_project_full_name () const
 
const CoreStringget_name () const
 
virtual void rename (const CoreString &name)=0
 
virtual const GuiIconget_item_icon () const =0
 Item icon get accessor.
 
virtual OfAttradd_attribute (const AttrCreationParams &params)=0
 
virtual OfAttradd_attribute (const CoreString &name, 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")=0
 
virtual const OfAttrget_attribute (const CoreBasicString &name) const =0
 
virtual OfAttrget_attribute (const CoreBasicString &name)=0
 
virtual const OfAttrget_attribute (const unsigned int &index) const =0
 
virtual OfAttrget_attribute (const unsigned int &index)=0
 
virtual const OfAttrattribute_exists (const CoreBasicString &name) const =0
 
virtual OfAttrattribute_exists (const CoreBasicString &name)=0
 
virtual const unsigned int & get_attribute_count () const =0
 
virtual const unsigned int find_attribute_index (const CoreBasicString &attr_name) const =0
 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 =0
 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)=0
 modifies the index of the specified attribute
 
virtual void remove_all_attributes ()=0
 
virtual void remove_attribute (const CoreBasicString &name)=0
 
virtual void remove_attribute (OfAttr &attr)=0
 
virtual void reset_attributes ()=0
 
OfObjectFactoryget_factory () const
 return the object factory
 
OfChannelManagerget_channel_manager () const
 
OfAppget_application () const
 return the application
 
virtual CoreString get_as_string (const OfSerialOptions &options=OfSerialOptions::get_default()) const =0
 
virtual void send_event (const CoreString &event)=0
 
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
 
virtual bool is_instance () const =0
 
virtual bool is_source () const =0
 
virtual const bool & is_object () const =0
 
virtual const bool & is_context () const =0
 
virtual const OfObjectto_object () const =0
 
virtual OfObjectto_object ()=0
 
virtual const OfContextto_context () const =0
 
virtual OfContextto_context ()=0
 
size_t get_memory_size () const override
 
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
 
virtual bool is_traversal () const
 
virtual OfItemHandle get_traversal_item ()=0
 
virtual const CoreStringget_type () const =0
 get item type
 
virtual bool is_protected () const =0
 
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 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.
 

Static Public Attributes

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

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
 
virtual void activate_flag (const int &flag)=0
 
virtual void desactivate_flag (const int &flag)=0
 
virtual void set_flags (const int &flag)=0
 
bool _is_disabled () const
 
virtual void _set_disabled (const bool &value, CoreSet< OfAttr * > &attrs_to_notify, CoreVector< int > &dependency_types)=0
 
virtual void _set_shadowed (const bool &value, CoreSet< OfAttr * > &attrs_to_notify, CoreVector< int > &dependency_types)=0
 
CoreString get_project_full_name (const OfContext &parent_context) const
 
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

static const int get_pending_flags ()
 
static void notify_disable_attrs (OfObjectFactory &factory, const CoreSet< OfAttr * > &attrs, const CoreVector< int > &dep_types)
 

Protected Attributes

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
 

Friends

class OfAttr
 
class OfContextEngine
 
class OfContextCallBacks
 
class OfNodalPositionManager
 
template<bool >
class OfBaseItemHandle
 

Detailed Description

Base class for OfObjects and OfContexts.


Class Documentation

struct OfItem::AttrCreationParams
Class Members
Container container
CoreString default_value_as_attr_fullname used to optionally init value, texture & animation from
bool enable_num_range
bool enable_ui_range
int flags
CoreString group_name
CoreString name
double num_max
double num_min
CoreString preset_definition as "value1|label1; value2|label2;...valueN|labelN", used only when type is OfAttr::TYPE_LONG
Type type
double ui_max
double ui_min
unsigned int value_count
VisualHint visual_hint

Member Enumeration Documentation

Capabilities: if the OfItem has a given Caps activated then it supports said capability. By default all Caps are active.

Each OfItem stores its own Caps, i.e. different items of the same OfClass can have different capabilities.

To define the same Caps for all items of the same OfClass it is best to set them in the module constructor. Caps can still be modified afterwards using the setters.

Enumerator:
CAPS_NONE 

No capabilities.

CAPS_DELETE 

Can be deleted.

CAPS_RENAME 

Can be renamed.

CAPS_COPY 

Can be copied.

CAPS_PASTE 

Can be pasted.

CAPS_MOVE 

Can be moved (e.g to another context - not fully implemented).

CAPS_INSTANTIATE 

Can be instantiated.

CAPS_LOCALIZE 

Can localize the item and its attributes. Implies CAPS_LOCALIZE_ATTRIBUTES.

CAPS_DISPLAY 

Can be displayed. Allow to hide an object in UI without set him private.

CAPS_LOCALIZE_ATTRIBUTES 

Can localize only the attributes.

CAPS_ALL 

Has all capabilities.

Enumerator:
RO_USER_LOCKED_MASK 

Specifies considering user locked flag for editable test.

RO_BUILD_MASK 

Specifies considering whether the item is visible in the build for editable test.

RO_BUILD_PACKAGE_MASK 

Specifies considering whether the item is inside a build package read only for editable test.

Member Function Documentation

void OfItem::clear_caps ( )
inline

Deactivate all capabilities.

bool OfItem::deserialize_item_property ( unsigned int  property_id,
OfItem item,
const ParserEntry serial 
)
static

Set item's property value from serial data.

Returns
false if property_id is unknown
bool OfItem::get_can_copy ( ) const

Returns true if the item can be copied, considering it's source if any.

If the item is an instance it is considered copyable even if its cap copy is disabled. This allows to conveniently copy an instance to create multiple instances instead of having to instantiante the source multiple times. Indeed, an instance is just an empty shell with a source and localized attributes.

bool OfItem::get_can_localize ( ) const

Returns true if the item can be localized, considering it's source and parent if any.

virtual const GuiIcon* OfItem::get_item_icon ( ) const
pure virtual

Item icon get accessor.

Returns
a const pointer on the icon

Implemented in OfContext, and OfObject.

const CoreString & OfItem::get_item_property_name ( unsigned int  property_id)
static
Returns
the name of the property for specified id, empty string if not found
OfItem * OfItem::get_parent_item ( const OfContext parent_context) const
protected

return the immediate parent of the item

Note
if it's an object, it returns the context. if it's an embedded object, it returns the parent object. if it's a context it returns the context
const OfItem * OfItem::get_scene_assembly_source_item ( ) const

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

Returns
this if the item was not created in the scene assembly
OfItem * OfItem::get_scene_assembly_source_item ( )

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

Returns
this if the item was not created in the scene assembly
bool OfItem::is_cap_delete ( ) const
inline

Return true if the capability is active.

For advanced capability querying, use the get_can_* methods.

bool OfItem::is_disabled ( ) const
inline

Returns true if the item is disabled. A disabled item is an item ignored by all evaluations. For example, if a geometry is disabled, it won't be possible to display it in the 3D View or to render it. In most of the cases, an item is disabled because the user specified it (CTRL + D when the item is selected for example), but an item may also be considered as disabled for other reasons. For example, if it is pending, the item must never be evaluated until it was replaced by a "real" object, except if it was set as pending temporarily for reloading purposes.

bool OfItem::is_editable ( const int &  read_only_mask = RO_ALL_MASK) const

Returns true if this attribute can be edited according to specified mask, false otherwise

Parameters
read_only_maskthe read only mask to use to test full or partial editable state
bool OfItem::is_enabled ( ) const
inline

Returns true if the item is not disabled.

See Also
is_disabled()
bool OfItem::is_external_dependency ( const OfContext parent_context,
const OfContext context 
) const
protected

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

Parameters
contextthe context from which we want to test if the item is an external dependency
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
unsigned int OfItem::is_item_property_event ( const CoreString event)
static
Returns
the property id for specified event, CORE_INVALID_INDEX if not found
unsigned int OfItem::is_item_property_name ( const CoreString name)
static
Returns
the property id for specified name, CORE_INVALID_INDEX if not found
bool OfItem::is_shadowable ( ) const

Returns true if the item must be shadowed instead of removed when calling the command DeleteItems this allows to not remove all the resources of the item, and to re-add it very quickly if the delete is undo

void OfItem::register_item_property ( const CoreString name,
const CoreString event,
PropertyExtractor  get,
PropertyIntegrator  set 
)
static

Declare a new property for all OfItems.

Parameters
nameproperty serial keyword
eventraised whenever property value changes on any OfItem
getCoreFunction to get value from any OfItem as serial data, to be invoked by OfItem::serialize_item_property
setCoreFunction to set value on any OfItem from serial data, to be invoked by OfItem::deserialize_item_property
bool OfItem::serialize_item_property ( unsigned int  property_id,
const OfItem item,
ParserEntry serial 
)
static

Retrieve item's current property value as serial data.

Returns
false if property_id is unknown
void OfItem::set_cap_delete ( bool  is_active)
inline

Set the active state of a capability.

Note
set_cap_localize(true) will call set_cap_localize_attributes(true) too.
CoreString OfItem::set_colortag ( const CoreString tag)

sets tag value

Parameters
tagto be set
Returns
previous tag value
CoreString OfItem::set_comment ( const CoreString comment)

sets comment value

Parameters
commentto be set
Returns
previous comment value
virtual void OfItem::set_zombie ( const bool &  value)
inlinevirtual
Note
set_zombie(false) must be always called after set_pending(false) to benefit of reloading optimization