Clarisse 5.0 SP8 SDK
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Static Public Member Functions | List of all members
AppEnv Class Reference

Static Public Member Functions

static void init_environment ()
static const char * get_env_file_name ()
 Get environment (.env) file name (without path).
static CoreString get_user_env_folder_path ()
 Get the path of the folder containing the environment file.
static CoreString get_user_env_file_path ()
 Get the path of the environment file.
static CoreString get_shelf_config_file_env_name ()
 Get the variable name for the shelf configuration file.
static CoreString get_shelf_script_path_env_name ()
 Get the variable name for shelf script path.
static CoreString get_shelf_icon_path_env_name ()
 Get the variable name for shelf icon path.
static CoreString get_default_shelf_config_file ()
 Get the path of the default shelf configuration file.
static CoreString get_menu_config_file_env_name ()
 Get the variable name for the menu configuration file.
static CoreString get_menu_script_path_env_name ()
 Get the variable name for the menu script path.
static CoreString get_menu_icon_path_env_name ()
 Get the variable name for the menu icon path.
static CoreString get_default_menu_config_file ()
 Get the path of the default menu configuration file.
static CoreString get_resolution_env_name ()
 Get the variable name for the resolution preset.
static void write_env_var (const CoreString &name, const CoreString &value)
static CoreArray< CoreStringsplit_paths (const CoreString &concatenated_path_list, const CoreString &default_path_list)

Detailed Description

Utility class with functions to initialize environment variables at application startup.

Member Function Documentation

void AppEnv::init_environment ( )

Initializes the application environment from the clarisse.env file and from the system environment.

If an environment variable is defined both in the system and in the file, the system value has the priority over the file's variable if its value is not empty.

CoreArray< CoreString > AppEnv::split_paths ( const CoreString concatenated_path_list,
const CoreString default_path_list 

Split a concatenated path list and return array containing the individual paths.

If the parameter concatenated_path_list is empty, the default_path_list is used.

On Windows, paths must be separated with ';'. On Unix both ';' and ':' are supported.

concatenated_path_list[in]string containing a list of concatenated paths
default_path_list[in]string containing the default list of concatenated paths
array containing the individual paths after split
void AppEnv::write_env_var ( const CoreString name,
const CoreString value 

Write an environment variable in the application environment file (.env).

If the variable exists in the file, it is overwritten with the new value, otherwise it is added.

name[in]variable name
value[in]variable value