#include <xml.h>
Public Types | |
| typedef std::vector< std::string > | container_type |
| Container type. | |
| typedef container_type::const_iterator | const_iterator |
| Const iterator type. | |
| typedef container_type::const_reverse_iterator | const_reverse_iterator |
| Const reverse iterator type. | |
Public Member Functions | |
| XMLIndex () | |
| Constructor. | |
| XMLIndex (XMLIndex const &xi) | |
| Copy constructor. | |
| XMLIndex & | operator= (XMLIndex const &right) |
| Assignment operator. | |
| bool | load (std::string const &filename) |
| Loads index from an XML index file. | |
| bool | save (std::string const &filename) |
| Saves index to an XML index file. | |
| bool | add (std::string const &filename) |
| Adds a file to the index. | |
| bool | remove (std::string const &filename) |
| Removes a file from the index. | |
| void | clear () |
| Clears the index. | |
| bool | exists (std::string const &filename) const |
| Determines whether a file exists in the index. | |
| const_iterator | begin () const |
| Returns a const_iterator to the first element. | |
| const_iterator | end () const |
| Returns a const_iterator to the last element. | |
| const_reverse_iterator | rbegin () const |
| Returns a const_reverse_iterator to the first element. | |
| const_reverse_iterator | rend () const |
| Returns a const_reverse_iterator to the last element. | |
| bool | empty () const |
| Returns whether the index is empty. | |
| container_type::size_type | size () const |
| Returns the number of files in the index. | |
| std::string const & | error () const |
| Returns a string describing the last error that occured after load()/save(). | |
|
|
Adds a file to the index. If the given file is already in the index, then it is not added, though the function is still successful.
|
|
|
Clears the index. return true if successful, false otherwise. |
|
|
Determines whether a file exists in the index.
|
|
|
Loads index from an XML index file.
|
|
|
Removes a file from the index.
|
|
|
Saves index to an XML index file.
|
1.4.6