Main Page   Modules   Alphabetical List   Compound List   Compound Members  

Parameter Lists


Typedefs

typedef _cpl_parlist_ cpl_parlist
 The opaque parameter list data type. More...


Functions

cpl_parlist * cpl_parlist_new (void)
 Create a new parameter list. More...

void cpl_parlist_delete (cpl_parlist *list)
 Destroy a parameter list. More...

int cpl_parlist_get_size (cpl_parlist *list)
 Get the current size of a property list. More...

void cpl_parlist_append (cpl_parlist *list, cpl_parameter *parameter)
 Append a parameter to a parameter list. More...

cpl_parametercpl_parlist_begin (cpl_parlist *list)
 Get the first parameter inthe given parameter list. More...

cpl_parametercpl_parlist_next (cpl_parlist *list)
 Get the next parameter in the given list. More...

cpl_parametercpl_parlist_end (cpl_parlist *list)
 Get the last parameter in the given list. More...

cpl_parametercpl_parlist_find (cpl_parlist *list, const char *name)
 Find a parameter with the given name in a parameter list. More...

cpl_parametercpl_parlist_find_type (cpl_parlist *list, cpl_type type)
 Find a parameter of the given type in a parameter list. More...

cpl_parametercpl_parlist_find_context (cpl_parlist *list, const char *context)
 Find a parameter which belongs to the given context in a parameter list. More...

cpl_parametercpl_parlist_find_tag (cpl_parlist *list, const char *tag)
 Find a parameter with the given tag in a parameter list. More...

void cpl_parlist_print (cpl_parlist *list)
 Print all parameters in the given parameter list. More...


Detailed Description

The module implements a parameter list data type, a container for the cpl_parameter type. It provides a convenient way to pass a set of parameters, as a whole, to a function.

It is used in the plugin interface (cf. Plugin Interface), for instance, to pass the parameters a recipe accepts from the plugin to the calling application and vice versa.

All functions expect a valid pointer to a parameter list as input, unless otherwise specified.

Synopsis:
   #include <cpl_parlist.h>

Typedef Documentation

typedef struct _cpl_parlist_ cpl_parlist
 

The opaque parameter list data type.


Function Documentation

void cpl_parlist_append cpl_parlist   list,
cpl_parameter   parameter
 

Append a parameter to a parameter list.

Parameters:
list  A parameter list.
parameter  The parameter to append.
Returns:
Nothing.
The parameter parameter is appended to the parameter list list.

cpl_parameter* cpl_parlist_begin cpl_parlist   list
 

Get the first parameter inthe given parameter list.

Parameters:
list  A parameter list.
Returns:
The function returns a handle for the first parameter in the list, or NULL if the list is empty.
The function returns the first parameter in the parameter list list, if it exists. If ther is no first parameter, i.e. if the list is empty, NULL is returned. The function updates the internal search position cache.

void cpl_parlist_delete cpl_parlist   list
 

Destroy a parameter list.

Parameters:
list  The parameter list to destroy.
Returns:
Nothing.
The function destroys the parameter list object list and all parameters it possibly contains. The individual parameters are destroyed using the parameter destructor (cf. Parameters).

cpl_parameter* cpl_parlist_end cpl_parlist   list
 

Get the last parameter in the given list.

Parameters:
list  A parameter list.
Returns:
The function returns a handle to the last parameter in the list.
The function returns the last parameter stored in the parameter list list. The list list must not be empty.

cpl_parameter* cpl_parlist_find cpl_parlist   list,
const char *    name
 

Find a parameter with the given name in a parameter list.

Parameters:
list  A parameter list.
name  The parameter name to search for.
Returns:
The function returns a handle for the first parameter with the name name, or NULL if no such parameter was found.
The function searches the parameter list list for the first occurrence of a parameter with the fully qualified name name. If no parameter with this name exists, the function returns NULL.

cpl_parameter* cpl_parlist_find_context cpl_parlist   list,
const char *    context
 

Find a parameter which belongs to the given context in a parameter list.

Parameters:
list  A parameter list.
context  The parameter context to search for.
Returns:
The function returns a handle for the first parameter with the context context, or NULL if no such parameter was found.
The function searches the parameter list list for the first occurrence of a parameter which belongs to the context context. If no parameter with this type exists, the function returns NULL.

cpl_parameter* cpl_parlist_find_tag cpl_parlist   list,
const char *    tag
 

Find a parameter with the given tag in a parameter list.

Parameters:
list  A parameter list.
tag  The parameter tag to search for.
Returns:
The function returns a handle for the first parameter with the tag tag, or NULL if no such parameter was found.
The function searches the parameter list list for the first occurrence of a parameter with the user tag tag. If no parameter with this tag exists, the function returns NULL.

cpl_parameter* cpl_parlist_find_type cpl_parlist   list,
cpl_type    type
 

Find a parameter of the given type in a parameter list.

Parameters:
list  A parameter list.
type  The parameter type to search for.
Returns:
The function returns a handle for the first parameter with the type type, or NULL if no such parameter was found.
The function searches the parameter list list for the first occurrence of a parameter whose value is of the type type. If no parameter with this type exists, the function returns NULL.

int cpl_parlist_get_size cpl_parlist   list
 

Get the current size of a property list.

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

cpl_parlist* cpl_parlist_new void   
 

Create a new parameter list.

Returns:
Pointer to the newly created parameter list.
The function creates a new parameter list object. The created object must be destroyed using the parameter list destructor cpl_parlist_delete().

cpl_parameter* cpl_parlist_next cpl_parlist   list
 

Get the next parameter in the given list.

Parameters:
list  A parameter list.
Returns:
The function returns a handle for the next parameter in a list. If there are no more parameters in the list the function returns NULL.
The function returns the next parameter in the parameter list list if it exists and NULL otherwise. The function uses the last cached search position to determine the most recently accessed parameter. This means that the function only works as expected if the list has been initialised by a call to cpl_parlist_begin(), and if no function updating the internal cache was called between two subsequent calls to this function.

void cpl_parlist_print cpl_parlist   list
 

Print all parameters in the given parameter list.

Parameters:
list  A parameter list.
Returns:
Nothing.
The function prints each parameter the list contains, showing all data members of the parameters. The output is written using the currently installed log handler (by default the output is written to the standard output).

Note:
This function is only provided for debugging purposes.


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