C Object Manipulation
[C Data Manipulation]


Functions

int hps_obj_create (hpobj_t **obj)
 Creates a C hpobj_t object that will store a RPL object.
int hps_obj_create_type (int type, void *data, hpobj_t **obj)
 Creates a C hpobj_t object and initializes it with a type and a data.
int hps_obj_destroy (hpobj_t **obj)
 Destroys a C hpobj_t object, without destroying the objects pointed by (string, list or array).
int hps_obj_destroy_all (hpobj_t **obj)
 Destroys a C hpobj_t object including the objects pointed by (string, list or array).
int hps_obj_get (hpobj_t *obj, int *type, void **data)
 Gets the type and data of a C hpobj_t object.
int hps_obj_create_int (LONGLONG value, hpobj_t **obj)
 Creates a C hpobj_t object describing an 'int' data.
int hps_obj_create_uint (ULONGLONG value, hpobj_t **obj)
 Creates a C hpobj_t object describing an 'unsigned int' data.
int hps_obj_create_real (double value, hpobj_t **obj)
 Creates a C hpobj_t object describing a 'real' data.
int hps_obj_create_complex (complex_t *value, hpobj_t **obj)
 Creates a C hpobj_t object describing a 'complex' data.
int hps_obj_create_str (char *value, hpobj_t **obj)
 Creates a C hpobj_t object describing a 'string' data.
int hps_obj_create_list (list_t *value, hpobj_t **obj)
 Creates a C hpobj_t object describing a 'list' data.
int hps_obj_create_array (array_t *value, hpobj_t **obj)
 Creates a C hpobj_t object describing a 'array' data.
int hps_obj_create_ident (char *value, hpobj_t **obj)
 Creates a C hpobj_t object describing an 'ident' data.
char * hps_dump (hpobj_t *obj)
 Dumps a C hpobj_t object.

Function Documentation

char* hps_dump ( hpobj_t obj  ) 

Dumps a C hpobj_t object.

This function is not yet implemented.

Parameters:
obj The object (pointer) to dump
Returns:
A string containing a dump of the object

int hps_obj_create ( hpobj_t **  obj  ) 

Creates a C hpobj_t object that will store a RPL object.

This function allocates and initializes an hpobj_t object, that will be used for storing an RPL object.

Parameters:
obj A pointer to the object (pointer) to allocate
Returns:
HPS_ERROR_ARM_MEMORY if unable to allocate, HPS_OK otherwise

int hps_obj_create_array ( array_t value,
hpobj_t **  obj 
)

Creates a C hpobj_t object describing a 'array' data.

This function allocates an initializes an hpobj_t object containing a 'array' data. The value is passed as arguments.

Parameters:
value Value of the data
obj A pointer to the object (pointer) to allocate
Returns:
HPS_ERROR_ARM_MEMORY if unable to allocate, HPS_OK otherwise

int hps_obj_create_complex ( complex_t value,
hpobj_t **  obj 
)

Creates a C hpobj_t object describing a 'complex' data.

This function allocates an initializes an hpobj_t object containing a 'complex' data. The value is passed as arguments.

Parameters:
value Value of the data
obj A pointer to the object (pointer) to allocate
Returns:
HPS_ERROR_ARM_MEMORY if unable to allocate, HPS_OK otherwise

int hps_obj_create_ident ( char *  value,
hpobj_t **  obj 
)

Creates a C hpobj_t object describing an 'ident' data.

This function allocates an initializes an hpobj_t object containing an 'ident' data. The value is passed as arguments.

Parameters:
value Value of the data
obj A pointer to the object (pointer) to allocate
Returns:
HPS_ERROR_ARM_MEMORY if unable to allocate, HPS_OK otherwise

int hps_obj_create_int ( LONGLONG  value,
hpobj_t **  obj 
)

Creates a C hpobj_t object describing an 'int' data.

This function allocates an initializes an hpobj_t object containing an 'int' data. The value is passed as arguments.

Parameters:
value Value of the data
obj A pointer to the object (pointer) to allocate
Returns:
HPS_ERROR_ARM_MEMORY if unable to allocate, HPS_OK otherwise

int hps_obj_create_list ( list_t value,
hpobj_t **  obj 
)

Creates a C hpobj_t object describing a 'list' data.

This function allocates an initializes an hpobj_t object containing a 'list' data. The value is passed as arguments.

Parameters:
value Value of the data
obj A pointer to the object (pointer) to allocate
Returns:
HPS_ERROR_ARM_MEMORY if unable to allocate, HPS_OK otherwise

int hps_obj_create_real ( double  value,
hpobj_t **  obj 
)

Creates a C hpobj_t object describing a 'real' data.

This function allocates an initializes an hpobj_t object containing a 'real' data. The value is passed as arguments.

Parameters:
value Value of the data
obj A pointer to the object (pointer) to allocate
Returns:
HPS_ERROR_ARM_MEMORY if unable to allocate, HPS_OK otherwise

int hps_obj_create_str ( char *  value,
hpobj_t **  obj 
)

Creates a C hpobj_t object describing a 'string' data.

This function allocates an initializes an hpobj_t object containing a 'string' data. The value is passed as arguments.

Parameters:
value Value of the data
obj A pointer to the object (pointer) to allocate
Returns:
HPS_ERROR_ARM_MEMORY if unable to allocate, HPS_OK otherwise

int hps_obj_create_type ( int  type,
void *  data,
hpobj_t **  obj 
)

Creates a C hpobj_t object and initializes it with a type and a data.

This function allocates and initializes an hpobj_t object. The type and data to store are passed as arguments.

Parameters:
type Type of the RPL object to store
data Pointer to the value of the object
obj A pointer to the object (pointer) to allocate
Returns:
HPS_ERROR_ARM_MEMORY if unable to allocate, HPS_OK otherwise

int hps_obj_create_uint ( ULONGLONG  value,
hpobj_t **  obj 
)

Creates a C hpobj_t object describing an 'unsigned int' data.

This function allocates an initializes an hpobj_t object containing an 'unsigned int' data. The value is passed as arguments.

Parameters:
value Value of the data
obj A pointer to the object (pointer) to allocate
Returns:
HPS_ERROR_ARM_MEMORY if unable to allocate, HPS_OK otherwise

int hps_obj_destroy ( hpobj_t **  obj  ) 

Destroys a C hpobj_t object, without destroying the objects pointed by (string, list or array).

This function destroys a hpobj_t object. The destruction applies only to the hpobj_t descriptor. If there is any data pointed by (string, list or array), this data is not destroyed.

Parameters:
obj A pointer to the object (pointer) to destroy
Returns:
HPS_ERROR_PAR if any pointer is incorrect, HPS_OK otherwise

int hps_obj_destroy_all ( hpobj_t **  obj  ) 

Destroys a C hpobj_t object including the objects pointed by (string, list or array).

This function destroys a hpobj_t object. The destruction applies to the hpobj_t descriptor and to the data pointed by (string, list or array).

Parameters:
obj A pointer to the object (pointer) to destroy
Returns:
HPS_ERROR_PAR if any pointer is incorrect, HPS_OK otherwise

int hps_obj_get ( hpobj_t obj,
int *  type,
void **  data 
)

Gets the type and data of a C hpobj_t object.

This function gets the type and the data from an existing C hpobj_t object.

Parameters:
obj C hpobj_t object
type Pointer to the type of the object
data Generic pointer to the data of the object
Returns:
HPS_ERROR_PAR if the object is NULL, HPS_OK otherwise


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