#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(). | |
| bool databases::XMLIndex::load | ( | std::string const & | filename | ) |
Loads index from an XML index file.
| [in] | filename | The name of the file to load from. |
| bool databases::XMLIndex::save | ( | std::string const & | filename | ) |
Saves index to an XML index file.
| [in] | filename | The name of the file to save to. |
| bool databases::XMLIndex::add | ( | std::string const & | filename | ) |
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.
| [in] | filename | The file to add. |
| bool databases::XMLIndex::remove | ( | std::string const & | filename | ) |
Removes a file from the index.
| [in] | filename | The file to remove. |
| void databases::XMLIndex::clear | ( | ) |
Clears the index.
return true if successful, false otherwise.
| bool databases::XMLIndex::exists | ( | std::string const & | filename | ) | const |
Determines whether a file exists in the index.
| [in] | filename | The file to check for. |
1.5.3