cr-attr-sel

## cr-attr-sel cr-attr-sel |

## Synopsis

    struct              CRAttrSel;
    enum CRStatus       cr_attr_sel_append_attr_sel         (CRAttrSel *a_this,
                                                             CRAttrSel *a_attr_sel);
    void                cr_attr_sel_destroy                 (CRAttrSel *a_this);
    void                cr_attr_sel_dump                    (CRAttrSel const *a_this,
                                                             FILE *a_fp);
    CRAttrSel *         cr_attr_sel_new                     (void);
    enum CRStatus       cr_attr_sel_prepend_attr_sel        (CRAttrSel *a_this,
                                                             CRAttrSel *a_attr_sel);
    guchar *            cr_attr_sel_to_string               (CRAttrSel const *a_this);

## Description

## Details

### struct CRAttrSel

    struct CRAttrSel {
            CRString             *name ;
            CRString             *value ;
            enum AttrMatchWay  match_way ;
            CRAttrSel          *next ;
            CRAttrSel          *prev ;
            CRParsingLocation location ;
    };

CRAdditionalSel abstracts an attribute selector. Attributes selectors are described in the css2 spec [5.8]. There are more generally used in the css2 selectors described in css2 spec [5] .

### cr_attr_sel_append_attr_sel ()

    enum CRStatus       cr_attr_sel_append_attr_sel         (CRAttrSel *a_this,
                                                             CRAttrSel *a_attr_sel);

Appends an attribute selector to the current list of attribute selectors represented by a_this.

`a_this` : | the this pointer of the current instance of CRAttrSel.
`a_attr_sel` : | selector to append.
Returns : | CR_OK upon successfull completion, an error code otherwise.

### cr_attr_sel_destroy ()

    void                cr_attr_sel_destroy                 (CRAttrSel *a_this);

Destroys the current instance of CRAttrSel. Frees all the fields if they are non null.

`a_this` : | the "this pointer" of the current instance of CRAttrSel.

### cr_attr_sel_dump ()

    void                cr_attr_sel_dump                    (CRAttrSel const *a_this,
                                                             FILE *a_fp);

Dumps the current instance of CRAttrSel to a file.

`a_this` : | the "this pointer" of the current instance of CRAttrSel.
`a_fp` : | the destination file.

### cr_attr_sel_new ()

    CRAttrSel *         cr_attr_sel_new                     (void);

### cr_attr_sel_prepend_attr_sel ()

    enum CRStatus       cr_attr_sel_prepend_attr_sel        (CRAttrSel *a_this,
                                                             CRAttrSel *a_attr_sel);

Prepends an attribute selector to the list of attributes selector represented by a_this.

`a_this` : | the "this pointer" of the current instance *of CRAttrSel.
`a_attr_sel` : | the attribute selector to append.
Returns : | CR_OK upon successfull completion, an error code otherwise.

### cr_attr_sel_to_string ()

    guchar *            cr_attr_sel_to_string               (CRAttrSel const *a_this);

Serializes an attribute selector into a string

`a_this` : | the current instance of CRAttrSel.
Returns : | the serialized attribute selector.