Loading...
Searching...
No Matches
Properties

## 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.

## Detailed Description

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.

Synopsis:
  #include <cpl_property.h>

## Typedef Documentation

## cpl_property

typedef struct _cpl_property_ cpl_property

The opaque property data type.

## Function Documentation

## cpl_property_delete()

void cpl_property_delete | ( | cpl_property * | self | ) |

Destroy a property.

Parameters

  self | The property.

Returns
  Nothing.

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().

## cpl_property_dump()

void cpl_property_dump | ( | const cpl_property * | property,
|  | FILE * | stream )

Print a property.

Parameters

  property | Pointer to property
  stream | The output stream

Returns
  Nothing.

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_duplicate()

cpl_property * cpl_property_duplicate | ( | const cpl_property * | other | ) |

Create a copy of a property.

Parameters

  other | The property to copy.

Returns
  The copy of the given property, or `NULL` in case of an error. In the latter case an appropriate error code is set.

Errors

  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().

## cpl_property_get_bool()

int cpl_property_get_bool | ( | const cpl_property * | self | ) |

Get the value of a boolean property.

Parameters

  self | The property.

Returns
  The current property value. If an error occurs the function returns 0 and an appropriate error code is set.

Errors

  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().

## cpl_property_get_char()

char cpl_property_get_char | ( | const cpl_property * | self | ) |

Get the value of a character property.

Parameters

  self | The property.

Returns
  The current property value. If an error occurs the function returns '\0' and an appropriate error code is set.

Errors

  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().

## cpl_property_get_comment()

const char * cpl_property_get_comment | ( | const cpl_property * | self | ) |

Get the property comment.

Parameters

  self | The property.

Returns
  The comment of the property if it is present or `NULL`. If an error occurs the function returns `NULL` and sets an appropriate error code.

Errors

  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().

## cpl_property_get_double()

double cpl_property_get_double | ( | const cpl_property * | self | ) |

Get the value of a double property.

Parameters

  self | The property.

Returns
  The current property value. If an error occurs the function returns
  1. and an appropriate error code is set.

Errors

  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().

## cpl_property_get_double_complex()

double complex cpl_property_get_double_complex | ( | const cpl_property * | self | ) |

Get the value of a double complex property.

Parameters

  self | The property.

Returns
  The current property value. If an error occurs the function returns
  1. and an appropriate error code is set.

Errors

  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().

## cpl_property_get_float()

float cpl_property_get_float | ( | const cpl_property * | self | ) |

Get the value of a float property.

Parameters

  self | The property.

Returns
  The current property value. If an error occurs the function returns
  1. and an appropriate error code is set.

Errors

  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.

Note
  Calling the function for a property of type double may lead to truncation errors!

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().

## cpl_property_get_float_complex()

float complex cpl_property_get_float_complex | ( | const cpl_property * | self | ) |

Get the value of a float complex property.

Parameters

  self | The property.

Returns
  The current property value. If an error occurs the function returns
  1. and an appropriate error code is set.

Errors

  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.

Note
  Calling the function for a property of type double complex may lead to truncation errors!

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().

## cpl_property_get_int()

int cpl_property_get_int | ( | const cpl_property * | self | ) |

Get the value of an integer property.

Parameters

  self | The property.

Returns
  The current property value. If an error occurs the function returns 0 and an appropriate error code is set.

Errors

  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().

## cpl_property_get_long()

long cpl_property_get_long | ( | const cpl_property * | self | ) |

Get the value of a long property.

Parameters

  self | The property.

Returns
  The current property value. If an error occurs the function returns 0 and an appropriate error code is set.

Errors

  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().

## cpl_property_get_long_long()

long long cpl_property_get_long_long | ( | const cpl_property * | self | ) |

Get the value of a long long property.

Parameters

  self | The property.

Returns
  The current property value. If an error occurs the function returns 0 and an appropriate error code is set.

Errors

  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().

## cpl_property_get_name()

const char * cpl_property_get_name | ( | const cpl_property * | self | ) |

Get the property name.

Parameters

  self | The property.

Returns
  The name of the property or `NULL` if an error occurred. In the latter case an appropriate error code is set.

Errors

  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_property_get_size()

cpl_size cpl_property_get_size | ( | const cpl_property * | self | ) |

Get the current number of elements a property contains.

Parameters

  self | The property.

Returns
  The current number of elements or -1 in case of an error. If an error occurred an appropriate error code is set.

Errors

  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:

if (cpl_property_get_size(property) == 8 &&
memcmp(cpl_property_get_string(property), "EXAMPLE", 7) == 0) {
my_strings_are_equal();
} else {
my_strings_are_not_equal();
}
cpl_property_get_string
const char * cpl_property_get_string(const cpl_property *self)
Get the value of a string property.
Definition cpl_property.c:2455
cpl_property_get_size
cpl_size cpl_property_get_size(const cpl_property *self)
Get the current number of elements a property contains.
Definition cpl_property.c:759

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.

See also
  cpl_property_get_string()

References CPL_ERROR_NULL_INPUT.

Referenced by cpl_dfs_setup_product_header(), cpl_property_dump(), and cpl_propertylist_dump().

## cpl_property_get_string()

const char * cpl_property_get_string | ( | const cpl_property * | self | ) |

Get the value of a string property.

Parameters

  self | The property.

Returns
  The current property value. If an error occurs the function returns `NULL` and an appropriate error code is set.

Errors

  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.

See also
  cpl_property_get_size()

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_property_get_type()

cpl_type cpl_property_get_type | ( | const cpl_property * | self | ) |

Get the type of a property.

Parameters

  self | The property.

Returns
  The type code of this property. In case of an error the returned type code is `CPL_TYPE_INVALID` and an appropriate error code is set.

Errors

  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_new()

cpl_property * cpl_property_new | ( | const char * | name,
|  | cpl_type | type )

Create an empty property of a given type.

Parameters

  name | Property name.
  type | Property type flag.

Returns
  The newly created property, or `NULL` if it could not be created. In the latter case an appropriate error code is set.

Errors

  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().

See also
  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_new_array()

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.

Parameters

  name | Property name.
  type | Property type flag.
  size | Size of the property value.

Returns
  The newly created property, or `NULL` if it could not be created. in the latter case an appropriate error code is set.

Errors

  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().

See also
  cpl_property_delete()

References CPL_ERROR_NULL_INPUT.

## cpl_property_set_bool()

cpl_error_code cpl_property_set_bool | ( | cpl_property * | self,
|  | int | value )

Set the value of a boolean property.

Parameters

  self | The property.
  value | New value.

Returns
  The function returns `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.

Errors

  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_property_set_char()

cpl_error_code cpl_property_set_char | ( | cpl_property * | self,
|  | char | value )

Set the value of a character property.

Parameters

  self | The property.
  value | New value.

Returns
  The function returns `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.

Errors

  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_property_set_comment()

cpl_error_code cpl_property_set_comment | ( | cpl_property * | self,
|  | const char * | comment )

Modify a property's comment.

Parameters

  self | The property.
  comment | New comment.

Returns
  The function returns `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.

Errors

  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_property_set_double()

cpl_error_code cpl_property_set_double | ( | cpl_property * | self,
|  | double | value )

Set the value of a double property.

Parameters

  self | The property.
  value | New value.

Returns
  The function returns `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.

Errors

  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_property_set_double_complex()

cpl_error_code cpl_property_set_double_complex | ( | cpl_property * | self,
|  | double complex | value )

Set the value of a double complex property.

Parameters

  self | The property.
  value | New value.

Returns
  The function returns `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.

Errors

  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_property_set_float()

cpl_error_code cpl_property_set_float | ( | cpl_property * | self,
|  | float | value )

Set the value of a float property.

Parameters

  self | The property.
  value | New value.

Returns
  The function returns `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.

Errors

  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_property_set_float_complex()

cpl_error_code cpl_property_set_float_complex | ( | cpl_property * | self,
|  | float complex | value )

Set the value of a complex float property.

Parameters

  self | The property.
  value | New value.

Returns
  The function returns `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.

Errors

  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_property_set_int()

cpl_error_code cpl_property_set_int | ( | cpl_property * | self,
|  | int | value )

Set the value of an integer property.

Parameters

  self | The property.
  value | New value.

Returns
  The function returns `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.

Errors

  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_property_set_long()

cpl_error_code cpl_property_set_long | ( | cpl_property * | self,
|  | long | value )

Set the value of a long property.

Parameters

  self | The property.
  value | New value.

Returns
  The function returns `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.

Errors

  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_property_set_long_long()

cpl_error_code cpl_property_set_long_long | ( | cpl_property * | self,
|  | long long | value )

Set the value of a long long property.

Parameters

  self | The property.
  value | New value.

Returns
  The function returns `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.

Errors

  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_property_set_name()

cpl_error_code cpl_property_set_name | ( | cpl_property * | self,
|  | const char * | name )

Modify the name of a property.

Parameters

  self | The property.
  name | New name.

Returns
  The function returns `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.

Errors

  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_property_set_string()

cpl_error_code cpl_property_set_string | ( | cpl_property * | self,
|  | const char * | value )

Set the value of a string property.

Parameters

  self | The property.
  value | New value.

Returns
  The function returns `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.

Errors

  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().