Poco::Dynamic

template < typename K >

class Pair

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

Description

Pair allows to define a pair of values.

Member Summary

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

Types

Data

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

Constructors

Pair inline

Pair();

Creates an empty Pair

Pair inline

Pair(
    const Pair & other
);

Creates the Pair from another pair.

Pair inline

Pair(
    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.

Destructor

~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
);

Swaps the content of the two Pairs.

toString inline

std::string toString();