#include <KeyValueDirectory.h>
Public Member Functions | |
String | key () const |
KeyValueDirectoryIterator (const String &query, const KeyValueDirectory< T > *directory) | |
String | matchGroup (size_t index) const |
bool | next () |
void | reset () |
ConvertToRef< T >::ToConstRef | value () const |
Private Attributes | |
KeyValueDirectory< T > ::KeyValueMap::const_iterator | m_current_entry |
boost::match_results < icl_core::String::const_iterator > | m_current_results |
const KeyValueDirectory< T > * | m_directory |
boost::regex | m_query |
bool | m_reset |
Implements an iterator for regular expression querys to a key/value directory.
Definition at line 118 of file KeyValueDirectory.h.
icl_core::KeyValueDirectoryIterator< T >::KeyValueDirectoryIterator | ( | const String & | query, |
const KeyValueDirectory< T > * | directory | ||
) |
Create a new iterator for the query on the directory.
Definition at line 71 of file KeyValueDirectory.hpp.
String icl_core::KeyValueDirectoryIterator< T >::key | ( | ) | const |
Get the key of the current match result.
Definition at line 80 of file KeyValueDirectory.hpp.
String icl_core::KeyValueDirectoryIterator< T >::matchGroup | ( | size_t | index | ) | const |
Get the match group at the specified index.
Remark: Match groups are the equivalent of Perl's (or sed's) $n references.
Definition at line 86 of file KeyValueDirectory.hpp.
bool icl_core::KeyValueDirectoryIterator< T >::next | ( | ) |
Move to the next query result.
Definition at line 99 of file KeyValueDirectory.hpp.
void icl_core::KeyValueDirectoryIterator< T >::reset | ( | ) |
Resets the iterator. You have to call Next() to move it to the first matching configuration entry.
Definition at line 126 of file KeyValueDirectory.hpp.
ConvertToRef< T >::ToConstRef icl_core::KeyValueDirectoryIterator< T >::value | ( | ) | const |
Get the value of the current match result.
Definition at line 132 of file KeyValueDirectory.hpp.
KeyValueDirectory<T>::KeyValueMap::const_iterator icl_core::KeyValueDirectoryIterator< T >::m_current_entry [private] |
Definition at line 203 of file KeyValueDirectory.h.
boost::match_results<icl_core::String::const_iterator> icl_core::KeyValueDirectoryIterator< T >::m_current_results [private] |
Definition at line 201 of file KeyValueDirectory.h.
const KeyValueDirectory<T>* icl_core::KeyValueDirectoryIterator< T >::m_directory [private] |
Definition at line 199 of file KeyValueDirectory.h.
boost::regex icl_core::KeyValueDirectoryIterator< T >::m_query [private] |
Definition at line 200 of file KeyValueDirectory.h.
bool icl_core::KeyValueDirectoryIterator< T >::m_reset [private] |
Definition at line 204 of file KeyValueDirectory.h.