Libcroco
Data Structures | Macros | 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
 

Macros

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

Functions

CRPropListcr_prop_list_append (CRPropList *a_this, CRPropList *a_to_append)
 cr_prop_list_append: @a_this: the current instance of CRPropList @a_to_append: the property list to append More...
 
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. More...
 
CRPropListcr_prop_list_prepend (CRPropList *a_this, CRPropList *a_to_prepend)
 cr_prop_list_prepend: @a_this: the current instance of CRPropList @a_to_prepend: the new list to prepend. More...
 
CRPropListcr_prop_list_prepend2 (CRPropList *a_this, CRString *a_prop_name, CRDeclaration *a_decl)
 cr_prop_list_prepend2: @a_this: the current instance of CRPropList @a_prop_name: property name to append @a_decl: the property value to append. More...
 
enum CRStatus cr_prop_list_set_prop (CRPropList *a_this, CRString *a_prop)
 cr_prop_list_set_prop: @a_this: the current instance of CRPropList @a_prop: the property to set More...
 
enum CRStatus cr_prop_list_get_prop (CRPropList const *a_this, CRString **a_prop)
 cr_prop_list_get_prop: @a_this: the current instance of CRPropList @a_prop: out parameter. More...
 
enum CRStatus cr_prop_list_set_decl (CRPropList *a_this, CRDeclaration *a_decl)
 cr_prop_list_set_decl: @a_this: the current instance of CRPropList @a_decl: the new property value. More...
 
enum CRStatus cr_prop_list_get_decl (CRPropList const *a_this, CRDeclaration **a_decl)
 cr_prop_list_get_decl: @a_this: the current instance of CRPropList @a_decl: out parameter. More...
 
enum CRStatus cr_prop_list_lookup_prop (CRPropList *a_this, CRString *a_prop, CRPropList **a_pair)
 cr_prop_list_lookup_prop: @a_this: the current instance of CRPropList @a_prop: the property to lookup @a_prop_list: out parameter. More...
 
CRPropListcr_prop_list_get_next (CRPropList *a_this)
 cr_prop_list_get_next: @a_this: the current instance of CRPropList More...
 
CRPropListcr_prop_list_get_prev (CRPropList *a_this)
 cr_prop_list_get_prev: @a_this: the current instance of CRPropList More...
 
CRPropListcr_prop_list_unlink (CRPropList *a_this, CRPropList *a_pair)
 cr_prop_list_unlink: @a_this: the current list of prop/decl pairs @a_pair: the prop/decl pair to unlink. More...
 
void cr_prop_list_destroy (CRPropList *a_this)
 cr_prop_list_destroy: @a_this: the current instance of CRPropList More...
 

Macro Definition Documentation

◆ PRIVATE

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

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

Function Documentation

◆ cr_prop_list_append()

CRPropList* cr_prop_list_append ( CRPropList a_this,
CRPropList a_to_append 
)

cr_prop_list_append: @a_this: the current instance of CRPropList @a_to_append: the property list to append

Appends a property list to the current one.

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

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

References PRIVATE.

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

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

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

◆ cr_prop_list_destroy()

void cr_prop_list_destroy ( CRPropList a_this)

cr_prop_list_destroy: @a_this: the current instance of CRPropList

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

References cr_prop_list_get_next(), and PRIVATE.

◆ cr_prop_list_get_decl()

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

cr_prop_list_get_decl: @a_this: the current instance of CRPropList @a_decl: 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()

CRPropList* cr_prop_list_get_next ( CRPropList a_this)

cr_prop_list_get_next: @a_this: 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()

CRPropList* cr_prop_list_get_prev ( CRPropList a_this)

cr_prop_list_get_prev: @a_this: 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.

◆ cr_prop_list_get_prop()

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

cr_prop_list_get_prop: @a_this: the current instance of CRPropList @a_prop: 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.

◆ cr_prop_list_lookup_prop()

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

cr_prop_list_lookup_prop: @a_this: the current instance of CRPropList @a_prop: the property to lookup @a_prop_list: 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.

◆ cr_prop_list_prepend()

CRPropList* cr_prop_list_prepend ( CRPropList a_this,
CRPropList a_to_prepend 
)

cr_prop_list_prepend: @a_this: the current instance of CRPropList @a_to_prepend: 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.

◆ cr_prop_list_prepend2()

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

cr_prop_list_prepend2: @a_this: the current instance of CRPropList @a_prop_name: property name to append @a_decl: 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 PRIVATE.

◆ cr_prop_list_set_decl()

enum CRStatus cr_prop_list_set_decl ( CRPropList a_this,
CRDeclaration a_decl 
)

cr_prop_list_set_decl: @a_this: the current instance of CRPropList @a_decl: 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.

◆ cr_prop_list_set_prop()

enum CRStatus cr_prop_list_set_prop ( CRPropList a_this,
CRString a_prop 
)

cr_prop_list_set_prop: @a_this: the current instance of CRPropList @a_prop: 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.

◆ cr_prop_list_unlink()

CRPropList* cr_prop_list_unlink ( CRPropList a_this,
CRPropList a_pair 
)

cr_prop_list_unlink: @a_this: the current list of prop/decl pairs @a_pair: 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.