Common Pipeline Library Reference 7.3.2
|
Typedefs | |
typedef struct _cpl_propertylist_ | cpl_propertylist |
The opaque property list data type. | |
typedef int(* | cpl_propertylist_compare_func) (const cpl_property *first, const cpl_property *second) |
The property comparison function data type. | |
Functions | |
cpl_error_code | cpl_propertylist_append (cpl_propertylist *self, const cpl_propertylist *other) |
Append a property list.. | |
cpl_error_code | cpl_propertylist_append_bool (cpl_propertylist *self, const char *name, int value) |
Append a boolean value to a property list. | |
cpl_error_code | cpl_propertylist_append_char (cpl_propertylist *self, const char *name, char value) |
Append a character value to a property list. | |
cpl_error_code | cpl_propertylist_append_double (cpl_propertylist *self, const char *name, double value) |
Append a double value to a property list. | |
cpl_error_code | cpl_propertylist_append_double_complex (cpl_propertylist *self, const char *name, double complex value) |
Append a double complex value to a property list. | |
cpl_error_code | cpl_propertylist_append_float (cpl_propertylist *self, const char *name, float value) |
Append a float value to a property list. | |
cpl_error_code | cpl_propertylist_append_float_complex (cpl_propertylist *self, const char *name, float complex value) |
Append a float complex value to a property list. | |
cpl_error_code | cpl_propertylist_append_int (cpl_propertylist *self, const char *name, int value) |
Append an integer value to a property list. | |
cpl_error_code | cpl_propertylist_append_long (cpl_propertylist *self, const char *name, long value) |
Append a long value to a property list. | |
cpl_error_code | cpl_propertylist_append_long_long (cpl_propertylist *self, const char *name, long long value) |
Append a long long value to a property list. | |
cpl_error_code | cpl_propertylist_append_property (cpl_propertylist *self, const cpl_property *property) |
Append a duplicate of a property to a property list. | |
cpl_error_code | cpl_propertylist_append_string (cpl_propertylist *self, const char *name, const char *value) |
Append a string value to a property list. | |
cpl_error_code | cpl_propertylist_copy_property (cpl_propertylist *self, const cpl_propertylist *other, const char *name) |
Copy a property from another property list. | |
cpl_error_code | cpl_propertylist_copy_property_regexp (cpl_propertylist *self, const cpl_propertylist *other, const char *regexp, int invert) |
Copy matching properties from another property list. | |
void | cpl_propertylist_delete (cpl_propertylist *self) |
Destroy a property list. | |
void | cpl_propertylist_dump (const cpl_propertylist *self, FILE *stream) |
Print a property list. | |
cpl_propertylist * | cpl_propertylist_duplicate (const cpl_propertylist *self) |
Create a copy of the given property list. | |
void | cpl_propertylist_empty (cpl_propertylist *self) |
Remove all properties from a property list. | |
int | cpl_propertylist_erase (cpl_propertylist *self, const char *name) |
Erase the given property from a property list. | |
int | cpl_propertylist_erase_regexp (cpl_propertylist *self, const char *regexp, int invert) |
Erase all properties with name matching a given regular expression. | |
cpl_property * | cpl_propertylist_get (cpl_propertylist *self, long position) |
Access property list elements by index. | |
int | cpl_propertylist_get_bool (const cpl_propertylist *self, const char *name) |
Get the boolean value of the given property list entry. | |
char | cpl_propertylist_get_char (const cpl_propertylist *self, const char *name) |
Get the character value of the given property list entry. | |
const char * | cpl_propertylist_get_comment (const cpl_propertylist *self, const char *name) |
Get the comment of the given property list entry. | |
const cpl_property * | cpl_propertylist_get_const (const cpl_propertylist *self, long position) |
Access property list elements by index. | |
double | cpl_propertylist_get_double (const cpl_propertylist *self, const char *name) |
Get the double value of the given property list entry. | |
double complex | cpl_propertylist_get_double_complex (const cpl_propertylist *self, const char *name) |
Get the double complex value of the given property list entry. | |
float | cpl_propertylist_get_float (const cpl_propertylist *self, const char *name) |
Get the float value of the given property list entry. | |
float complex | cpl_propertylist_get_float_complex (const cpl_propertylist *self, const char *name) |
Get the float complex value of the given property list entry. | |
int | cpl_propertylist_get_int (const cpl_propertylist *self, const char *name) |
Get the integer value of the given property list entry. | |
long | cpl_propertylist_get_long (const cpl_propertylist *self, const char *name) |
Get the long value of the given property list entry. | |
long long | cpl_propertylist_get_long_long (const cpl_propertylist *self, const char *name) |
Get the long long value of the given property list entry. | |
cpl_property * | cpl_propertylist_get_property (cpl_propertylist *self, const char *name) |
Access property list elements by property name. | |
const cpl_property * | cpl_propertylist_get_property_const (const cpl_propertylist *self, const char *name) |
Access property list elements by property name. | |
cpl_size | cpl_propertylist_get_size (const cpl_propertylist *self) |
Get the current size of a property list. | |
const char * | cpl_propertylist_get_string (const cpl_propertylist *self, const char *name) |
Get the string value of the given property list entry. | |
cpl_type | cpl_propertylist_get_type (const cpl_propertylist *self, const char *name) |
Get the the type of a property list entry. | |
int | cpl_propertylist_has (const cpl_propertylist *self, const char *name) |
Check whether a property is present in a property list. | |
cpl_error_code | cpl_propertylist_insert_after_bool (cpl_propertylist *self, const char *after, const char *name, int value) |
Insert a boolean value into a property list after the given position. | |
cpl_error_code | cpl_propertylist_insert_after_char (cpl_propertylist *self, const char *after, const char *name, char value) |
Insert a character value into a property list after the given position. | |
cpl_error_code | cpl_propertylist_insert_after_double (cpl_propertylist *self, const char *after, const char *name, double value) |
Insert a double value into a property list after the given position. | |
cpl_error_code | cpl_propertylist_insert_after_double_complex (cpl_propertylist *self, const char *after, const char *name, double complex value) |
Insert a double complex value into a property list after the given position. | |
cpl_error_code | cpl_propertylist_insert_after_float (cpl_propertylist *self, const char *after, const char *name, float value) |
Insert a float value into a property list after the given position. | |
cpl_error_code | cpl_propertylist_insert_after_float_complex (cpl_propertylist *self, const char *after, const char *name, float complex value) |
Insert a float complex value into a property list after the given position. | |
cpl_error_code | cpl_propertylist_insert_after_int (cpl_propertylist *self, const char *after, const char *name, int value) |
Insert a integer value into a property list after the given position. | |
cpl_error_code | cpl_propertylist_insert_after_long (cpl_propertylist *self, const char *after, const char *name, long value) |
Insert a long value into a property list after the given position. | |
cpl_error_code | cpl_propertylist_insert_after_long_long (cpl_propertylist *self, const char *after, const char *name, long long value) |
Insert a long long value into a property list after the given position. | |
cpl_error_code | cpl_propertylist_insert_after_property (cpl_propertylist *self, const char *after, const cpl_property *property) |
Insert a property into a property list after the given position. | |
cpl_error_code | cpl_propertylist_insert_after_string (cpl_propertylist *self, const char *after, const char *name, const char *value) |
Insert a string value into a property list after the given position. | |
cpl_error_code | cpl_propertylist_insert_bool (cpl_propertylist *self, const char *here, const char *name, int value) |
Insert a boolean value into a property list at the given position. | |
cpl_error_code | cpl_propertylist_insert_char (cpl_propertylist *self, const char *here, const char *name, char value) |
Insert a character value into a property list at the given position. | |
cpl_error_code | cpl_propertylist_insert_double (cpl_propertylist *self, const char *here, const char *name, double value) |
Insert a double value into a property list at the given position. | |
cpl_error_code | cpl_propertylist_insert_double_complex (cpl_propertylist *self, const char *here, const char *name, double complex value) |
Insert a double complex value into a property list at the given position. | |
cpl_error_code | cpl_propertylist_insert_float (cpl_propertylist *self, const char *here, const char *name, float value) |
Insert a float value into a property list at the given position. | |
cpl_error_code | cpl_propertylist_insert_float_complex (cpl_propertylist *self, const char *here, const char *name, float complex value) |
Insert a float complex value into a property list at the given position. | |
cpl_error_code | cpl_propertylist_insert_int (cpl_propertylist *self, const char *here, const char *name, int value) |
Insert a integer value into a property list at the given position. | |
cpl_error_code | cpl_propertylist_insert_long (cpl_propertylist *self, const char *here, const char *name, long value) |
Insert a long value into a property list at the given position. | |
cpl_error_code | cpl_propertylist_insert_long_long (cpl_propertylist *self, const char *here, const char *name, long long value) |
Insert a long long value into a property list at the given position. | |
cpl_error_code | cpl_propertylist_insert_property (cpl_propertylist *self, const char *here, const cpl_property *property) |
Insert a property into a property list at the given position. | |
cpl_error_code | cpl_propertylist_insert_string (cpl_propertylist *self, const char *here, const char *name, const char *value) |
Insert a string value into a property list at the given position. | |
int | cpl_propertylist_is_empty (const cpl_propertylist *self) |
Check whether a property list is empty. | |
cpl_propertylist * | cpl_propertylist_load (const char *name, cpl_size position) |
Create a property list from a file. | |
cpl_propertylist * | cpl_propertylist_load_regexp (const char *name, cpl_size position, const char *regexp, int invert) |
Create a filtered property list from a file. | |
cpl_propertylist * | cpl_propertylist_new (void) |
Create an empty property list. | |
cpl_error_code | cpl_propertylist_prepend_bool (cpl_propertylist *self, const char *name, int value) |
Prepend a boolean value to a property list. | |
cpl_error_code | cpl_propertylist_prepend_char (cpl_propertylist *self, const char *name, char value) |
Prepend a character value to a property list. | |
cpl_error_code | cpl_propertylist_prepend_double (cpl_propertylist *self, const char *name, double value) |
Prepend a double value to a property list. | |
cpl_error_code | cpl_propertylist_prepend_double_complex (cpl_propertylist *self, const char *name, double complex value) |
Prepend a double complex value to a property list. | |
cpl_error_code | cpl_propertylist_prepend_float (cpl_propertylist *self, const char *name, float value) |
Prepend a float value to a property list. | |
cpl_error_code | cpl_propertylist_prepend_float_complex (cpl_propertylist *self, const char *name, float complex value) |
Prepend a float complex value to a property list. | |
cpl_error_code | cpl_propertylist_prepend_int (cpl_propertylist *self, const char *name, int value) |
Prepend a integer value to a property list. | |
cpl_error_code | cpl_propertylist_prepend_long (cpl_propertylist *self, const char *name, long value) |
Prepend a long value to a property list. | |
cpl_error_code | cpl_propertylist_prepend_long_long (cpl_propertylist *self, const char *name, long long value) |
Prepend a long long value to a property list. | |
cpl_error_code | cpl_propertylist_prepend_property (cpl_propertylist *self, const cpl_property *property) |
Prepend a property to a property list. | |
cpl_error_code | cpl_propertylist_prepend_string (cpl_propertylist *self, const char *name, const char *value) |
Prepend a string value to a property list. | |
cpl_error_code | cpl_propertylist_save (const cpl_propertylist *self, const char *filename, unsigned mode) |
Save a property list to a FITS file. | |
cpl_error_code | cpl_propertylist_set_bool (cpl_propertylist *self, const char *name, int value) |
Set the value of the given boolean property list entry. | |
cpl_error_code | cpl_propertylist_set_char (cpl_propertylist *self, const char *name, char value) |
Set the value of the given character property list entry. | |
cpl_error_code | cpl_propertylist_set_comment (cpl_propertylist *self, const char *name, const char *comment) |
Modify the comment field of the given property list entry. | |
cpl_error_code | cpl_propertylist_set_double (cpl_propertylist *self, const char *name, double value) |
Set the value of the given double property list entry. | |
cpl_error_code | cpl_propertylist_set_double_complex (cpl_propertylist *self, const char *name, double complex value) |
Set the value of the given double complex property list entry. | |
cpl_error_code | cpl_propertylist_set_float (cpl_propertylist *self, const char *name, float value) |
Set the value of the given float property list entry. | |
cpl_error_code | cpl_propertylist_set_float_complex (cpl_propertylist *self, const char *name, float complex value) |
Set the value of the given float complex property list entry. | |
cpl_error_code | cpl_propertylist_set_int (cpl_propertylist *self, const char *name, int value) |
Set the value of the given integer property list entry. | |
cpl_error_code | cpl_propertylist_set_long (cpl_propertylist *self, const char *name, long value) |
Set the value of the given long property list entry. | |
cpl_error_code | cpl_propertylist_set_long_long (cpl_propertylist *self, const char *name, long long value) |
Set the value of the given long long property list entry. | |
cpl_error_code | cpl_propertylist_set_string (cpl_propertylist *self, const char *name, const char *value) |
Set the value of the given string property list entry. | |
cpl_error_code | cpl_propertylist_sort (cpl_propertylist *self, cpl_propertylist_compare_func compare) |
Sort a property list. | |
cpl_error_code | cpl_propertylist_update_bool (cpl_propertylist *self, const char *name, int value) |
Update a property list with a boolean value. | |
cpl_error_code | cpl_propertylist_update_char (cpl_propertylist *self, const char *name, char value) |
Update a property list with a character value. | |
cpl_error_code | cpl_propertylist_update_double (cpl_propertylist *self, const char *name, double value) |
Update a property list with a double value. | |
cpl_error_code | cpl_propertylist_update_double_complex (cpl_propertylist *self, const char *name, double complex value) |
Update a property list with a double complex value. | |
cpl_error_code | cpl_propertylist_update_float (cpl_propertylist *self, const char *name, float value) |
Update a property list with a float value. | |
cpl_error_code | cpl_propertylist_update_float_complex (cpl_propertylist *self, const char *name, float complex value) |
Update a property list with a float complex value. | |
cpl_error_code | cpl_propertylist_update_int (cpl_propertylist *self, const char *name, int value) |
Update a property list with a integer value. | |
cpl_error_code | cpl_propertylist_update_long (cpl_propertylist *self, const char *name, long value) |
Update a property list with a long value. | |
cpl_error_code | cpl_propertylist_update_long_long (cpl_propertylist *self, const char *name, long long value) |
Update a property list with a long long value. | |
cpl_error_code | cpl_propertylist_update_string (cpl_propertylist *self, const char *name, const char *value) |
Update a property list with a string value. | |
This module implements a container for properties (see Properties) which can be used to store auxiliary values related to another data object, an image or a table for instance. The property values can be set and retrieved by their associated name and properties can be added and removed from the list. The property list container is an ordered sequence of properties.
typedef struct _cpl_propertylist_ cpl_propertylist |
The opaque property list data type.
typedef int(* cpl_propertylist_compare_func) (const cpl_property *first, const cpl_property *second) |
The property comparison function data type.
cpl_error_code cpl_propertylist_append | ( | cpl_propertylist * | self, |
const cpl_propertylist * | other | ||
) |
Append a property list..
self | A property list. |
other | The property list to append. |
CPL_ERROR_NONE
on success or a CPL error code otherwise.CPL_ERROR_NULL_INPUT | The parameter self is a NULL pointer. |
The function appends the property list other to the property list self.
References CPL_ERROR_NONE, CPL_ERROR_NULL_INPUT, and cpl_property_duplicate().
Referenced by cpl_dfs_setup_product_header().
cpl_error_code cpl_propertylist_append_bool | ( | cpl_propertylist * | self, |
const char * | name, | ||
int | value | ||
) |
Append a boolean value to a property list.
self | A property list. |
name | The property name to be assigned to the value. |
value | The boolean value to store. |
CPL_ERROR_NONE
on success or a CPL error code otherwise.CPL_ERROR_NULL_INPUT | The parameter self or name is a NULL pointer. |
The function creates a new boolean property with name name and value value. The property is appended to the property list self.
References CPL_ERROR_NONE, CPL_ERROR_NULL_INPUT, cpl_property_new(), cpl_property_set_bool(), and CPL_TYPE_BOOL.
cpl_error_code cpl_propertylist_append_char | ( | cpl_propertylist * | self, |
const char * | name, | ||
char | value | ||
) |
Append a character value to a property list.
self | A property list. |
name | The property name to be assigned to the value. |
value | The character value to store. |
CPL_ERROR_NONE
on success or a CPL error code otherwise.CPL_ERROR_NULL_INPUT | The parameter self or name is a NULL pointer. |
The function creates a new character property with name name and value value. The property is appended to the property list self.
References CPL_ERROR_NONE, CPL_ERROR_NULL_INPUT, cpl_property_new(), cpl_property_set_char(), and CPL_TYPE_CHAR.
cpl_error_code cpl_propertylist_append_double | ( | cpl_propertylist * | self, |
const char * | name, | ||
double | value | ||
) |
Append a double value to a property list.
self | A property list. |
name | The property name to be assigned to the value. |
value | The double value to store. |
CPL_ERROR_NONE
on success or a CPL error code otherwise.CPL_ERROR_NULL_INPUT | The parameter self or name is a NULL pointer. |
The function creates a new double property with name name and value value. The property is appended to the property list self.
References CPL_ERROR_NONE, CPL_ERROR_NULL_INPUT, cpl_property_new(), cpl_property_set_double(), and CPL_TYPE_DOUBLE.
cpl_error_code cpl_propertylist_append_double_complex | ( | cpl_propertylist * | self, |
const char * | name, | ||
double complex | value | ||
) |
Append a double complex value to a property list.
self | A property list. |
name | The property name to be assigned to the value. |
value | The double complex value to store. |
CPL_ERROR_NONE
on success or a CPL error code otherwise.CPL_ERROR_NULL_INPUT | The parameter self or name is a NULL pointer. |
The function creates a new double complex property with name name and value value. The property is appended to the property list self.
References CPL_ERROR_NONE, CPL_ERROR_NULL_INPUT, cpl_property_new(), cpl_property_set_double_complex(), and CPL_TYPE_DOUBLE_COMPLEX.
cpl_error_code cpl_propertylist_append_float | ( | cpl_propertylist * | self, |
const char * | name, | ||
float | value | ||
) |
Append a float value to a property list.
self | A property list. |
name | The property name to be assigned to the value. |
value | The float value to store. |
CPL_ERROR_NONE
on success or a CPL error code otherwise.CPL_ERROR_NULL_INPUT | The parameter self or name is a NULL pointer. |
The function creates a new float property with name name and value value. The property is appended to the property list self.
References CPL_ERROR_NONE, CPL_ERROR_NULL_INPUT, cpl_property_new(), cpl_property_set_float(), and CPL_TYPE_FLOAT.
cpl_error_code cpl_propertylist_append_float_complex | ( | cpl_propertylist * | self, |
const char * | name, | ||
float complex | value | ||
) |
Append a float complex value to a property list.
self | A property list. |
name | The property name to be assigned to the value. |
value | The float complex value to store. |
CPL_ERROR_NONE
on success or a CPL error code otherwise.CPL_ERROR_NULL_INPUT | The parameter self or name is a NULL pointer. |
The function creates a new float complex property with name name and value value. The property is appended to the property list self.
References CPL_ERROR_NONE, CPL_ERROR_NULL_INPUT, cpl_property_new(), cpl_property_set_float_complex(), and CPL_TYPE_FLOAT_COMPLEX.
cpl_error_code cpl_propertylist_append_int | ( | cpl_propertylist * | self, |
const char * | name, | ||
int | value | ||
) |
Append an integer value to a property list.
self | A property list. |
name | The property name to be assigned to the value. |
value | The integer value to store. |
CPL_ERROR_NONE
on success or a CPL error code otherwise.CPL_ERROR_NULL_INPUT | The parameter self or name is a NULL pointer. |
The function creates a new integer property with name name and value value. The property is appended to the property list self.
References CPL_ERROR_NONE, CPL_ERROR_NULL_INPUT, cpl_property_new(), cpl_property_set_int(), and CPL_TYPE_INT.
cpl_error_code cpl_propertylist_append_long | ( | cpl_propertylist * | self, |
const char * | name, | ||
long | value | ||
) |
Append a long value to a property list.
self | A property list. |
name | The property name to be assigned to the value. |
value | The long value to store. |
CPL_ERROR_NONE
on success or a CPL error code otherwise.CPL_ERROR_NULL_INPUT | The parameter self or name is a NULL pointer. |
The function creates a new long property with name name and value value. The property is appended to the property list self.
References CPL_ERROR_NONE, CPL_ERROR_NULL_INPUT, cpl_property_new(), cpl_property_set_long(), and CPL_TYPE_LONG.
cpl_error_code cpl_propertylist_append_long_long | ( | cpl_propertylist * | self, |
const char * | name, | ||
long long | value | ||
) |
Append a long long value to a property list.
self | A property list. |
name | The property name to be assigned to the value. |
value | The long long value to store. |
CPL_ERROR_NONE
on success or a CPL error code otherwise.CPL_ERROR_NULL_INPUT | The parameter self or name is a NULL pointer. |
The function creates a new long long property with name name and value value. The property is appended to the property list self.
References CPL_ERROR_NONE, CPL_ERROR_NULL_INPUT, cpl_property_new(), cpl_property_set_long_long(), and CPL_TYPE_LONG_LONG.
cpl_error_code cpl_propertylist_append_property | ( | cpl_propertylist * | self, |
const cpl_property * | property | ||
) |
Append a duplicate of a property to a property list.
self | Property list to append to |
property | The property to duplicate and append |
CPL_ERROR_NONE
on success or a CPL error code otherwise.CPL_ERROR_NULL_INPUT | The parameter self or property is a NULL pointer. |
This function creates a new property and appends it to the end of a property list. It will not check if the property already exists.
References CPL_ERROR_NONE, CPL_ERROR_NULL_INPUT, and cpl_property_duplicate().
Referenced by cpl_dfs_setup_product_header().
cpl_error_code cpl_propertylist_append_string | ( | cpl_propertylist * | self, |
const char * | name, | ||
const char * | value | ||
) |
Append a string value to a property list.
self | A property list. |
name | The property name to be assigned to the value. |
value | The string value to store. |
CPL_ERROR_NONE
on success or a CPL error code otherwise.CPL_ERROR_NULL_INPUT | The parameter self, name or value is a NULL pointer. |
The function creates a new string property with name name and value value. The property is appended to the property list self.
References CPL_ERROR_NONE, CPL_ERROR_NULL_INPUT, cpl_property_new(), cpl_property_set_string(), and CPL_TYPE_STRING.
cpl_error_code cpl_propertylist_copy_property | ( | cpl_propertylist * | self, |
const cpl_propertylist * | other, | ||
const char * | name | ||
) |
Copy a property from another property list.
self | A property list. |
other | The property list from which a property is copied. |
name | The name of the property to copy. |
CPL_ERROR_NONE
on success or a CPL error code otherwise.CPL_ERROR_NULL_INPUT | The parameter self, other or name is a NULL pointer. |
CPL_ERROR_DATA_NOT_FOUND | The property list other does not contain a property with the name name. |
CPL_ERROR_TYPE_MISMATCH | The property list self contains a property with the name name which is not of the same type as the property which should be copied from other. |
The function copies the property name from the property list other to the property list self. If the property list self does not already contain a property name the property is appended to self. If a property name exists already in self the function overwrites the contents of this property if and only if this property is of the same type as the property to be copied from other.
References CPL_ERROR_DATA_NOT_FOUND, CPL_ERROR_NONE, CPL_ERROR_NULL_INPUT, CPL_ERROR_TYPE_MISMATCH, and cpl_property_duplicate().
cpl_error_code cpl_propertylist_copy_property_regexp | ( | cpl_propertylist * | self, |
const cpl_propertylist * | other, | ||
const char * | regexp, | ||
int | invert | ||
) |
Copy matching properties from another property list.
self | A property list. |
other | The property list from which a property is copied. |
regexp | The regular expression used to select properties. |
invert | Flag inverting the sense of matching. |
CPL_ERROR_NONE
on success or a CPL error code otherwise.CPL_ERROR_NULL_INPUT | The parameter self, other or regexp is a NULL pointer. |
CPL_ERROR_ILLEGAL_INPUT | The parameter regexp is an invalid regular expression, including the empty stringr. |
CPL_ERROR_TYPE_MISMATCH | The property list self contains a property with the name name which is not of the same type as the property which should be copied from other. |
The function copies all properties with matching names from the property list other to the property list self. If the flag invert is zero, all properties whose names match the regular expression regexp are copied. If invert is set to a non-zero value, all properties with names not matching regexp are copied rather. The function expects POSIX 1003.2 compliant extended regular expressions.
If the property list self does not already contain one of the properties to be copied this property is appended to self. If a property to be copied exists already in self the function overwrites the contents of this property.
Before properties are copied from the property list other to self the types of the properties are checked and if any type mismatch is detected the function stops processing immediately. The property list self is not at all modified in this case.
References CPL_ERROR_ILLEGAL_INPUT, CPL_ERROR_NONE, and CPL_ERROR_NULL_INPUT.
void cpl_propertylist_delete | ( | cpl_propertylist * | self | ) |
Destroy a property list.
self | The property list to . |
The function destroys the property list self and its whole contents. If self is NULL
, nothing is done and no error is set.
References cpl_property_delete().
Referenced by cpl_dfs_setup_product_header(), cpl_propertylist_load(), and cpl_propertylist_load_regexp().
void cpl_propertylist_dump | ( | const cpl_propertylist * | self, |
FILE * | stream | ||
) |
Print a property list.
self | Pointer to property list |
stream | The output stream |
This function is mainly intended for debug purposes. If the specified stream is NULL
, it is set to stdout. The function used for printing is the standard C fprintf()
.
References cpl_property_get_bool(), cpl_property_get_char(), cpl_property_get_comment(), cpl_property_get_double(), cpl_property_get_double_complex(), cpl_property_get_float(), cpl_property_get_float_complex(), cpl_property_get_int(), cpl_property_get_long(), cpl_property_get_long_long(), cpl_property_get_name(), cpl_property_get_size(), cpl_property_get_string(), cpl_propertylist_get_const(), cpl_propertylist_get_size(), CPL_SIZE_FORMAT, CPL_TYPE_BOOL, CPL_TYPE_CHAR, CPL_TYPE_DOUBLE, CPL_TYPE_DOUBLE_COMPLEX, CPL_TYPE_FLOAT, CPL_TYPE_FLOAT_COMPLEX, cpl_type_get_name(), CPL_TYPE_INT, CPL_TYPE_LONG, CPL_TYPE_LONG_LONG, and CPL_TYPE_STRING.
cpl_propertylist * cpl_propertylist_duplicate | ( | const cpl_propertylist * | self | ) |
Create a copy of the given property list.
self | The property list to be copied. |
NULL
in case an error occurred.CPL_ERROR_NULL_INPUT | The parameter self is a NULL pointer. |
The function creates a deep copy of the given property list self, i.e the created copy and the original property list do not share any resources.
References CPL_ERROR_NULL_INPUT, cpl_property_duplicate(), and cpl_propertylist_new().
void cpl_propertylist_empty | ( | cpl_propertylist * | self | ) |
Remove all properties from a property list.
self | A property list. |
CPL_ERROR_NULL_INPUT | The parameter self is a NULL pointer. |
The function removes all properties from self. Each property is properly deallocated. After calling this function self is empty.
References CPL_ERROR_NULL_INPUT, and cpl_property_delete().
int cpl_propertylist_erase | ( | cpl_propertylist * | self, |
const char * | name | ||
) |
Erase the given property from a property list.
self | A property list. |
name | Name of the property to erase. |
CPL_ERROR_NULL_INPUT | The parameter self or name is a NULL pointer. |
The function searches the property with the name name in the property list self and removes it. The property is destroyed. If self contains multiple duplicates of a property named name, only the first one is erased.
References CPL_ERROR_NULL_INPUT, and cpl_property_delete().
Referenced by cpl_dfs_setup_product_header().
int cpl_propertylist_erase_regexp | ( | cpl_propertylist * | self, |
const char * | regexp, | ||
int | invert | ||
) |
Erase all properties with name matching a given regular expression.
self | A property list. |
regexp | Regular expression. |
invert | Flag inverting the sense of matching. |
CPL_ERROR_NULL_INPUT | The parameter self or regexp is a NULL pointer. |
CPL_ERROR_ILLEGAL_INPUT | The parameter regexp is the empty string. |
The function searches for all the properties matching in the list self and removes them. Whether a property matches or not depends on the given regular expression regexp, and the flag invert. If invert is 0
, all properties matching regexp are removed from the list. If invert is set to a non-zero value, all properties which do not match regexp are erased. The removed properties are destroyed.
The function expects POSIX 1003.2 compliant extended regular expressions.
References CPL_ERROR_ILLEGAL_INPUT, and CPL_ERROR_NULL_INPUT.
cpl_property * cpl_propertylist_get | ( | cpl_propertylist * | self, |
long | position | ||
) |
Access property list elements by index.
self | The property list to query. |
position | Index of the element to retrieve. |
NULL
if position is out of range.CPL_ERROR_NULL_INPUT | The parameter self is a NULL pointer. |
The function returns a handle for the property list element, the property, with the index position. Numbering of property list elements extends from 0 to cpl_propertylist_get_size() - 1. If position is less than 0 or greater equal than cpl_propertylist_get_size() the function returns NULL
.
References cpl_errorstate_get(), cpl_errorstate_is_equal(), and cpl_propertylist_get_const().
int cpl_propertylist_get_bool | ( | const cpl_propertylist * | self, |
const char * | name | ||
) |
Get the boolean value of the given property list entry.
self | A property list. |
name | The property name to look up. |
TRUE
is represented as non-zero value while 0 indicates FALSE
. The function returns 0 if an error occurs and an appropriate error code is set.CPL_ERROR_NULL_INPUT | The parameter self or name is a NULL pointer. |
CPL_ERROR_DATA_NOT_FOUND | The property list self does not contain a property with the name name. |
CPL_ERROR_TYPE_MISMATCH | The sought-after property name is not of type CPL_TYPE_BOOL . |
The function searches the property list self for a property named name. If it is present in the list, its boolean value is returned. If there is more than one property with the same name, it takes the first one from the list.
References CPL_ERROR_DATA_NOT_FOUND, CPL_ERROR_NULL_INPUT, cpl_errorstate_get(), cpl_errorstate_is_equal(), and cpl_property_get_bool().
char cpl_propertylist_get_char | ( | const cpl_propertylist * | self, |
const char * | name | ||
) |
Get the character value of the given property list entry.
self | A property list. |
name | The property name to look up. |
CPL_ERROR_NULL_INPUT | The parameter self or name is a NULL pointer. |
CPL_ERROR_DATA_NOT_FOUND | The property list self does not contain a property with the name name. |
CPL_ERROR_TYPE_MISMATCH | The sought-after property name is not of type CPL_TYPE_CHAR . |
The function searches the property list self for a property named name. If it is present in the list, its character value is returned. If there is more than one property with the same name, it takes the first one from the list.
References CPL_ERROR_DATA_NOT_FOUND, CPL_ERROR_NULL_INPUT, cpl_errorstate_get(), cpl_errorstate_is_equal(), and cpl_property_get_char().
const char * cpl_propertylist_get_comment | ( | const cpl_propertylist * | self, |
const char * | name | ||
) |
Get the comment of the given property list entry.
self | A property list. |
name | The property name to look up. |
NULL
.CPL_ERROR_NULL_INPUT | The parameter self or name is a NULL pointer. |
CPL_ERROR_DATA_NOT_FOUND | The property list self does not contain a property with the name name. |
The function searches the property list self for a property named name. If it is present in the list, its comment string is returned. If an entry with the name name is not found, or if the entry has no comment the function returns NULL
. If there is more than one property with the same name, it takes the first one from the list.
References CPL_ERROR_DATA_NOT_FOUND, CPL_ERROR_NULL_INPUT, and cpl_property_get_comment().
const cpl_property * cpl_propertylist_get_const | ( | const cpl_propertylist * | self, |
long | position | ||
) |
Access property list elements by index.
self | The property list to query. |
position | Index of the element to retrieve. |
NULL
if position is out of range.CPL_ERROR_NULL_INPUT | The parameter self is a NULL pointer. |
The function returns a handle for the property list element, the property, with the index position. Numbering of property list elements extends from 0 to cpl_propertylist_get_size() - 1. If position is less than 0 or greater equal than cpl_propertylist_get_size() the function returns NULL
.
References CPL_ERROR_NULL_INPUT.
Referenced by cpl_multiframe_dataset_properties_remove(), cpl_multiframe_dataset_properties_update(), cpl_propertylist_dump(), and cpl_propertylist_get().
double cpl_propertylist_get_double | ( | const cpl_propertylist * | self, |
const char * | name | ||
) |
Get the double value of the given property list entry.
self | A property list. |
name | The property name to look up. |
CPL_ERROR_NULL_INPUT | The parameter self or name is a NULL pointer. |
CPL_ERROR_DATA_NOT_FOUND | The property list self does not contain a property with the name name. |
CPL_ERROR_TYPE_MISMATCH | The sought-after property name is not of type CPL_TYPE_DOUBLE or CPL_TYPE_FLOAT . |
The function searches the property list self for a property named name. If it is present in the list, its double value is returned. If there is more than one property with the same name, it takes the first one from the list. If the value is of type float, the function casts it to double before returning it.
The function may be used to access the value of all floating-point type properties whose floating-point value has a rank less or equal to the functions return type. If the value of a compatible property is retrieved, it is promoted to the return type of the function.
References CPL_ERROR_DATA_NOT_FOUND, CPL_ERROR_NULL_INPUT, cpl_errorstate_get(), cpl_errorstate_is_equal(), and cpl_property_get_double().
double complex cpl_propertylist_get_double_complex | ( | const cpl_propertylist * | self, |
const char * | name | ||
) |
Get the double complex value of the given property list entry.
self | A property list. |
name | The property name to look up. |
CPL_ERROR_NULL_INPUT | The parameter self or name is a NULL pointer. |
CPL_ERROR_DATA_NOT_FOUND | The property list self does not contain a property with the name name. |
CPL_ERROR_TYPE_MISMATCH | The sought-after property name is not of type CPL_TYPE_DOUBLE_COMPLEX or CPL_TYPE_FLOAT_COMPLEX . |
The function searches the property list self for a property named name. If it is present in the list, its double complex value is returned. If there is more than one property with the same name, it takes the first one from the list. If the value is of type float, the function casts it to double complex before returning it.
The function may be used to access the value of all complex type properties whose complex value has a rank less or equal to the functions return type. If the value of a compatible property is retrieved, it is promoted to the return type of the function.
References CPL_ERROR_DATA_NOT_FOUND, CPL_ERROR_NULL_INPUT, cpl_errorstate_get(), cpl_errorstate_is_equal(), and cpl_property_get_double_complex().
float cpl_propertylist_get_float | ( | const cpl_propertylist * | self, |
const char * | name | ||
) |
Get the float value of the given property list entry.
self | A property list. |
name | The property name to look up. |
CPL_ERROR_NULL_INPUT | The parameter self or name is a NULL pointer. |
CPL_ERROR_DATA_NOT_FOUND | The property list self does not contain a property with the name name. |
CPL_ERROR_TYPE_MISMATCH | The sought-after property name is not of type CPL_TYPE_FLOAT or CPL_TYPE_DOUBLE . |
The function searches the property list self for a property named name. If it is present in the list, its float value is returned. If there is more than one property with the same name, it takes the first one from the list. If the value is of type double, the function casts it to float before returning it.
References CPL_ERROR_DATA_NOT_FOUND, CPL_ERROR_NULL_INPUT, cpl_errorstate_get(), cpl_errorstate_is_equal(), and cpl_property_get_float().
float complex cpl_propertylist_get_float_complex | ( | const cpl_propertylist * | self, |
const char * | name | ||
) |
Get the float complex value of the given property list entry.
self | A property list. |
name | The property name to look up. |
CPL_ERROR_NULL_INPUT | The parameter self or name is a NULL pointer. |
CPL_ERROR_DATA_NOT_FOUND | The property list self does not contain a property with the name name. |
CPL_ERROR_TYPE_MISMATCH | The sought-after property name is not of type CPL_TYPE_FLOAT_COMPLEX or CPL_TYPE_DOUBLE_COMPLEX . |
The function searches the property list self for a property named name. If it is present in the list, its float complex value is returned. If there is more than one property with the same name, it takes the first one from the list. If the value is of type double, the function casts it to float complex before returning it.
References CPL_ERROR_DATA_NOT_FOUND, CPL_ERROR_NULL_INPUT, cpl_errorstate_get(), cpl_errorstate_is_equal(), and cpl_property_get_float_complex().
int cpl_propertylist_get_int | ( | const cpl_propertylist * | self, |
const char * | name | ||
) |
Get the integer value of the given property list entry.
self | A property list. |
name | The property name to look up. |
CPL_ERROR_NULL_INPUT | The parameter self or name is a NULL pointer. |
CPL_ERROR_DATA_NOT_FOUND | The property list self does not contain a property with the name name. |
CPL_ERROR_TYPE_MISMATCH | The sought-after property name is not of type CPL_TYPE_INT . |
The function searches the property list self for a property named name. If it is present in the list, its integer value is returned. If there is more than one property with the same name, it takes the first one from the list.
References CPL_ERROR_DATA_NOT_FOUND, CPL_ERROR_NULL_INPUT, cpl_errorstate_get(), cpl_errorstate_is_equal(), and cpl_property_get_int().
long cpl_propertylist_get_long | ( | const cpl_propertylist * | self, |
const char * | name | ||
) |
Get the long value of the given property list entry.
self | A property list. |
name | The property name to look up. |
CPL_ERROR_NULL_INPUT | The parameter self or name is a NULL pointer. |
CPL_ERROR_DATA_NOT_FOUND | The property list self does not contain a property with the name name. |
CPL_ERROR_TYPE_MISMATCH | The sought-after property name is not of type CPL_TYPE_LONG or CPL_TYPE_INT . |
The function searches the property list self for a property named name. If it is present in the list, its long value is returned. If there is more than one property with the same name, it takes the first one from the list.
The function may be used to access the value of all integer type properties whose integer value has a rank less or equal to the functions return type. If the value of a compatible property is retrieved, it is promoted to the return type of the function.
References CPL_ERROR_DATA_NOT_FOUND, CPL_ERROR_NULL_INPUT, cpl_errorstate_get(), cpl_errorstate_is_equal(), and cpl_property_get_long().
long long cpl_propertylist_get_long_long | ( | const cpl_propertylist * | self, |
const char * | name | ||
) |
Get the long long value of the given property list entry.
self | A property list. |
name | The property name to look up. |
CPL_ERROR_NULL_INPUT | The parameter self or name is a NULL pointer. |
CPL_ERROR_DATA_NOT_FOUND | The property list self does not contain a property with the name name. |
CPL_ERROR_TYPE_MISMATCH | The sought-after property name is not of type CPL_TYPE_LONG_LONG , CPL_TYPE_LONG , or CPL_TYPE_INT |
The function searches the property list self for a property named name. If it is present in the list, its long long value is returned. If there is more than one property with the same name, it takes the first one from the list.
The function may be used to access the value of all integer type properties whose integer value has a rank less or equal to the functions return type. If the value of a compatible property is retrieved, it is promoted to the return type of the function.
References CPL_ERROR_DATA_NOT_FOUND, CPL_ERROR_NULL_INPUT, cpl_errorstate_get(), cpl_errorstate_is_equal(), and cpl_property_get_long_long().
cpl_property * cpl_propertylist_get_property | ( | cpl_propertylist * | self, |
const char * | name | ||
) |
Access property list elements by property name.
self | The property list to query. |
name | The name of the property to retrieve. |
NULL
if it does not exist.CPL_ERROR_NULL_INPUT | The parameter self or the name is a NULL pointer. |
The function returns a handle to the property list element, the property, with the name name. If more than one property exist with the same name, then the first one found will be returned.
References CPL_ERROR_NULL_INPUT.
const cpl_property * cpl_propertylist_get_property_const | ( | const cpl_propertylist * | self, |
const char * | name | ||
) |
Access property list elements by property name.
self | The property list to query. |
name | The name of the property to retrieve. |
NULL
if it does not exist.CPL_ERROR_NULL_INPUT | The parameter self or the name is a NULL pointer. |
The function returns a handle to the property list element, the property, with the name name. If more than one property exist with the same name, then the first one found will be returned.
References CPL_ERROR_NULL_INPUT.
Referenced by cpl_dfs_setup_product_header().
cpl_size cpl_propertylist_get_size | ( | const cpl_propertylist * | self | ) |
Get the current size of a property list.
self | A property list. |
CPL_ERROR_NULL_INPUT | The parameter self is a NULL pointer. |
The function reports the current number of elements stored in the property list self.
References CPL_ERROR_NULL_INPUT.
Referenced by cpl_multiframe_dataset_properties_remove(), cpl_multiframe_dataset_properties_update(), cpl_propertylist_dump(), and cpl_table_sort().
const char * cpl_propertylist_get_string | ( | const cpl_propertylist * | self, |
const char * | name | ||
) |
Get the string value of the given property list entry.
self | A property list. |
name | The property name to look up. |
NULL
if an error occurs and an appropriate error code is set.CPL_ERROR_NULL_INPUT | The parameter self or name is a NULL pointer. |
CPL_ERROR_DATA_NOT_FOUND | The property list self does not contain a property with the name name. |
CPL_ERROR_TYPE_MISMATCH | The sought-after property name is not of type CPL_TYPE_STRING . |
The function searches the property list self for a property named name. If it is present in the list, a handle to its string value is returned. If there is more than one property with the same name, it takes the first one from the list.
References CPL_ERROR_DATA_NOT_FOUND, CPL_ERROR_NULL_INPUT, cpl_errorstate_get(), cpl_errorstate_is_equal(), and cpl_property_get_string().
cpl_type cpl_propertylist_get_type | ( | const cpl_propertylist * | self, |
const char * | name | ||
) |
Get the the type of a property list entry.
self | A property list. |
name | The property name to look up. |
CPL_TYPE_INVALID
and sets an appropriate error code.CPL_ERROR_NULL_INPUT | The parameter self or name is a NULL pointer. |
CPL_ERROR_DATA_NOT_FOUND | The property list self does not contain a property with the name name. |
The function returns the type of the value stored in self with the name name. If there is more than one property with the same name, it takes the first one from the list.
References CPL_ERROR_DATA_NOT_FOUND, CPL_ERROR_NULL_INPUT, and CPL_TYPE_INVALID.
int cpl_propertylist_has | ( | const cpl_propertylist * | self, |
const char * | name | ||
) |
Check whether a property is present in a property list.
self | A property list. |
name | The property name to look up. |
CPL_ERROR_NULL_INPUT | The parameter self or name is a NULL pointer. |
The function searches the property list self for a property with the name name and reports whether it was found or not.
References CPL_ERROR_NULL_INPUT.
Referenced by cpl_dfs_setup_product_header().
cpl_error_code cpl_propertylist_insert_after_bool | ( | cpl_propertylist * | self, |
const char * | after, | ||
const char * | name, | ||
int | value | ||
) |
Insert a boolean value into a property list after the given position.
self | A property list. |
after | Name of the property after which the value is inserted. |
name | The property name to be assigned to the value. |
value | The boolean value to store. |
CPL_ERROR_NONE
on success or a CPL error code otherwise.CPL_ERROR_NULL_INPUT | The parameter self, after or name is a NULL pointer. |
CPL_ERROR_UNSPECIFIED | A property with the name name could not be inserted into self. |
The function creates a new boolean property with name name and value value. The property is inserted into the property list self after the property named after.
References CPL_ERROR_NONE, CPL_ERROR_NULL_INPUT, CPL_ERROR_UNSPECIFIED, and CPL_TYPE_BOOL.
cpl_error_code cpl_propertylist_insert_after_char | ( | cpl_propertylist * | self, |
const char * | after, | ||
const char * | name, | ||
char | value | ||
) |
Insert a character value into a property list after the given position.
self | A property list. |
after | Name of the property after which the value is inserted. |
name | The property name to be assigned to the value. |
value | The character value to store. |
CPL_ERROR_NONE
on success or a CPL error code otherwise.CPL_ERROR_NULL_INPUT | The parameter self, after or name is a NULL pointer. |
CPL_ERROR_UNSPECIFIED | A property with the name name could not be inserted into self. |
The function creates a new character property with name name and value value. The property is inserted into the property list self after the property named after.
References CPL_ERROR_NONE, CPL_ERROR_NULL_INPUT, CPL_ERROR_UNSPECIFIED, and CPL_TYPE_CHAR.
cpl_error_code cpl_propertylist_insert_after_double | ( | cpl_propertylist * | self, |
const char * | after, | ||
const char * | name, | ||
double | value | ||
) |
Insert a double value into a property list after the given position.
self | A property list. |
after | Name of the property after which the value is inserted. |
name | The property name to be assigned to the value. |
value | The double value to store. |
CPL_ERROR_NONE
on success or a CPL error code otherwise.CPL_ERROR_NULL_INPUT | The parameter self, after or name is a NULL pointer. |
CPL_ERROR_UNSPECIFIED | A property with the name name could not be inserted into self. |
The function creates a new double property with name name and value value. The property is inserted into the property list self after the property named after.
References CPL_ERROR_NONE, CPL_ERROR_NULL_INPUT, CPL_ERROR_UNSPECIFIED, and CPL_TYPE_DOUBLE.
cpl_error_code cpl_propertylist_insert_after_double_complex | ( | cpl_propertylist * | self, |
const char * | after, | ||
const char * | name, | ||
double complex | value | ||
) |
Insert a double complex value into a property list after the given position.
self | A property list. |
after | Name of the property after which the value is inserted. |
name | The property name to be assigned to the value. |
value | The double complex value to store. |
CPL_ERROR_NONE
on success or a CPL error code otherwise.CPL_ERROR_NULL_INPUT | The parameter self, after or name is a NULL pointer. |
CPL_ERROR_UNSPECIFIED | A property with the name name could not be inserted into self. |
The function creates a new double complex property with name name and value value. The property is inserted into the property list self after the property named after.
References CPL_ERROR_NONE, CPL_ERROR_NULL_INPUT, CPL_ERROR_UNSPECIFIED, and CPL_TYPE_DOUBLE_COMPLEX.
cpl_error_code cpl_propertylist_insert_after_float | ( | cpl_propertylist * | self, |
const char * | after, | ||
const char * | name, | ||
float | value | ||
) |
Insert a float value into a property list after the given position.
self | A property list. |
after | Name of the property after which the value is inserted. |
name | The property name to be assigned to the value. |
value | The float value to store. |
CPL_ERROR_NONE
on success or a CPL error code otherwise.CPL_ERROR_NULL_INPUT | The parameter self, after or name is a NULL pointer. |
CPL_ERROR_UNSPECIFIED | A property with the name name could not be inserted into self. |
The function creates a new float property with name name and value value. The property is inserted into the property list self after the property named after.
References CPL_ERROR_NONE, CPL_ERROR_NULL_INPUT, CPL_ERROR_UNSPECIFIED, and CPL_TYPE_FLOAT.
cpl_error_code cpl_propertylist_insert_after_float_complex | ( | cpl_propertylist * | self, |
const char * | after, | ||
const char * | name, | ||
float complex | value | ||
) |
Insert a float complex value into a property list after the given position.
self | A property list. |
after | Name of the property after which the value is inserted. |
name | The property name to be assigned to the value. |
value | The float complex value to store. |
CPL_ERROR_NONE
on success or a CPL error code otherwise.CPL_ERROR_NULL_INPUT | The parameter self, after or name is a NULL pointer. |
CPL_ERROR_UNSPECIFIED | A property with the name name could not be inserted into self. |
The function creates a new float complex property with name name and value value. The property is inserted into the property list self after the property named after.
References CPL_ERROR_NONE, CPL_ERROR_NULL_INPUT, CPL_ERROR_UNSPECIFIED, and CPL_TYPE_FLOAT_COMPLEX.
cpl_error_code cpl_propertylist_insert_after_int | ( | cpl_propertylist * | self, |
const char * | after, | ||
const char * | name, | ||
int | value | ||
) |
Insert a integer value into a property list after the given position.
self | A property list. |
after | Name of the property after which the value is inserted. |
name | The property name to be assigned to the value. |
value | The integer value to store. |
CPL_ERROR_NONE
on success or a CPL error code otherwise.CPL_ERROR_NULL_INPUT | The parameter self, after or name is a NULL pointer. |
CPL_ERROR_UNSPECIFIED | A property with the name name could not be inserted into self. |
The function creates a new integer property with name name and value value. The property is inserted into the property list self after the property named after.
References CPL_ERROR_NONE, CPL_ERROR_NULL_INPUT, CPL_ERROR_UNSPECIFIED, and CPL_TYPE_INT.
cpl_error_code cpl_propertylist_insert_after_long | ( | cpl_propertylist * | self, |
const char * | after, | ||
const char * | name, | ||
long | value | ||
) |
Insert a long value into a property list after the given position.
self | A property list. |
after | Name of the property after which the value is inserted. |
name | The property name to be assigned to the value. |
value | The long value to store. |
CPL_ERROR_NONE
on success or a CPL error code otherwise.CPL_ERROR_NULL_INPUT | The parameter self, after or name is a NULL pointer. |
CPL_ERROR_UNSPECIFIED | A property with the name name could not be inserted into self. |
The function creates a new long property with name name and value value. The property is inserted into the property list self after the property named after.
References CPL_ERROR_NONE, CPL_ERROR_NULL_INPUT, CPL_ERROR_UNSPECIFIED, and CPL_TYPE_LONG.
cpl_error_code cpl_propertylist_insert_after_long_long | ( | cpl_propertylist * | self, |
const char * | after, | ||
const char * | name, | ||
long long | value | ||
) |
Insert a long long value into a property list after the given position.
self | A property list. |
after | Name of the property after which the value is inserted. |
name | The property name to be assigned to the value. |
value | The long long value to store. |
CPL_ERROR_NONE
on success or a CPL error code otherwise.CPL_ERROR_NULL_INPUT | The parameter self, after or name is a NULL pointer. |
CPL_ERROR_UNSPECIFIED | A property with the name name could not be inserted into self. |
The function creates a new long long property with name name and value value. The property is inserted into the property list self after the property named after.
References CPL_ERROR_NONE, CPL_ERROR_NULL_INPUT, CPL_ERROR_UNSPECIFIED, and CPL_TYPE_LONG_LONG.
cpl_error_code cpl_propertylist_insert_after_property | ( | cpl_propertylist * | self, |
const char * | after, | ||
const cpl_property * | property | ||
) |
Insert a property into a property list after the given position.
self | Property list |
after | Name of the property after which to insert the property |
property | The property to insert |
CPL_ERROR_NONE
on success or a CPL error code otherwise.CPL_ERROR_NULL_INPUT | The parameter self, property or after is a NULL pointer. |
The function creates a new property and inserts it into the property list self after the position of the property named after.
References CPL_ERROR_NONE, CPL_ERROR_NULL_INPUT, CPL_ERROR_UNSPECIFIED, and cpl_property_duplicate().
Referenced by cpl_wcs_platesol().
cpl_error_code cpl_propertylist_insert_after_string | ( | cpl_propertylist * | self, |
const char * | after, | ||
const char * | name, | ||
const char * | value | ||
) |
Insert a string value into a property list after the given position.
self | A property list. |
after | Name of the property after which the value is inserted. |
name | The property name to be assigned to the value. |
value | The string value to store. |
CPL_ERROR_NONE
on success or a CPL error code otherwise.CPL_ERROR_NULL_INPUT | The parameter self, after, name or value or name is a NULL pointer. |
CPL_ERROR_UNSPECIFIED | A property with the name name could not be inserted into self. |
The function creates a new string property with name name and value value. The property is inserted into the property list self after the property named after.
References CPL_ERROR_NONE, CPL_ERROR_NULL_INPUT, CPL_ERROR_UNSPECIFIED, and CPL_TYPE_STRING.
cpl_error_code cpl_propertylist_insert_bool | ( | cpl_propertylist * | self, |
const char * | here, | ||
const char * | name, | ||
int | value | ||
) |
Insert a boolean value into a property list at the given position.
self | A property list. |
here | Name indicating the position at which the value is inserted. |
name | The property name to be assigned to the value. |
value | The boolean value to store. |
CPL_ERROR_NONE
on success or a CPL error code otherwise.CPL_ERROR_NULL_INPUT | The parameter self, here or name is a NULL pointer. |
CPL_ERROR_UNSPECIFIED | A property with the name name could not be inserted into self. |
The function creates a new boolean property with name name and value value. The property is inserted into the property list self at the position of the property named here.
References CPL_ERROR_NONE, CPL_ERROR_NULL_INPUT, CPL_ERROR_UNSPECIFIED, and CPL_TYPE_BOOL.
cpl_error_code cpl_propertylist_insert_char | ( | cpl_propertylist * | self, |
const char * | here, | ||
const char * | name, | ||
char | value | ||
) |
Insert a character value into a property list at the given position.
self | A property list. |
here | Name indicating the position at which the value is inserted. |
name | The property name to be assigned to the value. |
value | The character value to store. |
CPL_ERROR_NONE
on success or a CPL error code otherwise.CPL_ERROR_NULL_INPUT | The parameter self, here or name is a NULL pointer. |
CPL_ERROR_UNSPECIFIED | A property with the name name could not be inserted into self. |
The function creates a new character property with name name and value value. The property is inserted into the property list self at the position of the property named here.
References CPL_ERROR_NONE, CPL_ERROR_NULL_INPUT, CPL_ERROR_UNSPECIFIED, and CPL_TYPE_CHAR.
cpl_error_code cpl_propertylist_insert_double | ( | cpl_propertylist * | self, |
const char * | here, | ||
const char * | name, | ||
double | value | ||
) |
Insert a double value into a property list at the given position.
self | A property list. |
here | Name indicating the position at which the value is inserted. |
name | The property name to be assigned to the value. |
value | The double value to store. |
CPL_ERROR_NONE
on success or a CPL error code otherwise.CPL_ERROR_NULL_INPUT | The parameter self, here or name is a NULL pointer. |
CPL_ERROR_UNSPECIFIED | A property with the name name could not be inserted into self. |
The function creates a new double property with name name and value value. The property is inserted into the property list self at the position of the property named here.
References CPL_ERROR_NONE, CPL_ERROR_NULL_INPUT, CPL_ERROR_UNSPECIFIED, and CPL_TYPE_DOUBLE.
cpl_error_code cpl_propertylist_insert_double_complex | ( | cpl_propertylist * | self, |
const char * | here, | ||
const char * | name, | ||
double complex | value | ||
) |
Insert a double complex value into a property list at the given position.
self | A property list. |
here | Name indicating the position at which the value is inserted. |
name | The property name to be assigned to the value. |
value | The double complex value to store. |
CPL_ERROR_NONE
on success or a CPL error code otherwise.CPL_ERROR_NULL_INPUT | The parameter self, here or name is a NULL pointer. |
CPL_ERROR_UNSPECIFIED | A property with the name name could not be inserted into self. |
The function creates a new double complex property with name name and value value. The property is inserted into the property list self at the position of the property named here.
References CPL_ERROR_NONE, CPL_ERROR_NULL_INPUT, CPL_ERROR_UNSPECIFIED, and CPL_TYPE_DOUBLE_COMPLEX.
cpl_error_code cpl_propertylist_insert_float | ( | cpl_propertylist * | self, |
const char * | here, | ||
const char * | name, | ||
float | value | ||
) |
Insert a float value into a property list at the given position.
self | A property list. |
here | Name indicating the position at which the value is inserted. |
name | The property name to be assigned to the value. |
value | The float value to store. |
CPL_ERROR_NONE
on success or a CPL error code otherwise.CPL_ERROR_NULL_INPUT | The parameter self, here or name is a NULL pointer. |
CPL_ERROR_UNSPECIFIED | A property with the name name could not be inserted into self. |
The function creates a new float property with name name and value value. The property is inserted into the property list self at the position of the property named here.
References CPL_ERROR_NONE, CPL_ERROR_NULL_INPUT, CPL_ERROR_UNSPECIFIED, and CPL_TYPE_FLOAT.
cpl_error_code cpl_propertylist_insert_float_complex | ( | cpl_propertylist * | self, |
const char * | here, | ||
const char * | name, | ||
float complex | value | ||
) |
Insert a float complex value into a property list at the given position.
self | A property list. |
here | Name indicating the position at which the value is inserted. |
name | The property name to be assigned to the value. |
value | The float complex value to store. |
CPL_ERROR_NONE
on success or a CPL error code otherwise.CPL_ERROR_NULL_INPUT | The parameter self, here or name is a NULL pointer. |
CPL_ERROR_UNSPECIFIED | A property with the name name could not be inserted into self. |
The function creates a new float complex property with name name and value value. The property is inserted into the property list self at the position of the property named here.
References CPL_ERROR_NONE, CPL_ERROR_NULL_INPUT, CPL_ERROR_UNSPECIFIED, and CPL_TYPE_FLOAT_COMPLEX.
cpl_error_code cpl_propertylist_insert_int | ( | cpl_propertylist * | self, |
const char * | here, | ||
const char * | name, | ||
int | value | ||
) |
Insert a integer value into a property list at the given position.
self | A property list. |
here | Name indicating the position at which the value is inserted. |
name | The property name to be assigned to the value. |
value | The integer value to store. |
CPL_ERROR_NONE
on success or a CPL error code otherwise.CPL_ERROR_NULL_INPUT | The parameter self, here or name is a NULL pointer. |
CPL_ERROR_UNSPECIFIED | A property with the name name could not be inserted into self. |
The function creates a new integer property with name name and value value. The property is inserted into the property list self at the position of the property named here.
References CPL_ERROR_NONE, CPL_ERROR_NULL_INPUT, CPL_ERROR_UNSPECIFIED, and CPL_TYPE_INT.
cpl_error_code cpl_propertylist_insert_long | ( | cpl_propertylist * | self, |
const char * | here, | ||
const char * | name, | ||
long | value | ||
) |
Insert a long value into a property list at the given position.
self | A property list. |
here | Name indicating the position at which the value is inserted. |
name | The property name to be assigned to the value. |
value | The long value to store. |
CPL_ERROR_NONE
on success or a CPL error code otherwise.CPL_ERROR_NULL_INPUT | The parameter self, here or name is a NULL pointer. |
CPL_ERROR_UNSPECIFIED | A property with the name name could not be inserted into self. |
The function creates a new long property with name name and value value. The property is inserted into the property list self at the position of the property named here.
References CPL_ERROR_NONE, CPL_ERROR_NULL_INPUT, CPL_ERROR_UNSPECIFIED, and CPL_TYPE_LONG.
cpl_error_code cpl_propertylist_insert_long_long | ( | cpl_propertylist * | self, |
const char * | here, | ||
const char * | name, | ||
long long | value | ||
) |
Insert a long long value into a property list at the given position.
self | A property list. |
here | Name indicating the position at which the value is inserted. |
name | The property name to be assigned to the value. |
value | The long long value to store. |
CPL_ERROR_NONE
on success or a CPL error code otherwise.CPL_ERROR_NULL_INPUT | The parameter self, here or name is a NULL pointer. |
CPL_ERROR_UNSPECIFIED | A property with the name name could not be inserted into self. |
The function creates a new long long property with name name and value value. The property is inserted into the property list self at the position of the property named here.
References CPL_ERROR_NONE, CPL_ERROR_NULL_INPUT, CPL_ERROR_UNSPECIFIED, and CPL_TYPE_LONG_LONG.
cpl_error_code cpl_propertylist_insert_property | ( | cpl_propertylist * | self, |
const char * | here, | ||
const cpl_property * | property | ||
) |
Insert a property into a property list at the given position.
self | Property list |
here | Name indicating the position where to insert the property |
property | The property to insert |
CPL_ERROR_NONE
on success or a CPL error code otherwise.CPL_ERROR_NULL_INPUT | The parameter self, property or here is a NULL pointer. |
The function creates a new property and inserts it into the property list self at the position of the property named here.
References CPL_ERROR_NONE, CPL_ERROR_NULL_INPUT, CPL_ERROR_UNSPECIFIED, and cpl_property_duplicate().
cpl_error_code cpl_propertylist_insert_string | ( | cpl_propertylist * | self, |
const char * | here, | ||
const char * | name, | ||
const char * | value | ||
) |
Insert a string value into a property list at the given position.
self | A property list. |
here | Name indicating the position at which the value is inserted. |
name | The property name to be assigned to the value. |
value | The string value to store. |
CPL_ERROR_NONE
on success or a CPL error code otherwise.CPL_ERROR_NULL_INPUT | The parameter self, here, name or value or name is a NULL pointer. |
CPL_ERROR_UNSPECIFIED | A property with the name name could not be inserted into self. |
The function creates a new string property with name name and value value. The property is inserted into the property list self at the position of the property named here.
References CPL_ERROR_NONE, CPL_ERROR_NULL_INPUT, CPL_ERROR_UNSPECIFIED, and CPL_TYPE_STRING.
int cpl_propertylist_is_empty | ( | const cpl_propertylist * | self | ) |
Check whether a property list is empty.
self | A property list. |
CPL_ERROR_NULL_INPUT | The parameter self is a NULL pointer. |
The function checks if self contains any properties.
References CPL_ERROR_NULL_INPUT.
Referenced by cpl_multiframe_dataset_properties_remove(), and cpl_multiframe_dataset_properties_update().
cpl_propertylist * cpl_propertylist_load | ( | const char * | name, |
cpl_size | position | ||
) |
Create a property list from a file.
name | Name of the input file. |
position | Index of the data set to read. |
NULL
if an error occurred.CPL_ERROR_NULL_INPUT | The parameter name is a NULL pointer. |
CPL_ERROR_ILLEGAL_INPUT | The position is less than 0 or the properties cannot be read from the file name. |
CPL_ERROR_FILE_IO | The file name does not exist. |
CPL_ERROR_BAD_FILE_FORMAT | The file name is not a valid FITS file. |
CPL_ERROR_DATA_NOT_FOUND | The requested data set at index position does not exist. |
The function reads the properties of the data set with index position from the file name.
Currently only the FITS file format is supported. The property list is created by reading the FITS keywords from extension position. The numbering of the data sections starts from 0. When creating the property list from a FITS header, any keyword without a value such as undefined keywords, are not transformed into a property. In the case of float or double (complex) keywords, there is no way to identify the type returned by CFITSIO, therefore this function will always load them as double (complex).
References CPL_ERROR_BAD_FILE_FORMAT, CPL_ERROR_FILE_IO, CPL_ERROR_ILLEGAL_INPUT, CPL_ERROR_NULL_INPUT, cpl_propertylist_delete(), and cpl_propertylist_new().
cpl_propertylist * cpl_propertylist_load_regexp | ( | const char * | name, |
cpl_size | position, | ||
const char * | regexp, | ||
int | invert | ||
) |
Create a filtered property list from a file.
name | Name of the input file. |
position | Index of the data set to read. |
regexp | Regular expression used to filter properties. |
invert | Flag inverting the sense of matching property names. |
NULL
if an error occurred.CPL_ERROR_NULL_INPUT | The parameter name or the parameter regexp is a NULL pointer. |
CPL_ERROR_ILLEGAL_INPUT | The position is less than 0, the properties cannot be read from the file name, or regexp is not a valid extended regular expression, including the empty string.. |
CPL_ERROR_FILE_IO | The file name does not exist. |
CPL_ERROR_BAD_FILE_FORMAT | The file name is not a valid FITS file. |
CPL_ERROR_DATA_NOT_FOUND | The requested data set at index position does not exist. |
The function reads all properties of the data set with index position with matching names from the file name. If the flag invert is zero, all properties whose names match the regular expression regexp are read. If invert is set to a non-zero value, all properties with names not matching regexp are read rather. The function expects POSIX 1003.2 compliant extended regular expressions.
Currently only the FITS file format is supported. The property list is created by reading the FITS keywords from extension position. The numbering of the data sections starts from 0.
When creating the property list from a FITS header, any keyword without a value such as undefined keywords, are not transformed into a property. In the case of float or double (complex) keywords, there is no way to identify the type returned by CFITSIO, therefore this function will always load them as double (complex).
FITS format specific keyword prefixes (e.g. HIERARCH
) must not be part of the given pattern string regexp, but only the actual FITS keyword name may be given.
References CPL_ERROR_BAD_FILE_FORMAT, CPL_ERROR_FILE_IO, CPL_ERROR_ILLEGAL_INPUT, CPL_ERROR_NULL_INPUT, cpl_propertylist_delete(), and cpl_propertylist_new().
cpl_propertylist * cpl_propertylist_new | ( | void | ) |
Create an empty property list.
The function creates a new property list and returns a handle for it. To destroy the returned property list object use the property list destructor cpl_propertylist_delete().
Referenced by cpl_dfs_setup_product_header(), cpl_propertylist_duplicate(), cpl_propertylist_load(), cpl_propertylist_load_regexp(), and cpl_wcs_platesol().
cpl_error_code cpl_propertylist_prepend_bool | ( | cpl_propertylist * | self, |
const char * | name, | ||
int | value | ||
) |
Prepend a boolean value to a property list.
self | A property list. |
name | The property name to be assigned to the value. |
value | The boolean value to store. |
CPL_ERROR_NONE
on success or a CPL error code otherwise.CPL_ERROR_NULL_INPUT | The parameter self or name is a NULL pointer. |
The function creates a new boolean property with name name and value value. The property is prepended to the property list self.
References CPL_ERROR_NONE, CPL_ERROR_NULL_INPUT, cpl_property_new(), cpl_property_set_bool(), and CPL_TYPE_BOOL.
cpl_error_code cpl_propertylist_prepend_char | ( | cpl_propertylist * | self, |
const char * | name, | ||
char | value | ||
) |
Prepend a character value to a property list.
self | A property list. |
name | The property name to be assigned to the value. |
value | The character value to store. |
CPL_ERROR_NONE
on success or a CPL error code otherwise.CPL_ERROR_NULL_INPUT | The parameter self or name is a NULL pointer. |
The function creates a new character property with name name and value value. The property is prepended to the property list self.
References CPL_ERROR_NONE, CPL_ERROR_NULL_INPUT, cpl_property_new(), cpl_property_set_char(), and CPL_TYPE_CHAR.
cpl_error_code cpl_propertylist_prepend_double | ( | cpl_propertylist * | self, |
const char * | name, | ||
double | value | ||
) |
Prepend a double value to a property list.
self | A property list. |
name | The property name to be assigned to the value. |
value | The double value to store. |
CPL_ERROR_NONE
on success or a CPL error code otherwise.CPL_ERROR_NULL_INPUT | The parameter self or name is a NULL pointer. |
The function creates a new double property with name name and value value. The property is prepended to the property list self.
References CPL_ERROR_NONE, CPL_ERROR_NULL_INPUT, cpl_property_new(), cpl_property_set_double(), and CPL_TYPE_DOUBLE.
cpl_error_code cpl_propertylist_prepend_double_complex | ( | cpl_propertylist * | self, |
const char * | name, | ||
double complex | value | ||
) |
Prepend a double complex value to a property list.
self | A property list. |
name | The property name to be assigned to the value. |
value | The double complex value to store. |
CPL_ERROR_NONE
on success or a CPL error code otherwise.CPL_ERROR_NULL_INPUT | The parameter self or name is a NULL pointer. |
The function creates a new double complex property with name name and value value. The property is prepended to the property list self.
References CPL_ERROR_NONE, CPL_ERROR_NULL_INPUT, cpl_property_new(), cpl_property_set_double_complex(), and CPL_TYPE_DOUBLE_COMPLEX.
cpl_error_code cpl_propertylist_prepend_float | ( | cpl_propertylist * | self, |
const char * | name, | ||
float | value | ||
) |
Prepend a float value to a property list.
self | A property list. |
name | The property name to be assigned to the value. |
value | The float value to store. |
CPL_ERROR_NONE
on success or a CPL error code otherwise.CPL_ERROR_NULL_INPUT | The parameter self or name is a NULL pointer. |
The function creates a new float property with name name and value value. The property is prepended to the property list self.
References CPL_ERROR_NONE, CPL_ERROR_NULL_INPUT, cpl_property_new(), cpl_property_set_float(), and CPL_TYPE_FLOAT.
cpl_error_code cpl_propertylist_prepend_float_complex | ( | cpl_propertylist * | self, |
const char * | name, | ||
float complex | value | ||
) |
Prepend a float complex value to a property list.
self | A property list. |
name | The property name to be assigned to the value. |
value | The float complex value to store. |
CPL_ERROR_NONE
on success or a CPL error code otherwise.CPL_ERROR_NULL_INPUT | The parameter self or name is a NULL pointer. |
The function creates a new float complex property with name name and value value. The property is prepended to the property list self.
References CPL_ERROR_NONE, CPL_ERROR_NULL_INPUT, cpl_property_new(), cpl_property_set_float_complex(), and CPL_TYPE_FLOAT_COMPLEX.
cpl_error_code cpl_propertylist_prepend_int | ( | cpl_propertylist * | self, |
const char * | name, | ||
int | value | ||
) |
Prepend a integer value to a property list.
self | A property list. |
name | The property name to be assigned to the value. |
value | The integer value to store. |
CPL_ERROR_NONE
on success or a CPL error code otherwise.CPL_ERROR_NULL_INPUT | The parameter self or name is a NULL pointer. |
The function creates a new integer property with name name and value value. The property is prepended to the property list self.
References CPL_ERROR_NONE, CPL_ERROR_NULL_INPUT, cpl_property_new(), cpl_property_set_int(), and CPL_TYPE_INT.
cpl_error_code cpl_propertylist_prepend_long | ( | cpl_propertylist * | self, |
const char * | name, | ||
long | value | ||
) |
Prepend a long value to a property list.
self | A property list. |
name | The property name to be assigned to the value. |
value | The long value to store. |
CPL_ERROR_NONE
on success or a CPL error code otherwise.CPL_ERROR_NULL_INPUT | The parameter self or name is a NULL pointer. |
The function creates a new long property with name name and value value. The property is prepended to the property list self.
References CPL_ERROR_NONE, CPL_ERROR_NULL_INPUT, cpl_property_new(), cpl_property_set_long(), and CPL_TYPE_LONG.
cpl_error_code cpl_propertylist_prepend_long_long | ( | cpl_propertylist * | self, |
const char * | name, | ||
long long | value | ||
) |
Prepend a long long value to a property list.
self | A property list. |
name | The property name to be assigned to the value. |
value | The long long value to store. |
CPL_ERROR_NONE
on success or a CPL error code otherwise.CPL_ERROR_NULL_INPUT | The parameter self or name is a NULL pointer. |
The function creates a new long long property with name name and value value. The property is prepended to the property list self.
References CPL_ERROR_NONE, CPL_ERROR_NULL_INPUT, cpl_property_new(), cpl_property_set_long_long(), and CPL_TYPE_LONG_LONG.
cpl_error_code cpl_propertylist_prepend_property | ( | cpl_propertylist * | self, |
const cpl_property * | property | ||
) |
Prepend a property to a property list.
self | Property list to prepend to |
property | The property to prepend |
CPL_ERROR_NONE
on success or a CPL error code otherwise.CPL_ERROR_NULL_INPUT | The parameter self or property is a NULL pointer. |
This function creates a new property and prepends it to the beginning of a property list. It will not check if the property already exists.
References CPL_ERROR_NONE, CPL_ERROR_NULL_INPUT, and cpl_property_duplicate().
cpl_error_code cpl_propertylist_prepend_string | ( | cpl_propertylist * | self, |
const char * | name, | ||
const char * | value | ||
) |
Prepend a string value to a property list.
self | A property list. |
name | The property name to be assigned to the value. |
value | The string value to store. |
CPL_ERROR_NONE
on success or a CPL error code otherwise.CPL_ERROR_NULL_INPUT | The parameter self, name or value is a NULL pointer. |
The function creates a new string property with name name and value value. The property is prepended to the property list self.
References CPL_ERROR_NONE, CPL_ERROR_NULL_INPUT, cpl_property_new(), cpl_property_set_string(), and CPL_TYPE_STRING.
cpl_error_code cpl_propertylist_save | ( | const cpl_propertylist * | self, |
const char * | filename, | ||
unsigned | mode | ||
) |
Save a property list to a FITS file.
self | The property list to save or NULL if empty |
filename | Name of the file to write |
mode | The desired output options (combined with bitwise or) |
CPL_ERROR_NULL_INPUT | The filename is a NULL pointer. |
CPL_ERROR_ILLEGAL_INPUT | The parameter mode is invalid. |
CPL_ERROR_FILE_IO | The file cannot be written or accessed. |
This function saves a property list to a FITS file, using cfitsio. The data unit is empty.
Supported output modes are CPL_IO_CREATE (create a new file) and CPL_IO_EXTEND (append to an existing file)
References cpl_ensure_code, CPL_ERROR_FILE_IO, CPL_ERROR_ILLEGAL_INPUT, CPL_ERROR_NONE, CPL_ERROR_NULL_INPUT, cpl_free(), CPL_IO_CREATE, CPL_IO_EXTEND, and cpl_sprintf().
Referenced by cpl_image_save(), and cpl_vector_save().
cpl_error_code cpl_propertylist_set_bool | ( | cpl_propertylist * | self, |
const char * | name, | ||
int | value | ||
) |
Set the value of the given boolean property list entry.
self | A property list. |
name | The property name to look up. |
value | New boolean value. |
CPL_ERROR_NONE
on success or a CPL error code otherwise.CPL_ERROR_NULL_INPUT | The parameter self or name is a NULL pointer. |
CPL_ERROR_DATA_NOT_FOUND | The property list self does not contain a property with the name name. |
The function searches the property list self for a property named name. If it is present in the list, its boolean value is replaced with the boolean value. If there is more than one property with the same name, it takes the first one from the list.
References CPL_ERROR_DATA_NOT_FOUND, CPL_ERROR_NULL_INPUT, and cpl_property_set_bool().
cpl_error_code cpl_propertylist_set_char | ( | cpl_propertylist * | self, |
const char * | name, | ||
char | value | ||
) |
Set the value of the given character property list entry.
self | A property list. |
name | The property name to look up. |
value | New character value. |
CPL_ERROR_NONE
on success or a CPL error code otherwise.CPL_ERROR_NULL_INPUT | The parameter self or name is a NULL pointer. |
CPL_ERROR_DATA_NOT_FOUND | The property list self does not contain a property with the name name. |
The function searches the property list self for a property named name. If it is present in the list, its character value is replaced with the character value. If there is more than one property with the same name, it takes the first one from the list.
References CPL_ERROR_DATA_NOT_FOUND, CPL_ERROR_NULL_INPUT, and cpl_property_set_char().
cpl_error_code cpl_propertylist_set_comment | ( | cpl_propertylist * | self, |
const char * | name, | ||
const char * | comment | ||
) |
Modify the comment field of the given property list entry.
self | A property list. |
name | The property name to look up. |
comment | New comment string. |
CPL_ERROR_NONE
on success or a CPL error code otherwise.CPL_ERROR_NULL_INPUT | The parameter self or name is a NULL pointer. |
CPL_ERROR_DATA_NOT_FOUND | The property list self does not contain a property with the name name. |
The function searches the property list self for a property named name. If it is present in the list, its comment is replaced by the string comment. The provided comment string may be NULL
. In this case an already existing comment is deleted. If there is more than one property with the same name, it takes the first one from the list.
References CPL_ERROR_DATA_NOT_FOUND, CPL_ERROR_NONE, CPL_ERROR_NULL_INPUT, and cpl_property_set_comment().
cpl_error_code cpl_propertylist_set_double | ( | cpl_propertylist * | self, |
const char * | name, | ||
double | value | ||
) |
Set the value of the given double property list entry.
self | A property list. |
name | The property name to look up. |
value | New double value. |
CPL_ERROR_NONE
on success or a CPL error code otherwise.CPL_ERROR_NULL_INPUT | The parameter self or name is a NULL pointer. |
CPL_ERROR_DATA_NOT_FOUND | The property list self does not contain a property with the name name. |
The function searches the property list self for a property named name. If it is present in the list, its double value is replaced with the double value. If there is more than one property with the same name, it takes the first one from the list.
References CPL_ERROR_DATA_NOT_FOUND, CPL_ERROR_NULL_INPUT, and cpl_property_set_double().
cpl_error_code cpl_propertylist_set_double_complex | ( | cpl_propertylist * | self, |
const char * | name, | ||
double complex | value | ||
) |
Set the value of the given double complex property list entry.
self | A property list. |
name | The property name to look up. |
value | New double complex value. |
CPL_ERROR_NONE
on success or a CPL error code otherwise.CPL_ERROR_NULL_INPUT | The parameter self or name is a NULL pointer. |
CPL_ERROR_DATA_NOT_FOUND | The property list self does not contain a property with the name name. |
The function searches the property list self for a property named name. If it is present in the list, its double complex value is replaced with the double complex value. If there is more than one property with the same name, it takes the first one from the list.
References CPL_ERROR_DATA_NOT_FOUND, CPL_ERROR_NONE, CPL_ERROR_NULL_INPUT, and cpl_property_set_double_complex().
cpl_error_code cpl_propertylist_set_float | ( | cpl_propertylist * | self, |
const char * | name, | ||
float | value | ||
) |
Set the value of the given float property list entry.
self | A property list. |
name | The property name to look up. |
value | New float value. |
CPL_ERROR_NONE
on success or a CPL error code otherwise.CPL_ERROR_NULL_INPUT | The parameter self or name is a NULL pointer. |
CPL_ERROR_DATA_NOT_FOUND | The property list self does not contain a property with the name name. |
The function searches the property list self for a property named name. If it is present in the list, its float value is replaced with the float value. If there is more than one property with the same name, it takes the first one from the list.
References CPL_ERROR_DATA_NOT_FOUND, CPL_ERROR_NULL_INPUT, and cpl_property_set_float().
cpl_error_code cpl_propertylist_set_float_complex | ( | cpl_propertylist * | self, |
const char * | name, | ||
float complex | value | ||
) |
Set the value of the given float complex property list entry.
self | A property list. |
name | The property name to look up. |
value | New float complex value. |
CPL_ERROR_NONE
on success or a CPL error code otherwise.CPL_ERROR_NULL_INPUT | The parameter self or name is a NULL pointer. |
CPL_ERROR_DATA_NOT_FOUND | The property list self does not contain a property with the name name. |
The function searches the property list self for a property named name. If it is present in the list, its float complex value is replaced with the float complex value. If there is more than one property with the same name, it takes the first one from the list.
References CPL_ERROR_DATA_NOT_FOUND, CPL_ERROR_NONE, CPL_ERROR_NULL_INPUT, and cpl_property_set_float_complex().
cpl_error_code cpl_propertylist_set_int | ( | cpl_propertylist * | self, |
const char * | name, | ||
int | value | ||
) |
Set the value of the given integer property list entry.
self | A property list. |
name | The property name to look up. |
value | New integer value. |
CPL_ERROR_NONE
on success or a CPL error code otherwise.CPL_ERROR_NULL_INPUT | The parameter self or name is a NULL pointer. |
CPL_ERROR_DATA_NOT_FOUND | The property list self does not contain a property with the name name. |
The function searches the property list self for a property named name. If it is present in the list, its integer value is replaced with the integer value. If there is more than one property with the same name, it takes the first one from the list.
References CPL_ERROR_DATA_NOT_FOUND, CPL_ERROR_NULL_INPUT, and cpl_property_set_int().
cpl_error_code cpl_propertylist_set_long | ( | cpl_propertylist * | self, |
const char * | name, | ||
long | value | ||
) |
Set the value of the given long property list entry.
self | A property list. |
name | The property name to look up. |
value | New long value. |
CPL_ERROR_NONE
on success or a CPL error code otherwise.CPL_ERROR_NULL_INPUT | The parameter self or name is a NULL pointer. |
CPL_ERROR_DATA_NOT_FOUND | The property list self does not contain a property with the name name. |
The function searches the property list self for a property named name. If it is present in the list, its long value is replaced with the long value. If there is more than one property with the same name, it takes the first one from the list.
References CPL_ERROR_DATA_NOT_FOUND, CPL_ERROR_NULL_INPUT, and cpl_property_set_long().
cpl_error_code cpl_propertylist_set_long_long | ( | cpl_propertylist * | self, |
const char * | name, | ||
long long | value | ||
) |
Set the value of the given long long property list entry.
self | A property list. |
name | The property name to look up. |
value | New long long value. |
CPL_ERROR_NONE
on success or a CPL error code otherwise.CPL_ERROR_NULL_INPUT | The parameter self or name is a NULL pointer. |
CPL_ERROR_DATA_NOT_FOUND | The property list self does not contain a property with the name name. |
The function searches the property list self for a property named name. If it is present in the list, its long long value is replaced with value. If there is more than one property with the same name, it takes the first one from the list.
References CPL_ERROR_DATA_NOT_FOUND, CPL_ERROR_NULL_INPUT, and cpl_property_set_long_long().
cpl_error_code cpl_propertylist_set_string | ( | cpl_propertylist * | self, |
const char * | name, | ||
const char * | value | ||
) |
Set the value of the given string property list entry.
self | A property list. |
name | The property name to look up. |
value | New string value. |
CPL_ERROR_NONE
on success or a CPL error code otherwise.CPL_ERROR_NULL_INPUT | The parameter self, name or value is a NULL pointer. |
CPL_ERROR_DATA_NOT_FOUND | The property list self does not contain a property with the name name. |
The function searches the property list self for a property named name. If it is present in the list, its string value is replaced with the string value. If there is more than one property with the same name, it takes the first one from the list.
References CPL_ERROR_DATA_NOT_FOUND, CPL_ERROR_NULL_INPUT, and cpl_property_set_string().
cpl_error_code cpl_propertylist_sort | ( | cpl_propertylist * | self, |
cpl_propertylist_compare_func | compare | ||
) |
Sort a property list.
self | The property list to sort. |
compare | The function used to compare two properties. |
CPL_ERROR_NONE
on success, or a CPL error code otherwise.CPL_ERROR_NULL_INPUT | The parameter self is a NULL pointer. |
The function sorts the property list self in place, using the function compare to determine whether a property is less, equal or greater than another one.
The function compare must be of the type cpl_propertylist_compare_func.
References CPL_ERROR_NONE, and CPL_ERROR_NULL_INPUT.
cpl_error_code cpl_propertylist_update_bool | ( | cpl_propertylist * | self, |
const char * | name, | ||
int | value | ||
) |
Update a property list with a boolean value.
self | A property list. |
name | The property name to be assigned to the value. |
value | The boolean value to store. |
CPL_ERROR_NONE
on success or a CPL error code otherwise.CPL_ERROR_NULL_INPUT | The parameter self or name is a NULL pointer. |
CPL_ERROR_TYPE_MISMATCH | The property list self contains a property with the name name which is not of type CPL_TYPE_BOOL . |
The function updates the property list self with the boolean value value. This means, if a property with the name name exists already its value is updated, otherwise a property with the name name is created and added to self. The update will fail if a property with the name name exists already which is not of type CPL_TYPE_BOOL
.
References CPL_ERROR_NONE, CPL_ERROR_NULL_INPUT, cpl_property_set_bool(), and CPL_TYPE_BOOL.
cpl_error_code cpl_propertylist_update_char | ( | cpl_propertylist * | self, |
const char * | name, | ||
char | value | ||
) |
Update a property list with a character value.
self | A property list. |
name | The property name to be assigned to the value. |
value | The character value to store. |
CPL_ERROR_NONE
on success or a CPL error code otherwise.CPL_ERROR_NULL_INPUT | The parameter self or name is a NULL pointer. |
CPL_ERROR_TYPE_MISMATCH | The property list self contains a property with the name name which is not of type CPL_TYPE_CHAR . |
The function updates the property list self with the character value value. This means, if a property with the name name exists already its value is updated, otherwise a property with the name name is created and added to self. The update will fail if a property with the name name exists already which is not of type CPL_TYPE_CHAR
.
References CPL_ERROR_NONE, CPL_ERROR_NULL_INPUT, cpl_property_set_char(), and CPL_TYPE_CHAR.
cpl_error_code cpl_propertylist_update_double | ( | cpl_propertylist * | self, |
const char * | name, | ||
double | value | ||
) |
Update a property list with a double value.
self | A property list. |
name | The property name to be assigned to the value. |
value | The double value to store. |
CPL_ERROR_NONE
on success or a CPL error code otherwise.CPL_ERROR_NULL_INPUT | The parameter self or name is a NULL pointer. |
CPL_ERROR_TYPE_MISMATCH | The property list self contains a property with the name name which is not of type CPL_TYPE_DOUBLE . |
The function updates the property list self with the double value value. This means, if a property with the name name exists already its value is updated, otherwise a property with the name name is created and added to self. The update will fail if a property with the name name exists already which is not of type CPL_TYPE_DOUBLE
.
References CPL_ERROR_NONE, CPL_ERROR_NULL_INPUT, cpl_property_set_double(), and CPL_TYPE_DOUBLE.
cpl_error_code cpl_propertylist_update_double_complex | ( | cpl_propertylist * | self, |
const char * | name, | ||
double complex | value | ||
) |
Update a property list with a double complex value.
self | A property list. |
name | The property name to be assigned to the value. |
value | The double complex value to store. |
CPL_ERROR_NONE
on success or a CPL error code otherwise.CPL_ERROR_NULL_INPUT | The parameter self or name is a NULL pointer. |
CPL_ERROR_TYPE_MISMATCH | The property list self contains a property with the name name which is not of type CPL_TYPE_DOUBLE_COMPLEX . |
The function updates the property list self with the double complex value value. This means, if a property with the name name exists already its value is updated, otherwise a property with the name name is created and added to self. The update will fail if a property with the name name exists already which is not of type CPL_TYPE_DOUBLE_COMPLEX
.
References CPL_ERROR_NONE, CPL_ERROR_NULL_INPUT, cpl_property_set_double_complex(), and CPL_TYPE_DOUBLE_COMPLEX.
cpl_error_code cpl_propertylist_update_float | ( | cpl_propertylist * | self, |
const char * | name, | ||
float | value | ||
) |
Update a property list with a float value.
self | A property list. |
name | The property name to be assigned to the value. |
value | The float value to store. |
CPL_ERROR_NONE
on success or a CPL error code otherwise.CPL_ERROR_NULL_INPUT | The parameter self or name is a NULL pointer. |
CPL_ERROR_TYPE_MISMATCH | The property list self contains a property with the name name which is not of type CPL_TYPE_FLOAT . |
The function updates the property list self with the float value value. This means, if a property with the name name exists already its value is updated, otherwise a property with the name name is created and added to self. The update will fail if a property with the name name exists already which is not of type CPL_TYPE_FLOAT
.
References CPL_ERROR_NONE, CPL_ERROR_NULL_INPUT, cpl_property_set_float(), and CPL_TYPE_FLOAT.
cpl_error_code cpl_propertylist_update_float_complex | ( | cpl_propertylist * | self, |
const char * | name, | ||
float complex | value | ||
) |
Update a property list with a float complex value.
self | A property list. |
name | The property name to be assigned to the value. |
value | The float complex value to store. |
CPL_ERROR_NONE
on success or a CPL error code otherwise.CPL_ERROR_NULL_INPUT | The parameter self or name is a NULL pointer. |
CPL_ERROR_TYPE_MISMATCH | The property list self contains a property with the name name which is not of type CPL_TYPE_FLOAT_COMPLEX . |
The function updates the property list self with the float complex value value. This means, if a property with the name name exists already its value is updated, otherwise a property with the name name is created and added to self. The update will fail if a property with the name name exists already which is not of type CPL_TYPE_FLOAT_COMPLEX
.
References CPL_ERROR_NONE, CPL_ERROR_NULL_INPUT, cpl_property_set_float_complex(), and CPL_TYPE_FLOAT_COMPLEX.
cpl_error_code cpl_propertylist_update_int | ( | cpl_propertylist * | self, |
const char * | name, | ||
int | value | ||
) |
Update a property list with a integer value.
self | A property list. |
name | The property name to be assigned to the value. |
value | The integer value to store. |
CPL_ERROR_NONE
on success or a CPL error code otherwise.CPL_ERROR_NULL_INPUT | The parameter self or name is a NULL pointer. |
CPL_ERROR_TYPE_MISMATCH | The property list self contains a property with the name name which is not of type CPL_TYPE_INT . |
The function updates the property list self with the integer value value. This means, if a property with the name name exists already its value is updated, otherwise a property with the name name is created and added to self. The update will fail if a property with the name name exists already which is not of type CPL_TYPE_INT
.
References CPL_ERROR_NONE, CPL_ERROR_NULL_INPUT, cpl_property_set_int(), and CPL_TYPE_INT.
cpl_error_code cpl_propertylist_update_long | ( | cpl_propertylist * | self, |
const char * | name, | ||
long | value | ||
) |
Update a property list with a long value.
self | A property list. |
name | The property name to be assigned to the value. |
value | The long value to store. |
CPL_ERROR_NONE
on success or a CPL error code otherwise.CPL_ERROR_NULL_INPUT | The parameter self or name is a NULL pointer. |
CPL_ERROR_TYPE_MISMATCH | The property list self contains a property with the name name which is not of type CPL_TYPE_LONG . |
The function updates the property list self with the long value value. This means, if a property with the name name exists already its value is updated, otherwise a property with the name name is created and added to self. The update will fail if a property with the name name exists already which is not of type CPL_TYPE_LONG
.
References CPL_ERROR_NONE, CPL_ERROR_NULL_INPUT, cpl_property_set_long(), and CPL_TYPE_LONG.
cpl_error_code cpl_propertylist_update_long_long | ( | cpl_propertylist * | self, |
const char * | name, | ||
long long | value | ||
) |
Update a property list with a long long value.
self | A property list. |
name | The property name to be assigned to the value. |
value | The long long value to store. |
CPL_ERROR_NONE
on success or a CPL error code otherwise.CPL_ERROR_NULL_INPUT | The parameter self or name is a NULL pointer. |
CPL_ERROR_TYPE_MISMATCH | The property list self contains a property with the name name which is not of type CPL_TYPE_LONG_LONG . |
The function updates the property list self with the long long value value. This means, if a property with the name name exists already its value is updated, otherwise a property with the name name is created and added to self. The update will fail if a property with the name name exists already which is not of type CPL_TYPE_LONG_LONG
.
References CPL_ERROR_NONE, CPL_ERROR_NULL_INPUT, cpl_property_set_long_long(), and CPL_TYPE_LONG_LONG.
cpl_error_code cpl_propertylist_update_string | ( | cpl_propertylist * | self, |
const char * | name, | ||
const char * | value | ||
) |
Update a property list with a string value.
self | A property list. |
name | The property name to be assigned to the value. |
value | The string value to store. |
CPL_ERROR_NONE
on success or a CPL error code otherwise.CPL_ERROR_NULL_INPUT | The parameter self, name or value is a NULL pointer. |
CPL_ERROR_TYPE_MISMATCH | The property list self contains a property with the name name which is not of type CPL_TYPE_STRING . |
The function updates the property list self with the string value value. This means, if a property with the name name exists already its value is updated, otherwise a property with the name name is created and added to self. The update will fail if a property with the name name exists already which is not of type CPL_TYPE_STRING
.
References CPL_ERROR_NONE, and CPL_ERROR_NULL_INPUT.