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

cr-selector.c File Reference

#include <string.h>
#include "cr-selector.h"
#include "cr-parser.h"

Go to the source code of this file.

Functions

CRSelectorcr_selector_new (CRSimpleSel *a_simple_sel)
 Creates a new instance of CRSelector.
CRSelectorcr_selector_parse_from_buf (const guchar *a_char_buf, enum CREncoding a_enc)
CRSelectorcr_selector_append (CRSelector *a_this, CRSelector *a_new)
 Appends a new instance of CRSelector to the current selector list.
CRSelectorcr_selector_prepend (CRSelector *a_this, CRSelector *a_new)
 Prepends an element to the CRSelector list.
CRSelectorcr_selector_append_simple_sel (CRSelector *a_this, CRSimpleSel *a_simple_sel)
 append a simple selector to the current CRSelector list.
guchar * cr_selector_to_string (CRSelector *a_this)
void cr_selector_dump (CRSelector *a_this, FILE *a_fp)
 Serializes the current instance of CRSelector to a file.
void cr_selector_ref (CRSelector *a_this)
 Increments the ref count of the current instance of CRSelector.
gboolean cr_selector_unref (CRSelector *a_this)
 Decrements the ref count of the current instance of CRSelector.
void cr_selector_destroy (CRSelector *a_this)
 Destroys the selector list.


Function Documentation

CRSelector* cr_selector_append CRSelector a_this,
CRSelector a_new
 

Appends a new instance of CRSelector to the current selector list.

Parameters:
a_this the current instance of CRSelector.
a_new the instance of CRSelector to be appended.
Returns:
the new list.

Definition at line 70 of file cr-selector.c.

References CRSelector, _CRSelector::next, and _CRSelector::prev.

Referenced by cr_selector_append_simple_sel().

CRSelector* cr_selector_append_simple_sel CRSelector a_this,
CRSimpleSel a_simple_sel
 

append a simple selector to the current CRSelector list.

Parameters:
a_this the current instance of CRSelector.
a_simple_sel the simple selector to append.
Returns:
the new list or NULL in case of failure.

Definition at line 113 of file cr-selector.c.

References cr_selector_append(), cr_selector_new(), CRSelector, and CRSimpleSel.

void cr_selector_destroy CRSelector a_this  ) 
 

Destroys the selector list.

Parameters:
a_this the current instance of CRSelector.

Definition at line 230 of file cr-selector.c.

References cr_simple_sel_destroy(), CRSelector, _CRSimpleSel::next, and _CRSelector::simple_sel.

Referenced by cr_selector_unref().

void cr_selector_dump CRSelector a_this,
FILE *  a_fp
 

Serializes the current instance of CRSelector to a file.

Parameters:
a_this the current instance of CRSelector.
a_fp the destination file.

Definition at line 172 of file cr-selector.c.

References cr_selector_to_string().

CRSelector* cr_selector_new CRSimpleSel a_simple_sel  ) 
 

Creates a new instance of CRSelector.

Parameters:
a_simple_sel the initial simple selector list of the current instance of CRSelector.
Returns:
the newly built instance of CRSelector, or NULL in case of failure.

Definition at line 35 of file cr-selector.c.

References cr_utils_trace_info, CRSelector, CRSimpleSel, and _CRSelector::simple_sel.

Referenced by cr_selector_append_simple_sel().

CRSelector* cr_selector_parse_from_buf const guchar *  a_char_buf,
enum CREncoding  a_enc
 

Definition at line 50 of file cr-selector.c.

References cr_parser_new_from_buf(), and CRParser.

CRSelector* cr_selector_prepend CRSelector a_this,
CRSelector a_new
 

Prepends an element to the CRSelector list.

Parameters:
a_this the current instance of CRSelector list.
a_new the instance of CRSelector.
Returns:
the new list.

Definition at line 94 of file cr-selector.c.

References CRSelector, _CRSelector::next, and _CRSelector::prev.

void cr_selector_ref CRSelector a_this  ) 
 

Increments the ref count of the current instance of CRSelector.

Parameters:
a_this the current instance of CRSelector.

Definition at line 192 of file cr-selector.c.

References _CRSelector::ref_count.

Referenced by cr_parser_parse_ruleset(), cr_statement_new_ruleset(), and cr_statement_ruleset_set_sel_list().

guchar* cr_selector_to_string CRSelector a_this  ) 
 

Definition at line 125 of file cr-selector.c.

References cr_simple_sel_to_string(), and CRSelector.

Referenced by cr_selector_dump().

gboolean cr_selector_unref CRSelector a_this  ) 
 

Decrements the ref count of the current instance of CRSelector.

If the ref count reaches zero, the current instance of CRSelector is destroyed.

Parameters:
a_this the current instance of CRSelector.
Returns:
TRUE if this function destroyed the current instance of CRSelector, FALSE otherwise.

Definition at line 209 of file cr-selector.c.

References cr_selector_destroy(), and _CRSelector::ref_count.

Referenced by cr_parser_parse_ruleset(), and cr_statement_ruleset_set_sel_list().


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