Clarisse 4.0 SP10 SDK  4.0.0.0.10
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions | Friends | List of all members
AppObject Class Reference

Application base class containing commands, managing project load and save and some low level application settings. More...

Inheritance diagram for AppObject:
OfApp AppBase EventObject CoreCustomData CoreBaseObject CoreBaseType GuiApp ClarisseApp

Public Types

enum  { MAX_WAIT_TIME = (unsigned int) -1 }
 
typedef CoreString(* LogCallback )(const AppObject &, void *)
 
- Public Types inherited from OfApp
enum  ReferenceLoadingMode {
  REFERENCE_LOADING_MODE_AUTOMATIC,
  REFERENCE_LOADING_MODE_MANUAL
}
 
typedef bool(* DirectiveCallback )(const ParserEntry &entry, OfItem &item)
 Callback to handle directive.
 
typedef void(* ProgressUpdateCallback )(void *data, const CoreString &object_name, const float &progress)
 Function called when the progress value of any process has changed.
 
- Public Types inherited from AppBase
enum  Type {
  TYPE_PROCESS,
  TYPE_INTERACTIVE,
  TYPE_GUI,
  TYPE_COUNT
}
 
enum  EvaluatorAddMode {
  EVALUATOR_ADD_MODE_HEAD,
  EVALUATOR_ADD_MODE_TAIL,
  EVALUATOR_ADD_MODE_COUNT
}
 
enum  AccelerationMode {
  ACCELERATION_MODE_FULL_INTERACTIVITY,
  ACCELERATION_MODE_FAVOR_INTERACTIVITY_OVER_SPEED,
  ACCELERATION_MODE_FAVOR_SPEED_OVER_INTERACTIVITY,
  ACCELERATION_MODE_FULL_SPEED,
  ACCELERATION_MODE_COUNT
}
 
enum  DisplacementStorageMode {
  DISPLACEMENT_STORAGE_MODE_FAVOR_MEMORY,
  DISPLACEMENT_STORAGE_MODE_FAVOR_SPEED,
  DISPLACEMENT_STORAGE_MODE_COUNT
}
 
enum  EvalFps {
  EVAL_FPS_LAYOUT_VIEW,
  EVAL_FPS_RENDERING,
  EVAL_FPS_SHADING,
  EVAL_FPS_COMPOSITING,
  EVAL_FPS_DEFAULT,
  EVAL_FPS_COUNT
}
 
enum  CurveSizeMode {
  CURVE_SIZE_MODE_SMALL,
  CURVE_SIZE_MODE_MEDIUM,
  CURVE_SIZE_MODE_LARGE,
  CURVE_SIZE_MODE_COUNT
}
 
enum  FileBrowserMode {
  FILE_BROWSER_MODE_NATIVE,
  FILE_BROWSER_MODE_CLARISSE,
  FILE_BROWSER_MODE_COUNT
}
 
enum  ObjectUicolorMode {
  OBJECT_UICOLOR_MODE_TAG,
  OBJECT_UICOLOR_MODE_CLASS,
  OBJECT_UICOLOR_MODE_COUNT
}
 
enum  InputDeviceMode {
  INPUT_DEVICE_MODE_AUTODETECT,
  INPUT_DEVICE_MODE_FORCE_MOUSE,
  INPUT_DEVICE_MODE_FORCE_TABLET,
  INPUT_DEVICE_MODE_COUNT
}
 
enum  MotionBlurDirectionMode {
  MOTION_BLUR_DIRECTION_MODE_BACKWARD,
  MOTION_BLUR_DIRECTION_MODE_CENTERED,
  MOTION_BLUR_DIRECTION_MODE_FORWARD,
  MOTION_BLUR_DIRECTION_MODE_COUNT
}
 
enum  VerifiableState {
  ALEMBIC_CACHE_COHERENCY = 0,
  VERIFIABLE_STATE_COUNT
}
 
typedef void(* DirectiveCallback )(ParserEntry *, OfItem *)
 
typedef bool(* VerifyStateCallback )(bool)
 
- Public Types inherited from EventObject
typedef void(* EventInfoFunction )(EventObject &, const EventInfo &, void *)
 
typedef void(EventObject::* EventInfoMethod )(EventObject &, const EventInfo &, void *)
 
typedef void(* EventFunction )(EventObject &, const CoreString &, void *)
 
typedef void(EventObject::* EventMethod )(EventObject &, const CoreString &, void *)
 

Public Member Functions

 AppObject (int argc, char **argv)
 
const AppConfigget_config () const
 
AppConfigget_config ()
 
virtual void set_preferences ()
 
bool populate_prefs () override
 
virtual void populate_project_prefs ()
 
const OfObjectFactoryget_factory () const override
 
OfObjectFactoryget_factory () override
 
const AppResourceManager & get_resources () const
 
AppResourceManager & get_resources ()
 
void scan_modules ()
 
void scan_modules (const CoreVector< CoreString > &folder_paths)
 
virtual CoreString get_application_header ()
 
AppSelectionget_selection ()
 
const AppSelectionget_selection () const
 
void unload_resources (const AppSelection &selection)
 
void unload_resources (const CoreVector< OfItem * > &selection)
 
void remove_items_from_selection (const CoreBasicArray< OfContext * > &contexts, const CoreBasicArray< OfObject * > &objects) override
 
double get_current_frame () const
 
double get_current_time () const
 
double get_evaluation_frame () const override
 
double get_evaluation_time () const override
 
double get_evaluation_quality () const override
 
AppBuiltinCommandsget_builtin_commands ()
 
virtual void clear_project ()
 
virtual void new_project ()
 
virtual bool load_startup_scene ()
 
virtual bool load_project (const CoreString &filename)
 
virtual bool save_project (const CoreString &filename, bool autosave=false)
 
virtual bool export_context_as_project (const CoreString &filename, const OfContext &context, bool include_dependencies=false)
 
virtual void preload_project_preferences (const ParserGroup &preferences)
 
virtual void load_project_preferences (const ParserGroup &preferences)
 
virtual void save_project_preferences (ParserGroup &preferences)
 
CoreString get_startup_scene_filename ()
 
AppPreferencesget_prefs (AppPreferences::Mode mode=AppPreferences::MODE_PROJECT)
 
const AppPreferencesget_prefs (AppPreferences::Mode mode=AppPreferences::MODE_PROJECT) const
 
bool get_use_in_place_parenting () const override
 
void set_use_in_place_parenting (const bool &enable) override
 
OfClassget_language_from_extension (const CoreString &extension) override
 Return the first language associated with the specified extension.
 
OfClassget_scripting_engine_from_extension (const CoreString &extension) override
 Return the first scripting engine associated with the specified extension.
 
void register_scripting_engine (const OfObject &engine_obj)
 
OfObjectretrieve_scripting_engine (const CoreString &engine_class_name)
 
OfObjectget_scripting_engine_object (const CoreString &engine_class_name)
 
bool run_single_script (const CoreString &script, CoreString &result) override
 
bool run_single_script (const CoreString &script) override
 
bool run_single_script (const SysFile &file, CoreString &result) override
 
bool run_single_script (const SysFile &file) override
 
bool request_temp_sub_folder (const CoreString &requested_name, CoreString &usable_path) override
 
CoreString get_temp_folder () const override
 
bool set_temp_folder (const CoreString &temp_folder)
 
const bool & is_managing_temp_folders () const
 
void set_managing_temp_folders (const bool &is_managing)
 
const CoreVector< CoreString > & get_search_paths () const override
 
void set_search_paths (const CoreVector< CoreString > &paths) override
 
virtual OfContextget_working_context () const
 
virtual void on_selection_change (const CoreString &group, const CoreString &slot)
 
virtual void on_working_context_change (const CoreString &slot, const OfContext *context)
 
void get_log_history (CoreVector< AppLogMessage > &log_msg) const
 
void set_enable_file_logging (const bool &enable)
 
void set_log_file_path (const CoreString &file_path)
 
void set_specified_log_file (const CoreString &file_path)
 
void set_log_file_policy (const unsigned int &policy)
 
void set_enable_verbose_log_file (const bool &enable)
 
virtual void set_previz_light_group (ModuleGroup *group)
 
const bool & get_enable_file_logging () const
 
const CoreStringget_log_file_path () const
 
const CoreStringget_specified_log_file () const
 
int get_log_file_policy () const
 
virtual const CoreBasicArray
< ModuleLight * > & 
get_previz_lights () const
 
virtual ModuleGroupget_previz_light_group () const
 
const unsigned int & get_selection_history_size () const
 
void set_selection_history_size (const unsigned int &size)
 
void set_current_frame_range (const double &range_min, const double &range_max)
 
void set_current_frame_range_min (const double &range_min)
 
void set_current_frame_range_max (const double &range_max)
 
const GMathVec2d & get_current_frame_range () const
 
void add_evaluator (AppEvaluator &evaluator, const AppBase::EvaluatorAddMode &mode, const AppBase::EvalFps &fps) override
 
void add_evaluator (AppEvaluator &evaluator, const double &priority, const AppBase::EvalFps &fps) override
 
void remove_evaluator (AppEvaluator &evaluator) override
 
void stop_evaluation (const bool &blocking=false) override
 
bool is_evaluating () const override
 
bool must_stop_evaluation () const override
 
bool is_evaluation_interrupted () const override
 
void clear_evaluation () override
 
unsigned int get_minimum_eval_time () const
 
void set_minimum_eval_time (const unsigned int &time_ms, const AppBase::EvalFps &fps)
 
bool is_minimum_time_elapsed () const
 
void add_to_event_loop (AppCallback cbk, void *data=0) override
 Add a callback that will be called at each iteration of the main loop. The data passed as argument is passed as argument of the callback. This method is thread safe.
 
void remove_from_event_loop (AppCallback cbk, void *data=0) override
 Remove the specified callback associated with the specified data. The callback will be removed only if the data matches the one given to the AppObject::add_to_event_loop() function. This method is thread safe.
 
void add_timer (const unsigned int &time_ms, AppCallback cbk, void *data=0, const bool &update=true) override
 Add a timer callback that will be called approximatively in the specified time. The data passed as argument is passed as argument of the callback. If you want to repeat the timer callback please use AppObject::repeat_timer(). This method is thread safe.
 
void repeat_timer (const unsigned int &time_ms, AppCallback cbk, void *data=0) override
 Call this method if you wish to repeat a previously added timer This method is thread safe.
 
void remove_timer (AppCallback cbk, void *data=0) override
 Remove the specified callback associated with the specified data. The callback will be removed only if the data matches the one given to the AppObject::add_timer() function. This method is thread safe.
 
virtual void run ()
 
void run_thread (SysThread &thread)
 Run a SysThread and manage its deletion.
 
const bool & is_started () const
 
const bool & is_running () const
 
const bool & is_quitting () const
 
void quit () override
 
void check_for_events () override
 Calls an iteration of the main loop by calling registered callbacks and launching pending evaluations.
 
void wait_for_events () override
 Wait for the first event in the main loop and do an iteration by calling registered callbacks and launching pending evaluations.
 
virtual void get_statistics (SysStatistic &stats) const
 gather application-wide statistic data (memory usage, objects count...)
 
CoreString get_project_statistics_as_string () const
 return a human readable string of the application-wide statistics
 
CoreString get_OIIO_statistics_as_string (int log_level) const
 return a human readable string of the application-wide statistics
 
CoreString get_all_statistics_as_string () const
 return a human readable string of the all application-wide statistics
 
bool add_statistic_logger (const CoreString &name, const LogCallback &log_callback, void *log_data)
 
void remove_statistic_logger (const CoreString &name)
 
CoreString get_statistics_log (const CoreString &name) const
 
int get_OIIO_statistics_log_level () const
 
void set_OIIO_statistics_log_level (int value)
 
void clear_texture_cache ()
 clears OpenImageIO cache
 
const OfContextget_current_context () const
 
void ls (const CoreString &path="") const
 
void cd (const CoreString &context_path="")
 
void init_directives () override
 
void add_directive (ParserEntry *entry, OfItem *item) override
 
void execute_directives () override
 
void set_texture_cache (const double &size) override
 
AppDialog inspect (OfObject &object, const AppDialog &default_value=AppDialog::ok(), const int &style=AppDialog::STYLE_OK, const CoreString &title="") const
 Displays the specified object contextually.
 
virtual AppDialog inspect (const CoreArray< OfObject * > &objects, const AppDialog &default_value=AppDialog::ok(), const int &style=AppDialog::STYLE_OK, const CoreString &title="") const
 Displays the specified objects contextually.
 
int get_argc () const
 Return the number of argument passed to the application.
 
char ** get_argv () const
 Return the command line argument sent to the application.
 
void set_current_project_filename (const CoreString &filename)
 
const CoreStringget_current_project_filename () const override
 
double get_current_project_version () const final
 
double get_current_object_framework_version () const final
 
const CoreArray< CoreString > & get_current_project_dependencies () const
 
CoreString import_project (const CoreString &filename, void *requester=0)
 
CoreArray< CoreStringimport_project (const CoreVector< CoreString > &filenames, void *requester=0)
 
bool export_render_archive (const CoreString &archive_filename)
 
void set_import_variables_mode (const OfImportOptions::VariableMode &mode)
 
const
OfImportOptions::VariableMode & 
get_import_variables_mode () const
 
void set_import_aov_mode (const OfImportOptions::AovMode &mode)
 
const OfImportOptions::AovMode & get_import_aov_mode () const
 
void enable_command_port (const bool &active=true)
 Enable or disable the command port.
 
bool is_command_port_active () const
 Return if the command port is active.
 
unsigned int get_command_port () const
 Return command port number.
 
void set_command_port (const unsigned int &port)
 Set the command port number. Changing value disconnects connected clients.
 
AppShelfget_shelf ()
 
bool reset_default_shelf (const bool &remove_all=true, const bool &use_env_config=true)
 
void clear_context_overrides (OfContext &context) override
 
void cleanup_context_overrides (OfContext &context) override
 
void create_override_set (OfContext &context) override
 
virtual void set_wait_mode (const bool &mode)
 
AppCopyBufferget_copy_buffer ()
 
bool check_filter_matches (const OfContext &base_context, const OfObject &object, const CoreString &filter) override
 Returns true if the incoming object name matches a text filter.
 
bool check_filter_matches (const OfContext &base_context, const CoreString &item_name, const CoreString &filter) override
 Returns true if the incoming object name matches a text filter.
 
bool check_filter_matches (const CoreString &prefix, const CoreString &str_value, const CoreString &filter) override
 Returns true if the incoming object name matches a text filter.
 
void get_matching_objects (CoreVector< OfObject * > &result, const CoreString &filter, const OfContext &base_context, const CoreBasicArray< CoreString > &filter_classes, const CoreBitFieldHelper &flags=OfItem::empty_flags_mask, const bool embedded_objects=false) override
 Get objects that match a text filter.
 
void get_matching_objects (CoreVector< OfObject * > &result, const CoreString &filter, const OfContext &base_context, const CoreString &filter_class="ProjectItem", const CoreBitFieldHelper &flags=OfItem::empty_flags_mask, const bool embedded_objects=false) override
 Get objects that match a text filter.
 
void get_matching_objects (CoreVector< OfObject * > &result, const CoreString &filter, const CoreString &filter_class="ProjectItem", const CoreBitFieldHelper &flags=OfItem::empty_flags_mask, const bool embedded_objects=false) override
 Get objects that match a text filter.
 
bool get_matching_contexts (CoreSet< OfContext * > &result, const CoreString &filter, const OfContext &base_context) override
 Get contexts that match a text filter.
 
bool is_experimental_features_enabled () const override
 
bool is_advanced_features_enabled () const override
 
void init_config (const bool &check_migration_config_file, const bool &force_migration=false)
 
void save_config () override
 
AppUnitsget_units (const AppUnits::Mode mode=AppUnits::MODE_PROJECT)
 
size_t get_memory_size () const override
 
virtual AppMainMenuget_main_menu ()
 
void check_migration_config_file (const bool &forced_import)
 
virtual void initialize_builtin_commands ()
 Provides a way to register builtin commands out of the constructor, then it is possible to use virtual method on this.
 
const bool & project_has_directives () const
 
virtual void copy (bool include_dependencies=false)
 
virtual void copy (const CoreVector< CoreString > &items_names, bool include_dependencies=false)
 
virtual void cut (const CoreVector< CoreString > &items_names, void *requester=0)
 
virtual void paste ()
 
virtual void paste (const bool &select, const CoreString &context_path, const CoreString &slot, void *requester=0)
 
CoreString get_scripting_command (const CoreString &command_id, const CoreBasicArray< OfCommandArgument > &arguments) override
 
CoreString get_default_integration_model () const
 
- Public Member Functions inherited from OfApp
const OfConfigget_config () const
 
OfConfigget_config ()
 
void register_directive (const CoreString &name, DirectiveCallback callback)
 
void add_directive (ParserEntry *entry, OfItem *item) override
 
const OfChannelManagerget_channel_manager () const
 
OfChannelManagerget_channel_manager ()
 
bool add_custom_variable (const CoreString &name, const CoreVariant &value, const OfAttr::Type type=OfAttr::TYPE_STRING)
 
bool append_custom_variable (const CoreString &name, const CoreString &value, const bool &replace_existing)
 
bool remove_custom_variable (const CoreString &name)
 
void clear_custom_variables ()
 
bool load_custom_variables (const CoreString &filename)
 
bool save_custom_variables (const CoreString &filename)
 
const OfCommandManagerget_command_manager () const
 
OfCommandManagerget_command_manager ()
 
void echo_command (bool value)
 
OfBatchCommandcreate_batch_command ()
 
void exec_batch_command (OfBatchCommand &cmd)
 
const unsigned int & get_history_size () const
 
void set_history_size (const unsigned int &size)
 
bool get_attr_auto_localize () const
 
void set_attr_auto_localize (const bool &value)
 
void set_reference_loading_mode (long mode)
 
ReferenceLoadingMode get_reference_loading_mode () const
 
const int & get_alembic_log_level () const
 
void set_alembic_log_level (const int &level)
 
const int & get_alembic_instance_detection () const
 
void set_alembic_instance_detection (const int &detection)
 
bool is_visible_object (const OfObject *obj) const
 Return true if the specified item should be displayed.
 
OfAttrValueManagerget_attr_value_manager () const
 
const OfNodalPositionManagerget_nodal_position_manager () const
 
OfNodalPositionManagerget_nodal_position_manager ()
 
bool add_progress_update_callback (void *data, ProgressUpdateCallback on_progress_update)
 This function registers a new progress update item.
 
void remove_progress_update_callback (void *data)
 Removes a progress update receiver.
 
void update_progress_receivers (const CoreString &object_name, const float &value)
 Notify all progress receivers that a progress value has changed.
 
size_t get_memory_size () const override
 
void declare_of_commands ()
 
void add_cam_attribute (const CoreVector< CoreString > &context_paths, const OfItem::AttrCreationParams &creation_params, const CoreString &cam_rule, const CoreString &cam_exclusion_rule, void *requester=0)
 
void edit_cam_attribute (const CoreVector< CoreString > &context_paths, const OfItem::AttrCreationParams &creation_params, const CoreString &cam_rule, const CoreString &cam_exclusion_rule, void *requester=0)
 
void add_cam_attribute (CoreVector< CoreString > &created_attrs, const CoreVector< CoreString > &context_paths, const CoreString &attr_name, const int &attr_type, const int &attr_container, const int &attr_visual_hint, const CoreString &group_name, const CoreString &cam_rule, void *requester=0)
 
void add_cam_attribute (CoreVector< CoreString > &created_attrs, const CoreVector< CoreString > &context_paths, const CoreString &attr_name, const int &attr_type, const int &attr_container, const int &attr_visual_hint, const CoreString &group_name, const CoreString &cam_rule, const CoreString &cam_exclusion_rule, void *requester=0)
 
void edit_cam_attribute (CoreVector< CoreString > &created_attrs, const CoreVector< CoreString > &attr_paths, const CoreString &attr_name, const int &attr_type, const int &attr_container, const int &attr_vh, const CoreString &group_name, const CoreString &cam_rule, void *requester=0)
 
void edit_cam_attribute (CoreVector< CoreString > &created_attrs, const CoreVector< CoreString > &attr_paths, const CoreString &attr_name, const int &attr_type, const int &attr_container, const int &attr_vh, const CoreString &group_name, const CoreString &cam_rule, const CoreString &cam_exclusion_rule, void *requester=0)
 
void remove_cam_attribute (const CoreBasicArray< CoreString > &attr_paths, void *requester=0)
 
void remove_all_cam_attributes (const CoreBasicArray< CoreString > &context_paths, void *requester=0)
 
void edit_cam_rule (const CoreBasicArray< CoreString > &attr_paths, const CoreString &cam_rule, void *requester=0)
 
void edit_cam_rule (const CoreBasicArray< CoreString > &attr_paths, const CoreString &cam_rule, const CoreString &cam_exclusion_rule, void *requester=0)
 
void disable_cam (const CoreBasicArray< CoreString > &attr_paths, const bool &disabled, void *requester=0)
 
void save_cam_set (const CoreString &context_path, void *requester=0)
 
void save_cam_set (const CoreBasicArray< CoreString > &context_paths, const CoreString &target_context_path, void *requester=0)
 
void load_cam_set (const CoreBasicArray< CoreString > &context_paths, const CoreString &cam_set, void *requester=0)
 
virtual bool retrieve_context (const CoreString &top_context, CoreString &retrieved_context, const CoreString &picker_title="")
 
virtual bool retrieve_object (const CoreString &top_context, const CoreString &class_name, CoreString &retrieved_object, const CoreString &picker_title="")
 
- Public Member Functions inherited from AppBase
const Type & get_type () const
 
const SysThreadId * get_thread_id () const
 
bool is_app_thread () const
 Return true if our execution context is the same as app thread (main loop)
 
SysThreadManagerget_thread_manager () const
 
const unsigned int & get_max_thread_count () const
 gets maximum current machine threads
 
const unsigned int & get_thread_count () const
 gets maximum application threads
 
virtual void set_thread_count (const unsigned int &thread_count)
 sets application thread count
 
void run_thread_task (SysThreadTask &task, const bool &auto_delete=true, const bool &is_preemptible=false)
 adds a task to task manager
 
unsigned long get_runtime () const
 Get elapsed time since application started.
 
virtual void awake (AppCallback callback, void *data)
 
CoreString resolve_path (const CoreString &file_path) const
 
CoreVector< CoreStringresolve_paths (const CoreBasicArray< CoreString > &file_paths, bool verbose=false) const
 
virtual const LicenseInfo & get_license () const
 Return the application license.
 
virtual CoreString get_name () const
 Return the application name from the license.
 
virtual CoreString get_vendor () const
 
AppProgressBarcreate_progress_bar (const CoreString &text, const bool &keep_in_history=true, const bool &is_abortable=false)
 Create a new progress bar and returns it.
 
void flush_progress_bars ()
 Removes all progress bars.
 
void clear_progress_bars_history ()
 Clears progress bars history.
 
const unsigned int & get_progress_bars_count () const
 Returns the number of progress bars.
 
const float & get_progress_bar_value (const unsigned int &id) const
 Returns value of progress bar by id.
 
const CoreStringget_progress_bar_text (const unsigned int &id) const
 Returns progress bar text by id.
 
bool is_progress_bar_abortable (const unsigned int &id) const
 
bool is_progress_bar_aborted (const unsigned int &id) const
 
bool abort_progress_bar (const unsigned int &id)
 Tells the progress bar to abort the monitored process.
 
const float & get_progress_bars_average () const
 Returns the average value of all progress bars.
 
const unsigned int & get_old_progress_bars_count () const
 Returns the amount of progress bars in history.
 
const CoreStringget_old_progress_bar_text (const unsigned int &id) const
 Returns text of progress bar in history by id.
 
const unsigned long & get_old_progress_bar_duration (const unsigned int &id) const
 Returns how long lasted history progress bar by id.
 
const AccelerationMode & get_acceleration_mode () const
 
void set_acceleration_mode (const AccelerationMode &mode)
 
const DisplacementStorageMode & get_displacement_storage_mode () const
 
void set_displacement_storage_mode (const DisplacementStorageMode &mode)
 
const int & get_default_virtual_key_interpolation_type () const
 
const int & get_default_key_interpolation_type () const
 
void set_default_virtual_key_interpolation_type (const int &type)
 
void set_default_key_interpolation_type (const int &type)
 
const bool & get_timeline_keyframes_display () const
 
void set_timeline_keyframes_display (const bool &mode)
 
const unsigned int & get_motion_blur_sample_count () const
 
const int & get_motion_blur_direction () const
 
const double & get_motion_blur_length () const
 
const bool & get_openVDB_delayed_load () const
 
const bool & get_openVDB_use_file_size_max () const
 
const unsigned int & get_openVDB_file_max_size () const
 
const unsigned int & get_application_geometry_subdivision_mode () const
 
const unsigned int & get_project_geometry_subdivision_mode () const
 
const double & get_texture_cache () const
 
const unsigned int & get_application_projection_master_eye ()
 
const unsigned int & get_project_projection_master_eye ()
 
void set_motion_blur_sample_count (const unsigned int &sample_count)
 
void set_motion_blur_direction (const int &direction)
 
void set_motion_blur_length (const double &length)
 
void set_openVDB_delayed_load (const bool &openVDB_delayed_load)
 
void set_openVDB_file_max_size (const unsigned int &file_max_size)
 
void set_openVDB_use_file_max_size (const unsigned int &use_file_max_size)
 
void set_application_geometry_subdivision_mode (const unsigned int &subdivision_mode)
 
void set_project_geometry_subdivision_mode (const unsigned int &subdivision_mode)
 
const unsigned int & get_application_geometry_visibility_mode () const
 
const unsigned int & get_project_geometry_visibility_mode () const
 
void set_application_geometry_visibility_mode (const unsigned int &visibility_mode)
 
void set_project_geometry_visibility_mode (const unsigned int &visibility_mode)
 
void set_application_projection_master_eye (const unsigned int &projection_master_eye)
 
void set_project_projection_master_eye (const unsigned int &projection_master_eye)
 
void set_OIIO_statistics_log_level (int value)
 
int get_OIIO_statistics_log_level () const
 
const int & get_curve_size_mode () const
 
void set_curve_size_mode (const int &mode)
 
const int & get_file_browser_mode () const
 
void set_file_browser_mode (const int &mode)
 
const int & get_objects_uicolor_mode () const
 
void set_objects_uicolor_mode (const int &mode)
 
const InputDeviceMode & get_input_device_mode ()
 
void set_input_device_mode (const InputDeviceMode &mode)
 
const double & get_gizmo_size () const
 
void set_gizmo_size (const double &size)
 
virtual CoreArray< CoreStringget_favorites_folders () const
 
virtual bool add_favorites_folders (const CoreString &path)
 
virtual bool remove_favorites_folders (const CoreString &path)
 
virtual bool remove_favorites_folders (const unsigned int &index)
 
virtual bool rename_favorites_folders (const CoreString &old_path, const CoreString &new_path)
 
virtual bool rename_favorites_folders (const unsigned int &index, const CoreString &new_path)
 
const bool & get_use_ocio_config_file () const
 
const CoreStringget_ocio_config_file () const
 
const CoreStringget_cdl_library_file () const
 
const CoreStringget_color_space_mapping_config_file () const
 
const bool & get_auto_detect_color_space () const
 
const CoreStringget_scene_color_space_name () const
 
void set_use_ocio_config_file (const bool &enable)
 
void set_ocio_config_file (const CoreString &path)
 
void set_cdl_library_file (const CoreString &path)
 
void set_color_space_mapping_config_file (const CoreString &path)
 
void set_auto_detect_color_space (const bool &enable)
 
void set_scene_color_space (const CoreString &name)
 
virtual void set_default_view_transform (CoreBasicString view_transform)
 
virtual const CoreStringget_default_view_transform () const
 
virtual void set_default_display_color_space (const CoreString &name)
 
virtual const CoreStringget_default_display_color_space_name () const
 
virtual void set_color_picker_color_space (const CoreString &name)
 
virtual const CoreStringget_color_picker_color_space_name (const bool real_value=false) const
 
bool get_use_color_space_mapping_on_save () const
 
void set_use_color_space_mapping_on_save (const bool &enable)
 
const bool & get_use_aov_config_file () const
 
const CoreStringget_aov_config_file () const
 
void set_use_aov_config_file (const bool &enable)
 
void set_aov_config_file (const CoreString &path)
 
const bool & get_use_resolution_preset_config_file () const
 
const CoreStringget_resolution_preset_config_file () const
 
void set_use_resolution_preset_config_file (const bool &enable)
 
void set_resolution_preset_config_file (const CoreString &path)
 
const int & get_combine_pivot_location () const
 
void set_combine_pivot_location (const int &mode)
 
const bool & enable_output_file_buffering () const
 
void set_enable_output_file_buffering (const bool &enable)
 
const int & get_image_output_file_type () const
 
void set_image_output_file_type (const int &output_file_type)
 
const int & get_openexr_compression_method () const
 
void set_openexr_compression_method (const int &compression_method)
 
void set_openexr_compression_error (const double &compression_error)
 
const double & get_openexr_compression_error () const
 
const int & get_deep_output_channels () const
 
const bool & get_deep_output_raw_samples () const
 
const int & get_deep_output_file_type () const
 
const int & get_deep_output_data_precision () const
 
const int & get_deep_output_max_sample_count () const
 
void set_deep_output_channels (const int &channels)
 
void set_deep_output_raw_samples (const bool &raw_samples)
 
void set_deep_output_file_type (const int &deep_output_file_type)
 
void set_deep_output_data_precision (const int &deep_output_data_precision)
 
void set_deep_output_max_sample_count (const int &deep_output_max_sample_count)
 
const bool & output_aovs_in_all_format () const
 
void set_output_aovs_in_all_format (const bool &output_aovs)
 
const bool & split_aovs_in_separate_files () const
 
void set_split_aovs_in_separate_files (const bool &split_aovs)
 
const bool & disable_rgba_in_output () const
 
void set_disable_rgba_in_output (const bool &disable_rgba)
 
ComponentFactoryget_component_factory ()
 
SysThreadTaskManagerget_task_manager () const
 
virtual AppDialog message_box (const CoreString &message, const CoreString &title="Information", const AppDialog &default_value=AppDialog::ok(), const int &style=AppDialog::STYLE_OK, int *geometry=0, const CoreVector< CoreString > &list=CoreVector< CoreString >()) const
 Displays a message box.
 
void register_directive (const CoreString &name, DirectiveCallback callback)
 
void log_error (const CoreString &message)
 
void log_info (const CoreString &message)
 
void log_warning (const CoreString &message)
 
virtual void enable ()
 
virtual void disable ()
 
virtual bool is_enabled () const
 
bool is_disabled () const
 
void * get_app_base_impl () const
 
SysWatchget_application_idle_watch ()
 
unsigned long get_application_idle_time ()
 
CoreString get_version () const
 
CoreString get_version_name () const
 
unsigned int get_version_number () const
 
CoreString get_launching_directory () const
 
bool verify_state (VerifiableState state, bool resolve_if_unsafe)
 
void register_verification_callback_for_state (VerifiableState state, VerifyStateCallback callback)
 
- Public Member Functions inherited from EventObject
 EventObject ()
 Constructor.
 
 EventObject (const EventObject &src)
 Copy Constructor.
 
virtual ~EventObject ()
 Destructor.
 
void connect (EventObject &sender, const CoreString &event_id, EventMethod event_cb, void *data=0)
 Connects this to an object to listen to a specific event.
 
void connect (EventObject &sender, EventMethod event_cb, void *data=0)
 Connects this to an object to listen any of its events.
 
void raise_event (const CoreString &event_id) const
 sends an event
 
void connect (EventObject &sender, const CoreString &event_id, EventInfoMethod event_cb, void *data=0)
 Connects this to an object to listen to a specific event.
 
void connect (EventObject &sender, EventInfoMethod event_cb, void *data=0)
 Connects this to an object to listen any of its events.
 
void raise_event (const EventInfo &event_info) const
 sends an event
 
bool disconnect_all (EventObject &sender)
 Disconnects from all objects sender was listening on.
 
void disconnect_all ()
 Disconnects from all objects we were listening on.
 
void remove_all_connection ()
 Disconnects object from other objects it is listening to, and also disconnects all objects listening to it.
 
bool is_connected (EventObject &sender, const CoreString &event_id, void *data)
 
void set_mute (const bool &mute)
 Asks for object muting. This will increase or decrease the muting counter. Unmuting may not be immediat since it will happen only when counter reaches 0.
 
bool is_mute () const
 Returns if object is muted.
 
bool disconnect (EventObject &sender, const CoreString &event_id, EventMethod event_cb, void *data=0)
 Disconnects this from an object for a specific event.
 
bool disconnect (EventObject &sender, const CoreString &event_id, EventInfoMethod event_cb, void *data=0)
 
unsigned int get_sender_count () const
 
unsigned int get_receiver_count () const
 
- Public Member Functions inherited from CoreCustomData
 CoreCustomData (const CoreCustomData &src)
 
void add_custom_data (void *key, const bool &data)
 
void add_custom_data (void *key, const int &data)
 
void add_custom_data (void *key, const unsigned int &data)
 
void add_custom_data (void *key, const char *data)
 
void add_custom_data (void *key, const CoreString &data)
 
void add_custom_data (void *key, const double &data)
 
void add_custom_data (void *key, void *data)
 
void remove_custom_data (void *key)
 
void remove_all_custom_data ()
 
void set_custom_data (void *key, const bool &data)
 
void set_custom_data (void *key, const int &data)
 
void set_custom_data (void *key, const unsigned int &data)
 
void set_custom_data (void *key, const double &data)
 
void set_custom_data (void *key, const char *data)
 
void set_custom_data (void *key, const CoreString &data)
 
void set_custom_data (void *key, void *data)
 
void get_custom_data (void *key, bool &data) const
 
void get_custom_data (void *key, int &data) const
 
void get_custom_data (void *key, unsigned int &data) const
 
void get_custom_data (void *key, double &data) const
 
void get_custom_data (void *key, CoreString &data) const
 
void get_custom_data (void *key, void *&data) const
 
- Public Member Functions inherited from CoreBaseObject
bool is_kindof (const CoreBaseObject &object) const
 
CoreString get_class_info_name () const
 
CoreString get_class_interface () const
 
const unsigned long & get_class_info_id () const
 
bool is_kindof (const CoreClassInfo &cinfo) const
 
virtual const CoreClassInfoget_class_info () const
 
bool operator== (const CoreBaseObject &obj) const
 
template<class T >
T * cast ()
 
template<class T >
const T * cast () const
 
- Public Member Functions inherited from CoreBaseType
bool is_kindof (const CoreClassInfo &cinfo) const
 
bool operator== (const CoreBaseType &obj) const
 

Static Public Member Functions

static const char * get_scripting_python_engine_error ()
 
static CoreString get_legacy_config_file_for_migration (const CoreString &filename, bool create_folder)
 
static void initialize_previz_physical_lights (OfObject *previz_light_set)
 
- Static Public Member Functions inherited from OfApp
static CoreString get_project_header ()
 return current project header This should be used if you want to serialize a Clarisse project.
 
static void process_expressions (void)
 
static OfCommandget_batch_command (void *data, const CoreArray< OfCommandArgument > &args)
 
- Static Public Member Functions inherited from AppBase
static const char * get_type_name (const Type &type)
 
static const char * get_evaluator_add_mode (EvaluatorAddMode &mode)
 
static const char * get_acceleration_mode (const AccelerationMode &mode)
 
static const char * get_acceleration_mode_human (const AccelerationMode &mode)
 
static const char * get_displacement_storage_mode (const DisplacementStorageMode &mode)
 
static const char * get_displacement_storage_mode_human (const DisplacementStorageMode &mode)
 
static const char * get_eval_fps (const EvalFps &fps)
 
static const char * get_curve_size_mode_name (const CurveSizeMode &mode)
 
static const char * get_file_browser_mode_name (const FileBrowserMode &mode)
 
static const char * get_object_uicolor_mode_name (const ObjectUicolorMode &mode)
 
static const char * get_input_device_mode_name (const InputDeviceMode &mode)
 
static const char * get_motion_blur_direction_mode_name (const MotionBlurDirectionMode &mode)
 
static int get_motion_blur_direction_mode_value (const MotionBlurDirectionMode &mode)
 
static MotionBlurDirectionMode get_motion_blur_direction_mode_from_value (const int &motion_blur_value)
 
static MotionBlurDirectionMode get_motion_blur_direction_mode_by_name (const CoreString &_mode)
 
static bool exists ()
 return true if an application exists. If true, this means an application has already been created.
 
- Static Public Member Functions inherited from EventObject
static void connect (EventObject &sender, const CoreString &event_id, EventObject &receiver, EventMethod event_cb, void *data=0)
 Static version of the above function.
 
static void connect (EventObject &sender, EventObject &receiver, EventMethod event_cb, void *data=0)
 Static version of the above function.
 
static void connect (EventObject &sender, const CoreString &event_id, EventObject &receiver, EventInfoMethod event_cb, void *data=0)
 Static version of the above function.
 
static void connect (EventObject &sender, EventObject &receiver, EventInfoMethod event_cb, void *data=0)
 Static version of the above function.
 
static void raise_event (EventObject &sender, const CoreString &event_id)
 Sends an event.
 
static void raise_event (EventObject &sender, const EventInfo &event_info)
 Sends an event.
 
static void connect (EventObject &sender, const CoreString &event_id, EventFunction event_cb, void *data=0)
 Connects to an object to listen to a specific event.
 
static void connect (EventObject &sender, EventFunction event_cb, void *data=0)
 Connects to an object to listen any of its events.
 
static void connect (EventObject &sender, const CoreString &event_id, EventInfoFunction event_cb, void *data=0)
 Connects to an object to listen to a specific event.
 
static void connect (EventObject &sender, EventInfoFunction event_cb, void *data=0)
 Connects to an object to listen any of its events.
 
static bool disconnect (EventObject &sender, const CoreString &event_id, EventFunction event_cb, void *data=0)
 Disconnects this from an object for a specific event.
 
static bool disconnect (EventObject &sender, const CoreString &event_id, EventInfoFunction event_cb, void *data=0)
 
- Static Public Member Functions inherited from CoreCustomData
static void * get_custom_data_key (const CoreString &key)
 
- Static Public Member Functions inherited from CoreBaseObject
static const CoreClassInfoclass_info ()
 
static bool ___class_destructor__ (void *instance, const bool &is_array)
 
template<class T >
static T * cast (CoreBaseObject *object)
 
template<class T >
static const T * cast (const CoreBaseObject *object)
 
- Static Public Member Functions inherited from CoreBaseType
static bool ___class_destructor__ (void *instance, const bool &is_array)
 
static const CoreClassInfoclass_info ()
 

Protected Member Functions

void run_start ()
 
void run_loop (const bool &blocking)
 
virtual void run_end ()
 
void cleanup_temp_folders ()
 
virtual void on_start ()
 
virtual void on_wait (unsigned int time_ms)
 
virtual void on_quit ()
 
virtual void on_init_start_object_factory ()
 
virtual void on_add_new_module (const OfClass &module)
 
virtual void on_init_end_object_factory ()
 
void track_resources ()
 
const bool & is_ple_project () const
 
void set_is_ple_project (const bool &value)
 
void launch_pending_evaluations ()
 
void create_defaults_objects (OfObject &prefs)
 
virtual bool start_command_port ()
 
bool scripting_python_engine_object_exists () const
 
ModuleScriptingget_scripting_module ()
 
CoreString add_working_directory_to_path (const CoreString &p)
 
virtual void sync_project_prefs_from_app_prefs ()
 
- Protected Member Functions inherited from OfApp
DirectiveCallback get_directive_callback (const CoreString &name) const
 
- Protected Member Functions inherited from AppBase
AppDialog message_box (const Type &type, const CoreString &message, const CoreString &title, const AppDialog &default_value, const int &style, int *geometry, const CoreVector< CoreString > &list) const
 Displays a message box.
 
virtual void progress_update ()
 
void set_type (const Type &type)
 
DirectiveCallback get_directive_callback (const CoreString &name) const
 

Static Protected Member Functions

static OfCommandcreate_import_project (void *data, const CoreArray< OfCommandArgument > &args)
 
static OfCommandcreate_merge_project (void *data, const CoreArray< OfCommandArgument > &args)
 

Friends

class AppPreferences
 
class Clarisse
 
class CNodeApp
 
class AppObjectImpl
 

Additional Inherited Members

- Protected Attributes inherited from OfApp
OfConfigm_config
 

Detailed Description

Application base class containing commands, managing project load and save and some low level application settings.

Member Function Documentation

void AppObject::add_timer ( const unsigned int &  time_ms,
AppCallback  cbk,
void *  data = 0,
const bool &  update = true 
)
overridevirtual

Add a timer callback that will be called approximatively in the specified time. The data passed as argument is passed as argument of the callback. If you want to repeat the timer callback please use AppObject::repeat_timer(). This method is thread safe.

Note
The method assumes the validity of the data passed as argument. If the data is deleted you must have removed the timer before deleting the data otherwise the data passed in the callback will be corrupted.
Parameters
time_msAppromative elapsed time in milliseconds before the callback gets called.
cbkCallback to be called
datablind data passed as argument of the specifed callback
updatewhen true, checks if the timer already exists and update its time

Reimplemented from AppBase.

void AppObject::add_to_event_loop ( AppCallback  cbk,
void *  data = 0 
)
overridevirtual

Add a callback that will be called at each iteration of the main loop. The data passed as argument is passed as argument of the callback. This method is thread safe.

Note
The method assumes the validity of the data passed as argument. If the data is deleted you must have removed the timer before deleting the data otherwise the data passed in the callback will be corrupted.
Parameters
cbkCallback to be called
datablind data passed as argument of the specifed callback

Reimplemented from AppBase.

bool AppObject::check_filter_matches ( const OfContext base_context,
const OfObject object,
const CoreString filter 
)
overridevirtual

Returns true if the incoming object name matches a text filter.

Parameters
[in]base_contextcontext to start looking from, if filter is relative (starts with ./ )
[in]objectto apply filter on
[in]filterstring filter which can contains wildcards '*'. Can start with './' to be relative to base_context or with "world://" to use kinematic (parenting) hierarchy instead of contexts.
Returns
true if object matches the filter, false otherwise

Implements OfApp.

bool AppObject::check_filter_matches ( const OfContext base_context,
const CoreString item_name,
const CoreString filter 
)
overridevirtual

Returns true if the incoming object name matches a text filter.

Parameters
[in]base_contextcontext to start looking from, if filter is relative (starts with ./ )
[in]item_nameitem name to apply filter on
[in]filterstring filter which can contains wildcards '*'. Can start with './' to be relative to base_context.
Returns
true if object matches the filter, false otherwise

Implements OfApp.

bool AppObject::check_filter_matches ( const CoreString prefix,
const CoreString str_value,
const CoreString filter 
)
overridevirtual

Returns true if the incoming object name matches a text filter.

Parameters
[in]prefixstring prefix to start looking from, if filter is relative (starts with ./ )
[in]str_valuestring to apply filter on
[in]filterstring filter which can contains wildcards '*'. Can start with './' to be relative to prefix
Returns
true if str_value matches the filter, false otherwise

Implements OfApp.

void AppObject::cleanup_temp_folders ( )
protected

Delete all temporary folders created by the application, only if temporary folder management is enabled. Do if disabled.

This function should only be called when exiting the application and never during the lifetime of the application.

bool AppObject::export_context_as_project ( const CoreString filename,
const OfContext context,
bool  include_dependencies = false 
)
virtual

Export a context to a project file.

Parameters
filenameOutput project filename.
contextContext to export.
include_dependenciesIf true context dependencies are also exported, if false only the context is exported.
Returns
true on success, false otherwise.
int AppObject::get_argc ( ) const

Return the number of argument passed to the application.

Parameters
threadthread to run
OfClass * AppObject::get_language_from_extension ( const CoreString extension)
overridevirtual

Return the first language associated with the specified extension.

Parameters
extensionExtension as string. For example "py" for python.
Returns
The language class or Null if no matching one is found.

Implements OfApp.

bool AppObject::get_matching_contexts ( CoreSet< OfContext * > &  result,
const CoreString filter,
const OfContext base_context 
)
overridevirtual

Get contexts that match a text filter.

Parameters
[in]filterstring filter which can contains wildcards '*'.
[in]base_contextbase context, used only if the filter is relative.
Returns
true if the filter is valid, false otherwise

Implements OfApp.

void AppObject::get_matching_objects ( CoreVector< OfObject * > &  result,
const CoreString filter,
const OfContext base_context,
const CoreBasicArray< CoreString > &  filter_classes,
const CoreBitFieldHelper flags = OfItem::empty_flags_mask,
const bool  embedded_objects = false 
)
overridevirtual

Get objects that match a text filter.

Parameters
[in]filterstring filter which can contains wildcards '*'. Can start with './' to be relative to base_context or with "world://" to use kinematic (parenting) hierarchy instead of contexts.
[in]base_contextcontext to start looking from, if filter is relative (starts with ./ )
[in]filter_classesclass names to filter results with (result will only contains objects from these classes).
[in]embedded_objectsspecifies to consider or not embedded objects

Implements OfApp.

void AppObject::get_matching_objects ( CoreVector< OfObject * > &  result,
const CoreString filter,
const OfContext base_context,
const CoreString filter_class = "ProjectItem",
const CoreBitFieldHelper flags = OfItem::empty_flags_mask,
const bool  embedded_objects = false 
)
overridevirtual

Get objects that match a text filter.

Parameters
[in]filterstring filter which can contains wildcards '*'. Can start with './' to be relative to base_context or with "world://" to use kinematic (parenting) hierarchy instead of contexts.
[in]base_contextcontext to start looking from, if filter is relative (starts with ./ )
[in]filter_classclass name to filter results with (result will only contains objects from this class).
[in]embedded_objectsspecifies to consider or not embedded objects

Implements OfApp.

void AppObject::get_matching_objects ( CoreVector< OfObject * > &  result,
const CoreString filter,
const CoreString filter_class = "ProjectItem",
const CoreBitFieldHelper flags = OfItem::empty_flags_mask,
const bool  embedded_objects = false 
)
overridevirtual

Get objects that match a text filter.

Parameters
[in]filterstring filter which can contains wildcards '*'. Can start with './' to be relative to base_context or with "world://" to use kinematic (parenting) hierarchy instead of contexts.
[in]filter_classclass name to filter results with (result will only contains objects from this class).
[in]embedded_objectsspecifies to consider or not embedded objects

Implements OfApp.

OfClass * AppObject::get_scripting_engine_from_extension ( const CoreString extension)
overridevirtual

Return the first scripting engine associated with the specified extension.

Parameters
extensionExtension as string. For example "py" for python.
Returns
The scripting engine class or Null if no matching one is found.

Implements OfApp.

OfObject * AppObject::get_scripting_engine_object ( const CoreString engine_class_name)

Get the unique (singleton-like) OfObject for the requested scripting engine OfClass name.

Parameters
engine_class_nameName of the OfClass of the requested scripting engine.
Returns
Pointer to the scripting engine OfObject if found, nullptr otherwise.
ModuleScripting * AppObject::get_scripting_module ( )
protected

Get the ScriptingPython engine's module.

Returns
The module's pointer if the engine exists, nullptr otherwise.
const char * AppObject::get_scripting_python_engine_error ( )
static

Get the error message to show when the ScriptingPython engine failed to be loaded/initialized.

This message is shown by Clarisse or CNode if the ScriptingPython moodule couldn't be loaded, or by the module itself if it was loaded but fails to be initialized.

void AppObject::get_statistics ( SysStatistic stats) const
virtual

gather application-wide statistic data (memory usage, objects count...)

  • stats the gathered statistic data

Reimplemented in GuiApp.

CoreString AppObject::get_temp_folder ( ) const
overridevirtual

Get the application's temporary folder (i.e. the "root" temp folder) that was specified by the user in the preferences or in the command line args.

This is not the working temporary folder. Use request_temp_sub_folder if you need a new temporary sub-folder to create temporary files for the application session.

Returns
The path of the current application's temporary folder.

Reimplemented from AppBase.

AppDialog AppObject::inspect ( OfObject object,
const AppDialog default_value = AppDialog::ok(),
const int &  style = AppDialog::STYLE_OK,
const CoreString title = "" 
) const

Displays the specified object contextually.

Parameters
objectto inspect
default_valuedefault return value
stylereturn style. See (AppDialog::Style)
Returns
User input value if applicable
AppDialog AppObject::inspect ( const CoreArray< OfObject * > &  objects,
const AppDialog default_value = AppDialog::ok(),
const int &  style = AppDialog::STYLE_OK,
const CoreString title = "" 
) const
virtual

Displays the specified objects contextually.

Parameters
objectsarray of objects to inspect
default_valuedefault return value
stylereturn style. See (AppDialog::Style)
Returns
User input value if applicable
void AppObject::register_scripting_engine ( const OfObject engine_object)

Register a Scripting engine in the "Default Scripting Engine" preferences presets.

Parameters
engine_objectThe OfObject of the new scripting engine to be registered.
void AppObject::remove_from_event_loop ( AppCallback  cbk,
void *  data = 0 
)
overridevirtual

Remove the specified callback associated with the specified data. The callback will be removed only if the data matches the one given to the AppObject::add_to_event_loop() function. This method is thread safe.

Note
The method assumes the validity of the data passed as argument. If the data is deleted you must have removed the callback before deleting the data otherwise the data passed in the callback will be corrupted.
Parameters
cbkCallback that was added using AppObject::add_to_event_loop()
datablind data that was passed as argument of the specifed callback during the GuiApp::add_to_event_loop call.

Reimplemented from AppBase.

void AppObject::remove_timer ( AppCallback  cbk,
void *  data = 0 
)
overridevirtual

Remove the specified callback associated with the specified data. The callback will be removed only if the data matches the one given to the AppObject::add_timer() function. This method is thread safe.

Note
The method assumes the validity of the data passed as argument. If the data is deleted you must have removed the timer before deleting the data otherwise the data passed in the callback will be corrupted.
Parameters
cbkCallback that was added using AppObject::add_timer()
datablind data that was passed as argument of the specifed callback during the GuiApp::add_timer call.

Reimplemented from AppBase.

void AppObject::repeat_timer ( const unsigned int &  time_ms,
AppCallback  cbk,
void *  data = 0 
)
overridevirtual

Call this method if you wish to repeat a previously added timer This method is thread safe.

Parameters
time_msAppromative elapsed time in milliseconds before the callback gets called.
cbkCallback that was added using AppObject::add_timer()
datablind data that was passed as argument of the specifed callback during the AppObject::add_timer call.

Reimplemented from AppBase.

bool AppObject::request_temp_sub_folder ( const CoreString requested_name,
CoreString usable_path 
)
overridevirtual

Create a new folder under the application's current temporary folder with the requested name, or get the existing one if already created.

The newly created sub-folder will be tracked by the application and deleted automatically on exit.

Parameters
requested_nameRequested name for the sub-folder to be created.
usable_pathOutput full path of the created, or existing, sub-folder, on success. Unchanged on failure.
Returns
true if the sub-folder was successfully created or found, false on failure.

Implements AppBase.

void AppObject::run_thread ( SysThread thread)

Run a SysThread and manage its deletion.

Parameters
threadthread to run
bool AppObject::scripting_python_engine_object_exists ( ) const
protected

Returns true if the engine OfObject for "ScriptingPython" exists in the list of known scripting engines.

void AppObject::set_managing_temp_folders ( const bool &  is_managing)

Enable or disable temporary folder management.

Once enabled, it can't be disabled at runtime. Therefore the enabled status must be set during application initialization.

Parameters
is_managingtrue to enable, false to disable.
bool AppObject::set_temp_folder ( const CoreString input_new_folder)

Set the application temporary folder (preference entry "temp_folder").

The input folder path is the parent folder of the final temporary sub-folder that will be created.

The event EVT_ID_APPLICATION_TEMP_FOLDER_CHANGED is sent only if the new folder is different than the previous one.

Parameters
input_new_folderNew temporary folder to be used by the application. Must exist.
  • If the folder does not exist, an error is logged.
  • If the folder exists but isn't writable, a warning is logged and the application fall-backs to the the default temporary path and uses it.
Returns
true if the new folder was successfuly set, false otherwise.