gmsh-TingyuanDoc  0.1
An Open-Source Timing-driven Analytical Mixed-size FPGA Placer
Pair.h
Go to the documentation of this file.
1 // Gmsh - Copyright (C) 1997-2022 C. Geuzaine, J.-F. Remacle
2 //
3 // See the LICENSE.txt file in the Gmsh root directory for license information.
4 // Please report all issues on https://gitlab.onelab.info/gmsh/gmsh/issues.
5 
6 #ifndef PAIR_H
7 #define PAIR_H
8 
9 // A pair of values, the types of which can be different
10 template <class L, class R> class Pair {
11 private:
12  L Left;
13  R Right;
14 
15 public:
16  Pair() {}
17  Pair(const L &left, const R &right) : Left(left), Right(right) {}
18  L left() const { return Left; }
19  void left(const L &left) { Left = left; }
20  R right() const { return Right; }
21  void right(const R &right) { Right = right; }
22  L first() const { return Left; }
23  R second() const { return Right; }
24 };
25 
26 #endif
Pair::Right
R Right
Definition: Pair.h:13
Pair::Left
L Left
Definition: Pair.h:12
Pair::left
L left() const
Definition: Pair.h:18
Pair::first
L first() const
Definition: Pair.h:22
Pair::second
R second() const
Definition: Pair.h:23
Pair::left
void left(const L &left)
Definition: Pair.h:19
Pair::right
void right(const R &right)
Definition: Pair.h:21
Pair::Pair
Pair(const L &left, const R &right)
Definition: Pair.h:17
Pair::right
R right() const
Definition: Pair.h:20
Pair
Definition: Pair.h:10
Pair::Pair
Pair()
Definition: Pair.h:16