Gnome XML Library Reference Manual
<<< Previous Page | Home | Up | Next Page >>>

# hash

## Name

hash --

## Synopsis

    struct      xmlHashTable;
    typedef     xmlHashTablePtr;
    void        (*xmlHashDeallocator)           (void *payload,
                                                 xmlChar *name);
    void*       (*xmlHashCopier)                (void *payload,
                                                 xmlChar *name);
    void        (*xmlHashScanner)               (void *payload,
                                                 void *data,
                                                 xmlChar *name);
    void        (*xmlHashScannerFull)           (void *payload,
                                                 void *data,
                                                 const xmlChar *name,
                                                 const xmlChar *name2,
                                                 const xmlChar *name3);
    xmlHashTablePtr xmlHashCreate               (int size);
    void        xmlHashFree                     (xmlHashTablePtr table,
                                                 xmlHashDeallocator f);
    int         xmlHashAddEntry                 (xmlHashTablePtr table,
                                                 const xmlChar *name,
                                                 void *userdata);
    int         xmlHashUpdateEntry              (xmlHashTablePtr table,
                                                 const xmlChar *name,
                                                 void *userdata,
                                                 xmlHashDeallocator f);
    int         xmlHashAddEntry2                (xmlHashTablePtr table,
                                                 const xmlChar *name,
                                                 const xmlChar *name2,
                                                 void *userdata);
    int         xmlHashUpdateEntry2             (xmlHashTablePtr table,
                                                 const xmlChar *name,
                                                 const xmlChar *name2,
                                                 void *userdata,
                                                 xmlHashDeallocator f);
    int         xmlHashAddEntry3                (xmlHashTablePtr table,
                                                 const xmlChar *name,
                                                 const xmlChar *name2,
                                                 const xmlChar *name3,
                                                 void *userdata);
    int         xmlHashUpdateEntry3             (xmlHashTablePtr table,
                                                 const xmlChar *name,
                                                 const xmlChar *name2,
                                                 const xmlChar *name3,
                                                 void *userdata,
                                                 xmlHashDeallocator f);
    int         xmlHashRemoveEntry              (xmlHashTablePtr table,
                                                 const xmlChar *name,
                                                 xmlHashDeallocator f);
    int         xmlHashRemoveEntry2             (xmlHashTablePtr table,
                                                 const xmlChar *name,
                                                 const xmlChar *name2,
                                                 xmlHashDeallocator f);
    int         xmlHashRemoveEntry3             (xmlHashTablePtr table,
                                                 const xmlChar *name,
                                                 const xmlChar *name2,
                                                 const xmlChar *name3,
                                                 xmlHashDeallocator f);
    void*       xmlHashLookup                   (xmlHashTablePtr table,
                                                 const xmlChar *name);
    void*       xmlHashLookup2                  (xmlHashTablePtr table,
                                                 const xmlChar *name,
                                                 const xmlChar *name2);
    void*       xmlHashLookup3                  (xmlHashTablePtr table,
                                                 const xmlChar *name,
                                                 const xmlChar *name2,
                                                 const xmlChar *name3);
    xmlHashTablePtr xmlHashCopy                 (xmlHashTablePtr table,
                                                 xmlHashCopier f);
    int         xmlHashSize                     (xmlHashTablePtr table);
    void        xmlHashScan                     (xmlHashTablePtr table,
                                                 xmlHashScanner f,
                                                 void *data);
    void        xmlHashScan3                    (xmlHashTablePtr table,
                                                 const xmlChar *name,
                                                 const xmlChar *name2,
                                                 const xmlChar *name3,
                                                 xmlHashScanner f,
                                                 void *data);
    void        xmlHashScanFull                 (xmlHashTablePtr table,
                                                 xmlHashScannerFull f,
                                                 void *data);
    void        xmlHashScanFull3                (xmlHashTablePtr table,
                                                 const xmlChar *name,
                                                 const xmlChar *name2,
                                                 const xmlChar *name3,
                                                 xmlHashScannerFull f,
                                                 void *data);

## Description

## Details

### struct xmlHashTable

    struct xmlHashTable;

### xmlHashTablePtr

### xmlHashDeallocator ()

    void        (*xmlHashDeallocator)           (void *payload,
                                                 xmlChar *name);

Callback to free data from a hash.

`payload` : |
`name` : |

### xmlHashCopier ()

    void*       (*xmlHashCopier)                (void *payload,
                                                 xmlChar *name);

Callback to copy data from a hash.

`payload` : |
`name` : |

### xmlHashScanner ()

    void        (*xmlHashScanner)               (void *payload,
                                                 void *data,
                                                 xmlChar *name);

Callback when scanning data in a hash with the simple scanner.

`payload` : |
`data` : |
`name` : |

### xmlHashScannerFull ()

    void        (*xmlHashScannerFull)           (void *payload,
                                                 void *data,
                                                 const xmlChar *name,
                                                 const xmlChar *name2,
                                                 const xmlChar *name3);

Callback when scanning data in a hash with the full scanner.

`payload` : |
`data` : |
`name` : |
`name2` : |
`name3` : |

### xmlHashCreate ()

    xmlHashTablePtr xmlHashCreate               (int size);

Create a new xmlHashTablePtr.

`size` : |
Returns : |

### xmlHashFree ()

    void        xmlHashFree                     (xmlHashTablePtr table,
                                                 xmlHashDeallocator f);

Free the hash `table` and its contents. The userdata is deallocated with `f` if provided.

`table` : |
`f` : |

### xmlHashAddEntry ()

    int         xmlHashAddEntry                 (xmlHashTablePtr table,
                                                 const xmlChar *name,
                                                 void *userdata);

Add the `userdata` to the hash `table`. This can later be retrieved by using the `name`. Duplicate names generate errors.

`table` : |
`name` : |
`userdata` : |
Returns : |

### xmlHashUpdateEntry ()

    int         xmlHashUpdateEntry              (xmlHashTablePtr table,
                                                 const xmlChar *name,
                                                 void *userdata,
                                                 xmlHashDeallocator f);

Add the `userdata` to the hash `table`. This can later be retrieved by using the `name`. Existing entry for this `name` will be removed and freed with `f` if found.

`table` : |
`name` : |
`userdata` : |
`f` : |
Returns : |

### xmlHashAddEntry2 ()

    int         xmlHashAddEntry2                (xmlHashTablePtr table,
                                                 const xmlChar *name,
                                                 const xmlChar *name2,
                                                 void *userdata);

Add the `userdata` to the hash `table`. This can later be retrieved by using the (`name`, `name2`) tuple. Duplicate tuples generate errors.

`table` : |
`name` : |
`name2` : |
`userdata` : |
Returns : |

### xmlHashUpdateEntry2 ()

    int         xmlHashUpdateEntry2             (xmlHashTablePtr table,
                                                 const xmlChar *name,
                                                 const xmlChar *name2,
                                                 void *userdata,
                                                 xmlHashDeallocator f);

Add the `userdata` to the hash `table`. This can later be retrieved by using the (`name`, `name2`) tuple. Existing entry for this tuple will be removed and freed with `f` if found.

`table` : |
`name` : |
`name2` : |
`userdata` : |
`f` : |
Returns : |

### xmlHashAddEntry3 ()

    int         xmlHashAddEntry3                (xmlHashTablePtr table,
                                                 const xmlChar *name,
                                                 const xmlChar *name2,
                                                 const xmlChar *name3,
                                                 void *userdata);

Add the `userdata` to the hash `table`. This can later be retrieved by using the tuple (`name`, `name2`, `name3`). Duplicate entries generate errors.

`table` : |
`name` : |
`name2` : |
`name3` : |
`userdata` : |
Returns : |

### xmlHashUpdateEntry3 ()

    int         xmlHashUpdateEntry3             (xmlHashTablePtr table,
                                                 const xmlChar *name,
                                                 const xmlChar *name2,
                                                 const xmlChar *name3,
                                                 void *userdata,
                                                 xmlHashDeallocator f);

Add the `userdata` to the hash `table`. This can later be retrieved by using the tuple (`name`, `name2`, `name3`). Existing entry for this tuple will be removed and freed with `f` if found.

`table` : |
`name` : |
`name2` : |
`name3` : |
`userdata` : |
`f` : |
Returns : |

### xmlHashRemoveEntry ()

    int         xmlHashRemoveEntry              (xmlHashTablePtr table,
                                                 const xmlChar *name,
                                                 xmlHashDeallocator f);

Find the userdata specified by the `name` and remove it from the hash `table`. Existing userdata for this tuple will be removed and freed with `f`.

`table` : |
`name` : |
`f` : |
Returns : |

### xmlHashRemoveEntry2 ()

    int         xmlHashRemoveEntry2             (xmlHashTablePtr table,
                                                 const xmlChar *name,
                                                 const xmlChar *name2,
                                                 xmlHashDeallocator f);

Find the userdata specified by the (`name`, `name2`) tuple and remove it from the hash `table`. Existing userdata for this tuple will be removed and freed with `f`.

`table` : |
`name` : |
`name2` : |
`f` : |
Returns : |

### xmlHashRemoveEntry3 ()

    int         xmlHashRemoveEntry3             (xmlHashTablePtr table,
                                                 const xmlChar *name,
                                                 const xmlChar *name2,
                                                 const xmlChar *name3,
                                                 xmlHashDeallocator f);

Find the userdata specified by the (`name`, `name2`, `name3`) tuple and remove it from the hash `table`. Existing userdata for this tuple will be removed and freed with `f`.

`table` : |
`name` : |
`name2` : |
`name3` : |
`f` : |
Returns : |

### xmlHashLookup ()

    void*       xmlHashLookup                   (xmlHashTablePtr table,
                                                 const xmlChar *name);

Find the userdata specified by the `name`.

`table` : |
`name` : |

### xmlHashLookup2 ()

    void*       xmlHashLookup2                  (xmlHashTablePtr table,
                                                 const xmlChar *name,
                                                 const xmlChar *name2);

Find the userdata specified by the (`name`, `name2`) tuple.

`table` : |
`name` : |
`name2` : |

### xmlHashLookup3 ()

    void*       xmlHashLookup3                  (xmlHashTablePtr table,
                                                 const xmlChar *name,
                                                 const xmlChar *name2,
                                                 const xmlChar *name3);

Find the userdata specified by the (`name`, `name2`, `name3`) tuple.

`table` : |
`name` : |
`name2` : |
`name3` : |

### xmlHashCopy ()

    xmlHashTablePtr xmlHashCopy                 (xmlHashTablePtr table,
                                                 xmlHashCopier f);

Scan the hash `table` and applied `f` to each value.

`table` : |
`f` : |
Returns : |

### xmlHashSize ()

    int         xmlHashSize                     (xmlHashTablePtr table);

Query the number of elements installed in the hash `table`.

`table` : |
Returns : |

### xmlHashScan ()

    void        xmlHashScan                     (xmlHashTablePtr table,
                                                 xmlHashScanner f,
                                                 void *data);

Scan the hash `table` and applied `f` to each value.

`table` : |
`f` : |
`data` : |

### xmlHashScan3 ()

    void        xmlHashScan3                    (xmlHashTablePtr table,
                                                 const xmlChar *name,
                                                 const xmlChar *name2,
                                                 const xmlChar *name3,
                                                 xmlHashScanner f,
                                                 void *data);

Scan the hash `table` and applied `f` to each value matching (`name`, `name2`, `name3`) tuple. If one of the names is null, the comparison is considered to match.

`table` : |
`name` : |
`name2` : |
`name3` : |
`f` : |
`data` : |

### xmlHashScanFull ()

    void        xmlHashScanFull                 (xmlHashTablePtr table,
                                                 xmlHashScannerFull f,
                                                 void *data);

Scan the hash `table` and applied `f` to each value.

`table` : |
`f` : |
`data` : |

### xmlHashScanFull3 ()

    void        xmlHashScanFull3                (xmlHashTablePtr table,
                                                 const xmlChar *name,
                                                 const xmlChar *name2,
                                                 const xmlChar *name3,
                                                 xmlHashScannerFull f,
                                                 void *data);

Scan the hash `table` and applied `f` to each value matching (`name`, `name2`, `name3`) tuple. If one of the names is null, the comparison is considered to match.

`table` : |
`name` : |
`name2` : |
`name3` : |
`f` : |
`data` : |

<<< Previous Page | Home | Up | Next Page >>>
encoding | debugXML