template class Poco::Dynamic::Pair

Overview

Pair allows to define a pair of values. Moreā€¦

#include <Pair.h>

template <typename K>
class Pair
{
public:
    // typedefs

    typedef std::pair<K, Var> Data;

    // construction

    Pair();
    Pair(const Pair& other);
    Pair(const Data& val);

    template <typename T>
    Pair(const std::pair<K, T>& val);

    template <typename T>
    Pair(
        const K& first,
        const T& second
        );

    // methods

    Pair&
    swap(Pair& other);

    Pair&
    operator=(const Pair& other);

    const K&
    first() const;

    const Var&
    second() const;

    std::string
    toString();
};

Detailed Documentation

Pair allows to define a pair of values.

Construction

Pair()

Creates an empty Pair.

Pair(const Pair& other)

Creates the Pair from another pair.

Pair(const Data& val)

Creates the Pair from the given value.

template <typename T>
Pair(const std::pair<K, T>& val)

Creates Pair form standard pair.

template <typename T>
Pair(
    const K& first,
    const T& second
    )

Creates pair from two values.

Methods

Pair&
swap(Pair& other)

Swaps the content of the two Pairs.

Pair&
operator=(const Pair& other)

Copy constructs Pair from another pair.

const K&
first() const

Returns the first member of the pair.

const Var&
second() const

Returns the second member of the pair.