Main Page   Modules   Alphabetical List   Compound List   Compound Members  

Property Lists


Typedefs

typedef _cpl_plist_ cpl_plist
 The opaque property list data type. More...


Functions

cpl_plist * cpl_plist_new (void)
 Create an empty property list. More...

cpl_plist * cpl_plist_duplicate (const cpl_plist *plist)
 Create a copy of the given property list. More...

void cpl_plist_delete (cpl_plist *plist)
 Destroy a property list. More...

long cpl_plist_get_size (const cpl_plist *plist)
 Get the current size of a property list. More...

long cpl_plist_max_size (const cpl_plist *plist)
 Get the maximum number of property list entries possible. More...

int cpl_plist_is_empty (const cpl_plist *plist)
 Check whether a property list is empty. More...

cpl_type cpl_plist_get_type (const cpl_plist *plist, const char *name)
 Get the the type of a property list entry. More...

int cpl_plist_contains (const cpl_plist *plist, const char *name)
 Check whether a property is present in a property list. More...

int cpl_plist_set_comment (cpl_plist *plist, const char *name, const char *comment)
 Modify the comment field of the given property list entry. More...

int cpl_plist_set_char (cpl_plist *plist, const char *name, char value)
 Set the value of the given character property list entry. More...

int cpl_plist_set_bool (cpl_plist *plist, const char *name, int value)
 Set the value of the given boolean property list entry. More...

int cpl_plist_set_int (cpl_plist *plist, const char *name, int value)
 Set the value of the given integer property list entry. More...

int cpl_plist_set_long (cpl_plist *plist, const char *name, long value)
 Set the value of the given long property list entry. More...

int cpl_plist_set_float (cpl_plist *plist, const char *name, float value)
 Set the value of the given float property list entry. More...

int cpl_plist_set_double (cpl_plist *plist, const char *name, double value)
 Set the value of the given double property list entry. More...

int cpl_plist_set_string (cpl_plist *plist, const char *name, const char *value)
 Set the value of the given string property list entry. More...

cpl_propertycpl_plist_get_element (cpl_plist *plist, long index)
 Access property list elements by index. More...

const char * cpl_plist_get_comment (const cpl_plist *plist, const char *name)
 Get the comment of the given property list entry. More...

char cpl_plist_get_char (const cpl_plist *plist, const char *name)
 Get the character value of the given property list entry. More...

int cpl_plist_get_bool (const cpl_plist *plist, const char *name)
 Get the boolean value of the given property list entry. More...

int cpl_plist_get_int (const cpl_plist *plist, const char *name)
 Get the integer value of the given property list entry. More...

long cpl_plist_get_long (const cpl_plist *plist, const char *name)
 Get the long value of the given property list entry. More...

float cpl_plist_get_float (const cpl_plist *plist, const char *name)
 Get the float value of the given property list entry. More...

double cpl_plist_get_double (const cpl_plist *plist, const char *name)
 Get the double value of the given property list entry. More...

const char * cpl_plist_get_string (const cpl_plist *plist, const char *name)
 Get the string value of the given property list entry. More...

int cpl_plist_insert_char (cpl_plist *plist, const char *here, const char *name, char value)
 Insert a character value into a property list at the given position. More...

int cpl_plist_insert_bool (cpl_plist *plist, const char *here, const char *name, int value)
 Insert a boolean value into a property list at the given position. More...

int cpl_plist_insert_int (cpl_plist *plist, const char *here, const char *name, int value)
 Insert a integer value into a property list at the given position. More...

int cpl_plist_insert_long (cpl_plist *plist, const char *here, const char *name, long value)
 Insert a long value into a property list at the given position. More...

int cpl_plist_insert_float (cpl_plist *plist, const char *here, const char *name, float value)
 Insert a float value into a property list at the given position. More...

int cpl_plist_insert_double (cpl_plist *plist, const char *here, const char *name, double value)
 Insert a double value into a property list at the given position. More...

int cpl_plist_insert_string (cpl_plist *plist, const char *here, const char *name, const char *value)
 Insert a string value into a property list at the given position. More...

int cpl_plist_insert_after_char (cpl_plist *plist, const char *after, const char *name, char value)
 Insert a character value into a property list after the given position. More...

int cpl_plist_insert_after_bool (cpl_plist *plist, const char *after, const char *name, int value)
 Insert a boolean value into a property list after the given position. More...

int cpl_plist_insert_after_int (cpl_plist *plist, const char *after, const char *name, int value)
 Insert a integer value into a property list after the given position. More...

int cpl_plist_insert_after_long (cpl_plist *plist, const char *after, const char *name, long value)
 Insert a long value into a property list after the given position. More...

int cpl_plist_insert_after_float (cpl_plist *plist, const char *after, const char *name, float value)
 Insert a float value into a property list after the given position. More...

int cpl_plist_insert_after_double (cpl_plist *plist, const char *after, const char *name, double value)
 Insert a double value into a property list after the given position. More...

int cpl_plist_insert_after_string (cpl_plist *plist, const char *after, const char *name, const char *value)
 Insert a string value into a property list after the given position. More...

int cpl_plist_prepend_char (cpl_plist *plist, const char *name, char value)
 Prepend a character value to a property list. More...

int cpl_plist_prepend_bool (cpl_plist *plist, const char *name, int value)
 Prepend a boolean value to a property list. More...

int cpl_plist_prepend_int (cpl_plist *plist, const char *name, int value)
 Prepend a integer value to a property list. More...

int cpl_plist_prepend_long (cpl_plist *plist, const char *name, long value)
 Prepend a long value to a property list. More...

int cpl_plist_prepend_float (cpl_plist *plist, const char *name, float value)
 Prepend a float value to a property list. More...

int cpl_plist_prepend_double (cpl_plist *plist, const char *name, double value)
 Prepend a double value to a property list. More...

int cpl_plist_prepend_string (cpl_plist *plist, const char *name, const char *value)
 Prepend a string value to a property list. More...

int cpl_plist_append_char (cpl_plist *plist, const char *name, char value)
 Append a character value to a property list. More...

int cpl_plist_append_bool (cpl_plist *plist, const char *name, int value)
 Append a boolean value to a property list. More...

int cpl_plist_append_int (cpl_plist *plist, const char *name, int value)
 Append an integer value to a property list. More...

int cpl_plist_append_long (cpl_plist *plist, const char *name, long value)
 Append a long value to a property list. More...

int cpl_plist_append_float (cpl_plist *plist, const char *name, float value)
 Append a float value to a property list. More...

int cpl_plist_append_double (cpl_plist *plist, const char *name, double value)
 Append a double value to a property list. More...

int cpl_plist_append_string (cpl_plist *plist, const char *name, const char *value)
 Append a string value to a property list. More...

int cpl_plist_erase (cpl_plist *plist, const char *name)
 Erase the given property from a property list. More...

int cpl_plist_erase_regexp (cpl_plist *plist, const char *regexp)
 Erase all properties with name matching a given regular expression. More...

void cpl_plist_clear (cpl_plist *plist)
 Remove all properties from a property list. More...

int cpl_plist_load (cpl_plist *plist, const char *name, int index)
 Create a property list from a file. More...

qfits_header * cpl_plist_to_fits (const cpl_plist *plist)
 Convert a property list to a FITS header. More...

cpl_plist * cpl_plist_from_fits (const qfits_header *header)
 Create a property list from a FITS header. More...


Detailed Description

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.
Synopsis:
   #include <cpl_plist.h>

Typedef Documentation

typedef struct _cpl_plist_ cpl_plist
 

The opaque property list data type.


Function Documentation

int cpl_plist_append_bool cpl_plist   plist,
const char *    name,
int    value
 

Append a boolean value to a property list.

Parameters:
plist  A property list.
name  The property name to be assigned to the value.
value  The boolean value to store.
Returns:
The function returns 0 on success, or 1 otherwise.
The function creates a new boolean property with name name and value value. The property is appended to the property list plist.

int cpl_plist_append_char cpl_plist   plist,
const char *    name,
char    value
 

Append a character value to a property list.

Parameters:
plist  A property list.
name  The property name to be assigned to the value.
value  The character value to store.
Returns:
The function returns 0 on success, or 1 otherwise.
The function creates a new character property with name name and value value. The property is appended to the property list plist.

int cpl_plist_append_double cpl_plist   plist,
const char *    name,
double    value
 

Append a double value to a property list.

Parameters:
plist  A property list.
name  The property name to be assigned to the value.
value  The double value to store.
Returns:
The function returns 0 on success, or 1 otherwise.
The function creates a new double property with name name and value value. The property is appended to the property list plist.

int cpl_plist_append_float cpl_plist   plist,
const char *    name,
float    value
 

Append a float value to a property list.

Parameters:
plist  A property list.
name  The property name to be assigned to the value.
value  The float value to store.
Returns:
The function returns 0 on success, or 1 otherwise.
The function creates a new float property with name name and value value. The property is appended to the property list plist.

int cpl_plist_append_int cpl_plist   plist,
const char *    name,
int    value
 

Append an integer value to a property list.

Parameters:
plist  A property list.
name  The property name to be assigned to the value.
value  The integer value to store.
Returns:
The function returns 0 on success, or 1 otherwise.
The function creates a new integer property with name name and value value. The property is appended to the property list plist.

int cpl_plist_append_long cpl_plist   plist,
const char *    name,
long    value
 

Append a long value to a property list.

Parameters:
plist  A property list.
name  The property name to be assigned to the value.
value  The long value to store.
Returns:
The function returns 0 on success, or 1 otherwise.
The function creates a new long property with name name and value value. The property is appended to the property list plist.

int cpl_plist_append_string cpl_plist   plist,
const char *    name,
const char *    value
 

Append a string value to a property list.

Parameters:
plist  A property list.
name  The property name to be assigned to the value.
value  The string value to store.
Returns:
The function returns 0 on success, or 1 otherwise.
The function creates a new string property with name name and value value. The property is appended to the property list plist.

void cpl_plist_clear cpl_plist   plist
 

Remove all properties from a property list.

Parameters:
plist  A property list.
Returns:
Nothing.
The function removes all properties from plist. Each property is properly deallocated. After calling this function plist is empty.

int cpl_plist_contains const cpl_plist   plist,
const char *    name
 

Check whether a property is present in a property list.

Parameters:
plist  A property list.
name  The property name to look up.
Returns:
The function returns 1 if the property is present, or 0 otherwise.
The function searches the property list plist for a property with the name name and reports whether it was found or not.

void cpl_plist_delete cpl_plist   plist
 

Destroy a property list.

Parameters:
plist  The property list to destroy.
Returns:
Nothing.
The function destroys the property list plist and its whole contents.

cpl_plist* cpl_plist_duplicate const cpl_plist   plist
 

Create a copy of the given property list.

Parameters:
plist  The property list to be copied.
Returns:
The created copy.
The function creates a deep copy of the given property list plist, i.e the created copy and the original property list do not share any resources.

int cpl_plist_erase cpl_plist   plist,
const char *    name
 

Erase the given property from a property list.

Parameters:
plist  A property list.
name  Name of the property to erase.
Returns:
Number of erased entries.
The function searches the property with the name name in the property list plist and removes it. The property is destroyed. If plist contains multiple duplicates of a property named name, only the first one is erased.

int cpl_plist_erase_regexp cpl_plist   plist,
const char *    regexp
 

Erase all properties with name matching a given regular expression.

Parameters:
plist  A property list.
regexp  Regular expression.
Returns:
Number of erased entries.
The function searches for all the properties matching regexp in the list plist and removes them. The properties are destroyed.

cpl_plist* cpl_plist_from_fits const qfits_header *    header
 

Create a property list from a FITS header.

Parameters:
header  FITS header to be converted.
Returns:
The function returns the created property list, or NULL in case of an error.
The function converts the FITS keywords from header into properties and puts them into a property list.

The FITS header header is left untouched, i.e. the conversion is non-destructive. The special FITS keyword END indicating the end of a FITS header is not transformed into a property, but simply ignored.

In case of an error, an appropriate error code is set. If a FITS header card cannot be parsed the error code is set to CPL_ERROR_ILLEGAL_INPUT or to CPL_ERROR_INVALID_TYPE if a FITS keyword type is not supported. If header is NULL the error code is set to CPL_ERROR_NULL_INPUT.

int cpl_plist_get_bool const cpl_plist   plist,
const char *    name
 

Get the boolean value of the given property list entry.

Parameters:
plist  A property list.
name  The property name to look up.
Returns:
The integer representation of the boolean value stored in the list entry. TRUE is represented as non-zero value while 0 indicates FALSE.
The function searches the property list plist for a property named name. If it is present in the list, its boolean value is returned. If an entry with the name name is not found, or if the value stored in the entry is of an incompatible type the function returns 0.

Additionally, the function sets the error CPL_ERROR_DATA_NOT_FOUND if a property with the name name was not found in the list. If the sought-after property is not of type boolean the error CPL_ERROR_TYPE_MISMATCH is set.

char cpl_plist_get_char const cpl_plist   plist,
const char *    name
 

Get the character value of the given property list entry.

Parameters:
plist  A property list.
name  The property name to look up.
Returns:
The character value stored in the list entry.
The function searches the property list plist for a property named name. If it is present in the list, its character value is returned. If an entry with the name name is not found, or if the value stored in the entry is of an incompatible type the function returns '\0'.

Additionally, the function sets the error CPL_ERROR_DATA_NOT_FOUND if a property with the name name was not found in the list. If the sought-after property is not of type character the error CPL_ERROR_TYPE_MISMATCH is set.

const char* cpl_plist_get_comment const cpl_plist   plist,
const char *    name
 

Get the comment of the given property list entry.

Parameters:
plist  A property list.
name  The property name to look up.
Returns:
The comment of the property list entry, or NULL.
The function searches the property list plist 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.

Additionally, the function sets the error CPL_ERROR_DATA_NOT_FOUND if a property with the name name was not found in the list.

double cpl_plist_get_double const cpl_plist   plist,
const char *    name
 

Get the double value of the given property list entry.

Parameters:
plist  A property list.
name  The property name to look up.
Returns:
The double value stored in the list entry.
The function searches the property list plist for a property named name. If it is present in the list, its double value is returned. If an entry with the name name is not found, or if the value stored in the entry is of an incompatible type the function returns 0.

Additionally, the function sets the error CPL_ERROR_DATA_NOT_FOUND if a property with the name name was not found in the list. If the sought-after property is not of type double the error CPL_ERROR_TYPE_MISMATCH is set.

cpl_property* cpl_plist_get_element cpl_plist   plist,
long    index
 

Access property list elements by index.

Parameters:
plist  The property list to query.
index  Index of the element to retrieve.
Returns:
The function returns the property with index index, or NULL if index is out of range.
The function returns a handle for the property list element, the property, with the index index. Numbering of property list elements extends from 0 to cpl_plist_get_size() - 1. If index is less than 0 or greater equal than cpl_plist_get_size() the function returns NULL.

float cpl_plist_get_float const cpl_plist   plist,
const char *    name
 

Get the float value of the given property list entry.

Parameters:
plist  A property list.
name  The property name to look up.
Returns:
The float value stored in the list entry.
The function searches the property list plist for a property named name. If it is present in the list, its float value is returned. If an entry with the name name is not found, or if the value stored in the entry is of an incompatible type the function returns 0.

Additionally, the function sets the error CPL_ERROR_DATA_NOT_FOUND if a property with the name name was not found in the list. If the sought-after property is not of type float the error CPL_ERROR_TYPE_MISMATCH is set.

int cpl_plist_get_int const cpl_plist   plist,
const char *    name
 

Get the integer value of the given property list entry.

Parameters:
plist  A property list.
name  The property name to look up.
Returns:
The integer value stored in the list entry.
The function searches the property list plist for a property named name. If it is present in the list, its integer value is returned. If an entry with the name name is not found, or if the value stored in the entry is of an incompatible type the function returns 0.

Additionally, the function sets the error CPL_ERROR_DATA_NOT_FOUND if a property with the name name was not found in the list. If the sought-after property is not of type integer the error CPL_ERROR_TYPE_MISMATCH is set.

long cpl_plist_get_long const cpl_plist   plist,
const char *    name
 

Get the long value of the given property list entry.

Parameters:
plist  A property list.
name  The property name to look up.
Returns:
The long value stored in the list entry.
The function searches the property list plist for a property named name. If it is present in the list, its long value is returned. If an entry with the name name is not found, or if the value stored in the entry is of an incompatible type the function returns 0.

Additionally, the function sets the error CPL_ERROR_DATA_NOT_FOUND if a property with the name name was not found in the list. If the sought-after property is not of type long the error CPL_ERROR_TYPE_MISMATCH is set.

long cpl_plist_get_size const cpl_plist   plist
 

Get the current size of a property list.

Parameters:
plist  A property list.
Returns:
The property list's current size, or 0 if the list is empty.
The function reports the current number of elements stored in the property list plist.

const char* cpl_plist_get_string const cpl_plist   plist,
const char *    name
 

Get the string value of the given property list entry.

Parameters:
plist  A property list.
name  The property name to look up.
Returns:
The string value stored in the list entry.
The function searches the property list plist for a property named name. If it is present in the list, its string value is returned. If an entry with the name name is not found, or if the value stored in the entry is of an incompatible type the function returns 0.

Additionally, the function sets the error CPL_ERROR_DATA_NOT_FOUND if a property with the name name was not found in the list. If the sought-after property is not of type string the error CPL_ERROR_TYPE_MISMATCH is set.

cpl_type cpl_plist_get_type const cpl_plist   plist,
const char *    name
 

Get the the type of a property list entry.

Parameters:
plist  A property list.
name  The property name to look up.
Returns:
The type of the stored value, or CPL_TYPE_INVALID if the name was not found.
The function returns the type of the value stored in plist with the name name.

int cpl_plist_insert_after_bool cpl_plist   plist,
const char *    after,
const char *    name,
int    value
 

Insert a boolean value into a property list after the given position.

Parameters:
plist  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.
Returns:
The function returns 0 on success, or 1 otherwise.
The function creates a new boolean property with name name and value value. The property is inserted into the property list plist after the property named after.

int cpl_plist_insert_after_char cpl_plist   plist,
const char *    after,
const char *    name,
char    value
 

Insert a character value into a property list after the given position.

Parameters:
plist  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.
Returns:
The function returns 0 on success, or 1 otherwise.
The function creates a new character property with name name and value value. The property is inserted into the property list plist after the property named after.

int cpl_plist_insert_after_double cpl_plist   plist,
const char *    after,
const char *    name,
double    value
 

Insert a double value into a property list after the given position.

Parameters:
plist  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.
Returns:
The function returns 0 on success, or 1 otherwise.
The function creates a new double property with name name and value value. The property is inserted into the property list plist after the property named after.

int cpl_plist_insert_after_float cpl_plist   plist,
const char *    after,
const char *    name,
float    value
 

Insert a float value into a property list after the given position.

Parameters:
plist  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.
Returns:
The function returns 0 on success, or 1 otherwise.
The function creates a new float property with name name and value value. The property is inserted into the property list plist after the property named after.

int cpl_plist_insert_after_int cpl_plist   plist,
const char *    after,
const char *    name,
int    value
 

Insert a integer value into a property list after the given position.

Parameters:
plist  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.
Returns:
The function returns 0 on success, or 1 otherwise.
The function creates a new integer property with name name and value value. The property is inserted into the property list plist after the property named after.

int cpl_plist_insert_after_long cpl_plist   plist,
const char *    after,
const char *    name,
long    value
 

Insert a long value into a property list after the given position.

Parameters:
plist  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.
Returns:
The function returns 0 on success, or 1 otherwise.
The function creates a new long property with name name and value value. The property is inserted into the property list plist after the property named after.

int cpl_plist_insert_after_string cpl_plist   plist,
const char *    after,
const char *    name,
const char *    value
 

Insert a string value into a property list after the given position.

Parameters:
plist  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.
Returns:
The function returns 0 on success, or 1 otherwise.
The function creates a new string property with name name and value value. The property is inserted into the property list plist after the property named after.

int cpl_plist_insert_bool cpl_plist   plist,
const char *    here,
const char *    name,
int    value
 

Insert a boolean value into a property list at the given position.

Parameters:
plist  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.
Returns:
The function returns 0 on success, or 1 otherwise.
The function creates a new boolean property with name name and value value. The property is inserted into the property list plist at the position of the property named here.

int cpl_plist_insert_char cpl_plist   plist,
const char *    here,
const char *    name,
char    value
 

Insert a character value into a property list at the given position.

Parameters:
plist  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.
Returns:
The function returns 0 on success, or 1 otherwise.
The function creates a new character property with name name and value value. The property is inserted into the property list plist at the position of the property named here.

int cpl_plist_insert_double cpl_plist   plist,
const char *    here,
const char *    name,
double    value
 

Insert a double value into a property list at the given position.

Parameters:
plist  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.
Returns:
The function returns 0 on success, or 1 otherwise.
The function creates a new double property with name name and value value. The property is inserted into the property list plist at the position of the property named here.

int cpl_plist_insert_float cpl_plist   plist,
const char *    here,
const char *    name,
float    value
 

Insert a float value into a property list at the given position.

Parameters:
plist  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.
Returns:
The function returns 0 on success, or 1 otherwise.
The function creates a new float property with name name and value value. The property is inserted into the property list plist at the position of the property named here.

int cpl_plist_insert_int cpl_plist   plist,
const char *    here,
const char *    name,
int    value
 

Insert a integer value into a property list at the given position.

Parameters:
plist  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.
Returns:
The function returns 0 on success, or 1 otherwise.
The function creates a new integer property with name name and value value. The property is inserted into the property list plist at the position of the property named here.

int cpl_plist_insert_long cpl_plist   plist,
const char *    here,
const char *    name,
long    value
 

Insert a long value into a property list at the given position.

Parameters:
plist  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.
Returns:
The function returns 0 on success, or 1 otherwise.
The function creates a new long property with name name and value value. The property is inserted into the property list plist at the position of the property named here.

int cpl_plist_insert_string cpl_plist   plist,
const char *    here,
const char *    name,
const char *    value
 

Insert a string value into a property list at the given position.

Parameters:
plist  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.
Returns:
The function returns 0 on success, or 1 otherwise.
The function creates a new string property with name name and value value. The property is inserted into the property list plist at the position of the property named here.

int cpl_plist_is_empty const cpl_plist   plist
 

Check whether a property list is empty.

Parameters:
plist  A property list.
Returns:
The function returns 1 if the list is empty, and 0 otherwise.
The function checks if plist contains any properties.

int cpl_plist_load cpl_plist   plist,
const char *    name,
int    index
 

Create a property list from a file.

Parameters:
plist  The property list to fill.
name  Name of the input file.
index  Index of the data set to read.
Returns:
The function returns 0 on success, or 1 otherwise. if the creation failed.
The function reads the properties of the data set with index index from the file name. Currently only the FITS file format is supported, i.e. the property list plist is filled by reading the FITS keywords from extension index. The numbering of the data sections starts from 0. When creating the property list from a FITS header, any keyword without a value like undefined keywords for instance are not transformed into a property.

The function returns 1 if the file name cannot be accessed, has an unknown file format or does not contain any properties. The provided property list plist must be empty.

long cpl_plist_max_size const cpl_plist   plist
 

Get the maximum number of property list entries possible.

Parameters:
plist  A property list.
Returns:
The maximum number of properties that can be stored in the list.
The function reports the capacity of the property list plist, i.e. the maximum number of properties which can be stored in the list.

cpl_plist* cpl_plist_new void   
 

Create an empty property list.

Returns:
The newly created 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_plist_delete().

See also:
cpl_plist_delete()

int cpl_plist_prepend_bool cpl_plist   plist,
const char *    name,
int    value
 

Prepend a boolean value to a property list.

Parameters:
plist  A property list.
name  The property name to be assigned to the value.
value  The boolean value to store.
Returns:
The function returns 0 on success, or 1 otherwise.
The function creates a new boolean property with name name and value value. The property is prepended to the property list plist.

int cpl_plist_prepend_char cpl_plist   plist,
const char *    name,
char    value
 

Prepend a character value to a property list.

Parameters:
plist  A property list.
name  The property name to be assigned to the value.
value  The character value to store.
Returns:
The function returns 0 on success, or 1 otherwise.
The function creates a new character property with name name and value value. The property is prepended to the property list plist.

int cpl_plist_prepend_double cpl_plist   plist,
const char *    name,
double    value
 

Prepend a double value to a property list.

Parameters:
plist  A property list.
name  The property name to be assigned to the value.
value  The double value to store.
Returns:
The function returns 0 on success, or 1 otherwise.
The function creates a new double property with name name and value value. The property is prepended to the property list plist.

int cpl_plist_prepend_float cpl_plist   plist,
const char *    name,
float    value
 

Prepend a float value to a property list.

Parameters:
plist  A property list.
name  The property name to be assigned to the value.
value  The float value to store.
Returns:
The function returns 0 on success, or 1 otherwise.
The function creates a new float property with name name and value value. The property is prepended to the property list plist.

int cpl_plist_prepend_int cpl_plist   plist,
const char *    name,
int    value
 

Prepend a integer value to a property list.

Parameters:
plist  A property list.
name  The property name to be assigned to the value.
value  The integer value to store.
Returns:
The function returns 0 on success, or 1 otherwise.
The function creates a new integer property with name name and value value. The property is prepended to the property list plist.

int cpl_plist_prepend_long cpl_plist   plist,
const char *    name,
long    value
 

Prepend a long value to a property list.

Parameters:
plist  A property list.
name  The property name to be assigned to the value.
value  The long value to store.
Returns:
The function returns 0 on success, or 1 otherwise.
The function creates a new long property with name name and value value. The property is prepended to the property list plist.

int cpl_plist_prepend_string cpl_plist   plist,
const char *    name,
const char *    value
 

Prepend a string value to a property list.

Parameters:
plist  A property list.
name  The property name to be assigned to the value.
value  The string value to store.
Returns:
The function returns 0 on success, or 1 otherwise.
The function creates a new string property with name name and value value. The property is prepended to the property list plist.

int cpl_plist_set_bool cpl_plist   plist,
const char *    name,
int    value
 

Set the value of the given boolean property list entry.

Parameters:
plist  A property list.
name  The property name to look up.
value  New boolean value.
Returns:
The function returns 0 on success and 1 otherwise.
The function searches the property list plist for a property named name. If it is present in the list, its boolean value is replaced with the boolean value and the function returns 0. If such a property was not found 1 is returned.

int cpl_plist_set_char cpl_plist   plist,
const char *    name,
char    value
 

Set the value of the given character property list entry.

Parameters:
plist  A property list.
name  The property name to look up.
value  New character value.
Returns:
The function returns 0 on success and 1 otherwise.
The function searches the property list plist for a property named name. If it is present in the list, its character value is replaced with the character value and the function returns 0. If such a property was not found 1 is returned.

int cpl_plist_set_comment cpl_plist   plist,
const char *    name,
const char *    comment
 

Modify the comment field of the given property list entry.

Parameters:
plist  A property list.
name  The property name to look up.
comment  New comment string.
Returns:
The function returns 0 on success and 1 otherwise.
The function searches the property list plist for a property named name. If it is present in the list, its comment is replaced by the string comment and the function returns 0. If such a property was not found 1 is returned. The provided comment string may be NULL. In this case an already existing comment is deleted.

int cpl_plist_set_double cpl_plist   plist,
const char *    name,
double    value
 

Set the value of the given double property list entry.

Parameters:
plist  A property list.
name  The property name to look up.
value  New double value.
Returns:
The function returns 0 on success and 1 otherwise.
The function searches the property list plist for a property named name. If it is present in the list, its double value is replaced with the double value and the function returns 0. If such a property was not found 1 is returned.

int cpl_plist_set_float cpl_plist   plist,
const char *    name,
float    value
 

Set the value of the given float property list entry.

Parameters:
plist  A property list.
name  The property name to look up.
value  New float value.
Returns:
The function returns 0 on success and 1 otherwise.
The function searches the property list plist for a property named name. If it is present in the list, its float value is replaced with the float value and the function returns 0. If such a property was not found 1 is returned.

int cpl_plist_set_int cpl_plist   plist,
const char *    name,
int    value
 

Set the value of the given integer property list entry.

Parameters:
plist  A property list.
name  The property name to look up.
value  New integer value.
Returns:
The function returns 0 on success and 1 otherwise.
The function searches the property list plist for a property named name. If it is present in the list, its integer value is replaced with the integer value and the function returns 0. If such a property was not found 1 is returned.

int cpl_plist_set_long cpl_plist   plist,
const char *    name,
long    value
 

Set the value of the given long property list entry.

Parameters:
plist  A property list.
name  The property name to look up.
value  New long value.
Returns:
The function returns 0 on success and 1 otherwise.
The function searches the property list plist for a property named name. If it is present in the list, its long value is replaced with the long value and the function returns 0. If such a property was not found 1 is returned.

int cpl_plist_set_string cpl_plist   plist,
const char *    name,
const char *    value
 

Set the value of the given string property list entry.

Parameters:
plist  A property list.
name  The property name to look up.
value  New string value.
Returns:
The function returns 0 on success and 1 otherwise.
The function searches the property list plist for a property named name. If it is present in the list, its string value is replaced with the string value and the function returns 0. If such a property was not found 1 is returned.

qfits_header* cpl_plist_to_fits const cpl_plist   plist
 

Convert a property list to a FITS header.

Parameters:
plist  Property list to be saved.
Returns:
The function returns the created qfits header, or NULL in case of an error.
The function converts the properties from plist to valid FITS keywords and puts them into a qfits_header structure.

If a property cannot be converted into a valid FITS keyword the function fails.


Generated on Mon May 24 14:58:05 2004 for Common Pipeline Library Reference Manual by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002