C List Manipulation
[C Data Manipulation]


Functions

int hps_list_create (list_t **list)
 Creates a C list_t object for storing a list.
int hps_list_destroy (list_t **list)
 Destroys a C list_t object.
int hps_list_add (list_t *list, hpobj_t *obj)
 Adds an element to the end of a list.
int hps_list_get (list_t *list, int ind, hpobj_t **obj)
 Gets the n-th element of a list.
int hps_list_get_int (list_t *list, int ind, LONGLONG *val)
 Gets the n-th element of a list if an 'int'.
int hps_list_get_uint (list_t *list, int ind, ULONGLONG *val)
 Gets the n-th element of a list if an 'unsigned int'.
int hps_list_get_real (list_t *list, int ind, double *val)
 Gets the n-th element of a list if a 'real'.
int hps_list_get_str (list_t *list, int ind, char **val)
 Gets the n-th element of a list if a 'string'.
int hps_list_get_list (list_t *list, int ind, list_t **val)
 Gets the n-th element of a list if a 'list'.
int hps_list_get_array (list_t *list, int ind, array_t **val)
 Gets the n-th element of a list if a 'array'.
int hps_list_get_ident (list_t *list, int ind, char **val)
 Gets the n-th element of a list if a 'ident'.
int hps_list_get_symb (list_t *list, int ind, entry_t **val)
 Gets the n-th element of a list if a 'symb'.
int hps_list_add_type (list_t *list, int type, void *data)
 Adds an element of the specified type to the end of a list.
int hps_list_add_int (list_t *list, LONGLONG value)
 Adds an integer to the end of a list.
int hps_list_add_uint (list_t *list, ULONGLONG value)
 Adds an unsigned integer to the end of a list.
int hps_list_add_real (list_t *list, double value)
 Adds a real to the end of a list.
int hps_list_add_complex (list_t *list, complex_t *value)
 Adds a complex to the end of a list.
int hps_list_add_str (list_t *list, char *value)
 Adds a string to the end of a list.
int hps_list_add_list (list_t *list, list_t *value)
 Adds a list to the end of a list.
int hps_list_add_array (list_t *list, array_t *value)
 Adds an array to the end of a list.
int hps_list_add_ident (list_t *list, char *value)
 Adds an ident to the end of a list.

Function Documentation

int hps_list_add ( list_t list,
hpobj_t obj 
)

Adds an element to the end of a list.

This function adds a C hpobj_t object at the end of the specified list.

Parameters:
list The list to which the object has to be added
obj The object to add
Returns:
HPS_ERROR_ARM_MEMORY if unable to allocate the element, HPS_ERROR_PAR if the list or object parameter is incorrect, HPS_OK otherwise

int hps_list_add_array ( list_t list,
array_t value 
)

Adds an array to the end of a list.

This function adds an array element which value is provided at the end of the specified list.

Parameters:
list The list to which the object has to be added
value The array to add
Returns:
HPS_ERROR_ARM_MEMORY if unable to allocate the element, HPS_ERROR_PAR if the list or object parameter is incorrect, HPS_OK otherwise

int hps_list_add_complex ( list_t list,
complex_t value 
)

Adds a complex to the end of a list.

This function adds a complex element which value is provided at the end of the specified list.

Parameters:
list The list to which the object has to be added
value The pointer to the complex value
Returns:
HPS_ERROR_ARM_MEMORY if unable to allocate the element, HPS_ERROR_PAR if the list or object parameter is incorrect, HPS_OK otherwise

int hps_list_add_ident ( list_t list,
char *  value 
)

Adds an ident to the end of a list.

This function adds an ident element which value is provided at the end of the specified list.

Parameters:
list The list to which the object has to be added
value The array to add
Returns:
HPS_ERROR_ARM_MEMORY if unable to allocate the element, HPS_ERROR_PAR if the list or object parameter is incorrect, HPS_OK otherwise

int hps_list_add_int ( list_t list,
LONGLONG  value 
)

Adds an integer to the end of a list.

This function adds an integer element which value is provided at the end of the specified list.

Parameters:
list The list to which the object has to be added
value The integer value
Returns:
HPS_ERROR_ARM_MEMORY if unable to allocate the element, HPS_ERROR_PAR if the list or object parameter is incorrect, HPS_OK otherwise

int hps_list_add_list ( list_t list,
list_t value 
)

Adds a list to the end of a list.

This function adds a list element which value is provided at the end of the specified list.

Parameters:
list The list to which the object has to be added
value The list to add
Returns:
HPS_ERROR_ARM_MEMORY if unable to allocate the element, HPS_ERROR_PAR if the list or object parameter is incorrect, HPS_OK otherwise

int hps_list_add_real ( list_t list,
double  value 
)

Adds a real to the end of a list.

This function adds a real element which value is provided at the end of the specified list.

Parameters:
list The list to which the object has to be added
value The real value
Returns:
HPS_ERROR_ARM_MEMORY if unable to allocate the element, HPS_ERROR_PAR if the list or object parameter is incorrect, HPS_OK otherwise

int hps_list_add_str ( list_t list,
char *  value 
)

Adds a string to the end of a list.

This function adds a string element which value is provided at the end of the specified list.

Parameters:
list The list to which the object has to be added
value The string value
Returns:
HPS_ERROR_ARM_MEMORY if unable to allocate the element, HPS_ERROR_PAR if the list or object parameter is incorrect, HPS_OK otherwise

int hps_list_add_type ( list_t list,
int  type,
void *  data 
)

Adds an element of the specified type to the end of a list.

This function adds an element (described by its type and a pointer to its data) at the end of the specified list.

Parameters:
list The list to which the object has to be added
type The type of the element to add
data The pointer to the data of the element to add
Returns:
HPS_ERROR_ARM_MEMORY if unable to allocate the element, HPS_ERROR_PAR if the list or object parameter is incorrect, HPS_OK otherwise

int hps_list_add_uint ( list_t list,
ULONGLONG  value 
)

Adds an unsigned integer to the end of a list.

This function adds an unsigned integer element which value is provided at the end of the specified list.

Parameters:
list The list to which the object has to be added
value The unsigned integer value
Returns:
HPS_ERROR_ARM_MEMORY if unable to allocate the element, HPS_ERROR_PAR if the list or object parameter is incorrect, HPS_OK otherwise

int hps_list_create ( list_t **  list  ) 

Creates a C list_t object for storing a list.

This function creates a list that can be later filled unsing hp_list_add... functions.

Parameters:
list A pointer to the list to create
Returns:
HPS_ERROR_ARM_MEMORY if unable to allocate, HPS_OK otherwise

int hps_list_destroy ( list_t **  list  ) 

Destroys a C list_t object.

This function destroys recursively a list.

Parameters:
list A pointer to the list to destroy
Returns:
HPS_ERROR_PAR if any parameter error, HPS_OK otherwise

int hps_list_get ( list_t list,
int  ind,
hpobj_t **  obj 
)

Gets the n-th element of a list.

This function gets a C hpobj_t object that is the n-th element of the specified list.

Parameters:
list The list from which the object has to be got
ind The index of the object to get
obj The object to get
Returns:
HPS_ERROR_ARM_MEMORY if unable to allocate the element, HPS_ERROR_PAR if the list or object parameter is incorrect, HPS_OK otherwise

int hps_list_get_array ( list_t list,
int  ind,
array_t **  val 
)

Gets the n-th element of a list if a 'array'.

This function gets a 'array' that is the n-th element of the specified list.

Parameters:
list The list from which the object has to be got
ind The index of the object to get
val The 'array' to get
Returns:
HPS_ERROR_ARM_MEMORY if unable to allocate the element, HPS_ERROR_PAR if the list or object parameter is incorrect, HPS_ERROR_TYPE the n-th element is not an 'int', HPS_OK otherwise

int hps_list_get_ident ( list_t list,
int  ind,
char **  val 
)

Gets the n-th element of a list if a 'ident'.

This function gets a 'ident' that is the n-th element of the specified list.

Parameters:
list The list from which the object has to be got
ind The index of the object to get
val The 'ident' to get
Returns:
HPS_ERROR_ARM_MEMORY if unable to allocate the element, HPS_ERROR_PAR if the list or object parameter is incorrect, HPS_ERROR_TYPE the n-th element is not an 'int', HPS_OK otherwise

int hps_list_get_int ( list_t list,
int  ind,
LONGLONG *  val 
)

Gets the n-th element of a list if an 'int'.

This function gets an 'int' that is the n-th element of the specified list.

Parameters:
list The list from which the object has to be got
ind The index of the object to get
val The 'int' to get
Returns:
HPS_ERROR_ARM_MEMORY if unable to allocate the element, HPS_ERROR_PAR if the list or object parameter is incorrect, HPS_ERROR_TYPE the n-th element is not an 'int', HPS_OK otherwise

int hps_list_get_list ( list_t list,
int  ind,
list_t **  val 
)

Gets the n-th element of a list if a 'list'.

This function gets a 'list' that is the n-th element of the specified list.

Parameters:
list The list from which the object has to be got
ind The index of the object to get
val The 'list' to get
Returns:
HPS_ERROR_ARM_MEMORY if unable to allocate the element, HPS_ERROR_PAR if the list or object parameter is incorrect, HPS_ERROR_TYPE the n-th element is not an 'int', HPS_OK otherwise

int hps_list_get_real ( list_t list,
int  ind,
double *  val 
)

Gets the n-th element of a list if a 'real'.

This function gets a 'real' that is the n-th element of the specified list.

Parameters:
list The list from which the object has to be got
ind The index of the object to get
val The 'real' to get
Returns:
HPS_ERROR_ARM_MEMORY if unable to allocate the element, HPS_ERROR_PAR if the list or object parameter is incorrect, HPS_ERROR_TYPE the n-th element is not an 'int', HPS_OK otherwise

int hps_list_get_str ( list_t list,
int  ind,
char **  val 
)

Gets the n-th element of a list if a 'string'.

This function gets a 'string' that is the n-th element of the specified list.

Parameters:
list The list from which the object has to be got
ind The index of the object to get
val The 'string' to get
Returns:
HPS_ERROR_ARM_MEMORY if unable to allocate the element, HPS_ERROR_PAR if the list or object parameter is incorrect, HPS_ERROR_TYPE the n-th element is not an 'int', HPS_OK otherwise

int hps_list_get_symb ( list_t list,
int  ind,
entry_t **  val 
)

Gets the n-th element of a list if a 'symb'.

This function gets a 'symb' that is the n-th element of the specified list.

Parameters:
list The list from which the object has to be got
ind The index of the object to get
val The 'symb' to get
Returns:
HPS_ERROR_ARM_MEMORY if unable to allocate the element, HPS_ERROR_PAR if the list or object parameter is incorrect, HPS_ERROR_TYPE the n-th element is not an 'int', HPS_OK otherwise

int hps_list_get_uint ( list_t list,
int  ind,
ULONGLONG *  val 
)

Gets the n-th element of a list if an 'unsigned int'.

This function gets an 'unsigned int' that is the n-th element of the specified list.

Parameters:
list The list from which the object has to be got
ind The index of the object to get
val The 'unsigned int' to get
Returns:
HPS_ERROR_ARM_MEMORY if unable to allocate the element, HPS_ERROR_PAR if the list or object parameter is incorrect, HPS_ERROR_TYPE the n-th element is not an 'int', HPS_OK otherwise


Generated on Tue Mar 4 17:43:20 2014 for HPStack by  doxygen 1.5.0