PPL  1.2
Difference_Floating_Point_Expression_inlines.hh
Go to the documentation of this file.
1 /* Difference_Floating_Point_Expression class implementation: inline
2  functions.
3  Copyright (C) 2001-2010 Roberto Bagnara <bagnara@cs.unipr.it>
4  Copyright (C) 2010-2016 BUGSENG srl (http://bugseng.com)
5 
6 This file is part of the Parma Polyhedra Library (PPL).
7 
8 The PPL is free software; you can redistribute it and/or modify it
9 under the terms of the GNU General Public License as published by the
10 Free Software Foundation; either version 3 of the License, or (at your
11 option) any later version.
12 
13 The PPL is distributed in the hope that it will be useful, but WITHOUT
14 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
15 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
16 for more details.
17 
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software Foundation,
20 Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1307, USA.
21 
22 For the most up-to-date information see the Parma Polyhedra Library
23 site: http://bugseng.com/products/ppl/ . */
24 
25 #ifndef PPL_Difference_Floating_Point_Expression_inlines_hh
26 #define PPL_Difference_Floating_Point_Expression_inlines_hh 1
27 
28 #include "globals_defs.hh"
29 
30 namespace Parma_Polyhedra_Library {
31 
32 template <typename FP_Interval_Type, typename FP_Format>
33 inline
38  : first_operand(x), second_operand(y) {
39  assert(x != 0);
40  assert(y != 0);
41 }
42 
43 template <typename FP_Interval_Type, typename FP_Format>
44 inline
47  delete first_operand;
48  delete second_operand;
49 }
50 
51 template <typename FP_Interval_Type, typename FP_Format>
52 inline void
55  using std::swap;
56  swap(first_operand, y.first_operand);
57  swap(second_operand, y.second_operand);
58 }
59 
61 template <typename FP_Interval_Type, typename FP_Format>
62 inline void
65  x.m_swap(y);
66 }
67 
68 } // namespace Parma_Polyhedra_Library
69 
70 #endif // !defined(PPL_Difference_Floating_Point_Expression_inlines_hh)
void swap(Difference_Floating_Point_Expression< FP_Interval_Type, FP_Format > &x, Difference_Floating_Point_Expression< FP_Interval_Type, FP_Format > &y)
void swap(CO_Tree &x, CO_Tree &y)
Difference_Floating_Point_Expression(Floating_Point_Expression< FP_Interval_Type, FP_Format > *const x, Floating_Point_Expression< FP_Interval_Type, FP_Format > *const y)
Constructor with two parameters: builds the difference floating point expression corresponding to x ...
void m_swap(Difference_Floating_Point_Expression< FP_Interval_Type, FP_Format > &y)
Swaps *this with y.
Floating_Point_Expression< FP_Interval_Type, FP_Format > * first_operand
Pointer to the first operand.
Floating_Point_Expression< FP_Interval_Type, FP_Format > * second_operand
Pointer to the second operand.
The entire library is confined to this namespace.
Definition: version.hh:61