ITK Function Reference

(V10000.1.0.60_20160308.00)
Data Structures | Typedefs | Enumerations
preferences.h File Reference
#include <unidefs.h>
#include <tc/libtc_exports.h>
#include <tc/libtc_undef.h>

Go to the source code of this file.

Data Structures

struct  PREF_preference_context_values_t
 
struct  PREF_preference_definition_t
 
struct  PREF_preference_object_t
 

Typedefs

typedef enum PREF_import_actions_e PREF_import_actions_t
 
typedef struct
PREF_preference_context_values_t
PREF_preference_context_values_p_t
 
typedef struct
PREF_preference_definition_t
PREF_preference_definition_p_t
 
typedef struct
PREF_preference_object_t
PREF_preference_object_p_t
 
typedef enum PREF_preference_type_e PREF_preference_type_t
 
typedef enum
TC_preference_search_scope_e 
TC_preference_search_scope_t
 

Enumerations

enum  PREF_import_actions_e { PREF_import_action_skip, PREF_import_action_override, PREF_import_action_merge }
 
enum  PREF_preference_type_e {
  PREF_preference_string, PREF_preference_logical, PREF_preference_integer, PREF_preference_double,
  PREF_preference_date
}
 
enum  TC_preference_search_scope_e {
  TC_preference_all, TC_preference_user, TC_preference_role, TC_preference_group,
  TC_preference_site, TC_preference_system, TC_preference_cots_location, TC_preference_overlay_location,
  TC_preference_env_variable_location
}
 

Functions

Initialization of Preferences module
TC_API int PREF_initialize (void)
 
TC_API int PREF_reinitialize ()
 
Preferences Protection Scope

The protection scope defines the lowest-level of users allowed to provide a value (e.g. create an instance of the preference). This can be modified only by a system administrator.
Possible values are:

  • TC_preference_user: all users are allowed to provide a value. Instances can be created at the User, Role, Group and Site levels.
  • TC_preference_role: only system and group administrators can provide a value. Instances can be created at the Role, Group and Site levels only.
  • TC_preference_group: only system and group administrators can provide a value. Instances can be created at the Group and Site levels only.
  • TC_preference_site: only system administrators can provide a value. Instances can be only created at the Site level.
  • TC_preference_system: Same restrition as for TC_preference_site. However, the protection scope cannot be modified by a system administrator.
TC_API int PREF_ask_protection_scope (const char *preference_name, TC_preference_search_scope_t *protection_scope)
 
TC_API int PREF_ask_protection_scopes (int preference_count, const char **preference_names, TC_preference_search_scope_t **protection_scopes)
 
TC_API int PREF_set_protection_scope (const char *preference_name, TC_preference_search_scope_t protection_scope)
 
TC_API int PREF_set_protection_scopes (int preference_count, const char **preference_names, TC_preference_search_scope_t protection_scopes[])
 
Preferences Environment Enabled Information

The Environment Enabled flag determines if a preference value can be retrieved from a system environment value.
If set to true, the existence of an environment variable with the name of the preference is checked. If it exists, the value is retrieved.

Note
Multi-valued preferences cannot be retrieved through environment variable.
TC_API int PREF_ask_environment_set_flag (const char *preference_name, logical *flag)
 
TC_API int PREF_ask_environment_set_flags (int preference_count, const char **preference_names, logical **flags)
 
TC_API int PREF_set_environment_set_flag (const char *preference_name, logical flag)
 
TC_API int PREF_set_environment_set_flags (int preference_count, const char **preference_names, const logical flag[])
 
Preferences Count
TC_API int PREF_ask_value_count (const char *preference_name, int *value_count)
 
TC_API int PREF_ask_value_count_at_location (const char *preference_name, TC_preference_search_scope_t location, int *value_count)
 
String Preferences
TC_API int PREF_ask_char_value (const char *preference_name, int index, char **value)
 
TC_API int PREF_ask_char_values (const char *preference_name, int *count, char ***value)
 
TC_API int PREF_set_char_values (const char *preference_name, int value_count, char *values[])
 
TC_API int PREF_ask_char_value_at_location (const char *preference_name, TC_preference_search_scope_t location, int index, char **value)
 
TC_API int PREF_ask_char_values_at_location (const char *preference_name, TC_preference_search_scope_t location, int *count, char ***values)
 
TC_API int PREF_set_char_values_at_location (const char *preference_name, TC_preference_search_scope_t location, int value_count, char *values[])
 
Integer Preferences
TC_API int PREF_ask_int_value (const char *preference_name, int index, int *value)
 
TC_API int PREF_ask_int_values (const char *preference_name, int *value_count, int **values)
 
TC_API int PREF_set_int_values (const char *preference_name, int value_count, int values[])
 
TC_API int PREF_ask_int_value_at_location (const char *preference_name, TC_preference_search_scope_t location, int index, int *value)
 
TC_API int PREF_ask_int_values_at_location (const char *preference_name, TC_preference_search_scope_t location, int *value_count, int **values)
 
TC_API int PREF_set_int_values_at_location (const char *preference_name, TC_preference_search_scope_t location, int value_count, int values[])
 
Double Preferences
TC_API int PREF_ask_double_value (const char *preference_name, int index, double *value)
 
TC_API int PREF_ask_double_values (const char *preference_name, int *value_count, double **values)
 
TC_API int PREF_set_double_values (const char *preference_name, int value_count, double values[])
 
TC_API int PREF_ask_double_value_at_location (const char *preference_name, TC_preference_search_scope_t location, int index, double *value)
 
TC_API int PREF_ask_double_values_at_location (const char *preference_name, TC_preference_search_scope_t location, int *value_count, double **values)
 
TC_API int PREF_set_double_values_at_location (const char *preference_name, TC_preference_search_scope_t location, int value_count, double values[])
 
Logical Preferences
TC_API int PREF_ask_logical_value (const char *preference_name, int index, logical *value)
 
TC_API int PREF_ask_logical_values (const char *preference_name, int *value_count, logical **values)
 
TC_API int PREF_set_logical_value (const char *preference_name, logical value)
 
TC_API int PREF_set_logical_values (const char *preference_name, int value_count, logical values[])
 
TC_API int PREF_ask_logical_value_at_location (const char *preference_name, TC_preference_search_scope_t location, int index, logical *value)
 
TC_API int PREF_ask_logical_values_at_location (const char *preference_name, TC_preference_search_scope_t location, int *value_count, logical **values)
 
TC_API int PREF_set_logical_values_at_location (const char *preference_name, TC_preference_search_scope_t location, int value_count, logical values[])
 
Preferences Definitions
TC_API int PREF_set_definition (const char *preference_name, PREF_preference_object_t preference_object, logical env_variable_enabled)
 
TC_API int PREF_delete_definition (int nb_of_preferences, const char **preference_names, logical delete_all_custom_definitions)
 
Preferences Import and Export
TC_API int PREF_export_preference_list (int preference_count, char **preference_names, TC_preference_search_scope_t location, const char *output_file_name)
 
TC_API int PREF_export_preferences (TC_preference_search_scope_t location, const char *output_file_name)
 
TC_API int PREF_export_preferences_with_category (TC_preference_search_scope_t location, int number_of_categories, char **categories, const char *output_file_name)
 
TC_API int PREF_import_preferences (TC_preference_search_scope_t location, const char *input_xml, PREF_import_actions_t action)
 
TC_API int PREF_import_preferences_with_category (TC_preference_search_scope_t location, const char *input_xml, int number_of_categories, char **category_names, PREF_import_actions_t action)
 
Deleting Preferences Instances
TC_API int PREF_delete_preference (const char *preference_name)
 
TC_API int PREF_delete_preference_at_location (const char *preference_name, TC_preference_search_scope_t location)
 
TC_API int PREF_delete_non_session_preference (char *preference_name, tag_t object)
 
Preferences Refresh and Lock
TC_API int PREF_refresh (const char *preference_name)
 
TC_API int PREF_lock_site_preferences ()
 
TC_API int PREF_unlock_site_preferences ()
 
Deprecated APIs
TC_API int PREF_set_search_scope (TC_preference_search_scope_t scope)
 
TC_API int PREF_ask_search_scope (TC_preference_search_scope_t *scope)
 

Detailed Description

This file contains the constants, data structures and function prototypes for working with the class Preferences and specifically with the C ITK interface to this class.

Definition in file preferences.h.