Clarisse 5.0 SP8 SDK  5.0.5.8.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
of_attr.h
1 #ifndef IX_OF_ATTR_H
2 #define IX_OF_ATTR_H
3 
4 #include <core_string.h>
5 #include <core_list.h>
6 #include <core_vector.h>
7 #include <core_stack.h>
8 #include <of_export.h>
9 #include <of_type.h>
10 #include <gmath_units.h>
11 #include <of_attr_event.h>
12 
13 template <class T> class GMathVec2;
14 typedef GMathVec2<double> GMathVec2d;
15 template <class T> class GMathVec3;
16 typedef GMathVec3<double> GMathVec3d;
17 template <class T> class GMathVec4;
18 typedef GMathVec4<double> GMathVec4d;
19 
20 class AnimFCurve;
21 class FCurve;
22 class FCurveKeyId;
23 class GuiIcon;
24 class GuiImage;
25 class OfAction;
26 class OfApp;
27 class OfAttrGroup;
28 class OfAttrState;
29 class OfAttrTable;
30 class OfAttrTableImpl;
31 class OfCommandData;
32 class OfContext;
34 class OfEnum;
35 class OfObject;
36 class OfObjectFactory;
37 class OfTime;
38 class ParserEntry;
39 class ParserGroup;
40 struct OfAttrSubgraph;
41 struct OfAttrSubgraphNode;
42 struct SysStatistic;
43 
44 // expressions
45 namespace OfExpression
46 {
47  class Binding;
48  class Expression;
49  class GetDoubleValue;
50  class GetStringValue;
51  class GetVec3Value;
52  class GlobalVariable;
53 }
54 
55 // unit tests
56 class OfTestHelpers;
57 class OfExprTests;
58 
59 
60 class OF_EXPORT OfAttrPreset
61 {
62 public:
63  CoreString label;
64  CoreString value;
65  const GuiIcon *icon;
66 };
67 
70 class OF_EXPORT OfPlugType : public CoreBaseObject
71 {
72 public:
74  enum Type
75  {
76  TYPE_BOOL = 0,
85 
86  TYPE_COUNT
87  };
88 
93  enum Container
94  {
98 
99  CONTAINER_COUNT
100  };
101 
110  {
147 
148  VISUAL_HINT_COUNT
149  };
150 
151  const CoreString& get_name() const;
152  const Type& get_type() const;
153  const VisualHint& get_visual_hint() const;
154  const Container& get_container() const;
155  OfObject *get_parent_object() const;
156  OfContext& get_parent_context() const;
157  OfApp& get_application() const;
158  OfObjectFactory& get_factory() const;
159 
163  CoreString get_full_name() const;
164 
165 protected:
166  OfPlugType(OfObject& object, const CoreString& name, const Type& type, const Container& container, const VisualHint& visual_hint);
167  OfPlugType(OfObject& object, OfPlugType& source) : m_pdef(source.m_pdef), m_object(object) {}
168  OfPlugType(OfObject& object) : m_pdef(nullptr), m_object(object) {}
169  struct Pdef;
170  Pdef *m_pdef;
172 
174 };
175 
176 class OF_EXPORT OfOutput : public OfPlugType
177 {
178 public:
179  OfOutput(OfObject& object, const CoreString& n="self",Type t=TYPE_REFERENCE, unsigned int s=1, VisualHint h=VISUAL_HINT_DEFAULT);
180  OfOutput(OfObject& object, OfOutput& source) : OfPlugType(object, source), m_dim(source.m_dim) {}
181  ~OfOutput();
182  void get_statistics(SysStatistic& stats) const;
183  unsigned int get_dim() const { return m_dim; }
184 private:
185  unsigned int m_dim;
186 
188 };
189 
192 class OF_EXPORT OfAttr
193  : public OfPlugType
194 {
195 
196 public:
197 
198  // Value validators without index: the validation rule is the same for all indices.
199  typedef void (*ValidatorBool)(const OfAttr&, bool&, void *);
200  typedef void (*ValidatorLong)(const OfAttr&, long&, void *);
201  typedef void (*ValidatorDouble)(const OfAttr&, double&, void *);
202  typedef void (*ValidatorString)(const OfAttr&, CoreString&, void *);
203  typedef void (*ValidatorItem)(const OfAttr&, OfItem *&, void *);
204 
205  // Value validators with index: the validation rule can depend on the value index.
206  typedef void (*ValidatorBoolIndexed)(const OfAttr &, bool &, unsigned int, void *);
207  typedef void (*ValidatorLongIndexed)(const OfAttr &, long &, unsigned int, void *);
208  typedef void (*ValidatorDoubleIndexed)(const OfAttr &, double &, unsigned int, void *);
209  typedef void (*ValidatorStringIndexed)(const OfAttr &, CoreString &, unsigned int, void *);
210  typedef void (*ValidatorItemIndexed)(const OfAttr &, OfItem *&, unsigned int, void *);
211 
214  {
215  VALUE_PAGE_CURRENT = 0,
217 
218  VALUE_PAGE_COUNT
219  };
220 
222  enum Flag
223  {
224  FLAG_PRIVATE = 1 << 0,
225  FLAG_HIDDEN = 1 << 1,
226  FLAG_SAVEABLE = 1 << 2,
227  FLAG_TEXTURABLE = 1 << 3,
228  FLAG_ANIMATABLE = 1 << 4,
229  FLAG_SLIDER = 1 << 5,
230  FLAG_NUMERIC_RANGE = 1 << 6,
231  FLAG_UI_RANGE = 1 << 7,
232  FLAG_DG_ACTIVE = 1 << 8,
233  FLAG_DG_CYCLIC = 1 << 9,
234  FLAG_DIRTINESS_PASS_THROUGH = 1 << 10,
235  FLAG_READ_ONLY = 1 << 11,
236  FLAG_SHADING_VARIABLE = 1 << 12,
237  FLAG_EXPERIMENTAL = 1 << 13,
238  FLAG_ADVANCED = 1 << 14,
239  FLAG_OVERRIDEN = 1 << 15,
240  FLAG_PROMOTE_ATTRIBUTE = 1 << 16,
241  FLAG_ALLOW_EXPRESSION = 1 << 17,
242  FLAG_COLUMN = 1 << 18,
243  FLAG_COUNT = 19
244  };
245 
248  {
253 
254  TEXTURE_MODE_COUNT
255  };
256 
259  {
260  DIRTINESS_NONE = 0,
261 
262  DIRTINESS_MOTION_TRANSLATE = 1 << 0,
263  DIRTINESS_MOTION_ROTATE = 1 << 1,
264  DIRTINESS_MOTION_SCALE = 1 << 2,
265  DIRTINESS_MOTION = DIRTINESS_MOTION_TRANSLATE | DIRTINESS_MOTION_ROTATE |
266  DIRTINESS_MOTION_SCALE,
267 
268  DIRTINESS_PARENTING = 1 << 3,
269 
270  DIRTINESS_SHADING_MATERIAL = 1 << 4,
271  DIRTINESS_SHADING_LIGHT = 1 << 5,
272  DIRTINESS_SHADING_GROUP_MATERIAL = 1 << 6,
273  DIRTINESS_SHADING_GROUP_VISIBILITY = 1 << 7,
274  DIRTINESS_SHADING_GROUP = DIRTINESS_SHADING_GROUP_MATERIAL | DIRTINESS_SHADING_GROUP_VISIBILITY,
275  DIRTINESS_SHADING_VARIABLE = 1 << 8,
276  DIRTINESS_SHADING = DIRTINESS_SHADING_MATERIAL | DIRTINESS_SHADING_LIGHT |
277  DIRTINESS_SHADING_GROUP | DIRTINESS_SHADING_VARIABLE,
278 
279  DIRTINESS_GEOMETRY_BASE = 1 << 9,
280  DIRTINESS_GEOMETRY_DEFORMED = 1 << 10,
281  DIRTINESS_GEOMETRY = DIRTINESS_GEOMETRY_BASE | DIRTINESS_GEOMETRY_DEFORMED,
282  DIRTINESS_IMAGE = 1 << 11,
283  DIRTINESS_GL = 1 << 12,
284  DIRTINESS_MOTION_BLUR = 1 << 13,
285 
286  DIRTINESS_ALL = (1 << 14) - 1,
287 
288  DIRTINESS_COUNT = 20
289  };
290 
293  DIRTINESS_FLAG_NONE = 0,
294  DIRTINESS_FLAG_LOCALIZE = 1 << 0,
295  DIRTINESS_FLAG_DESERIALIZE = 1 << 1,
296  DIRTINESS_FLAG_GRAPH = 1 << 2,
297  DIRTINESS_FLAG_AOV = 1 << 3,
298  DIRTINESS_FLAG_CHANGE = 1 << 4,
299  DIRTINESS_FLAG_SCENE_ASSEMBLY = 1 << 5,
300 
301  DIRTINESS_FLAG_COUNT = 7 // unused, useless, and will be problematic when it will reach 8 once more
302  };
303 
306  {
309  CYCLIC_CHECK_NONE
310  };
311 
312  static CoreString get_type_name(const Type& type);
313  static CoreString get_type_serial_name(const Type& type);
314  static void get_type_min(const OfAttr::Type& type, double& min);
315  static void get_type_max(const OfAttr::Type& type, double& max);
316  static const CoreString& get_container_name(const Container& type);
317  static Container get_container_from_name(const CoreString& container);
318  static const CoreString& get_visual_hint_name(const VisualHint& visual_hint);
319  static CoreString get_visual_hint_serial_name(const VisualHint& visual_hint);
320  static VisualHint get_visual_hint_from_name(const CoreString& visual_hint);
321  static CoreString get_texture_mode_name(const TextureMode& mode);
322  static const Dirtiness& get_dirtiness(const unsigned int& index);
323  static CoreString get_dirtiness_name(const Dirtiness& dirtiness);
324 
325  static bool get_info_from_visual_hint(const VisualHint& visual_hint, Type& type, Container& container, bool& fixed_value_count, unsigned int& value_count);
326 
330  static void get_dirtinesses(CoreVector<Dirtiness>& dirtinesses, const int& dirtiness);
331 
335  static void get_dirtiness_names(CoreVector<CoreString>& names, const int& dirtiness);
336 
337  static CoreString get_unit_from_visual_hint(const VisualHint& of_attr_visual_hint);
338  static VisualHint get_visual_hint_from_unit(const CoreString& of_attr_unit);
339 
340  virtual size_t get_memory_size() const override;
341 
342  //
343  bool is_custom() const;
344  bool is_custom_root() const;
345  bool is_custom_instance() const;
346 
347  int get_index() const;
348 
349  const CoreString& get_group_name() const;
350 
351  const unsigned int& get_dependency_count() const;
352  OfAttr *get_dependency(const unsigned int& index) const;
353  void add_dependency(const CoreString attr_name);
354  void remove_dependency(const CoreString attr_name);
355 
358  OfAttr *get_parent_attribute() const;
359 
362  OfObject *get_top_object() const;
363 
364  OfAttr *get_proto() const;
365  void set_container(const Container& container);
366  bool is_single() const;
367  bool is_array() const;
368  bool is_list() const;
369  bool is_numeric_type() const;
370 
373  const CoreString& get_doc() const;
374 
379  void add_preset(const CoreString& preset_label,
380  const CoreString& preset_value,
381  const GuiIcon *icon = 0);
382 
383  void remove_preset(const CoreString& label);
384  void remove_preset(const unsigned int& index);
385  void remove_all_presets();
386 
387  bool has_preset() const;
388  const unsigned int& get_preset_count() const;
389  CoreString get_preset_label(const unsigned int& preset_index) const;
390  CoreString get_preset_value(const unsigned int& preset_index) const;
391  const GuiIcon *get_preset_icon(const unsigned int& preset_index) const;
392  CoreString get_preset_value(const CoreString& preset_label) const;
393  int get_preset_index(const CoreString& preset_label) const;
394  void set_preset_label(const unsigned int& preset_index,
395  const CoreString& preset_label);
396  void set_preset_value(const unsigned int& preset_index,
397  const CoreString& preset_value);
398  void set_preset_value(const CoreString& preset_label,
399  const CoreString& preset_value);
400  void apply_preset(const CoreString& preset_label);
401  void apply_preset(const unsigned int& preset_index);
402  unsigned int get_applied_preset_index() const;
403  CoreString get_applied_preset_label() const;
404 
408  void get_preset_hints(CoreArray<bool>& hints) const;
409 
410  CoreString serialize_presets() const;
411  void deserialize_presets(const CoreString& line);
412  static bool check_presets_syntax(const CoreString& def, CoreString& error_message);
413 
414  const CoreString& get_null_label() const;
415  void set_null_label(const CoreString& label);
416 
417  const CoreString& get_null_value() const;
418  void set_null_value(const CoreString& value);
419 
420  CoreString get_custom_ui(const bool& recursive = true) const;
421 
424  OfAction *add_action(const CoreString& name);
425 
426  bool has_actions() const;
427  const CoreVector<OfAction *>& get_actions() const;
428 
429  ~OfAttr();
430 
436  CoreString get_project_full_name() const;
437 
438  //
442  void localize(const bool& flag, void *requester = 0);
443 
444  void reset();
445 
446 
447  //---------------------------------------------------------------------------------------------
448  // Flag handling
449  //---------------------------------------------------------------------------------------------
450 
452  static Flag get_flag(unsigned int index);
453 
455  static CoreString get_flag_name(Flag flag);
456 
458  static bool get_flag_default_value(Flag flag);
459 
461  CoreString get_flags_names() const;
462 
464  int get_flags() const;
465 
467  void set_flags(int flags);
468 
470  bool has_flag(Flag flag) const;
471 
473  void set_flag(Flag flag, bool value);
474 
475 
476  //---------------------------------------------------------------------------------------------------
477  // Note for following methods and nomenclature
481 
482  //---------------------------------------------------------------------------------------------------
483  // source management
486  OfAttr& get_source();
487  const OfAttr& get_source() const;
488 
491  OfAttr& get_serialized_source();
492  const OfAttr& get_serialized_source() const;
493 
494  //---------------------------------------------------------------------------------------------------
495  // value count management
499  void set_value_count(const unsigned int& count, void *requester = 0);
500 
501  bool remove_item(const unsigned int& index, void *requester = 0);
502  bool remove_item(const CoreBasicArray<unsigned int>& indices, void *requester = 0);
503  bool remove_item(const CoreList<unsigned int>& indices, void *requester = 0);
504  void remove_all(void *requester = 0);
505 
511  void move_item(const unsigned int& from, const unsigned int& to, void *requester = 0);
512 
517  void permute(const CoreBasicArray<unsigned int>& permutation, const bool& check_permutation = true, void *requester = 0);
518 
523  void permute(const CoreList<unsigned int>& permutation, const bool& check_permutation = true, void *requester = 0);
524 
526  const unsigned int get_serialized_value_count() const;
527 
534  const unsigned int get_value_count(const bool& consider_disabled = true) const;
535 
536  bool is_vec3d() const;
537  bool is_vec4d() const;
538 
539  //---------------------------------------------------------------------------------------------------
540  // bool type management
548  void set_bool(const bool& value, const unsigned int& index = 0, void *requester = 0);
549 
558  void drive_bool(const bool& value, const unsigned int& index = 0, void *requester = 0);
559 
567  void change_bool(const bool& value, const unsigned int& index = 0, void *requester = 0);
568 
576  void set_bool(const CoreBasicArray<bool>& values, const CoreBasicArray<unsigned int>& indices, void *requester = 0);
577 
584  void change_bool(const CoreBasicArray<bool>& values, const CoreBasicArray<unsigned int>& indices, void *requester = 0);
585 
592  void set_bool(const CoreBasicArray<bool>& values, void *requester = 0);
593 
600  void change_bool(const CoreBasicArray<bool>& values, void *requester = 0);
601 
608  void set_bool(const CoreList<bool>& values, void *requester = 0);
609 
616  void change_bool(const CoreList<bool>& values, void *requester = 0);
617 
623  void add_bool(const bool& value, void *requester = 0);
624 
626  void toggle_bool(const unsigned int& index = 0, void *requester = 0);
627 
628  // value getter
634  bool get_bool(const unsigned int& index = 0, const ValuePage& page = VALUE_PAGE_CURRENT) const;
635 
636  void get_values(CoreArray<bool>& values, const ValuePage& page = VALUE_PAGE_CURRENT) const;
637  void get_values(CoreVector<bool>& values, const ValuePage& page = VALUE_PAGE_CURRENT) const;
638 
639  // raw value getter
646  inline bool get_raw_bool(const unsigned int& index = 0, const ValuePage& page = VALUE_PAGE_CURRENT) const { return get_bool(index, page); }
647 
650  inline void get_raw_values(CoreArray<bool>& values, const ValuePage& page = VALUE_PAGE_CURRENT) const { get_values(values, page); }
653  inline void get_raw_values(CoreVector<bool>& values, const ValuePage& page = VALUE_PAGE_CURRENT) const { get_values(values, page); }
654 
655  // serialized value getter
661  bool get_serialized_bool(const unsigned int& index = 0, const ValuePage& page = VALUE_PAGE_CURRENT) const;
662 
663  void get_serialized_values(CoreArray<bool>& values, const ValuePage& page = VALUE_PAGE_CURRENT) const;
664  void get_serialized_values(CoreVector<bool>& values, const ValuePage& page = VALUE_PAGE_CURRENT) const;
665 
666  //---------------------------------------------------------------------------------------------------
667  // long type management
675  void set_long(const long& value, const unsigned int& index = 0, void *requester = 0);
676 
684  void change_long(const long& value, const unsigned int& index = 0, void *requester = 0);
685 
693  void set_long(const CoreBasicArray<long>& values, const CoreBasicArray<unsigned int>& indices, void *requester = 0);
694 
701  void change_long(const CoreBasicArray<long>& values, const CoreBasicArray<unsigned int>& indices, void *requester = 0);
702 
709  void set_long(const CoreBasicArray<long>& values, void *requester = 0);
710 
717  void change_long(const CoreBasicArray<long>& values, void *requester = 0);
718 
725  void set_long(const CoreList<long>& values, void *requester = 0);
726 
733  void change_long(const CoreList<long>& values, void *requester = 0);
734 
740  void add_long(const long& value, void *requester = 0);
741 
743  void inc_long(const long& value, const unsigned int& index = 0, void *requester = 0);
744 
745  //
752  long get_long(const unsigned int& index = 0, const ValuePage& page = VALUE_PAGE_CURRENT) const;
753 
754  void get_values(CoreArray<long>& values, const ValuePage& page = VALUE_PAGE_CURRENT) const;
755  void get_values(CoreVector<long>& values, const ValuePage& page = VALUE_PAGE_CURRENT) const;
756 
757  //
764  inline long get_raw_long(const unsigned int& index = 0, const ValuePage& page = VALUE_PAGE_CURRENT) const { return get_long(index, page); }
765 
768  inline void get_raw_values(CoreArray<long>& values, const ValuePage& page = VALUE_PAGE_CURRENT) const { get_values(values, page); }
769 
772  inline void get_raw_values(CoreVector<long>& values, const ValuePage& page = VALUE_PAGE_CURRENT) const { get_values(values, page); }
773 
774  //
780  long get_serialized_long(const unsigned int& index = 0, const ValuePage& page = VALUE_PAGE_CURRENT) const;
781 
782  void get_serialized_values(CoreArray<long>& values, const ValuePage& page = VALUE_PAGE_CURRENT) const;
783  void get_serialized_values(CoreVector<long>& values, const ValuePage& page = VALUE_PAGE_CURRENT) const;
784 
785  //---------------------------------------------------------------------------------------------------
786  // double type management
794  void set_double(const double& value, const unsigned int& index = 0, void *requester = 0);
795 
803  void change_double(const double& value, const unsigned int& index = 0, void *requester = 0);
804 
812  void set_double(const CoreBasicArray<double>& values, const CoreBasicArray<unsigned int>& indices, void *requester = 0);
813 
820  void change_double(const CoreBasicArray<double>& values, const CoreBasicArray<unsigned int>& indices, void *requester = 0);
821 
828  void set_double(const CoreBasicArray<double>& values, void *requester = 0);
829 
836  void change_double(const CoreBasicArray<double>& values, void *requester = 0);
837 
844  void set_double(const CoreList<double>& values, void *requester = 0);
845 
852  void change_double(const CoreList<double>& values, void *requester = 0);
853 
861  void set_vec3d(const GMathVec3d& vec, void *requester = 0);
862 
870  void change_vec3d(const GMathVec3d& vec, void *requester = 0);
871 
879  void set_vec4d(const GMathVec4d& vec, void *requester = 0);
880 
888  void change_vec4d(const GMathVec4d& vec, void *requester = 0);
889 
895  void add_double(const double& value, void *requester = 0);
896 
898  void inc_double(const double& value, const unsigned int& index = 0, void *requester = 0);
899 
900  //
907  double get_double(const unsigned int& index = 0, const ValuePage& page = VALUE_PAGE_CURRENT) const;
908 
909  void get_values(CoreArray<double>& values, const ValuePage& page = VALUE_PAGE_CURRENT) const;
910  void get_values(CoreVector<double>& values, const ValuePage& pages = VALUE_PAGE_CURRENT) const;
911 
916  GMathVec2d get_vec2d(const ValuePage& page = VALUE_PAGE_CURRENT) const;
917 
922  GMathVec3d get_vec3d(const ValuePage& page = VALUE_PAGE_CURRENT) const;
923 
928  GMathVec4d get_vec4d(const ValuePage& page = VALUE_PAGE_CURRENT) const;
929 
930  //
937  inline double get_raw_double(const unsigned int& index = 0, const ValuePage& page = VALUE_PAGE_CURRENT) const { return get_double(index, page); }
938 
941  inline void get_raw_values(CoreArray<double>& values, const ValuePage& page = VALUE_PAGE_CURRENT) const { get_values(values, page); }
944  inline void get_raw_values(CoreVector<double>& values, const ValuePage& page = VALUE_PAGE_CURRENT) const { get_values(values, page); }
945 
951  GMathVec2d get_raw_vec2d(const ValuePage& page = VALUE_PAGE_CURRENT) const;
952 
958  GMathVec3d get_raw_vec3d(const ValuePage& page = VALUE_PAGE_CURRENT) const;
959 
965  GMathVec4d get_raw_vec4d(const ValuePage& page = VALUE_PAGE_CURRENT) const;
966 
967  //
973  double get_serialized_double(const unsigned int& index = 0, const ValuePage& page = VALUE_PAGE_CURRENT) const;
974 
975  void get_serialized_values(CoreArray<double>& values, const ValuePage& page = VALUE_PAGE_CURRENT) const;
976  void get_serialized_values(CoreVector<double>& value, const ValuePage& pages = VALUE_PAGE_CURRENT) const;
977 
982  GMathVec2d get_serialized_vec2d(const ValuePage& page = VALUE_PAGE_CURRENT) const;
983 
988  GMathVec3d get_serialized_vec3d(const ValuePage& page = VALUE_PAGE_CURRENT) const;
989 
994  GMathVec4d get_serialized_vec4d(const ValuePage& page = VALUE_PAGE_CURRENT) const;
995 
996  //---------------------------------------------------------------------------------------------------
997  // string type management
1005  void set_string(const CoreString& value, const unsigned int& index = 0, void *requester = 0);
1006 
1014  void change_string(const CoreString& value, const unsigned int& index = 0, void *requester = 0);
1015 
1023  void set_string(const CoreBasicArray<CoreString>& values, const CoreBasicArray<unsigned int>& indices, void *requester = 0);
1024 
1032  void change_string(const CoreBasicArray<CoreString>& values, const CoreBasicArray<unsigned int>& indices, void *requester = 0);
1033 
1040  void set_string(const CoreBasicArray<CoreString>& values, void *requester = 0);
1041 
1048  void change_string(const CoreBasicArray<CoreString>& values, void *requester = 0);
1049 
1056  void set_string(const CoreList<CoreString>& values, void *requester = 0);
1057 
1064  void change_string(const CoreList<CoreString>& values, void *requester = 0);
1065 
1071  void add_string(const CoreString& value, void *requester = 0);
1072 
1078  void add_string(const CoreBasicArray<CoreString>& values, void *requester = 0);
1079 
1086  void add_embedded_object(const CoreString& class_name, const CoreString& object_name, const CoreString& source_path, void *requester) { _add_embedded_object(&class_name, &object_name, &source_path, 1, requester); }
1087 
1088  //
1094  CoreString get_string(const unsigned int& index = 0, const ValuePage& page = VALUE_PAGE_CURRENT, const bool& consider_disabled = true) const;
1095 
1096 
1097  void get_values(CoreArray<CoreString>& values, const ValuePage& page = VALUE_PAGE_CURRENT, const bool& consider_disabled = true) const;
1098  void get_values(CoreVector<CoreString>& values, const ValuePage& page = VALUE_PAGE_CURRENT, const bool& consider_disabled = true) const;
1099 
1100  //
1106  CoreString get_raw_string(const unsigned int& index = 0, const ValuePage& page = VALUE_PAGE_CURRENT, const bool& consider_disabled = true) const;
1107 
1108  void get_raw_values(CoreArray<CoreString>& values, const ValuePage& page = VALUE_PAGE_CURRENT, const bool& consider_disabled = true) const;
1109  void get_raw_values(CoreVector<CoreString>& values, const ValuePage& page = VALUE_PAGE_CURRENT, const bool& consider_disabled = true) const;
1110 
1111  //
1117  CoreString get_serialized_string(const unsigned int& index = 0, const ValuePage& page = VALUE_PAGE_CURRENT) const;
1118 
1119  void get_serialized_values(CoreArray<CoreString>& values, const ValuePage& page = VALUE_PAGE_CURRENT) const;
1120  void get_serialized_values(CoreVector<CoreString>& values, const ValuePage& page = VALUE_PAGE_CURRENT) const;
1121 
1122  //---------------------------------------------------------------------------------------------------
1123  // context type management
1130  //void set_referenced_context(OfContext *value, const unsigned int& index=0, void *requester=0);
1131 
1132  // object type management
1139  void set_object(OfObject *value, const unsigned int& index = 0, void *requester = 0, const CyclicCheckInfo& cyclic_check = OfAttr::CYCLIC_CHECK_AND_WARN);
1140  void set_item(OfItem *value, const unsigned int& index = 0, void *requester = 0, const CyclicCheckInfo& cyclic_check = OfAttr::CYCLIC_CHECK_AND_WARN);
1141 
1149  void set_item(const CoreBasicArray<OfItem *>& values, const CoreBasicArray<unsigned int>& indices, void *requester = 0, const CyclicCheckInfo& cyclic_check = OfAttr::CYCLIC_CHECK_AND_WARN);
1150  void set_object(const CoreBasicArray<OfObject *>& values, const CoreBasicArray<unsigned int>& indices, void *requester = 0, const CyclicCheckInfo& cyclic_check = OfAttr::CYCLIC_CHECK_AND_WARN);
1151 
1158  void set_item(const CoreBasicArray<OfItem *>& values, void *requester = 0, const CyclicCheckInfo& cyclic_check = OfAttr::CYCLIC_CHECK_AND_WARN);
1159  void set_object(const CoreBasicArray<OfObject *>& values, void *requester = 0, const CyclicCheckInfo& cyclic_check = OfAttr::CYCLIC_CHECK_AND_WARN);
1160 
1167  void set_object(const CoreList<OfObject *>& values, void *requester = 0, const CyclicCheckInfo& cyclic_check = OfAttr::CYCLIC_CHECK_AND_WARN);
1168  void set_item(const CoreList<OfItem *>& values, void *requester = 0, const CyclicCheckInfo& cyclic_check = OfAttr::CYCLIC_CHECK_AND_WARN);
1169 
1175  void add_object(OfObject *value, void *requester = 0);
1176 
1182  void add_item(OfItem *value, void *requester = 0);
1183 
1189  void add_object(const CoreBasicArray<OfObject *>& values, void *requester = 0);
1190 
1196  void add_item(const CoreBasicArray<OfItem *>& values, void *requester = 0);
1197 
1202  void add_string(const CoreString& class_name, const CoreString& object_name, void *requester = 0);
1203 
1208  void add_string(const CoreBasicArray<CoreString>& class_name, const CoreBasicArray<CoreString>& object_name, void *requester = 0);
1209 
1215  void add_string(const CoreString& class_name, const CoreString& object_name, const CoreString& source_name, void *requester);
1216 
1223  void add_string(const CoreBasicArray<CoreString>& values, const CoreBasicArray<CoreString>& object_names, const CoreBasicArray<CoreString>& source_names, void *requester);
1224 
1229  void remove_object(const OfObject& object, void *requester = 0);
1230 
1236  OfObject *get_object(const unsigned int& index = 0, const ValuePage& page = VALUE_PAGE_CURRENT, const bool& consider_disabled = true) const;
1237 
1242  OfItem *get_item(const unsigned int& index = 0, const ValuePage& page = VALUE_PAGE_CURRENT, const bool& consider_disabled = true) const;
1243 
1248  OfItem *get_raw_item(const unsigned int& index = 0, const ValuePage& page = VALUE_PAGE_CURRENT, const bool& consider_disabled = true) const;
1249 
1252  bool get_item_match_filters(OfItem& item) const;
1253 
1254  //
1260  OfContext *get_referenced_context(const unsigned int& index = 0, const ValuePage& page = VALUE_PAGE_CURRENT, const bool& consider_disabled = true) const;
1261  OfContext *get_serialized_referenced_context(const unsigned int& index, const ValuePage& page = VALUE_PAGE_CURRENT, const bool& consider_disabled = true) const;
1262  OfContext *get_raw_referenced_context(const unsigned int& index, const ValuePage& page = VALUE_PAGE_CURRENT, const bool& consider_disabled = true) const;
1263 
1265  void get_values(CoreArray<OfObject *>& values, const ValuePage& page = VALUE_PAGE_CURRENT, const bool& consider_disabled = true) const;
1267  void get_values(CoreVector<OfObject *>& values, const ValuePage& page = VALUE_PAGE_CURRENT, const bool& consider_disabled = true) const;
1269  void get_values(CoreArray<OfItem *>& values, const ValuePage& page = VALUE_PAGE_CURRENT, const bool& consider_disabled = true) const;
1271  void get_values(CoreVector<OfItem *>& values, const ValuePage& page = VALUE_PAGE_CURRENT, const bool& consider_disabled = true) const;
1272 
1273 
1279  OfObject *get_group(const unsigned int& index = 0, const ValuePage& page = VALUE_PAGE_CURRENT, const bool& consider_disabled = true) const;
1280 
1281  //
1287  OfObject *get_raw_object(const unsigned int& index = 0, const ValuePage& page = VALUE_PAGE_CURRENT, const bool& consider_disabled = true) const;
1288 
1290  void get_raw_values(CoreArray<OfObject *>& values, const ValuePage& page = VALUE_PAGE_CURRENT, const bool& consider_disabled = true) const;
1292  void get_raw_values(CoreVector<OfObject *>& values, const ValuePage& page = VALUE_PAGE_CURRENT, const bool& consider_disabled = true) const;
1294  void get_raw_values(CoreArray<OfItem *>& values, const ValuePage& page = VALUE_PAGE_CURRENT, const bool& consider_disabled = true) const;
1296  void get_raw_values(CoreVector<OfItem *>& values, const ValuePage& page = VALUE_PAGE_CURRENT, const bool& consider_disabled = true) const;
1297 
1298  //
1304  OfObject *get_serialized_object(const unsigned int& index = 0, const ValuePage& page = VALUE_PAGE_CURRENT) const;
1305  OfItem *get_serialized_item(const unsigned int& index = 0, const ValuePage& page = VALUE_PAGE_CURRENT) const;
1306 
1308  void get_serialized_values(CoreArray<OfObject *>& values, const ValuePage& page = VALUE_PAGE_CURRENT) const;
1310  void get_serialized_values(CoreVector<OfObject *>& values, const ValuePage& page = VALUE_PAGE_CURRENT) const;
1312  void get_serialized_values(CoreArray<OfItem *>& values, const ValuePage& page = VALUE_PAGE_CURRENT) const;
1314  void get_serialized_values(CoreVector<OfItem *>& values, const ValuePage& page = VALUE_PAGE_CURRENT) const;
1315 
1321  OfObject *get_serialized_group(const unsigned int& index = 0, const ValuePage& page = VALUE_PAGE_CURRENT) const;
1322 
1323  //---------------------------------------------------------------------------------------------------
1324  // curve type management
1330  void set_curve(const FCurve& curve, const unsigned int& index, void *requester = 0);
1331 
1337  void change_curve(const FCurve& curve, const unsigned int& index, void *requester = 0);
1338 
1345  void add_curve_key(const int& key_type, const double& x, const double& y, const unsigned int& index, void *requester = 0);
1346 
1352  void add_curve_key(const int& key_type, const double& x, const CoreBasicArray<double>& y, void *requester = 0);
1353 
1358  void remove_curve_key(const FCurveKeyId& key_id, const unsigned int& index, void *requester = 0);
1359 
1363  void remove_curve_key(const FCurveKeyId& key_id, void *requester = 0);
1364 
1369  void remove_curve_key(const CoreBasicArray<FCurveKeyId>& key_ids, const unsigned int& index, void *requester = 0);
1370 
1374  void remove_curve_key(const CoreBasicArray<FCurveKeyId>& key_ids, void *requester = 0);
1375 
1381  void set_curve_extrapolation(const int& behavior, const short& pre_or_post, const unsigned int& index, void *requester = 0);
1382 
1387  void set_curve_extrapolation(const int& behavior, const short& pre_or_post, void *requester = 0);
1388 
1394  void set_curve_key_type(const int& key_type, const FCurveKeyId& key_id, const unsigned int& index, void *requester = 0);
1395 
1400  void set_curve_key_type(const int& key_type, const FCurveKeyId& key_id, void *requester = 0);
1401 
1407  void set_curve_key_type(const int& key_type, const CoreBasicArray<FCurveKeyId>& key_ids, const unsigned int& index, void *requester = 0);
1408 
1413  void set_curve_key_type(const int& key_type, const CoreBasicArray<FCurveKeyId>& key_ids, void *requester = 0);
1414 
1421  void set_curve_key_property(const CoreString& property_name, const CoreString& property_value, const FCurveKeyId& key_id, const unsigned int& index, void *requester = 0);
1422 
1428  void set_curve_key_property(const CoreString& property_name, const CoreString& property_value, const FCurveKeyId& key_id, void *requester = 0);
1429 
1436  void set_curve_key_property(const CoreString& property_name, const CoreString& property_value, const CoreBasicArray<FCurveKeyId>& key_ids, const unsigned int& index, void *requester = 0);
1437 
1443  void set_curve_key_property(const CoreString& property_name, const CoreString& property_value, const CoreBasicArray<FCurveKeyId>& key_ids, void *requester = 0);
1444 
1450  void set_curve_key_tangent_left(const GMathVec2d& left, const FCurveKeyId& key_id, const unsigned int& index, void *requester = 0);
1451 
1457  void set_curve_key_tangent_right(const GMathVec2d& right, const FCurveKeyId& key_id, const unsigned int& index, void *requester = 0);
1458 
1465  void set_curve_key_tangents(const GMathVec2d& left, const GMathVec2d& right, const FCurveKeyId& key_id, const unsigned int& index, void *requester = 0);
1466 
1473  void change_curve_key_tangent_left(const GMathVec2d& left, const FCurveKeyId& key_id, const unsigned int& index, void *requester = 0);
1474 
1481  void change_curve_key_tangent_right(const GMathVec2d& right, const FCurveKeyId& key_id, const unsigned int& index, void *requester = 0);
1482 
1490  void change_curve_key_tangents(const GMathVec2d& left, const GMathVec2d& right, const FCurveKeyId& key_id, const unsigned int& index, void *requester = 0);
1491 
1497  void set_curve_key_tcb(const GMathVec3d& tcb, const CoreBasicArray<FCurveKeyId>& key_ids, const unsigned int& index, void *requester = 0);
1498 
1505  void change_curve_key_tcb(const GMathVec3d& tcb, const CoreBasicArray<FCurveKeyId>& key_ids, const unsigned int& index, void *requester = 0);
1506 
1512  void set_curve_key_x(const double& x, const FCurveKeyId& key_id, const unsigned int& index, void *requester = 0);
1513 
1519  void set_curve_key_x(const CoreBasicArray<double>& x, const CoreBasicArray<FCurveKeyId>& key_ids, const unsigned int& index, void *requester = 0);
1520 
1526  void set_curve_key_x(const double& x, const FCurveKeyId& key_id, void *requester = 0);
1527 
1533  void set_curve_key_x(const CoreBasicArray<double>& x, const CoreBasicArray<FCurveKeyId>& key_ids, void *requester = 0);
1534 
1541  void change_curve_key_x(const double& x, const FCurveKeyId& key_id, const unsigned int& index, void *requester = 0);
1542 
1549  void change_curve_key_x(const CoreBasicArray<double>& x, const CoreBasicArray<FCurveKeyId>& key_ids, const unsigned int& index, void *requester = 0);
1550 
1557  void change_curve_key_x(const double& x, const FCurveKeyId& key_id, void *requester = 0);
1558 
1565  void change_curve_key_x(const CoreBasicArray<double>& x, const CoreBasicArray<FCurveKeyId>& key_ids, void *requester = 0);
1566 
1572  void set_curve_key_y(const double& y, const FCurveKeyId& key_id, const unsigned int& index, void *requester = 0);
1573 
1579  void set_curve_key_y(const CoreBasicArray<double>& y, const CoreBasicArray<FCurveKeyId>& key_ids, const unsigned int& index, void *requester = 0);
1580 
1586  void set_curve_key_y(const CoreBasicArray<double>& y, const FCurveKeyId& key_id, void *requester = 0);
1587 
1593  void set_curve_key_y(const double& y, const CoreBasicArray<FCurveKeyId>& key_ids, const unsigned int& index, void *requester = 0);
1594 
1599  void set_curve_key_y(const CoreBasicArray<double>& y, const CoreBasicArray<FCurveKeyId>& key_ids, void *requester = 0);
1600 
1607  void change_curve_key_y(const double& y, const FCurveKeyId& key_id, const unsigned int& index, void *requester = 0);
1608 
1614  void change_curve_key_y(const CoreBasicArray<double>& y, const CoreBasicArray<FCurveKeyId>& key_ids, const unsigned int& index, void *requester = 0);
1615 
1622  void change_curve_key_y(const CoreBasicArray<double>& y, const FCurveKeyId& key_id, void *requester = 0);
1623 
1630  void change_curve_key_y(const double& y, const CoreBasicArray<FCurveKeyId>& key_ids, const unsigned int& index, void *requester = 0);
1631 
1637  void change_curve_key_y(const CoreBasicArray<double>& y, const CoreBasicArray<FCurveKeyId>& key_ids, void *requester = 0);
1638 
1643  const FCurve *get_curve(const unsigned int& index = 0, const ValuePage& page = VALUE_PAGE_CURRENT) const;
1644 
1650  double get_curve_double(const double& parameter, const unsigned int& index = 0, const ValuePage& page = VALUE_PAGE_CURRENT) const;
1651 
1657  double get_double_at(const double& time, const unsigned int& index = 0) const;
1658 
1664  void get_curve_values(CoreArray<double>& values, const double& parameter, const ValuePage& page = VALUE_PAGE_CURRENT) const;
1665 
1671  void get_curve_values(CoreVector<double>& values, const double& parameter, const ValuePage& page = VALUE_PAGE_CURRENT) const;
1672 
1678  void get_curve_values(CoreArray<double>& values, const CoreBasicArray<double>& parameter, const ValuePage& page = VALUE_PAGE_CURRENT) const;
1679 
1684  GMathVec2d get_curve_vec2d(const double& parameter, const ValuePage& page = VALUE_PAGE_CURRENT) const;
1685 
1690  GMathVec2d get_curve_vec2d(const GMathVec2d& parameter, const ValuePage& page = VALUE_PAGE_CURRENT) const;
1691 
1696  GMathVec3d get_curve_vec3d(const double& parameter, const ValuePage& page = VALUE_PAGE_CURRENT) const;
1697 
1702  GMathVec3d get_vec3d_at(const double& time) const;
1703 
1708  GMathVec3d get_curve_vec3d(const GMathVec3d& parameter, const ValuePage& page = VALUE_PAGE_CURRENT) const;
1709 
1714  GMathVec4d get_curve_vec4d(const double& parameter, const ValuePage& page = VALUE_PAGE_CURRENT) const;
1715 
1720  GMathVec4d get_vec4d_at(const double& time) const;
1721 
1726  GMathVec4d get_curve_vec4d(const GMathVec4d& parameter, const ValuePage& page = VALUE_PAGE_CURRENT) const;
1727 
1728  //
1733  const FCurve *get_serialized_curve(const unsigned int& index = 0, const ValuePage& page = VALUE_PAGE_CURRENT) const;
1734 
1740  double get_serialized_curve_double(const double& parameter, const unsigned int& index = 0, const ValuePage& page = VALUE_PAGE_CURRENT) const;
1741 
1747  double get_serialized_double_at(const double& time, const unsigned int& index = 0) const;
1748 
1754  void get_serialized_curve_values(CoreArray<double>& values, const double& parameter, const ValuePage& page = VALUE_PAGE_CURRENT) const;
1755 
1761  void get_serialized_curve_values(CoreVector<double>& values, const double& parameter, const ValuePage& page = VALUE_PAGE_CURRENT) const;
1762 
1768  void get_serialized_curve_values(CoreArray<double>& values, const CoreBasicArray<double>& parameter, const ValuePage& page = VALUE_PAGE_CURRENT) const;
1769 
1774  GMathVec2d get_serialized_curve_vec2d(const double& parameter, const ValuePage& page = VALUE_PAGE_CURRENT) const;
1775 
1780  GMathVec2d get_serialized_curve_vec2d(const GMathVec2d& parameter, const ValuePage& page = VALUE_PAGE_CURRENT) const;
1781 
1786  GMathVec3d get_serialized_curve_vec3d(const double& parameter, const ValuePage& page = VALUE_PAGE_CURRENT) const;
1787 
1792  GMathVec3d get_serialized_vec3d_at(const double& time) const;
1793 
1798  GMathVec3d get_serialized_curve_vec3d(const GMathVec3d& parameter, const ValuePage& page = VALUE_PAGE_CURRENT) const;
1799 
1804  GMathVec4d get_serialized_curve_vec4d(const double& parameter, const ValuePage& page = VALUE_PAGE_CURRENT) const;
1805 
1810  GMathVec4d get_serialized_vec4d_at(const double& time) const;
1811 
1816  GMathVec4d get_serialized_curve_vec4d(const GMathVec4d& parameter, const ValuePage& page = VALUE_PAGE_CURRENT) const;
1817 
1818  //---------------------------------------------------------------------------------------------------
1819  // Animatable management
1820  bool is_animatable() const;
1821  void set_animatable(const bool& flag);
1822 
1823  void set_time(const double& time);
1824  //
1828  AnimFCurve *add_fcurve(const unsigned int& index, void *requester = 0);
1829 
1833  AnimFCurve *add_fcurve_with_key(const unsigned int& index, void *requester = 0);
1834 
1839  AnimFCurve *add_fcurve(const ParserEntry& entry, const unsigned int& index, void *requester = 0);
1840 
1845  void set_key(const double& time, const unsigned int& index = -1, void *requester = 0);
1846 
1850  void remove_anim(const unsigned int& index = -1, void *requester = 0);
1851 
1856  void remove_fcurve(const unsigned int& index = -1, void *requester = 0);
1857 
1861  bool is_animated(const unsigned int& index = -1) const;
1862 
1864  //DriverType get_anim_type(const unsigned int& index) const;
1865  bool is_driver_anim_fcurve(const unsigned int& index) const;
1866  bool is_serialized_driver_anim_fcurve(const unsigned int& index) const;
1867 
1870  bool has_fcurve(const unsigned int& index = -1) const;
1871 
1874  AnimFCurve *get_fcurve(const unsigned int& index) const;
1875 
1879  bool is_serialized_animated(const unsigned int& index = -1) const;
1880 
1883  bool has_serialized_fcurve(const unsigned int& index = -1) const;
1884 
1887  AnimFCurve *get_serialized_fcurve(const unsigned int& index) const;
1888 
1889  //---------------------------------------------------------------------------------------------------
1890  // Texturable management
1891  bool is_texturable() const;
1892  void set_texturable(const bool& flag);
1893 
1894  const TextureMode& get_texture_mode() const;
1895  void set_texture_mode(const TextureMode& mode);
1896 
1902  void set_texture(OfObject *texture, void *requester = 0);
1903 
1904  void set_texture_channel_group(const short& channel_group_index, void *requester = 0);
1905 
1906  //
1908  bool is_textured(const bool& consider_disabled = true) const;
1909 
1911  const short& get_texture_channel_group() const;
1912 
1915  OfObject *get_texture(const bool& consider_disabled = true) const;
1916 
1919  OfObject *get_raw_texture(const bool& consider_disabled = true) const;
1920 
1921  //
1923  bool is_serialized_textured() const;
1924 
1926  const short& get_serialized_texture_channel_group() const;
1927 
1930  OfObject *get_serialized_texture() const;
1931 
1932  //---------------------------------------------------------------------------------------------------
1933  // OfOutput binding management
1934 
1941  void set_output_binding(OfObject *object, unsigned int id, void *requester = 0);
1942 
1945  OfObject *get_output_binding(unsigned int& id, bool consider_disabled = true) const;
1948  OfObject *get_serialized_output_binding(unsigned int& id) const;
1949 
1951  bool has_output_binding(bool consider_disabled = true) const;
1953  bool has_serialized_output_binding() const;
1954 
1955  //---------------------------------------------------------------------------------------------------
1956  // Shading Variable management
1957  bool is_shading_variable_enabled() const;
1958  void enable_shading_variable(const bool& enable);
1959 
1960  void activate_shading_variable(const bool& flag, void *requester = 0);
1961  void bind_shading_variable(const CoreString& variable, void *requester = 0);
1962  void unbind_shading_variable(void *requester = 0);
1963 
1964  //
1965  bool is_shading_variable_activated() const;
1966  bool is_bound_to_shading_variable() const;
1967  const CoreString& get_bound_shading_variable() const;
1968 
1969  //
1970  bool is_serialized_shading_variable_activated() const;
1971  bool is_serialized_bound_to_shading_variable() const;
1972  const CoreString& get_serialized_bound_shading_variable() const;
1973 
1975  inline bool is_shading_dependent() const {
1976  return is_textured() || is_shading_variable_activated();
1977  }
1978 
1979  //---------------------------------------------------------------------------------------------------
1980  // Table helpers
1981  //
1982 
1984  bool is_column(void) const;
1985 
1988  OfAttrTable get_table(unsigned int row_index = 0) const;
1989 
1992  unsigned int get_table_column_index(void) const;
1993 
1994  //---------------------------------------------------------------------------------------------------
1995  // Expression API
1996  //
1997  // Note: all expression methods dealing with serialization will ignore legacy expressions. Those
1998  // expression will never be serialized as expression, but as simple string values. So for instance
1999  // if you have a "filename" attribute, and assign the following string: "$PDIR/$F4.png", the
2000  // attribute will have an expression bound (is_expression_bound() will return true) but since the
2001  // expression is a legacy one, we want to serialize it as a standard string, so is_serialized_expression_bound
2002  // will return false.
2003  //
2004 
2008  void enable_expression(bool enable);
2009 
2012  bool is_expression_enabled() const;
2013 
2017  bool can_manage_expression() const;
2018 
2020  bool is_expression_bound(unsigned int value_index = 0) const;
2021 
2023  bool is_serialized_expression_bound(unsigned int value_index = 0) const;
2024 
2026  bool is_any_expression_bound() const;
2027 
2029  bool is_any_serialized_expression_bound() const;
2030 
2032  bool is_expression_activated(unsigned int value_index = 0) const;
2033 
2036  bool is_expression_legacy(unsigned int index = 0) const;
2037 
2039  bool is_serialized_expression_activated(unsigned int value_index = 0) const;
2040 
2042  const CoreString& get_expression(unsigned int value_index = 0) const;
2043 
2045  const CoreString& get_serialized_expression(unsigned int value_index = 0) const;
2046 
2051  void activate_expression(bool active, unsigned int value_index = 0, void *requester = nullptr);
2052 
2055  void activate_expression(const CoreBasicArray<bool>& active, const CoreBasicArray<unsigned int>& value_indices, void *requester = nullptr);
2056 
2062  void set_expression(const CoreString& expression, unsigned int index = 0, bool activated = true, void *requester = nullptr);
2063 
2066  void set_expression(const CoreBasicArray<CoreString>& expressions, const CoreBasicArray<unsigned int>& indices, const CoreBasicArray<bool>& activated, void *requester = nullptr);
2067 
2068  //---------------------------------------------------------------------------------------------------
2069  // range management
2070  bool is_slider() const;
2071  void set_slider(const bool& flag);
2072 
2073  void enable_range(const bool& flag);
2074  bool is_range_enabled() const;
2075  void set_numeric_range(const double& min, const double& max);
2076  void get_numeric_range(double& min, double& max) const;
2077 
2081  void set_numeric_range_min(const double& min, const bool& auto_set_max = false);
2082 
2086  void set_numeric_range_max(const double& max, const bool& auto_set_min = false);
2087 
2089  const double& get_numeric_range_min() const;
2091  const double& get_numeric_range_max() const;
2092 
2093  void enable_ui_range(const bool& flag);
2094  bool is_ui_range_enabled() const;
2095  void set_numeric_ui_range(const double& min, const double& max);
2096  void get_numeric_ui_range(double& min, double& max) const;
2097 
2099  const double& get_ui_range_min() const;
2101  const double& get_ui_range_max() const;
2102 
2106  void set_ui_range_min(const double& min, const bool& auto_set_max = false);
2107 
2111  void set_ui_range_max(const double& max, const bool& auto_set_min = false);
2112 
2113  //---------------------------------------------------------------------------------------------------
2114  // validator management
2115 
2124 
2125  void add_validator(ValidatorBool validator, void *data = nullptr);
2126  void add_validator(ValidatorLong validator, void *data = nullptr);
2127  void add_validator(ValidatorDouble validator, void *data = nullptr);
2128  void add_validator(ValidatorString validator, void *data = nullptr);
2129  void add_validator(ValidatorItem validator, void *data = nullptr);
2130 
2131  void add_validator(ValidatorBoolIndexed validator, void *data = nullptr);
2132  void add_validator(ValidatorLongIndexed validator, void *data = nullptr);
2133  void add_validator(ValidatorDoubleIndexed validator, void *data = nullptr);
2134  void add_validator(ValidatorStringIndexed validator, void *data = nullptr);
2135  void add_validator(ValidatorItemIndexed validator, void *data = nullptr);
2136 
2140 
2144  void remove_all_validators();
2145 
2156 
2157  void remove_validator(ValidatorBool validator, void *data = nullptr);
2158  void remove_validator(ValidatorLong validator, void *data = nullptr);
2159  void remove_validator(ValidatorDouble validator, void *data = nullptr);
2160  void remove_validator(ValidatorString validator, void *data = nullptr);
2161  void remove_validator(ValidatorItem validator, void *data = nullptr);
2162 
2163  void remove_validator(ValidatorBoolIndexed validator, void *data = nullptr);
2164  void remove_validator(ValidatorLongIndexed validator, void *data = nullptr);
2165  void remove_validator(ValidatorDoubleIndexed validator, void *data = nullptr);
2166  void remove_validator(ValidatorStringIndexed validator, void *data = nullptr);
2167  void remove_validator(ValidatorItemIndexed validator, void *data = nullptr);
2168 
2172 
2176  void enable_all_validators();
2177 
2188 
2189  void enable_validator(ValidatorBool validator, void *data = nullptr);
2190  void enable_validator(ValidatorLong validator, void *data = nullptr);
2191  void enable_validator(ValidatorDouble validator, void *data = nullptr);
2192  void enable_validator(ValidatorString validator, void *data = nullptr);
2193  void enable_validator(ValidatorItem validator, void *data = nullptr);
2194 
2195  void enable_validator(ValidatorBoolIndexed validator, void *data = nullptr);
2196  void enable_validator(ValidatorLongIndexed validator, void *data = nullptr);
2197  void enable_validator(ValidatorDoubleIndexed validator, void *data = nullptr);
2198  void enable_validator(ValidatorStringIndexed validator, void *data = nullptr);
2199  void enable_validator(ValidatorItemIndexed validator, void *data = nullptr);
2200 
2204 
2208  void disable_all_validators();
2209 
2220 
2221  void disable_validator(ValidatorBool validator, void *data = nullptr);
2222  void disable_validator(ValidatorLong validator, void *data = nullptr);
2223  void disable_validator(ValidatorDouble validator, void *data = nullptr);
2224  void disable_validator(ValidatorString validator, void *data = nullptr);
2225  void disable_validator(ValidatorItem validator, void *data = nullptr);
2226 
2227  void disable_validator(ValidatorBoolIndexed validator, void *data = nullptr);
2228  void disable_validator(ValidatorLongIndexed validator, void *data = nullptr);
2229  void disable_validator(ValidatorDoubleIndexed validator, void *data = nullptr);
2230  void disable_validator(ValidatorStringIndexed validator, void *data = nullptr);
2231  void disable_validator(ValidatorItemIndexed validator, void *data = nullptr);
2232 
2236 
2237  //---------------------------------------------------------------------------------------------------
2241  const CoreString& get_object_filter() const;
2242 
2248  const CoreBasicArray<CoreString>& get_item_filters() const;
2249  const CoreString& get_item_filter() const;
2250 
2252  bool support_context_filter() const;
2253 
2260  const CoreBasicArray<CoreString>& get_texture_filters() const;
2261 
2269  void set_object_filters(const CoreBasicArray<CoreString>& filters, void *requester = 0);
2270 
2275  void set_item_filters(const CoreBasicArray<CoreString>& filters, void *requester = 0);
2276 
2284  void set_texture_filters(const CoreBasicArray<CoreString>& filters, void *requester = 0);
2285 
2288  const CoreString& get_context_filter() const;
2289 
2293  void set_context_filter(const CoreString& filter);
2294 
2300  const CoreString& get_group_filter() const;
2301 
2307  void set_group_filter(const CoreString& filter);
2308 
2309  //---------------------------------------------------------------------------------------------------
2310  void set_enum_type(const CoreString& type);
2311  const CoreString& get_enum_type() const;
2312  OfEnum *get_enum() const;
2313 
2314  //---------------------------------------------------------------------------------------------------
2315  const CoreString& get_scripting_filter() const;
2316  void set_scripting_filter(const CoreString& filter);
2317 
2318  const CoreBasicArray<CoreString>& get_filename_extensions() const;
2319  void set_filename_extensions(const CoreBasicArray<CoreString>& extensions);
2320 
2321  //---------------------------------------------------------------------------------------------------
2322  typedef void (*TagCandidateCallback)(const OfObject&, const OfAttr&, CoreVector<CoreString>&, CoreArray<bool>& preset_hints);
2323  void set_tag_candidate_callback(OfAttr::TagCandidateCallback callback);
2324  OfAttr::TagCandidateCallback get_tag_candidate_callback() const;
2325  void get_tag_candidates(CoreVector<CoreString>& candidates, CoreArray<bool>& preset_hints) const;
2326 
2327  //---------------------------------------------------------------------------------------------------
2330  bool is_depending_on_variable(const CoreString& variable_name) const;
2331 
2332  //---------------------------------------------------------------------------------------------------
2333  // Settings management
2338  void add_settings(const CoreString& settings_key, const ParserEntry& settings, void *requester = 0);
2339 
2343  void remove_settings(const CoreString& settings_key, void *requester = 0);
2344 
2347  void remove_all_settings(void *requester = 0);
2348 
2349  //
2352  unsigned int get_settings_count() const;
2353 
2357  ParserEntry * settings_exists(const CoreString& settings_key) const;
2358 
2363  ParserEntry * get_settings(const CoreString& settings_key) const;
2364 
2367  void get_settings_keys(CoreVector<CoreString>& keys) const;
2368 
2369  //
2372  unsigned int get_serialized_settings_count() const;
2373 
2377  ParserEntry * serialized_settings_exists(const CoreString& settings_key) const;
2378 
2383  ParserEntry * get_serialized_settings(const CoreString& settings_key) const;
2384 
2387  void get_serialized_settings_keys(CoreVector<CoreString>& keys) const;
2388 
2389  //---------------------------------------------------------------------------------------------------
2391  void notify_object_disabled(const int& dependency_type, void *requester = 0);
2392 
2393  //---------------------------------------------------------------------------------------------------
2401  void asleep(bool silent = false);
2402 
2408  void awake(const bool& silent = false);
2409 
2412  bool is_asleep() const;
2413 
2416  bool is_awake() const;
2417 
2418  bool is_dg_active() const;
2419  void set_dg_active(const bool& flag);
2420  bool is_dg_cyclic() const;
2421  void set_dg_cyclic(const bool& flag);
2422  void set_output_dirtiness(const int& dirtiness);
2423  const int get_output_dirtiness() const;
2424  void set_input_dirtiness(const int& dirtiness);
2425  const int get_input_dirtiness() const;
2426  const OfAttrEvent& get_event_info() const;
2427  const CoreBasicArray<OfAttrEvent>& get_event_infos() const;
2428 
2429  bool is_local() const;
2430  bool is_instance() const;
2431  bool is_proto() const;
2432  bool is_synchronized() const;
2433 
2434  bool is_value_proto() const;
2435  bool is_default_value() const;
2436 
2437  bool is_private() const;
2438  bool is_hidden() const;
2439 
2441  inline bool is_read_only() const { return ((m_flags & FLAG_READ_ONLY) != 0); }
2442 
2444  RO_PARENT_MASK = 1 << 2,
2445  RO_SOURCE_MASK = 1 << 3,
2446  RO_EXT_REF_MASK = 1 << 4,
2447  RO_MUTE_MASK = 1 << 5,
2448  RO_OVERRIDE_MASK = 1 << 6,
2449  RO_LOCK_MASK = 1 << 7,
2450  };
2451 
2454  bool is_editable(const int& read_only_mask = RO_ALL_MASK) const;
2455  bool is_saveable() const;
2456  bool is_experimental() const;
2457  bool is_advanced() const;
2458  bool is_overriden() const;
2459  bool is_promoted() const;
2460  bool is_preserved_on_undo() const;
2461 
2462  void set_hidden(const bool& flag);
2463  void set_read_only(const bool& flag);
2464  void set_saveable(const bool& flag);
2465  void set_overriden(const bool& flag);
2466  void set_private(const bool& flag);
2467  void set_promoted(const bool& flag);
2468  void set_preserve_on_undo(const bool& flag);
2469 
2470  //---------------------------------------------------------------------------------------------------
2471  // Weak referencing
2473  void set_weak_referencing(const bool& weak, void * requester = 0);
2475  bool is_weak_referencing() const;
2476 
2477  //---------------------------------------------------------------------------------------------------
2478  // Lock attribute and value management
2479  void set_locked(const bool& locked, void * requester = 0);
2480  bool is_locked() const;
2481 
2482  void set_value_locked(const CoreBasicArray<unsigned int>& value_indices, const bool& locked, void * requester = 0);
2483  void set_value_locked(const unsigned int& value_index, const bool& locked, void * requester = 0);
2484  bool is_value_locked(const unsigned int& value_index) const;
2485  bool is_serialized_value_locked(const unsigned int& value_index) const;
2486  bool is_any_serialized_value_locked() const;
2487 
2488  //---------------------------------------------------------------------------------------------------
2489  // Mute local value management
2492  bool can_mute_local_value() const;
2495  void set_can_mute_local_value(const bool enable);
2496 
2500  void mute_local_value(const bool& flag);
2501 
2504  bool is_local_muted() const;
2505 
2506  //---------------------------------------------------------------------------------------------------
2507  // Disable management
2510  bool can_disable() const;
2513  void set_can_disable(const bool enable);
2514 
2517  bool is_disabled() const;
2518 
2521  void set_disabled(const bool& disable);
2522 
2523  //---------------------------------------------------------------------------------------------------
2524  // Disable value management
2529  void set_value_disabled(const unsigned int& value_index, const bool& disable, void *requester = nullptr);
2534  void set_value_disabled(const CoreBasicArray<unsigned int>& value_indices, const bool& disable, void *requester = nullptr);
2538  void set_disabled_values(const CoreBasicArray<unsigned int>& value_indices, void *requester = nullptr);
2542  bool is_value_disabled(const unsigned int& value_index) const;
2545  bool is_any_value_disabled() const;
2549  bool is_serialized_value_disabled(const unsigned int& value_index) const;
2552  bool is_any_serialized_value_disabled() const;
2553 
2554  //---------------------------------------------------------------------------------------------------
2558  bool is_value_equal_to(const OfAttr& attr, const bool& consider_disabled = true) const;
2561  bool is_serialized_value_equal_to(const OfAttr& attr) const;
2562 
2563  static const CoreSet<OfAttr *>& get_path_attrs();
2564  void add_to_path_attrs() const;
2565  void remove_from_path_attrs() const;
2566 
2568  void raise_object_attr_changed();
2569 
2570  class Reference;
2571 
2572  void *operator new(size_t);
2573  void operator delete(void *);
2574 
2575  void get_statistics(SysStatistic& stats) const;
2576 
2577  // Revert value framework
2579  bool can_revert() const;
2581  const OfAttrState * get_revert() const;
2583  void release_revert();
2585  bool is_revert_dirty() const;
2587  void dirty_revert(const bool& dirty = true);
2591  void update_revert(const bool& force = false, OfAttrState * state = 0);
2595  void revert(OfAttrState * state = 0, const bool& auto_delete_state = true);
2596 
2597  static bool is_revert_event_info(const OfAttrEvent& event);
2598  static bool is_override_flag_change_event(const OfAttrEvent& event);
2599 
2603  OfAttrState *save_state(const OfAttr::ValuePage& page) const;
2604 
2608  void restore_state(OfAttrState *state, const bool& auto_delete_state = false);
2609 
2610  static void delete_state(OfAttrState *state);
2611 
2612  OfAttr& operator=(const OfAttr& attr);
2613 
2617  ParserEntry *serialize(const OfSerialOptions& options = OfSerialOptions::get_default()) const;
2618 
2622  bool deserialize(const ParserEntry& entry, const OfSerialOptions& options = OfSerialOptions::get_default());
2623 
2624  void set_ui_data(const CoreString& key, const CoreString &value);
2625  CoreString *get_ui_data(const CoreString& key);
2626  void clear_ui_data(const CoreString& key);
2627  void clear_ui_data();
2628  bool has_ui_data() const;
2629 
2632  void set_overridable(const bool& enable);
2635  bool can_use_override() const;
2639  bool can_use_override(const OfAttr * overrider) const;
2643  void override(OfAttr& overrider, void *requester = 0);
2646  void remove_override(void *requester = 0);
2649  OfAttr* get_override() const;
2652  inline bool is_using_override() const { return (m_override != 0); }
2655  bool is_override() const;
2658  void get_override_users(CoreVector<OfAttr*>& users) const;
2661  bool is_override_user_protected() const;
2662 
2664  OfContext *get_root_context() const;
2666  void set_root_context(OfContext *context);
2667 
2671  ParserEntry *get_reference_entry(ParserEntry *entry) const;
2672 
2673 protected:
2674 
2675  void set_def_output_dirtiness(const int& dirtiness); // set default output dirtiness for all future attributes. Will not modify dirtiness of existing attributes.
2676  void set_def_input_dirtiness(const int& dirtiness); // set default input dirtiness for all future attributes. Will not modify dirtiness of existing attributes.
2677  int get_def_input_dirtiness() const;
2678  int get_def_output_dirtiness() const;
2679 
2680  void serialize_flags(const OfSerialOptions& options, ParserGroup *group) const;
2681  void deserialize_flags(const ParserGroup &group);
2682  bool has_flag_modifications() const;
2683  bool has_flag_overrides() const;
2684  bool has_expression_overrides(unsigned int index = static_cast<unsigned int>(-1)) const;
2685 
2686  void _mute_local_value(const bool& flag);
2687  void _set_disabled(const bool& disable);
2688  void _set_value_disabled(const CoreBasicArray<unsigned int>& value_indices, bool disable, bool replace, void *requester = nullptr);
2689 
2690  static void cmd_mute_local_value(OfCommandData *data);
2691  static void cmd_disable_attribute(OfCommandData *data);
2692 
2693  void print_revert_state(); // debug usage
2694 
2695 private:
2696  enum PrivateStatusFlag {
2697  PRIVATE_FLAG_NONE = 0,
2698  PRIVATE_FLAG_INITIALIZED = 1 << 0,
2699  PRIVATE_FLAG_MUTE_LOCAL = 1 << 1,
2700  PRIVATE_FLAG_CAN_MUTE = 1 << 2,
2701  PRIVATE_FLAG_DISABLED = 1 << 3,
2702  PRIVATE_FLAG_CAN_DISABLE = 1 << 4,
2703  PRIVATE_FLAG_CAN_OVERRIDE = 1 << 5,
2704  PRIVATE_FLAG_LOCKED = 1 << 6,
2705  PRIVATE_FLAG_WEAK_REFERENCE = 1 << 7,
2706  PRIVATE_FLAG_UPDATE_REVERT = 1 << 8,
2707  PRIVATE_FLAG_PRESERVE_ON_UNDO = 1 << 10,
2708  };
2709 
2710  friend class AnimFCurve;
2711  friend class AttributeOverrides;
2712  friend class OfAttrIsCyclicTask;
2713  friend class OfAttrTable;
2714  friend class OfAttrTableImpl;
2715  template <bool> friend class OfBaseAttrHandle;
2716  template <bool> friend class OfBaseObjectHandle;
2717  friend class OfBuildPackageContextEngine;
2718  friend class OfCid;
2719  friend class OfClass;
2720  friend class OfClassFactory;
2721  friend class OfContext;
2722  friend class OfContextEngine;
2723  friend class OfEnum;
2724  friend class OfExpression::Binding;
2725  friend class OfExpression::Expression;
2726  friend class OfExpression::GetDoubleValue;
2727  friend class OfExpression::GetStringValue;
2728  friend class OfExpression::GetVec3Value;
2729  friend class OfExpression::GlobalVariable;
2730  friend class OfItem;
2731  friend class OfObject;
2732  friend class OfObjectFactory;
2733  friend class OfOverrides;
2734  friend class OfSceneAssemblyContextEngine;
2735  friend class OfTime;
2736  friend struct OfAttrPtr;
2737  friend struct OfAttrValue;
2738 
2739  // unit tests
2740  friend class OfAttrTests;
2741  friend class OfTestHelpers;
2742  friend class OfExprTests;
2743 
2744  struct Def;
2745  struct Shared;
2746  struct DgData;
2747  struct OfAttrImpl;
2748 
2749  OfAttr(OfObject& object, const CoreString& name, const Type& type, const Container& container, const VisualHint& visual_hint, const CoreString& group_name);
2750  OfAttr(OfObject& object, OfAttr& source);
2751  void ensure_source();
2752  void init();
2753  void init_share();
2754  void release_share();
2755  void initialize();
2756  bool is_initialized() const;
2757 
2758  void cleanup_embedded_object(const CoreBasicArray<OfObject *>& objects);
2759  static char get_default_private_flags();
2760 
2761  OfTime& get_time() const;
2762 
2763  void make_local(const bool& flag = true, void *requester = 0);
2764  void reset_to_default();
2765 
2766  enum SourceMask {
2767  SOURCE_NONE = 0,
2768  SOURCE_OVERRIDE = 1, // considers override existency to access the source
2769  SOURCE_DISABLE = 1 << 1, // considers disabled state to access the source
2770  SOURCE_MUTED = 1 << 2, // considers muted state to access the source
2771 
2772  SOURCE_ALL = 0xff
2773  };
2774 
2775  OfAttr *get_source_attr(const int& source_mask) const;
2776  OfAttr *get_serialized_source_attr() const;
2777  OfAttr *get_serialized_source_attr_to_set() const;
2778  const Shared * get_source_share() const;
2779  //inline const Shared * get_serialized_source_share() const { return m_shared; } //! \brief returns the pointer on the shared value used by this attribute, without considering attribute state (disabled, muted, ...)
2780 
2781  OfAttr& copy_from(const OfAttr& attr, const bool& copy_value);
2782  void propagate_dirtiness(int& dirtiness, const int& dirtiness_flags);
2783  void on_attribute_change(int& dirtiness, const int& dirtiness_flags);
2784  void refresh_instancing(OfAttr *self);
2785  void raise_object_attr_changed(OfAttrEvent *event_info);
2786  void raise_object_attr_error(OfAttrEvent *event_info);
2787  void synchronize_instance(const OfAttrEvent& event_info, const int& dirtiness, const int& dirtiness_flags);
2788  void synchronize_instance2(const OfAttrEvent& event_info, const int& dirtiness, const int& dirtiness_flags);
2789 
2790  //---------------------------------------------------------------------------------------------------
2791  // per type factorization
2792  // bool type management
2800  bool _set_bool(const bool *values, const unsigned int *indices, const unsigned int& value_count, void *requester, const ValuePage& page, const bool& driven_value = false);
2806  bool _get_bool(const Shared * shared, const unsigned int& index, const ValuePage& page) const;
2807 
2808  // long type management
2816  bool _set_long(const long *values, const unsigned int *indices, const unsigned int& value_count, void *requester, const ValuePage& page);
2822  long _get_long(const Shared * shared, const unsigned int& index, const ValuePage& page) const;
2823 
2824  // double type management
2834  bool _set_double(const double* values, const unsigned int* indices, unsigned int value_count, void *requester, ValuePage page, unsigned int additional_event_flags = OfAttrEvent::FLAG_NONE, const int& additional_dirtiness_flags = DIRTINESS_FLAG_NONE);
2840  double _get_double(const Shared * shared, const unsigned int& index, const ValuePage& page) const;
2841 
2842  void _set_vec3d(const GMathVec3d& vec, void *requester, const ValuePage& page);
2843  void _set_vec4d(const GMathVec4d& vec, void *requester, const ValuePage& page);
2844 
2845  // for factorization purpose in set_double
2846  void _update_virtual_key(AnimFCurve * fcurve, const double& value);
2847 
2848  // string type management
2856  bool _set_string(const CoreString* values, const unsigned int* indices, unsigned int value_count, void *requester, ValuePage page, unsigned int additional_event_flags = OfAttrEvent::FLAG_NONE, int additional_dirtiness_flags = DIRTINESS_FLAG_NONE);
2863  CoreString _get_string(const Shared *shared, unsigned int index, ValuePage page, bool raw) const;
2864 
2868  OfExpression::Expression* get_expression_wrapper(unsigned int value_index = 0) const;
2869 
2870  // object type management
2871 
2872  bool must_check_cyclic() const;
2873 
2880  int _check_cyclic(OfItem *const *values, const unsigned int *indices, const unsigned int& value_count, void *requester, const ValuePage& page, const OfAttr::CyclicCheckInfo& cyclic_check,
2881  CoreVector<OfItem *>& output_items, CoreVector<unsigned int>& output_indices);
2882 
2883  bool _set_object(OfObject *const *values, const unsigned int *indices, const unsigned int& value_count, void *requester, const ValuePage& page, const OfAttr::CyclicCheckInfo& cyclic_check = OfAttr::CYCLIC_CHECK_AND_WARN, const unsigned int& additional_event_flags = OfAttrEvent::FLAG_NONE, const int& additional_dirtiness_flags = DIRTINESS_FLAG_NONE);
2884  bool _set_item(OfItem *const *values, const unsigned int *indices, const unsigned int& value_count, void *requester, const ValuePage& page, const OfAttr::CyclicCheckInfo& cyclic_check = OfAttr::CYCLIC_CHECK_AND_WARN, const unsigned int& additional_event_flags = OfAttrEvent::FLAG_NONE, const int& additional_dirtiness_flags = DIRTINESS_FLAG_NONE);
2885  void _add_object(OfObject *const *values, const unsigned int& value_count, void *requester);
2886  void _add_item(OfItem *const *values, const unsigned int& value_count, void *requester);
2887 
2888  void _add_string(const CoreString* values, const CoreString* object_names, const CoreString* source_names, const unsigned int& value_count, void *requester);
2889 
2890  void _add_embedded_object(const CoreString* class_names, const CoreString* object_names, const CoreString* sources, const unsigned int& value_count, void *requester);
2891 
2892  bool _set_reference(OfAttr::Reference **references, const int& dep_type, const unsigned int *indices, OfItem **items, const unsigned int& ref_count);
2893  OfContext *_get_referenced_context(const Shared * shared, const unsigned int& index, const ValuePage& page, const bool& consider_disabled) const;
2894 
2895  const unsigned int _get_value_count(const Shared * shared, const bool& consider_disabled) const;
2896  OfItem * _get_item(const Shared * shared, const unsigned int& index, const ValuePage& page, const bool& consider_disabled) const;
2897  OfItem * _get_item(const Shared * shared, const unsigned int& index, const ValuePage& page) const;
2898 
2899  void _set_texture(OfObject * texture, void * requester, const unsigned int& additional_event_flags = OfAttrEvent::FLAG_NONE, const int& additional_dirtiness_flags = DIRTINESS_FLAG_NONE, unsigned int output_binding = CORE_INVALID_INDEX);
2900 
2901  // curve type management
2902  void set_value_time(const double& time);
2903 
2904  void _set_curve(const FCurve& curve, const unsigned int& index, void *requester, const ValuePage& page);
2905  void _add_curve_key(const int& key_type, const double& x, const CoreBasicArray<double>& y, const CoreBasicArray<unsigned int>& indices, void *requester);
2906  void _remove_curve_key(const CoreBasicArray<FCurveKeyId>& key_ids, const CoreBasicArray<unsigned int>& indices, void *requester);
2907  void _set_curve_extrapolation(const int& behavior, const short& pre_or_post, const CoreBasicArray<unsigned int>& indices, void *requester);
2908  void _set_curve_key_type(const int& key_type, const CoreBasicArray<FCurveKeyId>& key_ids, const CoreBasicArray<unsigned int>& indices, void *requester, const ValuePage& page);
2909  void _set_curve_key_property(const CoreString& property_name, const CoreString& property_value, const CoreBasicArray<FCurveKeyId>& key_ids, const CoreBasicArray<unsigned int>& indices, void *requester, const ValuePage& page);
2910  void _set_curve_key_tangents(const GMathVec2d* left, const GMathVec2d* right, const FCurveKeyId& key_id, const unsigned int& index, void *requester, const ValuePage& page);
2911  void _set_curve_key_tcb(const GMathVec3d& tcb, const CoreBasicArray<FCurveKeyId>& key_ids, const unsigned int& index, void *requester, const ValuePage& page);
2912  void _set_curve_key_x(const CoreBasicArray<double>& x, const CoreBasicArray<FCurveKeyId>& key_ids, const CoreBasicArray<unsigned int>& indices, void *requester, const ValuePage& page);
2913  void _set_curve_key_y(const CoreBasicArray<double>& y, const CoreBasicArray<FCurveKeyId>& key_ids, const CoreBasicArray<unsigned int>& indices, void *requester, const ValuePage& page);
2914 
2915  static void cmd_on_anim_update(OfCommandData *data);
2916  static void on_anim_update(OfAttr& attr, AnimFCurve& fcurve);
2917  static void cmd_add_fcurve(OfCommandData *data);
2918  AnimFCurve *_add_fcurve(const ParserEntry *fcurve_entry, const unsigned int& index, void *requester, AnimFCurve *fcurve);
2919  AnimFCurve *add_fcurve(const ParserEntry *fcurve_entry, const unsigned int& index, void *requester, AnimFCurve *fcurve = 0);
2920  bool _remove_fcurve(const unsigned int& index, void *requester);
2921 
2922  // override management
2923  void _override(OfAttr* overrider, const bool& send_event, void *requester);
2924  void _remove_override(const bool& send_event, void *requester);
2925  void _start_remove_override(const bool& send_event, void *requester);
2926  void _end_remove_override(OfAttr * old_override);
2927  void _disable_override(const bool& disable, const bool& send_event, void *requester);
2928 
2929  // weak referencing
2930  void _set_weak_referencing(const bool& weak, void * requester);
2931 
2932  // lock management
2933  void _set_value_locked(const unsigned int* value_indices, const unsigned int& indice_count, const bool& locked, void * requester = 0);
2934 
2935  // Commands for delayed usage (need to be declared in header to be able to access protected/private methods)
2936  static void cmd_set_bool(OfCommandData *data);
2937  static void cmd_set_long(OfCommandData *data);
2938  static void cmd_set_double(OfCommandData *data);
2939  static void cmd_set_vec3d(OfCommandData *data);
2940  static void cmd_set_vec4d(OfCommandData *data);
2941  static void cmd_set_string(OfCommandData *data);
2942  static void cmd_set_item(OfCommandData *data);
2943  static void cmd_set_texture(OfCommandData *data);
2944 
2945  static void cmd_add_string(OfCommandData *data);
2946  static void cmd_add_embedded_object(OfCommandData *data);
2947  static void cmd_add_object(OfCommandData *data);
2948  static void cmd_remove_object(OfCommandData *data);
2949 
2950  static void cmd_set_curve(OfCommandData *data);
2951  static void cmd_add_curve_key(OfCommandData *data);
2952  static void cmd_remove_curve_key(OfCommandData *data);
2953  static void cmd_set_curve_extrapolation(OfCommandData *data);
2954  static void cmd_set_curve_key_type(OfCommandData *data);
2955  static void cmd_set_curve_key_property(OfCommandData *data);
2956  static void cmd_set_curve_key_tangents(OfCommandData *data);
2957  static void cmd_set_curve_key_tcb(OfCommandData *data);
2958  static void cmd_set_curve_key_x(OfCommandData *data);
2959  static void cmd_set_curve_key_y(OfCommandData *data);
2960 
2961  //
2962  bool _check_valid_indices(const unsigned int *indices, const unsigned int& value_count) const;
2963  void update_saved_state(const ValuePage& page, const bool& skip_update_revert = false);
2964 
2965  //---------------------------------------------------------------------------------------------------
2966  // serialization
2967  static bool is_serialization_needed(const OfAttr& attr, const OfSerialOptions& options);
2968  bool is_serialize_group_needed(const OfSerialOptions& options) const;
2969  void serialize_value(const OfSerialOptions& options, ParserEntry *entry) const;
2970  void serialize_value(const OfSerialOptions& options, ParserEntry *entry, const unsigned int& index) const;
2971  void serialize_group(const OfSerialOptions& options, ParserGroup *group) const;
2972  bool deserialize_value(const OfSerialOptions& options, const ParserEntry& entry);
2973  bool deserialize_value(const OfSerialOptions& options, const ParserEntry& entry, const unsigned int& value_index, const unsigned int& attr_index,
2974  CoreVector<OfObject*>& collected_objects, CoreVector<unsigned int>& collected_objects_indices, CoreVector<CoreString>& collected_strings, CoreVector<unsigned int>& collected_strings_indices); // I would have found a better solution
2975 
2976  void deserialize_group(const ParserGroup& group, const OfSerialOptions& options);
2977  ParserEntry* serialize_uidata() const;
2978  void deserialize_uidata(const ParserGroup& group);
2979  void _deserialize_embedded(const ParserEntry * value_entry, const ParserEntry * disabled_entry);
2980  //---------------------------------------------------------------------------------------------------
2981 private:
2982  void send_event_set_value(const unsigned int * indices, const unsigned& value_count, const ValuePage& page, void * requester, const unsigned int& dirtiness_flags = OfAttr::DIRTINESS_FLAG_NONE, const unsigned int& additional_event_flags = OfAttrEvent::FLAG_NONE);
2983  void send_event_add_value(void * requester);
2984  static void cmd_send_dirtiness(OfCommandData *data);
2985 
2988  bool send_dirtiness(const int& dirtiness, const int& dirtiness_flags);
2989 
2990  static void clean_dirty_attrs(const CoreVector<OfAttr *>& dirty_attrs);
2991  void mark_as_dirty(const int& dirtiness, const int& dirtiness_flags);
2992 
2993  void _remove_object(const CoreBasicArray<unsigned int>& indices); // Removes the values at the given indices. This method DOES consider the container type of the attribute
2994  void _do_remove_references(const CoreBasicArray<unsigned int>& indices, const bool& remove_entries, void * requester); // specifies remove_entries = true to remove value indices, otherwise just clean the value content
2995  void _do_remove_values(const CoreBasicArray<unsigned int>& indices, const bool& remove_entries, void * requester);
2996  void _do_remove_embedded(const CoreBasicArray<unsigned int>& indices, const bool& remove_entries, const bool with_event, void * requester); // specifies remove_entries = true to remove value indices, otherwise just clean the value content
2997  void _do_set_value_count_embedded(const unsigned int& new_count, const bool& with_event, void * requester);
2998  void _do_set_value_count_embedded(const unsigned int& new_count, CoreVector<OfObject*>& collected_objects, const bool& with_event, void * requester);
2999  void _do_set_value_count_reference(const unsigned int& new_count, const bool& with_event, void * requester);
3000  void _do_make_unlocal(void *requester);
3001  bool can_unlocalize() const;
3002 
3003  void set_enum(OfEnum *enm);
3004  void populate_presets_from_enum(); // aka on_enum_changed()
3005 
3006  OfAttrSubgraph *get_subgraph();
3007  void compute_subgraph(OfAttr& attr, OfAttrSubgraph& subgraph, OfAttrSubgraphNode *input_node, const unsigned int& input_index, const bool& continue_deeper);
3008 
3009  bool validate(bool& value, unsigned int index);
3010  bool validate(long& value, unsigned int index);
3011  bool validate(double& value, unsigned int index);
3012  bool validate(CoreString& value, unsigned int index);
3013  bool validate(OfItem *& value, unsigned int index);
3014 
3015  bool stop_evaluation_if_locked(const bool& check_command_list = false);
3016 
3017  void add_event_info(OfAttrEvent& event);
3018  void add_event_info(OfAttrEvent&& event);
3019 
3020  CoreSet<OfAttr *>& get_attr_deps() const;
3021  void release_attr_deps();
3022 
3023  // 8 bytes
3024 
3025  Def * m_def;
3026  Shared * m_shared;
3027  mutable DgData * m_dg_data;
3028  OfAttrState * m_revert;
3029  mutable CoreSet<OfAttr *> * m_dependencies;
3030  OfContext * m_root_context;
3031 
3032  // 4 bytes
3033 
3034  unsigned int m_pool_index;
3035  int m_output_dirtiness;
3036  int m_input_dirtiness;
3037  int m_flags;
3038  OfAttrPtr m_embedded_source;
3039  OfAttrPtr m_self;
3040  OfAttrPtr m_override;
3041 
3042  // 2 bytes
3043 
3044  short m_status;
3045 
3046  // statics
3047 
3048  static const OfAttrEvent m_default_event_info;
3049  static Flag *m_flag_array;
3050  static Dirtiness *m_dirtiness_array;
3051  static CoreSet<OfAttr *> m_path_attrs;
3053 
3055 };
3056 
3057 #endif