class ugcs::vsm::Properties::Iterator

Overview

Stored properties iterator. More…

#include <properties.h>

class Iterator
{
public:
    // construction

    Iterator(
        const Table_type::const_iterator& iterator,
        const Table_type::const_iterator& end_iterator,
        const std::string& prefix = std::string(),
        char separator = '.'
        );

    // methods

    std::string operator * () const;
    const std::string* operator -> () const;
    bool operator == (const Iterator& it) const;
    bool operator != (const Iterator& it) const;
    void operator ++ ();
    void operator ++ (int);
    std::string operator [] (size_t comp_idx);
    int Get_count();
};

Detailed Documentation

Stored properties iterator.

Construction

Iterator(
    const Table_type::const_iterator& iterator,
    const Table_type::const_iterator& end_iterator,
    const std::string& prefix = std::string(),
    char separator = '.'
    )

Construct new iterator which iterates values starting from the given prefix.

Parameters:

iterator

Start from.

end_iterator

End.

prefix

Prefix for filtering.

separator

Path nodes separator.

Methods

std::string operator * () const

Get the value.

const std::string* operator -> () const

Get the value.

bool operator == (const Iterator& it) const

Equality check method.

bool operator != (const Iterator& it) const

Non-equality check method.

void operator ++ ()

Prefix increment operator.

void operator ++ (int)

Postfix increment operator.

std::string operator [] (size_t comp_idx)

Get component of name with the specified index.

Components are separated by separator character specified in Properties::begin() method.

Parameters:

comp_idx

Component index.

Invalid_param_exception

if index is out of range.

Returns:

String for component.