TUM-Logo

libRASCH

 

Home
 

General

About libRASCH/News
Design
Screen shots
Sample programs (with source code)
License
 

Download

libRASCH
Tools
 

Documentation

User
Developer
 

Resources

Mailing list
Supported Formats
Plugins
Status
Links
 
Contact
About this site
 
Last updated
Tue Mar 27 23:03:54 2007
libRASCH: value.c File Reference

value.c File Reference

Include dependency graph for value.c:

Go to the source code of this file.

Defines

#define _LIBRASCH_BUILD

Functions

LIBRAAPI value_handle ra_value_malloc ()
 allocate and initialize a value_handle
LIBRAAPI void ra_value_free (value_handle vh)
 free value-handle
int valid_value_handle (value_handle vh, int line_num)
 checks the validity of a value-handle
LIBRAAPI void ra_value_reset (value_handle vh)
 reset value-handle
LIBRAAPI long ra_value_get_type (value_handle vh)
 return value-type
LIBRAAPI int ra_value_is_ok (value_handle vh)
 checks if value is valid
LIBRAAPI long ra_value_get_num_elem (value_handle vh)
 return number of elements of array values
LIBRAAPI long ra_value_get_info (value_handle vh)
 returns id of info
LIBRAAPI const char * ra_value_get_name (value_handle vh)
 returns name of info
LIBRAAPI const char * ra_value_get_desc (value_handle vh)
 returns description of info
LIBRAAPI int ra_value_set_number (value_handle vh, long number)
 set a number in a value-handle
LIBRAAPI long ra_value_get_number (value_handle vh)
 get a number set in a value-handle
int set_meta_info (value_handle vh, const char *name, const char *desc, int id)
 set name and description in a value-handle
LIBRAAPI void ra_value_set_short (value_handle vh, const short value)
 set short value in value-handle
LIBRAAPI void ra_value_set_long (value_handle vh, const long value)
 set long value in value-handle
LIBRAAPI void ra_value_set_double (value_handle vh, const double value)
 set double value in value-handle
LIBRAAPI void ra_value_set_string (value_handle vh, const char *string)
 set a string in value-handle
LIBRAAPI void ra_value_set_string_utf8 (value_handle vh, const char *string)
 set a UTF-8 encoded string in value-handle
LIBRAAPI void ra_value_set_voidp (value_handle vh, const void *value)
 set void-pointer value in value-handle
LIBRAAPI void ra_value_set_short_array (value_handle vh, const short *array, long num)
 set short-array values in value-handle
LIBRAAPI void ra_value_set_long_array (value_handle vh, const long *array, long num)
 set long-array values in value-handle
LIBRAAPI void ra_value_set_double_array (value_handle vh, const double *array, long num)
 set double-array values in value-handle
LIBRAAPI void ra_value_set_string_array (value_handle vh, const char **array, long num)
 set a string-array in value-handle
LIBRAAPI void ra_value_set_string_array_utf8 (value_handle vh, const char **array, long num)
 set a string-array (UTF-8 encoded) in value-handle
LIBRAAPI void ra_value_set_voidp_array (value_handle vh, const void **array, long num)
 set void-pointer-array values in value-handle
LIBRAAPI void ra_value_set_vh_array (value_handle vh, const value_handle *array, long num)
 set value-handle-array values in value-handle
LIBRAAPI short ra_value_get_short (value_handle vh)
 return short value from value-handle
LIBRAAPI long ra_value_get_long (value_handle vh)
 return long value from value-handle
LIBRAAPI double ra_value_get_double (value_handle vh)
 return double value from value-handle
LIBRAAPI const char * ra_value_get_string (value_handle vh)
 return character pointer from value-handle
LIBRAAPI const char * ra_value_get_string_utf8 (value_handle vh)
 return character pointer from value-handle (UTF-8 encoded)
LIBRAAPI const void * ra_value_get_voidp (value_handle vh)
 return void-pointer from value-handle
LIBRAAPI const short * ra_value_get_short_array (value_handle vh)
 return pointer to short array from value-handle
LIBRAAPI const long * ra_value_get_long_array (value_handle vh)
 return pointer to long array from value-handle
LIBRAAPI const double * ra_value_get_double_array (value_handle vh)
 return pointer to double array from value-handle
LIBRAAPI const char ** ra_value_get_string_array (value_handle vh)
 return pointer to character pointer array from value-handle
LIBRAAPI const char ** ra_value_get_string_array_utf8 (value_handle vh)
 return pointer to character pointer array from value-handle (UTF-8 encoded)
LIBRAAPI const void ** ra_value_get_voidp_array (value_handle vh)
 return pointer to void-pointer array from value-handle
LIBRAAPI const value_handlera_value_get_vh_array (value_handle vh)
 return pointer to long array from value-handle
LIBRAAPI int ra_value_copy (value_handle dest, value_handle src)
 copy one value_handle to another value_handle
LIBRAAPI int ra_value_get_single_elem (value_handle dest, value_handle src, long elem_num)
 copy one element from a value-handle in another value-handle
void free_mem (struct ra_value *v)
 frees value-handle memory


Detailed Description

This file provides the ra-value related libRASCH-API functions

Author:
Raphael Schneider (rasch@med1.med.tum.de)

Definition in file value.c.


Define Documentation

#define _LIBRASCH_BUILD
 

Definition at line 30 of file value.c.


Function Documentation

void free_mem struct ra_value v  ) 
 

Parameters:
<v> pointer to a value-handle struct
Function frees memory allocated for a value-handle.

Definition at line 1328 of file value.c.

References ra_value::l, ra_value::num_values, ra_free_mem, ra_value_free(), RA_VALUE_TYPE_CHAR, RA_VALUE_TYPE_CHAR_ARRAY, RA_VALUE_TYPE_DOUBLE_ARRAY, RA_VALUE_TYPE_LONG_ARRAY, RA_VALUE_TYPE_NONE, RA_VALUE_TYPE_SHORT_ARRAY, RA_VALUE_TYPE_VH_ARRAY, RA_VALUE_TYPE_VOIDP_ARRAY, ra_value::utype, ra_value::value, ra_value::value_is_valid, and ra_value::value_locale.

Referenced by ra_value_copy(), ra_value_free(), ra_value_get_single_elem(), ra_value_reset(), ra_value_set_double(), ra_value_set_double_array(), ra_value_set_long(), ra_value_set_long_array(), ra_value_set_short(), ra_value_set_short_array(), ra_value_set_string(), ra_value_set_string_array(), ra_value_set_string_array_utf8(), ra_value_set_string_utf8(), ra_value_set_vh_array(), ra_value_set_voidp(), and ra_value_set_voidp_array().

LIBRAAPI int ra_value_copy value_handle  dest,
value_handle  src
 

Parameters:
<dest> destination value-handle
<src> source value-handle
This function copies the values from one value-handle to another value-handle and the name and description. The remaining fields are not copied.

Definition at line 1179 of file value.c.

References ra_value::d, ra_value::desc, free_mem(), ra_value::id, ra_value::name, ra_value::num_values, RA_VALUE_DESC_MAX, RA_VALUE_NAME_MAX, ra_value_set_double(), ra_value_set_double_array(), ra_value_set_long(), ra_value_set_long_array(), ra_value_set_short(), ra_value_set_short_array(), ra_value_set_string(), ra_value_set_string_array(), ra_value_set_vh_array(), ra_value_set_voidp(), ra_value_set_voidp_array(), RA_VALUE_TYPE_CHAR, RA_VALUE_TYPE_CHAR_ARRAY, RA_VALUE_TYPE_DOUBLE, RA_VALUE_TYPE_DOUBLE_ARRAY, RA_VALUE_TYPE_LONG, RA_VALUE_TYPE_LONG_ARRAY, RA_VALUE_TYPE_SHORT, RA_VALUE_TYPE_SHORT_ARRAY, RA_VALUE_TYPE_VH_ARRAY, RA_VALUE_TYPE_VOIDP, RA_VALUE_TYPE_VOIDP_ARRAY, ra_value::s, ra_value::utype, valid_value_handle(), ra_value::value, and ra_value::value_is_valid.

Referenced by ra_eval_attribute_get(), ra_eval_attribute_set(), ra_proc_get_result(), ra_sum_get_part_data(), ra_sum_set_part_data(), ra_value_get_single_elem(), and ra_value_set_vh_array().

LIBRAAPI void ra_value_free value_handle  vh  ) 
 

Parameters:
<vh> value-handle
Frees the memory asocciated with vh.

Definition at line 61 of file value.c.

References free_mem(), and valid_value_handle().

Referenced by add_class_orig(), add_eval_orig(), add_events_orig(), add_prop_orig(), add_sum_ch(), add_sum_part_orig(), add_summaries_orig(), add_values_orig(), calc_x_scales(), copy_move_meas(), create_auto_class(), create_auto_prop(), delete_attributes(), do_post_processing(), free_eval_infos(), free_mem(), get_eval_file(), get_eval_file_xml(), post_process_ecg(), ra_class_add(), ra_class_add_predef(), ra_eval_add(), ra_eval_attribute_unset(), ra_eval_delete(), ra_meas_delete(), ra_meas_move(), ra_prop_add(), ra_prop_add_predef(), ra_sum_add(), ra_sum_del_part(), read_evals_xml(), and write_evals_xml().

LIBRAAPI const char* ra_value_get_desc value_handle  vh  ) 
 

Parameters:
<vh> value-handle
Returns a character pointer to the description of the info set in vh. The pointer is valid until vh is free'd or a new info was retrived.

Definition at line 217 of file value.c.

References ra_value::desc, ra_value::desc_locale, RA_VALUE_DESC_MAX, utf8_to_local(), and valid_value_handle().

LIBRAAPI double ra_value_get_double value_handle  vh  ) 
 

Parameters:
<vh> value-handle
This function returns the double value set in vh.

Definition at line 860 of file value.c.

References RA_VALUE_TYPE_DOUBLE, RA_VALUE_TYPE_LONG, RA_VALUE_TYPE_SHORT, ra_value::utype, valid_value_handle(), ra_value::value, and ra_value::value_is_valid.

Referenced by add_prop_orig(), calc_x_scales(), ra_prop_add_predef(), ra_prop_get_events(), ra_prop_set_value(), set_option(), and write_evals_xml().

LIBRAAPI const double* ra_value_get_double_array value_handle  vh  ) 
 

Parameters:
<vh> value-handle
This function returns a pointer to the double array stored in vh. The pointer is valid until vh is used in another function or vh is freed. The number of elements of the array can be get by calling ra_value_get_num_elem().

Definition at line 1035 of file value.c.

References RA_VALUE_TYPE_DOUBLE_ARRAY, ra_value::utype, valid_value_handle(), ra_value::value, and ra_value::value_is_valid.

Referenced by ra_prop_set_value(), and set_option().

LIBRAAPI long ra_value_get_info value_handle  vh  ) 
 

Parameters:
<vh> value-handle
Returns the id of the info set in vh. Check in ra_defines.h for for the meaning of info-id (RA_INFO_*).

Definition at line 179 of file value.c.

References ra_value::id, RA_INFO_NONE, and valid_value_handle().

Referenced by ra_info_get_by_name().

LIBRAAPI long ra_value_get_long value_handle  vh  ) 
 

Parameters:
<vh> value-handle
This function returns the long value set in vh.

Definition at line 828 of file value.c.

References RA_VALUE_TYPE_DOUBLE, RA_VALUE_TYPE_LONG, RA_VALUE_TYPE_SHORT, ra_value::utype, valid_value_handle(), ra_value::value, and ra_value::value_is_valid.

Referenced by add_prop_orig(), add_sum_ch(), calc_x_scales(), get_eval_file(), get_eval_file_xml(), ra_meas_delete(), ra_prop_add_predef(), ra_prop_get_events(), ra_prop_set_value(), and set_option().

LIBRAAPI const long* ra_value_get_long_array value_handle  vh  ) 
 

Parameters:
<vh> value-handle
This function returns a pointer to the long array stored in vh. The pointer is valid until vh is used in another function or vh is freed. The number of elements of the array can be get by calling ra_value_get_num_elem().

Definition at line 1006 of file value.c.

References RA_VALUE_TYPE_LONG_ARRAY, ra_value::utype, valid_value_handle(), ra_value::value, and ra_value::value_is_valid.

Referenced by add_events_orig(), add_sum_part_orig(), add_summaries_orig(), add_values_orig(), create_auto_class(), create_auto_prop(), ra_prop_set_value(), and set_option().

LIBRAAPI const char* ra_value_get_name value_handle  vh  ) 
 

Parameters:
<vh> value-handle
Returns a character pointer to the name of the info set in vh. The pointer is valid until vh is free'd or a new info was retrived.

Definition at line 197 of file value.c.

References ra_value::name, ra_value::name_locale, RA_VALUE_NAME_MAX, utf8_to_local(), and valid_value_handle().

LIBRAAPI long ra_value_get_num_elem value_handle  vh  ) 
 

Parameters:
<vh> value-handle
When an array is stored in vh, the number of elements of the array is returned.

Definition at line 161 of file value.c.

References ra_value::num_values, and valid_value_handle().

Referenced by add_events_orig(), add_sum_ch(), add_sum_part_orig(), add_summaries_orig(), add_values_orig(), copy_move_meas(), create_auto_class(), create_auto_prop(), do_post_processing(), ra_eval_delete(), ra_eval_save_result(), ra_meas_delete(), ra_prop_set_value(), and set_option().

LIBRAAPI long ra_value_get_number value_handle  vh  ) 
 

Parameters:
<vh> value-handle
Returns the number number set in the value-handle vh.

Definition at line 258 of file value.c.

References ra_value::number, and valid_value_handle().

Referenced by eval_get_info().

LIBRAAPI short ra_value_get_short value_handle  vh  ) 
 

Parameters:
<vh> value-handle
This function returns the short value set in vh.

Definition at line 796 of file value.c.

References RA_VALUE_TYPE_DOUBLE, RA_VALUE_TYPE_LONG, RA_VALUE_TYPE_SHORT, ra_value::utype, valid_value_handle(), ra_value::value, and ra_value::value_is_valid.

Referenced by ra_prop_set_value(), and set_option().

LIBRAAPI const short* ra_value_get_short_array value_handle  vh  ) 
 

Parameters:
<vh> value-handle
This function returns a pointer to the short array stored in vh. The pointer is valid until vh is used in another function or vh is freed. The number of elements of the array can be get by calling ra_value_get_num_elem().

Definition at line 977 of file value.c.

References RA_VALUE_TYPE_SHORT_ARRAY, ra_value::utype, valid_value_handle(), ra_value::value, and ra_value::value_is_valid.

Referenced by ra_prop_set_value(), and set_option().

LIBRAAPI int ra_value_get_single_elem value_handle  dest,
value_handle  src,
long  elem_num
 

Parameters:
<dest> destination value-handle
<src> source value-handle
<elem_num> zero-based index of the value which has to be copied
This function copies one element from value-handle to another value-handle and the name and description. The remaining fields are not copied. The function is helpfull when a single value from an array, stored in a value-handle, is needed for another function expecting a single value in a value-handle.

Definition at line 1255 of file value.c.

References ra_value::can_be_changed, ra_value::d, ra_value::desc, free_mem(), ra_value::id, ra_value::name, ra_value::num_values, ra_value_copy(), RA_VALUE_DESC_MAX, RA_VALUE_NAME_MAX, ra_value_set_double(), ra_value_set_long(), ra_value_set_short(), ra_value_set_string(), ra_value_set_voidp(), RA_VALUE_TYPE_CHAR, RA_VALUE_TYPE_CHAR_ARRAY, RA_VALUE_TYPE_DOUBLE, RA_VALUE_TYPE_DOUBLE_ARRAY, RA_VALUE_TYPE_LONG, RA_VALUE_TYPE_LONG_ARRAY, RA_VALUE_TYPE_SHORT, RA_VALUE_TYPE_SHORT_ARRAY, RA_VALUE_TYPE_VH_ARRAY, RA_VALUE_TYPE_VOIDP, RA_VALUE_TYPE_VOIDP_ARRAY, ra_value::s, ra_value::utype, valid_value_handle(), ra_value::value, and ra_value::value_is_valid.

Referenced by add_values_orig(), and create_auto_prop().

LIBRAAPI const char* ra_value_get_string value_handle  vh  ) 
 

Parameters:
<vh> value-handle
This function returns a character pointer to the string set in vh. The pointer is valid until vh is used in another function or vh is freed.

Definition at line 894 of file value.c.

References RA_VALUE_TYPE_CHAR, ra_value::utype, valid_value_handle(), ra_value::value_is_valid, and ra_value::value_locale.

Referenced by add_class_orig(), add_eval_orig(), add_prop_orig(), add_summaries_orig(), copy_move_meas(), get_eval_file(), get_eval_file_xml(), ra_class_add_predef(), ra_meas_delete(), ra_meas_move(), ra_prop_add_predef(), and ra_prop_set_value().

LIBRAAPI const char** ra_value_get_string_array value_handle  vh  ) 
 

Parameters:
<vh> value-handle
This function returns a pointer to the character pointer array stored in vh. The pointer is valid until vh is used in another function or vh is freed. The number of elements of the array can be get by calling ra_value_get_num_elem().

Definition at line 1064 of file value.c.

References RA_VALUE_TYPE_CHAR_ARRAY, ra_value::utype, valid_value_handle(), ra_value::value_is_valid, and ra_value::value_locale.

Referenced by add_sum_ch(), copy_move_meas(), ra_meas_delete(), and ra_prop_set_value().

LIBRAAPI const char** ra_value_get_string_array_utf8 value_handle  vh  ) 
 

Parameters:
<vh> value-handle
This function returns a pointer to the character pointer array stored in vh. The strings are UTF-8 encoded. The pointer is valid until vh is used in another function or vh is freed. The number of elements of the array can be get by calling ra_value_get_num_elem().

Definition at line 1093 of file value.c.

References RA_VALUE_TYPE_CHAR_ARRAY, ra_value::utype, valid_value_handle(), ra_value::value, and ra_value::value_is_valid.

LIBRAAPI const char* ra_value_get_string_utf8 value_handle  vh  ) 
 

Parameters:
<vh> value-handle
This function returns a character pointer to the string set in vh. The string is UTF-8 encoded. The pointer is valid until vh is used in another function or vh is freed.

Definition at line 922 of file value.c.

References RA_VALUE_TYPE_CHAR, ra_value::utype, valid_value_handle(), ra_value::value, and ra_value::value_is_valid.

Referenced by set_option().

LIBRAAPI long ra_value_get_type value_handle  vh  ) 
 

Parameters:
<vh> value-handle
Return the type of the value stored in vh. Check in ra_defines.h for the meaning of the returned value (RA_VALUE_TYPE_*).

Definition at line 126 of file value.c.

References RA_VALUE_TYPE_NONE, ra_value::utype, and valid_value_handle().

Referenced by ra_prop_set_value().

LIBRAAPI const value_handle* ra_value_get_vh_array value_handle  vh  ) 
 

Parameters:
<vh> value-handle
This function returns a pointer to the value-handle array stored in vh. The pointer is valid until vh is used in another function or vh is freed. The number of elements of the array can be get by calling ra_value_get_num_elem().

Definition at line 1151 of file value.c.

References RA_VALUE_TYPE_VH_ARRAY, ra_value::utype, valid_value_handle(), ra_value::value, and ra_value::value_is_valid.

LIBRAAPI const void* ra_value_get_voidp value_handle  vh  ) 
 

Parameters:
<vh> value-handle
This function returns the void-pointer set in vh.

Definition at line 948 of file value.c.

References RA_VALUE_TYPE_VOIDP, ra_value::utype, valid_value_handle(), ra_value::value, and ra_value::value_is_valid.

Referenced by set_option().

LIBRAAPI const void** ra_value_get_voidp_array value_handle  vh  ) 
 

Parameters:
<vh> value-handle
This function returns a pointer to the void-pointer array stored in vh. The pointer is valid until vh is used in another function or vh is freed. The number of elements of the array can be get by calling ra_value_get_num_elem().

Definition at line 1122 of file value.c.

References RA_VALUE_TYPE_VOIDP_ARRAY, ra_value::utype, valid_value_handle(), ra_value::value, and ra_value::value_is_valid.

Referenced by do_post_processing(), ra_eval_delete(), and set_option().

LIBRAAPI int ra_value_is_ok value_handle  vh  ) 
 

Parameters:
<vh> value-handle
Returns '1' if value stored in vh is valid, '0' if not.

Definition at line 143 of file value.c.

References valid_value_handle(), and ra_value::value_is_valid.

Referenced by add_class_orig(), add_events_orig(), add_prop_orig(), add_summaries_orig(), ra_prop_get_events(), and ra_prop_set_value().

LIBRAAPI value_handle ra_value_malloc  ) 
 

Returns a initialzed value-handle.

Definition at line 41 of file value.c.

References ra_value::handle_id, and RA_HANDLE_VALUE.

Referenced by add_class_orig(), add_eval_orig(), add_events_orig(), add_prop_orig(), add_sum_ch(), add_sum_part_orig(), add_summaries_orig(), add_values_orig(), calc_x_scales(), copy_move_meas(), create_auto_class(), create_auto_prop(), do_post_processing(), get_eval_file(), get_eval_file_xml(), post_process_ecg(), ra_class_add(), ra_class_add_predef(), ra_eval_add(), ra_eval_attribute_set(), ra_eval_delete(), ra_meas_delete(), ra_meas_move(), ra_prop_add(), ra_prop_add_predef(), ra_sum_add(), ra_sum_add_part(), ra_value_set_vh_array(), read_evals_xml(), and write_evals_xml().

LIBRAAPI void ra_value_reset value_handle  vh  ) 
 

Parameters:
<vh> value-handle
Reset value-handle vh.

Definition at line 108 of file value.c.

References free_mem(), and valid_value_handle().

Referenced by find_ra_info_by_name(), ra_class_get(), ra_class_get_events(), ra_eval_attribute_get(), ra_eval_attribute_list(), ra_eval_get_all(), ra_info_get(), ra_info_get_by_idx(), ra_lib_get_option(), ra_proc_get_result(), ra_prop_get_all(), ra_prop_get_events(), and ra_sum_get().

LIBRAAPI void ra_value_set_double value_handle  vh,
const double  value
 

Parameters:
<vh> value-handle
<value> value to set in ra_info
This function set the value in vh.

Definition at line 360 of file value.c.

References free_mem(), RA_VALUE_TYPE_DOUBLE, and valid_value_handle().

Referenced by fill_predef_prop_info(), fill_predef_prop_info_ascii(), get_option(), ra_prop_add(), ra_prop_get_value(), ra_value_copy(), and ra_value_get_single_elem().

LIBRAAPI void ra_value_set_double_array value_handle  vh,
const double *  array,
long  num
 

Parameters:
<vh> value-handle
<array> array to set in ra_info
<num> number of array elements
This function set the double array array with num elements in vh.

Definition at line 563 of file value.c.

References free_mem(), ra_alloc_mem, RA_VALUE_TYPE_DOUBLE_ARRAY, and valid_value_handle().

Referenced by get_option(), ra_prop_get_value(), and ra_value_copy().

LIBRAAPI void ra_value_set_long value_handle  vh,
const long  value
 

Parameters:
<vh> value-handle
<value> value to set in ra_info
This function set the value in vh.

Definition at line 338 of file value.c.

References free_mem(), RA_VALUE_TYPE_LONG, and valid_value_handle().

Referenced by eval_get_info(), fill_predef_prop_info(), fill_predef_prop_info_ascii(), get_lib_info(), get_option(), get_plugin_info(), get_proc_info(), ra_prop_add(), ra_prop_get_value(), ra_value_copy(), and ra_value_get_single_elem().

LIBRAAPI void ra_value_set_long_array value_handle  vh,
const long *  array,
long  num
 

Parameters:
<vh> value-handle
<array> array to set in ra_info
<num> number of array elements
This function set the long array array with num elements in vh.

Definition at line 532 of file value.c.

References free_mem(), ra_alloc_mem, RA_VALUE_TYPE_LONG_ARRAY, and valid_value_handle().

Referenced by get_option(), ra_class_get_events(), ra_prop_get_events(), ra_prop_get_value(), ra_sum_get_part_events(), and ra_value_copy().

LIBRAAPI int ra_value_set_number value_handle  vh,
long  number
 

Parameters:
<vh> value-handle
<number> number
Set the number number in the value-handle vh. This number is used when infos about channels, recording devices and plugins. number is also used when processing results are retrived.

Definition at line 239 of file value.c.

References ra_value::number, and valid_value_handle().

Referenced by calc_x_scales().

LIBRAAPI void ra_value_set_short value_handle  vh,
const short  value
 

Parameters:
<vh> value-handle
<value> value to set in ra_info
This function set the value in vh.

Definition at line 316 of file value.c.

References free_mem(), RA_VALUE_TYPE_SHORT, and valid_value_handle().

Referenced by get_option(), ra_prop_get_value(), ra_value_copy(), and ra_value_get_single_elem().

LIBRAAPI void ra_value_set_short_array value_handle  vh,
const short *  array,
long  num
 

Parameters:
<vh> value-handle
<array> array to set in ra_info
<num> number of array elements
This function set the short array array with num elements in vh.

Definition at line 501 of file value.c.

References free_mem(), ra_alloc_mem, RA_VALUE_TYPE_SHORT_ARRAY, and valid_value_handle().

Referenced by get_option(), ra_prop_get_ch(), ra_prop_get_value(), and ra_value_copy().

LIBRAAPI void ra_value_set_string value_handle  vh,
const char *  string
 

Parameters:
<vh> value-handle
<string> string to set in ra_info
This function set the string (`\0`-ended char *) in vh.

Definition at line 382 of file value.c.

References free_mem(), local_to_utf8(), ra_alloc_mem, RA_VALUE_TYPE_CHAR, and valid_value_handle().

Referenced by create_auto_class(), eval_get_info(), fill_predef_class_info(), fill_predef_class_info_ascii(), fill_predef_prop_info(), fill_predef_prop_info_ascii(), ra_class_add(), ra_eval_add(), ra_prop_add(), ra_prop_get_value(), ra_sum_add(), ra_value_copy(), ra_value_get_single_elem(), read_evals_xml(), and read_sets_xml().

LIBRAAPI void ra_value_set_string_array value_handle  vh,
const char **  array,
long  num
 

Parameters:
<vh> value-handle
<array> array to set in ra_info
<num> number of array elements
This function set the string-array array with num elements in vh.

Definition at line 594 of file value.c.

References free_mem(), ra_value::l, local_to_utf8(), ra_alloc_mem, RA_VALUE_TYPE_CHAR_ARRAY, and valid_value_handle().

Referenced by eval_get_info(), ra_eval_attribute_list(), ra_prop_get_value(), and ra_value_copy().

LIBRAAPI void ra_value_set_string_array_utf8 value_handle  vh,
const char **  array,
long  num
 

Parameters:
<vh> value-handle
<array> array to set in ra_info
<num> number of array elements
This function set the string-array 'array' with 'num' elements in vh. The strings in 'array' are expected to be UTF-8 encoded.

Definition at line 664 of file value.c.

References free_mem(), ra_value::l, ra_alloc_mem, RA_VALUE_TYPE_CHAR_ARRAY, utf8_to_local(), and valid_value_handle().

LIBRAAPI void ra_value_set_string_utf8 value_handle  vh,
const char *  string
 

Parameters:
<vh> value-handle
<string> string to set in ra_info
This function set the string (`\0`-ended char *) in vh.

Definition at line 430 of file value.c.

References free_mem(), ra_alloc_mem, RA_VALUE_TYPE_CHAR, utf8_to_local(), and valid_value_handle().

Referenced by get_lib_info(), get_option(), get_plugin_info(), and get_session_info().

LIBRAAPI void ra_value_set_vh_array value_handle  vh,
const value_handle array,
long  num
 

Parameters:
<vh> value-handle
<array> array to set in ra_value
<num> number of array elements
This function set the value-handle array 'array' with num elements in vh.

Definition at line 764 of file value.c.

References free_mem(), ra_value::l, ra_alloc_mem, ra_value_copy(), ra_value_malloc(), RA_VALUE_TYPE_VH_ARRAY, and valid_value_handle().

Referenced by ra_value_copy().

LIBRAAPI void ra_value_set_voidp value_handle  vh,
const void *  value
 

Parameters:
<vh> value-handle
<value> value to set in ra_info
This function set the value in vh.

Definition at line 478 of file value.c.

References free_mem(), RA_VALUE_TYPE_VOIDP, and valid_value_handle().

Referenced by post_process_ecg(), ra_value_copy(), and ra_value_get_single_elem().

LIBRAAPI void ra_value_set_voidp_array value_handle  vh,
const void **  array,
long  num
 

Parameters:
<vh> value-handle
<array> array to set in ra_info
<num> number of array elements
This function set the long array array with num elements in vh.

Definition at line 733 of file value.c.

References free_mem(), ra_alloc_mem, RA_VALUE_TYPE_VOIDP_ARRAY, and valid_value_handle().

Referenced by ra_class_get(), ra_eval_get_all(), ra_prop_get_all(), ra_sum_get(), and ra_value_copy().

int set_meta_info value_handle  vh,
const char *  name,
const char *  desc,
int  id
 

Parameters:
<vh> value-handle
<name> name of the value
<desc> a short description of the value
<id> id of the value (if it is an libRASCH info)
When value-handle represents some information set inside the core or in a plugin, most of the times a name and description is available.

Definition at line 280 of file value.c.

References ra_value::desc, ra_value::id, ra_value::name, RA_VALUE_DESC_MAX, RA_VALUE_NAME_MAX, and valid_value_handle().

Referenced by find_ra_info_by_name(), get_lib_info(), get_option(), get_plugin_info(), and ra_info_set().

int valid_value_handle value_handle  vh,
int  line_num
 

Parameters:
<vh> value-handle
Function checks if the handle given by 'vh' is really a value-handle. If it is another handle, assert(0) is called which stops the program.

Definition at line 81 of file value.c.

References ra_value::handle_id, and RA_HANDLE_VALUE.

Referenced by ra_value_copy(), ra_value_free(), ra_value_get_desc(), ra_value_get_double(), ra_value_get_double_array(), ra_value_get_info(), ra_value_get_long(), ra_value_get_long_array(), ra_value_get_name(), ra_value_get_num_elem(), ra_value_get_number(), ra_value_get_short(), ra_value_get_short_array(), ra_value_get_single_elem(), ra_value_get_string(), ra_value_get_string_array(), ra_value_get_string_array_utf8(), ra_value_get_string_utf8(), ra_value_get_type(), ra_value_get_vh_array(), ra_value_get_voidp(), ra_value_get_voidp_array(), ra_value_is_ok(), ra_value_reset(), ra_value_set_double(), ra_value_set_double_array(), ra_value_set_long(), ra_value_set_long_array(), ra_value_set_number(), ra_value_set_short(), ra_value_set_short_array(), ra_value_set_string(), ra_value_set_string_array(), ra_value_set_string_array_utf8(), ra_value_set_string_utf8(), ra_value_set_vh_array(), ra_value_set_voidp(), ra_value_set_voidp_array(), and set_meta_info().


Generated on Fri May 27 11:33:45 2005 for libRASCH by  doxygen 1.4.2