Open
Graph Drawing
Framework

 v. 2022.02 (Dogwood)
 

ogdf::Tuple2< E1, E2 > Class Template Reference

Tuples of two elements (2-tuples). More...

#include <ogdf/basic/tuples.h>

Public Member Functions

 Tuple2 ()
 Constructs a 2-tuple using default constructors. More...
 
 Tuple2 (const E1 &y1, const E2 &y2)
 Constructs a 2-tuple for given values. More...
 
 Tuple2 (const Tuple2< E1, E2 > &t2)
 Constructs a 2-tuple that is a copy of t2. More...
 
Tuple2operator= (const Tuple2< E1, E2 > &)=default
 
E1 & x1 ()
 Returns a reference the first element. More...
 
const E1 & x1 () const
 Returns a reference the first element. More...
 
E2 & x2 ()
 Returns a reference the second element. More...
 
const E2 & x2 () const
 Returns a reference the second element. More...
 

Public Attributes

E1 m_x1
 The first element. More...
 
E2 m_x2
 The second element. More...
 

Detailed Description

template<class E1, class E2>
class ogdf::Tuple2< E1, E2 >

Tuples of two elements (2-tuples).

Template Parameters
E1is the data type for the first element.
E2is the data type for the second element.

Definition at line 46 of file tuples.h.

Constructor & Destructor Documentation

◆ Tuple2() [1/3]

template<class E1 , class E2 >
ogdf::Tuple2< E1, E2 >::Tuple2 ( )
inline

Constructs a 2-tuple using default constructors.

Definition at line 52 of file tuples.h.

◆ Tuple2() [2/3]

template<class E1 , class E2 >
ogdf::Tuple2< E1, E2 >::Tuple2 ( const E1 &  y1,
const E2 &  y2 
)
inline

Constructs a 2-tuple for given values.

Definition at line 54 of file tuples.h.

◆ Tuple2() [3/3]

template<class E1 , class E2 >
ogdf::Tuple2< E1, E2 >::Tuple2 ( const Tuple2< E1, E2 > &  t2)
inline

Constructs a 2-tuple that is a copy of t2.

Definition at line 56 of file tuples.h.

Member Function Documentation

◆ operator=()

template<class E1 , class E2 >
Tuple2& ogdf::Tuple2< E1, E2 >::operator= ( const Tuple2< E1, E2 > &  )
default

◆ x1() [1/2]

template<class E1 , class E2 >
E1& ogdf::Tuple2< E1, E2 >::x1 ( )
inline

Returns a reference the first element.

Definition at line 64 of file tuples.h.

◆ x1() [2/2]

template<class E1 , class E2 >
const E1& ogdf::Tuple2< E1, E2 >::x1 ( ) const
inline

Returns a reference the first element.

Definition at line 59 of file tuples.h.

◆ x2() [1/2]

template<class E1 , class E2 >
E2& ogdf::Tuple2< E1, E2 >::x2 ( )
inline

Returns a reference the second element.

Definition at line 66 of file tuples.h.

◆ x2() [2/2]

template<class E1 , class E2 >
const E2& ogdf::Tuple2< E1, E2 >::x2 ( ) const
inline

Returns a reference the second element.

Definition at line 61 of file tuples.h.

Member Data Documentation

◆ m_x1

template<class E1 , class E2 >
E1 ogdf::Tuple2< E1, E2 >::m_x1

The first element.

Definition at line 48 of file tuples.h.

◆ m_x2

template<class E1 , class E2 >
E2 ogdf::Tuple2< E1, E2 >::m_x2

The second element.

Definition at line 49 of file tuples.h.


The documentation for this class was generated from the following file: