Libcroco
Data Structures | Defines | Functions
cr-prop-list.c File Reference
#include <string.h>
#include "cr-prop-list.h"

Go to the source code of this file.

Data Structures

struct  _CRPropListPriv

Defines

#define PRIVATE(a_obj)   (a_obj)->priv

Functions

CRPropListcr_prop_list_append (CRPropList *a_this, CRPropList *a_to_append)
 cr_prop_list_append: : the current instance of CRPropList : the property list to append
CRPropListcr_prop_list_append2 (CRPropList *a_this, CRString *a_prop, CRDeclaration *a_decl)
 cr_prop_list_append2: Appends a pair of prop/declaration to the current prop list.
CRPropListcr_prop_list_prepend (CRPropList *a_this, CRPropList *a_to_prepend)
 cr_prop_list_prepend: : the current instance of CRPropList : the new list to prepend.
CRPropListcr_prop_list_prepend2 (CRPropList *a_this, CRString *a_prop_name, CRDeclaration *a_decl)
 cr_prop_list_prepend2: : the current instance of CRPropList : property name to append : the property value to append.
enum CRStatus cr_prop_list_set_prop (CRPropList *a_this, CRString *a_prop)
 cr_prop_list_set_prop: : the current instance of CRPropList : the property to set
enum CRStatus cr_prop_list_get_prop (CRPropList const *a_this, CRString **a_prop)
 cr_prop_list_get_prop: : the current instance of CRPropList : out parameter.
enum CRStatus cr_prop_list_set_decl (CRPropList *a_this, CRDeclaration *a_decl)
 cr_prop_list_set_decl: : the current instance of CRPropList : the new property value.
enum CRStatus cr_prop_list_get_decl (CRPropList const *a_this, CRDeclaration **a_decl)
 cr_prop_list_get_decl: : the current instance of CRPropList : out parameter.
enum CRStatus cr_prop_list_lookup_prop (CRPropList *a_this, CRString *a_prop, CRPropList **a_pair)
 cr_prop_list_lookup_prop: : the current instance of CRPropList : the property to lookup : out parameter.
CRPropListcr_prop_list_get_next (CRPropList *a_this)
 cr_prop_list_get_next: : the current instance of CRPropList
CRPropListcr_prop_list_get_prev (CRPropList *a_this)
 cr_prop_list_get_prev: : the current instance of CRPropList
CRPropListcr_prop_list_unlink (CRPropList *a_this, CRPropList *a_pair)
 cr_prop_list_unlink: : the current list of prop/decl pairs : the prop/decl pair to unlink.
void cr_prop_list_destroy (CRPropList *a_this)
 cr_prop_list_destroy: : the current instance of CRPropList

Define Documentation

#define PRIVATE (   a_obj)    (a_obj)->priv

Function Documentation

CRPropList* cr_prop_list_append ( CRPropList a_this,
CRPropList a_to_append 
)

cr_prop_list_append: : the current instance of CRPropList : the property list to append

Appends a property list to the current one.

Returns the resulting prop list, or NULL if an error occured

Definition at line 77 of file cr-prop-list.c.

References PRIVATE.

Referenced by cr_prop_list_append2().

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

cr_prop_list_append2: Appends a pair of prop/declaration to the current prop list.

: the current instance of CRPropList : the property to consider : the declaration to consider

Returns the resulting property list, or NULL in case of an error.

Definition at line 108 of file cr-prop-list.c.

References cr_prop_list_append(), and PRIVATE.

void cr_prop_list_destroy ( CRPropList a_this)

cr_prop_list_destroy: : the current instance of CRPropList

Definition at line 380 of file cr-prop-list.c.

References cr_prop_list_get_next(), and PRIVATE.

Referenced by cr_sel_eng_get_matched_style().

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

cr_prop_list_get_decl: : the current instance of CRPropList : out parameter.

The property value

Returns CR_OK upon successful completion.

Definition at line 244 of file cr-prop-list.c.

References CR_BAD_PARAM_ERROR, CR_OK, and PRIVATE.

cr_prop_list_get_next: : the current instance of CRPropList

Gets the next prop/decl pair in the list

Returns the next prop/declaration pair of the list, or NULL if we reached end of list (or if an error occurs)

Definition at line 308 of file cr-prop-list.c.

References PRIVATE.

Referenced by cr_prop_list_destroy().

cr_prop_list_get_prev: : the current instance of CRPropList

Gets the previous prop/decl pair in the list

Returns the previous prop/declaration pair of the list, or NULL if we reached end of list (or if an error occurs)

Definition at line 325 of file cr-prop-list.c.

References PRIVATE.

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

cr_prop_list_get_prop: : the current instance of CRPropList : out parameter.

The returned property

Getter of the property associated to the current instance of CRPropList

Returns CR_OK upon successful completion, an error code otherwise.

Definition at line 210 of file cr-prop-list.c.

References CR_BAD_PARAM_ERROR, CR_OK, and PRIVATE.

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

cr_prop_list_lookup_prop: : the current instance of CRPropList : the property to lookup : out parameter.

The property/declaration pair found (if and only if the function returned code if CR_OK)

Lookup a given property/declaration pair

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.

Definition at line 267 of file cr-prop-list.c.

References CR_BAD_PARAM_ERROR, CR_OK, CR_VALUE_NOT_FOUND_ERROR, and PRIVATE.

CRPropList* cr_prop_list_prepend ( CRPropList a_this,
CRPropList a_to_prepend 
)

cr_prop_list_prepend: : the current instance of CRPropList : the new list to prepend.

Prepends a list to the current list Returns the new properties list.

Definition at line 136 of file cr-prop-list.c.

References PRIVATE.

Referenced by cr_prop_list_prepend2().

CRPropList* cr_prop_list_prepend2 ( CRPropList a_this,
CRString a_prop_name,
CRDeclaration a_decl 
)

cr_prop_list_prepend2: : the current instance of CRPropList : property name to append : the property value to append.

Prepends a propertie to a list of properties

Returns the new property list.

Definition at line 164 of file cr-prop-list.c.

References cr_prop_list_prepend(), and PRIVATE.

enum CRStatus cr_prop_list_set_decl ( CRPropList a_this,
CRDeclaration a_decl 
)

cr_prop_list_set_decl: : the current instance of CRPropList : the new property value.

Returns CR_OK upon successful completion, an error code otherwise.

Definition at line 227 of file cr-prop-list.c.

References CR_BAD_PARAM_ERROR, CR_OK, and PRIVATE.

enum CRStatus cr_prop_list_set_prop ( CRPropList a_this,
CRString a_prop 
)

cr_prop_list_set_prop: : the current instance of CRPropList : the property to set

Sets the property of a CRPropList

Definition at line 189 of file cr-prop-list.c.

References CR_BAD_PARAM_ERROR, CR_OK, and PRIVATE.

CRPropList* cr_prop_list_unlink ( CRPropList a_this,
CRPropList a_pair 
)

cr_prop_list_unlink: : the current list of prop/decl pairs : the prop/decl pair to unlink.

Unlinks a prop/decl pair from the list

Returns the new list or NULL in case of an error.

Definition at line 342 of file cr-prop-list.c.

References PRIVATE.