template < typename K >

class Pair

Library: Foundation
Package: Dynamic
Header: Poco/Dynamic/Pair.h


Pair allows to define a pair of values.

Member Summary

Member Functions: first, operator =, second, swap, toString

Types Aliases


using Data = typename std::pair < K, Var >;


Pair inline


Creates an empty Pair

Pair inline

    const Pair & other

Creates the Pair from another pair.

Pair inline

    const Data & val

Creates the Pair from the given value.

Pair inline

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

Creates Pair form standard pair.

Pair inline

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

Creates pair from two values.


~Pair virtual inline

virtual ~Pair();

Destroys the Pair.

Member Functions

first inline

inline const K & first() const;

Returns the first member of the pair.

operator = inline

Pair & operator = (
    const Pair & other

Copy constructs Pair from another pair.

second inline

inline const Var & second() const;

Returns the second member of the pair.

swap inline

Pair & swap(
    Pair & other
) noexcept;

Swaps the content of the two Pairs.

toString inline

std::string toString();