## cr-prop-list

cr-prop-list

## Synopsis

    struct              CRPropList;
                        CRPropListPriv;
    CRPropList *        cr_prop_list_append                 (CRPropList *a_this,
                                                             CRPropList *a_to_append);
    CRPropList *        cr_prop_list_append2                (CRPropList *a_this,
                                                             CRString *a_prop,
                                                             CRDeclaration *a_decl);
    void                cr_prop_list_destroy                (CRPropList *a_this);
    enum CRStatus       cr_prop_list_get_decl               (CRPropList const *a_this,
                                                             CRDeclaration **a_decl);
    CRPropList *        cr_prop_list_get_next               (CRPropList *a_this);
    CRPropList *        cr_prop_list_get_prev               (CRPropList *a_this);
    enum CRStatus       cr_prop_list_get_prop               (CRPropList const *a_this,
                                                             CRString **a_prop);
    enum CRStatus       cr_prop_list_lookup_prop            (CRPropList *a_this,
                                                             CRString *a_prop,
                                                             CRPropList **a_pair);
    CRPropList *        cr_prop_list_prepend                (CRPropList *a_this,
                                                             CRPropList *a_to_append);
    CRPropList *        cr_prop_list_prepend2               (CRPropList *a_this,
                                                             CRString *a_prop,
                                                             CRDeclaration *a_decl);
    enum CRStatus       cr_prop_list_set_decl               (CRPropList *a_this,
                                                             CRDeclaration *a_decl);
    enum CRStatus       cr_prop_list_set_prop               (CRPropList *a_this,
                                                             CRString *a_prop);
    CRPropList *        cr_prop_list_unlink                 (CRPropList *a_this,
                                                             CRPropList *a_pair);

## Description

## Details

### struct CRPropList

    struct CRPropList {
    	CRPropListPriv * priv;
    };

### CRPropListPriv

    typedef struct _CRPropListPriv CRPropListPriv;

### cr_prop_list_append ()

    CRPropList *        cr_prop_list_append                 (CRPropList *a_this,
                                                             CRPropList *a_to_append);

Appends a property list to the current one.

`a_this` : | the current instance of CRPropList
`a_to_append` : | the property list to append
Returns : | the resulting prop list, or NULL if an error occured

### cr_prop_list_append2 ()

    CRPropList *        cr_prop_list_append2                (CRPropList *a_this,
                                                             CRString *a_prop,
                                                             CRDeclaration *a_decl);

`a_this` : | the current instance of CRPropList
`a_prop` : | the property to consider
`a_decl` : | the declaration to consider
Returns : | the resulting property list, or NULL in case of an error.

### cr_prop_list_destroy ()

    void                cr_prop_list_destroy                (CRPropList *a_this);

`a_this` : | the current instance of CRPropList

### cr_prop_list_get_decl ()

    enum CRStatus       cr_prop_list_get_decl               (CRPropList const *a_this,
                                                             CRDeclaration **a_decl);

`a_this` : | the current instance of CRPropList
`a_decl` : | out parameter. The property value
Returns : | CR_OK upon successful completion.

### cr_prop_list_get_next ()

    CRPropList *        cr_prop_list_get_next               (CRPropList *a_this);

Gets the next prop/decl pair in the list

`a_this` : | the current instance of CRPropList
Returns : | the next prop/declaration pair of the list, or NULL if we reached end of list (or if an error occurs)

### cr_prop_list_get_prev ()

    CRPropList *        cr_prop_list_get_prev               (CRPropList *a_this);

Gets the previous prop/decl pair in the list

`a_this` : | the current instance of CRPropList
Returns : | the previous prop/declaration pair of the list, or NULL if we reached end of list (or if an error occurs)

### cr_prop_list_get_prop ()

    enum CRStatus       cr_prop_list_get_prop               (CRPropList const *a_this,
                                                             CRString **a_prop);

Getter of the property associated to the current instance of CRPropList

`a_this` : | the current instance of CRPropList
`a_prop` : | out parameter. The returned property
Returns : | CR_OK upon successful completion, an error code otherwise.

### cr_prop_list_lookup_prop ()

    enum CRStatus       cr_prop_list_lookup_prop            (CRPropList *a_this,
                                                             CRString *a_prop,
                                                             CRPropList **a_pair);

Lookup a given property/declaration pair

`a_this` : | the current instance of CRPropList
`a_prop` : | the property to lookup
Returns : | CR_OK if a prop/decl pair has been found, CR_VALUE_NOT_FOUND_ERROR if not, or an error code if something bad happens.

### cr_prop_list_prepend ()

    CRPropList *        cr_prop_list_prepend                (CRPropList *a_this,
                                                             CRPropList *a_to_append);

Prepends a list to the current list

`a_this` : | the current instance of CRPropList
Returns : | the new properties list.

### cr_prop_list_prepend2 ()

    CRPropList *        cr_prop_list_prepend2               (CRPropList *a_this,
                                                             CRString *a_prop,
                                                             CRDeclaration *a_decl);

Prepends a propertie to a list of properties

`a_this` : | the current instance of CRPropList
`a_decl` : | the property value to append.
Returns : | the new property list.

### cr_prop_list_set_decl ()

    enum CRStatus       cr_prop_list_set_decl               (CRPropList *a_this,
                                                             CRDeclaration *a_decl);

`a_this` : | the current instance of CRPropList
`a_decl` : | the new property value.
Returns : | CR_OK upon successful completion, an error code otherwise.

### cr_prop_list_set_prop ()

    enum CRStatus       cr_prop_list_set_prop               (CRPropList *a_this,
                                                             CRString *a_prop);

Sets the property of a CRPropList

`a_this` : | the current instance of CRPropList
`a_prop` : | the property to set

### cr_prop_list_unlink ()

    CRPropList *        cr_prop_list_unlink                 (CRPropList *a_this,
                                                             CRPropList *a_pair);

Unlinks a prop/decl pair from the list

`a_this` : | the current list of prop/decl pairs
`a_pair` : | the prop/decl pair to unlink.
Returns : | the new list or NULL in case of an error.