Common Pipeline Library Reference 7.3.2
|
Typedefs | |
typedef struct _cpl_property_ | cpl_property |
The opaque property data type. | |
Functions | |
void | cpl_property_delete (cpl_property *self) |
Destroy a property. | |
void | cpl_property_dump (const cpl_property *, FILE *) |
Print a property. | |
cpl_property * | cpl_property_duplicate (const cpl_property *other) |
Create a copy of a property. | |
int | cpl_property_get_bool (const cpl_property *self) |
Get the value of a boolean property. | |
char | cpl_property_get_char (const cpl_property *self) |
Get the value of a character property. | |
const char * | cpl_property_get_comment (const cpl_property *self) |
Get the property comment. | |
double | cpl_property_get_double (const cpl_property *self) |
Get the value of a double property. | |
double complex | cpl_property_get_double_complex (const cpl_property *self) |
Get the value of a double complex property. | |
float | cpl_property_get_float (const cpl_property *self) |
Get the value of a float property. | |
float complex | cpl_property_get_float_complex (const cpl_property *self) |
Get the value of a float complex property. | |
int | cpl_property_get_int (const cpl_property *self) |
Get the value of an integer property. | |
long | cpl_property_get_long (const cpl_property *self) |
Get the value of a long property. | |
long long | cpl_property_get_long_long (const cpl_property *self) |
Get the value of a long long property. | |
const char * | cpl_property_get_name (const cpl_property *self) |
Get the property name. | |
cpl_size | cpl_property_get_size (const cpl_property *self) |
Get the current number of elements a property contains. | |
const char * | cpl_property_get_string (const cpl_property *self) |
Get the value of a string property. | |
cpl_type | cpl_property_get_type (const cpl_property *self) |
Get the type of a property. | |
cpl_property * | cpl_property_new (const char *name, cpl_type type) |
Create an empty property of a given type. | |
cpl_property * | cpl_property_new_array (const char *name, cpl_type type, cpl_size size) |
Create an empty property of a given type and size. | |
cpl_error_code | cpl_property_set_bool (cpl_property *self, int value) |
Set the value of a boolean property. | |
cpl_error_code | cpl_property_set_char (cpl_property *self, char value) |
Set the value of a character property. | |
cpl_error_code | cpl_property_set_comment (cpl_property *self, const char *comment) |
Modify a property's comment. | |
cpl_error_code | cpl_property_set_double (cpl_property *self, double value) |
Set the value of a double property. | |
cpl_error_code | cpl_property_set_double_complex (cpl_property *self, double complex value) |
Set the value of a double complex property. | |
cpl_error_code | cpl_property_set_float (cpl_property *self, float value) |
Set the value of a float property. | |
cpl_error_code | cpl_property_set_float_complex (cpl_property *self, float complex value) |
Set the value of a complex float property. | |
cpl_error_code | cpl_property_set_int (cpl_property *self, int value) |
Set the value of an integer property. | |
cpl_error_code | cpl_property_set_long (cpl_property *self, long value) |
Set the value of a long property. | |
cpl_error_code | cpl_property_set_long_long (cpl_property *self, long long value) |
Set the value of a long long property. | |
cpl_error_code | cpl_property_set_name (cpl_property *self, const char *name) |
Modify the name of a property. | |
cpl_error_code | cpl_property_set_string (cpl_property *self, const char *value) |
Set the value of a string property. | |
This module implements the property type. The type cpl_property
is basically a variable container which consists of a name, a type identifier and a specific value of that type. The type identifier always determines the type of the associated value. A property is similar to an ordinary variable and its current value can be set or retrieved through its name. In addition a property may have a descriptive comment associated. A property can be created for the basic types char, bool (int), int, long, float and double. Also C strings are supported. Support for arrays in general is currently not available.
typedef struct _cpl_property_ cpl_property |
The opaque property data type.
void cpl_property_delete | ( | cpl_property * | self | ) |
Destroy a property.
self | The property. |
The function destroys a property of any kind. All property members including their values are properly deallocated. If the property self is NULL
, nothing is done and no error is set.
References cpl_msg_warning(), cpl_type_get_name(), and cpl_type_get_sizeof().
Referenced by cpl_dfs_setup_product_header(), cpl_propertylist_delete(), cpl_propertylist_empty(), cpl_propertylist_erase(), and cpl_wcs_platesol().
void cpl_property_dump | ( | const cpl_property * | property, |
FILE * | stream | ||
) |
Print a property.
property | Pointer to property |
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_float(), 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_property_get_type(), CPL_TYPE_BOOL, CPL_TYPE_CHAR, CPL_TYPE_DOUBLE, CPL_TYPE_FLOAT, CPL_TYPE_INT, CPL_TYPE_LONG, CPL_TYPE_LONG_LONG, and CPL_TYPE_STRING.
cpl_property * cpl_property_duplicate | ( | const cpl_property * | other | ) |
Create a copy of a property.
other | The property to copy. |
NULL
in case of an error. In the latter case an appropriate error code is set.CPL_ERROR_NULL_INPUT | The parameter self is a NULL pointer. |
The function returns a copy of the property self. The copy is a deep copy, i.e. all property members are copied.
References CPL_ERROR_NULL_INPUT.
Referenced by cpl_dfs_setup_product_header(), cpl_propertylist_append(), cpl_propertylist_append_property(), cpl_propertylist_copy_property(), cpl_propertylist_duplicate(), cpl_propertylist_insert_after_property(), cpl_propertylist_insert_property(), and cpl_propertylist_prepend_property().
int cpl_property_get_bool | ( | const cpl_property * | self | ) |
Get the value of a boolean property.
self | The property. |
CPL_ERROR_NULL_INPUT | The parameter self is a NULL pointer. |
CPL_ERROR_TYPE_MISMATCH | The property self is not of type CPL_TYPE_BOOL . |
The function retrieves the boolean value currently stored in the property self.
References CPL_ERROR_NULL_INPUT, CPL_ERROR_TYPE_MISMATCH, CPL_TYPE_BOOL, and cpl_type_get_name().
Referenced by cpl_dfs_setup_product_header(), cpl_property_dump(), cpl_propertylist_dump(), and cpl_propertylist_get_bool().
char cpl_property_get_char | ( | const cpl_property * | self | ) |
Get the value of a character property.
self | The property. |
CPL_ERROR_NULL_INPUT | The parameter self is a NULL pointer. |
CPL_ERROR_TYPE_MISMATCH | The property self is not of type CPL_TYPE_CHAR . |
The function retrieves the character value currently stored in the property self.
References CPL_ERROR_NULL_INPUT, CPL_ERROR_TYPE_MISMATCH, CPL_TYPE_CHAR, and cpl_type_get_name().
Referenced by cpl_property_dump(), cpl_propertylist_dump(), and cpl_propertylist_get_char().
const char * cpl_property_get_comment | ( | const cpl_property * | self | ) |
Get the property comment.
self | The property. |
NULL
. If an error occurs the function returns NULL
and sets an appropriate error code.CPL_ERROR_NULL_INPUT | The parameter self is a NULL pointer. |
The function returns a handle for the read-only comment string of self.
References CPL_ERROR_NULL_INPUT.
Referenced by cpl_multiframe_dataset_properties_update(), cpl_property_dump(), cpl_propertylist_dump(), and cpl_propertylist_get_comment().
double cpl_property_get_double | ( | const cpl_property * | self | ) |
Get the value of a double property.
self | The property. |
CPL_ERROR_NULL_INPUT | The parameter self is a NULL pointer. |
CPL_ERROR_TYPE_MISMATCH | The property self is not of type CPL_TYPE_DOUBLE or CPL_TYPE_FLOAT . |
The function retrieves the value currently stored in the property self as a double. The function accepts properties of a floating-point type with a rank less or equal than the function's return type.
References CPL_ERROR_NULL_INPUT, CPL_ERROR_TYPE_MISMATCH, CPL_TYPE_DOUBLE, CPL_TYPE_FLOAT, cpl_type_get_name(), and cpl_type_get_sizeof().
Referenced by cpl_property_dump(), cpl_propertylist_dump(), and cpl_propertylist_get_double().
double complex cpl_property_get_double_complex | ( | const cpl_property * | self | ) |
Get the value of a double complex property.
self | The property. |
CPL_ERROR_NULL_INPUT | The parameter self is a NULL pointer. |
CPL_ERROR_TYPE_MISMATCH | The property self is not of type CPL_TYPE_DOUBLE_COMPLEX or CPL_TYPE_FLOAT_COMPLEX . |
The function retrieves the value currently stored in the property self as a double complex. The function accepts properties of a complex type with a rank less or equal than the function's return type.
References CPL_ERROR_NULL_INPUT, CPL_ERROR_TYPE_MISMATCH, CPL_TYPE_DOUBLE_COMPLEX, CPL_TYPE_FLOAT_COMPLEX, cpl_type_get_name(), and cpl_type_get_sizeof().
Referenced by cpl_propertylist_dump(), and cpl_propertylist_get_double_complex().
float cpl_property_get_float | ( | const cpl_property * | self | ) |
Get the value of a float property.
self | The property. |
CPL_ERROR_NULL_INPUT | The parameter self is a NULL pointer. |
CPL_ERROR_TYPE_MISMATCH | The property self is not of type CPL_TYPE_FLOAT or CPL_TYPE_DOUBLE . |
The function retrieves the value currently stored in the property self as a float. The function also accepts properties of type double and returns the property value as float.
References CPL_ERROR_NULL_INPUT, CPL_ERROR_TYPE_MISMATCH, CPL_TYPE_DOUBLE, CPL_TYPE_FLOAT, cpl_type_get_name(), and cpl_type_get_sizeof().
Referenced by cpl_property_dump(), cpl_propertylist_dump(), and cpl_propertylist_get_float().
float complex cpl_property_get_float_complex | ( | const cpl_property * | self | ) |
Get the value of a float complex property.
self | The property. |
CPL_ERROR_NULL_INPUT | The parameter self is a NULL pointer. |
CPL_ERROR_TYPE_MISMATCH | The property self is not of type CPL_TYPE_FLOAT_COMPLEX or CPL_TYPE_DOUBLE_COMPLEX . |
The function retrieves the value currently stored in the property self as a float complex. The function also accepts properties of type double complex and returns the property value as float complex.
References CPL_ERROR_NULL_INPUT, CPL_ERROR_TYPE_MISMATCH, CPL_TYPE_DOUBLE_COMPLEX, CPL_TYPE_FLOAT_COMPLEX, cpl_type_get_name(), and cpl_type_get_sizeof().
Referenced by cpl_propertylist_dump(), and cpl_propertylist_get_float_complex().
int cpl_property_get_int | ( | const cpl_property * | self | ) |
Get the value of an integer property.
self | The property. |
CPL_ERROR_NULL_INPUT | The parameter self is a NULL pointer. |
CPL_ERROR_TYPE_MISMATCH | The property self is not of type CPL_TYPE_INT . |
The function retrieves the integer value currently stored in the property self.
References CPL_ERROR_NULL_INPUT, CPL_ERROR_TYPE_MISMATCH, cpl_type_get_name(), and CPL_TYPE_INT.
Referenced by cpl_property_dump(), cpl_propertylist_dump(), and cpl_propertylist_get_int().
long cpl_property_get_long | ( | const cpl_property * | self | ) |
Get the value of a long property.
self | The property. |
CPL_ERROR_NULL_INPUT | The parameter self is a NULL pointer. |
CPL_ERROR_TYPE_MISMATCH | The property self is not of type CPL_TYPE_LONG or CPL_TYPE_INT . |
The function retrieves the value currently stored in the property self as a long integer. The function accepts properties of integer type with a rank less or equal than the function's return type.
References CPL_ERROR_NULL_INPUT, CPL_ERROR_TYPE_MISMATCH, cpl_type_get_name(), CPL_TYPE_INT, and CPL_TYPE_LONG.
Referenced by cpl_property_dump(), cpl_propertylist_dump(), and cpl_propertylist_get_long().
long long cpl_property_get_long_long | ( | const cpl_property * | self | ) |
Get the value of a long long property.
self | The property. |
CPL_ERROR_NULL_INPUT | The parameter self is a NULL pointer. |
CPL_ERROR_TYPE_MISMATCH | The property self is not of type CPL_TYPE_LONG_LONG , CPL_TYPE_LONG , or CPL_TYPE_INT . |
The function retrieves the value currently stored in the property self as a long long integer. The function accepts properties of integer type with a rank less or equal than the function's return type.
References CPL_ERROR_NULL_INPUT, CPL_ERROR_TYPE_MISMATCH, cpl_type_get_name(), CPL_TYPE_INT, CPL_TYPE_LONG, and CPL_TYPE_LONG_LONG.
Referenced by cpl_property_dump(), cpl_propertylist_dump(), and cpl_propertylist_get_long_long().
const char * cpl_property_get_name | ( | const cpl_property * | self | ) |
Get the property name.
self | The property. |
NULL
if an error occurred. In the latter case an appropriate error code is set.CPL_ERROR_NULL_INPUT | The parameter self is a NULL pointer. |
The function returns a handle for the read-only identifier string of self.
References CPL_ERROR_NULL_INPUT.
Referenced by cpl_multiframe_dataset_properties_remove(), cpl_multiframe_dataset_properties_update(), cpl_property_dump(), and cpl_propertylist_dump().
cpl_size cpl_property_get_size | ( | const cpl_property * | self | ) |
Get the current number of elements a property contains.
self | The property. |
CPL_ERROR_NULL_INPUT | The parameter self is a NULL pointer. |
The function returns the current number of elements the property self contains. This is the array size of the property's value and in particular, for a property of the type CPL_TYPE_STRING
, it is the length of the string as given by the strlen() function plus 1.
Testing whether the value of a string property equals a given string can be done like this:
When the length of the string to compare to is known at compile time, the call to memcmp() will typically be inlined (and no calls to strlen() et al are needed). Further, if the length of the property string value is greater than 1, then it is not necessary to test whether its type is CPL_TYPE_STRING, since all properties of a numerical type has size 1.
References CPL_ERROR_NULL_INPUT.
Referenced by cpl_dfs_setup_product_header(), cpl_property_dump(), and cpl_propertylist_dump().
const char * cpl_property_get_string | ( | const cpl_property * | self | ) |
Get the value of a string property.
self | The property. |
NULL
and an appropriate error code is set.CPL_ERROR_NULL_INPUT | The parameter self is a NULL pointer. |
CPL_ERROR_TYPE_MISMATCH | The property self is not of type CPL_TYPE_STRING . |
The function retrieves the string value currently stored in the property self.
References CPL_ERROR_NULL_INPUT, CPL_ERROR_TYPE_MISMATCH, cpl_type_get_name(), and CPL_TYPE_STRING.
Referenced by cpl_dfs_setup_product_header(), cpl_property_dump(), cpl_propertylist_dump(), and cpl_propertylist_get_string().
cpl_type cpl_property_get_type | ( | const cpl_property * | self | ) |
Get the type of a property.
self | The property. |
CPL_TYPE_INVALID
and an appropriate error code is set.CPL_ERROR_NULL_INPUT | The parameter self is a NULL pointer. |
This function returns the type of the data value stored in the property self.
References CPL_ERROR_NULL_INPUT, and CPL_TYPE_INVALID.
Referenced by cpl_dfs_setup_product_header(), cpl_multiframe_dataset_properties_update(), and cpl_property_dump().
cpl_property * cpl_property_new | ( | const char * | name, |
cpl_type | type | ||
) |
Create an empty property of a given type.
name | Property name. |
type | Property type flag. |
NULL
if it could not be created. In the latter case an appropriate error code is set.CPL_ERROR_NULL_INPUT | The parameter name is a NULL pointer. |
CPL_ERROR_INVALID_TYPE | The requested property type type is not supported. |
The function allocates memory for a property of type type and assigns the identifier string name to the newly created property.
The returned property must be destroyed using the property destructor cpl_property_delete().
References CPL_ERROR_NULL_INPUT.
Referenced by cpl_propertylist_append_bool(), cpl_propertylist_append_char(), cpl_propertylist_append_double(), cpl_propertylist_append_double_complex(), cpl_propertylist_append_float(), cpl_propertylist_append_float_complex(), cpl_propertylist_append_int(), cpl_propertylist_append_long(), cpl_propertylist_append_long_long(), cpl_propertylist_append_string(), cpl_propertylist_prepend_bool(), cpl_propertylist_prepend_char(), cpl_propertylist_prepend_double(), cpl_propertylist_prepend_double_complex(), cpl_propertylist_prepend_float(), cpl_propertylist_prepend_float_complex(), cpl_propertylist_prepend_int(), cpl_propertylist_prepend_long(), cpl_propertylist_prepend_long_long(), and cpl_propertylist_prepend_string().
cpl_property * cpl_property_new_array | ( | const char * | name, |
cpl_type | type, | ||
cpl_size | size | ||
) |
Create an empty property of a given type and size.
name | Property name. |
type | Property type flag. |
size | Size of the property value. |
NULL
if it could not be created. in the latter case an appropriate error code is set.CPL_ERROR_NULL_INPUT | The parameter name is a NULL pointer. |
CPL_ERROR_INVALID_TYPE | The requested property type type is not supported. |
CPL_ERROR_ILLEGAL_INPUT | The requested size is non-positive. |
The function allocates memory for a property of type type and assigns the identifier string name to the newly created property. The property value is created such that size elements of type type can be stored.
The returned property must be destroyed using the property destructor cpl_property_delete().
References CPL_ERROR_NULL_INPUT.
cpl_error_code cpl_property_set_bool | ( | cpl_property * | self, |
int | value | ||
) |
Set the value of a boolean property.
self | The property. |
value | New value. |
CPL_ERROR_NONE
on success and an appropriate error code if an error occurred. In the latter case the error code is also set in the error handling system.CPL_ERROR_NULL_INPUT | The parameter self is a NULL pointer. |
CPL_ERROR_TYPE_MISMATCH | The property self is not of type CPL_TYPE_BOOL . |
The function replaces the current boolean value of self with a a 0, if value is equal to 0. If value is different from 0 any previous value of self is replaced by a 1.
References CPL_ERROR_NONE, CPL_ERROR_NULL_INPUT, CPL_ERROR_TYPE_MISMATCH, CPL_TYPE_BOOL, cpl_type_get_name(), and cpl_type_get_sizeof().
Referenced by cpl_dfs_setup_product_header(), cpl_propertylist_append_bool(), cpl_propertylist_prepend_bool(), cpl_propertylist_set_bool(), and cpl_propertylist_update_bool().
cpl_error_code cpl_property_set_char | ( | cpl_property * | self, |
char | value | ||
) |
Set the value of a character property.
self | The property. |
value | New value. |
CPL_ERROR_NONE
on success and an appropriate error code if an error occurred. In the latter case the error code is also set in the error handling system.CPL_ERROR_NULL_INPUT | The parameter self is a NULL pointer. |
CPL_ERROR_TYPE_MISMATCH | The property self is not of type CPL_TYPE_CHAR . |
The function replaces the current character value of self with a copy of the value value.
References CPL_ERROR_NONE, CPL_ERROR_NULL_INPUT, CPL_ERROR_TYPE_MISMATCH, CPL_TYPE_CHAR, cpl_type_get_name(), and cpl_type_get_sizeof().
Referenced by cpl_propertylist_append_char(), cpl_propertylist_prepend_char(), cpl_propertylist_set_char(), and cpl_propertylist_update_char().
cpl_error_code cpl_property_set_comment | ( | cpl_property * | self, |
const char * | comment | ||
) |
Modify a property's comment.
self | The property. |
comment | New comment. |
CPL_ERROR_NONE
on success and an appropriate error code if an error occurred. In the latter case the error code is also set in the error handling system.CPL_ERROR_NULL_INPUT | The parameter self or comment is a NULL pointer. |
The function replaces the current comment field of self with a copy of the string comment. The new comment may be NULL
. In this case the function effectively deletes the current comment.
References CPL_ERROR_NONE, and CPL_ERROR_NULL_INPUT.
Referenced by cpl_dfs_setup_product_header(), and cpl_propertylist_set_comment().
cpl_error_code cpl_property_set_double | ( | cpl_property * | self, |
double | value | ||
) |
Set the value of a double property.
self | The property. |
value | New value. |
CPL_ERROR_NONE
on success and an appropriate error code if an error occurred. In the latter case the error code is also set in the error handling system.CPL_ERROR_NULL_INPUT | The parameter self is a NULL pointer. |
CPL_ERROR_TYPE_MISMATCH | The property self is not of type CPL_TYPE_DOUBLE . |
The function replaces the current double value of self with a copy of the value value.
References CPL_ERROR_NONE, CPL_ERROR_NULL_INPUT, CPL_ERROR_TYPE_MISMATCH, CPL_TYPE_DOUBLE, cpl_type_get_name(), and cpl_type_get_sizeof().
Referenced by cpl_propertylist_append_double(), cpl_propertylist_prepend_double(), cpl_propertylist_set_double(), cpl_propertylist_update_double(), and cpl_wcs_platesol().
cpl_error_code cpl_property_set_double_complex | ( | cpl_property * | self, |
double complex | value | ||
) |
Set the value of a double complex property.
self | The property. |
value | New value. |
CPL_ERROR_NONE
on success and an appropriate error code if an error occurred. In the latter case the error code is also set in the error handling system.CPL_ERROR_NULL_INPUT | The parameter self is a NULL pointer. |
CPL_ERROR_TYPE_MISMATCH | The property self is not of type CPL_TYPE_DOUBLE_COMPLEX . |
The function replaces the current double value of self with a copy of the value value.
References CPL_ERROR_NONE, CPL_ERROR_NULL_INPUT, CPL_ERROR_TYPE_MISMATCH, CPL_TYPE_DOUBLE_COMPLEX, cpl_type_get_name(), and cpl_type_get_sizeof().
Referenced by cpl_propertylist_append_double_complex(), cpl_propertylist_prepend_double_complex(), cpl_propertylist_set_double_complex(), and cpl_propertylist_update_double_complex().
cpl_error_code cpl_property_set_float | ( | cpl_property * | self, |
float | value | ||
) |
Set the value of a float property.
self | The property. |
value | New value. |
CPL_ERROR_NONE
on success and an appropriate error code if an error occurred. In the latter case the error code is also set in the error handling system.CPL_ERROR_NULL_INPUT | The parameter self is a NULL pointer. |
CPL_ERROR_TYPE_MISMATCH | The property self is not of type CPL_TYPE_FLOAT . |
The function replaces the current float value of self with a copy of the value value.
References CPL_ERROR_NONE, CPL_ERROR_NULL_INPUT, CPL_ERROR_TYPE_MISMATCH, CPL_TYPE_FLOAT, cpl_type_get_name(), and cpl_type_get_sizeof().
Referenced by cpl_propertylist_append_float(), cpl_propertylist_prepend_float(), cpl_propertylist_set_float(), and cpl_propertylist_update_float().
cpl_error_code cpl_property_set_float_complex | ( | cpl_property * | self, |
float complex | value | ||
) |
Set the value of a complex float property.
self | The property. |
value | New value. |
CPL_ERROR_NONE
on success and an appropriate error code if an error occurred. In the latter case the error code is also set in the error handling system.CPL_ERROR_NULL_INPUT | The parameter self is a NULL pointer. |
CPL_ERROR_TYPE_MISMATCH | The property self is not of type CPL_TYPE_COMPLEX_FLOAT . |
The function replaces the current complex float value of self with a copy of the value value.
References CPL_ERROR_NONE, CPL_ERROR_NULL_INPUT, CPL_ERROR_TYPE_MISMATCH, CPL_TYPE_FLOAT_COMPLEX, cpl_type_get_name(), and cpl_type_get_sizeof().
Referenced by cpl_propertylist_append_float_complex(), cpl_propertylist_prepend_float_complex(), cpl_propertylist_set_float_complex(), and cpl_propertylist_update_float_complex().
cpl_error_code cpl_property_set_int | ( | cpl_property * | self, |
int | value | ||
) |
Set the value of an integer property.
self | The property. |
value | New value. |
CPL_ERROR_NONE
on success and an appropriate error code if an error occurred. In the latter case the error code is also set in the error handling system.CPL_ERROR_NULL_INPUT | The parameter self is a NULL pointer. |
CPL_ERROR_TYPE_MISMATCH | The property self is not of type CPL_TYPE_INT . |
The function replaces the current integer value of self with a copy of the value value.
References CPL_ERROR_NONE, CPL_ERROR_NULL_INPUT, CPL_ERROR_TYPE_MISMATCH, cpl_type_get_name(), cpl_type_get_sizeof(), and CPL_TYPE_INT.
Referenced by cpl_dfs_setup_product_header(), cpl_propertylist_append_int(), cpl_propertylist_prepend_int(), cpl_propertylist_set_int(), and cpl_propertylist_update_int().
cpl_error_code cpl_property_set_long | ( | cpl_property * | self, |
long | value | ||
) |
Set the value of a long property.
self | The property. |
value | New value. |
CPL_ERROR_NONE
on success and an appropriate error code if an error occurred. In the latter case the error code is also set in the error handling system.CPL_ERROR_NULL_INPUT | The parameter self is a NULL pointer. |
CPL_ERROR_TYPE_MISMATCH | The property self is not of type CPL_TYPE_LONG . |
The function replaces the current long value of self with a copy of the value value.
References CPL_ERROR_NONE, CPL_ERROR_NULL_INPUT, CPL_ERROR_TYPE_MISMATCH, cpl_type_get_name(), cpl_type_get_sizeof(), and CPL_TYPE_LONG.
Referenced by cpl_propertylist_append_long(), cpl_propertylist_prepend_long(), cpl_propertylist_set_long(), and cpl_propertylist_update_long().
cpl_error_code cpl_property_set_long_long | ( | cpl_property * | self, |
long long | value | ||
) |
Set the value of a long long property.
self | The property. |
value | New value. |
CPL_ERROR_NONE
on success and an appropriate error code if an error occurred. In the latter case the error code is also set in the error handling system.CPL_ERROR_NULL_INPUT | The parameter self is a NULL pointer. |
CPL_ERROR_TYPE_MISMATCH | The property self is not of type CPL_TYPE_LONG . |
The function replaces the current long long value of self with a copy of the value value.
References CPL_ERROR_NONE, CPL_ERROR_NULL_INPUT, CPL_ERROR_TYPE_MISMATCH, cpl_type_get_name(), cpl_type_get_sizeof(), and CPL_TYPE_LONG_LONG.
Referenced by cpl_propertylist_append_long_long(), cpl_propertylist_prepend_long_long(), cpl_propertylist_set_long_long(), and cpl_propertylist_update_long_long().
cpl_error_code cpl_property_set_name | ( | cpl_property * | self, |
const char * | name | ||
) |
Modify the name of a property.
self | The property. |
name | New name. |
CPL_ERROR_NONE
on success and an appropriate error code if an error occurred. In the latter case the error code is also set in the error handling system.CPL_ERROR_NULL_INPUT | The parameter self or name is a NULL pointer. |
The function replaces the current name of self with a copy of the string name. The function returns an error if name is NULL
.
References CPL_ERROR_NONE, and CPL_ERROR_NULL_INPUT.
Referenced by cpl_dfs_setup_product_header().
cpl_error_code cpl_property_set_string | ( | cpl_property * | self, |
const char * | value | ||
) |
Set the value of a string property.
self | The property. |
value | New value. |
CPL_ERROR_NONE
on success and an appropriate error code if an error occurred. In the latter case the error code is also set in the error handling system.CPL_ERROR_NULL_INPUT | The parameter self or value is a NULL pointer. |
CPL_ERROR_TYPE_MISMATCH | The property self is not of type CPL_TYPE_STRING . |
The function replaces the current string value of self with a copy of the value value.
References CPL_ERROR_NONE, CPL_ERROR_NULL_INPUT, CPL_ERROR_TYPE_MISMATCH, cpl_type_get_name(), and CPL_TYPE_STRING.
Referenced by cpl_propertylist_append_string(), cpl_propertylist_prepend_string(), and cpl_propertylist_set_string().