OrderedPair.h

Classes

OrderedPair -- Ordered pair class (full description)

template<class K, class V> class OrderedPair

Types

enum

OrderedPairVersion = 1

Interface

Public Members
OrderedPair()
OrderedPair(const K &k, const V &v)
OrderedPair(const OrderedPair<K,V>& that)
OrderedPair<K,V>& operator= (const OrderedPair<K,V>& that)
K &x()
const K &x() const
V &y()
const V &y() const

Description

Review Status

Reviewed By:
UNKNOWN
Date Reviewed:
before2004/08/25

Synopsis

This class is a simple class used in the Map classes to manage key/value pairs for maps. The default constructor is needed for use in containers. This implies that ALL classes ever used in OrderedPair should have a default constructor!!!!

This should probably be cleaned up in the future and made into a generally useful class.

Member Description

OrderedPair()

Needed for "operator>>(AipsIO &ios, Slist &list)"

OrderedPair(const K &k, const V &v)

This is the "standard" constructor which takes a key and a value and constructs an ordered pair.

OrderedPair(const OrderedPair<K,V>& that)

Copy constructor (copy semantics).

OrderedPair<K,V>& operator= (const OrderedPair<K,V>& that)

Assignment (copy semantics).

enum

K &x()
const K &x() const
V &y()
const V &y() const

Get access to the key or value.