Main Page | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

cr-simple-sel.c File Reference

#include <string.h>
#include <glib.h>
#include "cr-simple-sel.h"

Go to the source code of this file.

Functions

CRSimpleSelcr_simple_sel_new (void)
 The constructor of CRSimpleSel.
CRSimpleSelcr_simple_sel_append_simple_sel (CRSimpleSel *a_this, CRSimpleSel *a_sel)
 Appends a simpe selector to the current list of simple selector.
CRSimpleSelcr_simple_sel_prepend_simple_sel (CRSimpleSel *a_this, CRSimpleSel *a_sel)
 Prepends a simple selector to the current list of simple selectors.
guchar * cr_simple_sel_to_string (CRSimpleSel *a_this)
guchar * cr_simple_sel_one_to_string (CRSimpleSel *a_this)
enum CRStatus cr_simple_sel_dump (CRSimpleSel *a_this, FILE *a_fp)
 Dumps the selector to a file.
enum CRStatus cr_simple_sel_compute_specificity (CRSimpleSel *a_this)
 Computes the selector (combinator separated list of simple selectors) as defined in the css2 spec in chapter 6.4.3.
void cr_simple_sel_destroy (CRSimpleSel *a_this)
 The destructor of the current instance of CRSimpleSel.


Function Documentation

CRSimpleSel* cr_simple_sel_append_simple_sel CRSimpleSel a_this,
CRSimpleSel a_sel
 

Appends a simpe selector to the current list of simple selector.

Parameters:
a_this the this pointer of the current instance of CRSimpleSel.
a_sel the simple selector to append.
Returns:
the new list upon successfull completion, an error code otherwise.

Definition at line 56 of file cr-simple-sel.c.

References CRSimpleSel, _CRSimpleSel::next, and _CRSimpleSel::prev.

enum CRStatus cr_simple_sel_compute_specificity CRSimpleSel a_this  ) 
 

Computes the selector (combinator separated list of simple selectors) as defined in the css2 spec in chapter 6.4.3.

Parameters:
a_this the current instance of CRSimpleSel
Returns:
CR_OK upon successfull completion, an error code otherwise.

Definition at line 231 of file cr-simple-sel.c.

References _CRSimpleSel::add_sel, CR_BAD_PARAM_ERROR, CRAdditionalSel, CRSimpleSel, ID_ADD_SELECTOR, _CRSimpleSel::name, _CRSimpleSel::next, _CRAdditionalSel::next, NO_ADD_SELECTOR, _CRSimpleSel::specificity, and _CRString::stryng.

void cr_simple_sel_destroy CRSimpleSel a_this  ) 
 

The destructor of the current instance of CRSimpleSel.

Parameters:
a_this the this pointer of the current instance of CRSimpleSel.

Definition at line 287 of file cr-simple-sel.c.

References _CRSimpleSel::add_sel, cr_additional_sel_destroy(), cr_string_destroy(), CRSimpleSel, _CRSimpleSel::name, and _CRSimpleSel::next.

Referenced by cr_parser_parse_ruleset(), and cr_selector_destroy().

enum CRStatus cr_simple_sel_dump CRSimpleSel a_this,
FILE *  a_fp
 

Dumps the selector to a file.

TODO: add the support of unicode in the dump.

Parameters:
a_this the current instance of CRSimpleSel.
a_fp the destination file pointer.
Returns:
CR_OK upon successfull completion, an error code otherwise.

Definition at line 206 of file cr-simple-sel.c.

References CR_BAD_PARAM_ERROR, cr_simple_sel_to_string(), and CRSimpleSel.

CRSimpleSel* cr_simple_sel_new void   ) 
 

The constructor of CRSimpleSel.

Returns:
the new instance of CRSimpleSel.

Definition at line 34 of file cr-simple-sel.c.

References cr_utils_trace_info, and CRSimpleSel.

guchar* cr_simple_sel_one_to_string CRSimpleSel a_this  ) 
 

Definition at line 156 of file cr-simple-sel.c.

References _CRSimpleSel::add_sel, cr_additional_sel_to_string(), CRSimpleSel, _CRSimpleSel::name, and _CRString::stryng.

CRSimpleSel* cr_simple_sel_prepend_simple_sel CRSimpleSel a_this,
CRSimpleSel a_sel
 

Prepends a simple selector to the current list of simple selectors.

Parameters:
a_this the this pointer of the current instance of CRSimpleSel.
a_sel the simple selector to prepend.
Returns:
the new list upon successfull completion, an error code otherwise.

Definition at line 80 of file cr-simple-sel.c.

References CRSimpleSel, _CRSimpleSel::next, and _CRSimpleSel::prev.

guchar* cr_simple_sel_to_string CRSimpleSel a_this  ) 
 

Definition at line 94 of file cr-simple-sel.c.

References _CRSimpleSel::add_sel, COMB_GT, COMB_PLUS, COMB_WS, cr_additional_sel_to_string(), CRSimpleSel, _CRSimpleSel::name, _CRSimpleSel::next, and _CRString::stryng.

Referenced by cr_selector_to_string(), and cr_simple_sel_dump().


Generated on Fri Oct 29 08:29:13 2004 for Libcroco by  doxygen 1.3.9.1