1 /* Multiplication_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_Multiplication_Floating_Point_Expression_inlines_hh
26 #define PPL_Multiplication_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
34 Multiplication_Floating_Point_Expression<FP_Interval_Type, FP_Format>
Multiplication_Floating_Point_Expression(Floating_Point_Expression<FP_Interval_Type,FP_Format> * const x,Floating_Point_Expression<FP_Interval_Type,FP_Format> * const y)35 ::Multiplication_Floating_Point_Expression(
36          Floating_Point_Expression<FP_Interval_Type, FP_Format>* const x,
37          Floating_Point_Expression<FP_Interval_Type, FP_Format>* const y)
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
45 Multiplication_Floating_Point_Expression<FP_Interval_Type, FP_Format>
~Multiplication_Floating_Point_Expression()46 ::~Multiplication_Floating_Point_Expression() {
47   delete first_operand;
48   delete second_operand;
49 }
50 
51 template <typename FP_Interval_Type, typename FP_Format>
52 inline void
53 Multiplication_Floating_Point_Expression<FP_Interval_Type, FP_Format>
m_swap(Multiplication_Floating_Point_Expression<FP_Interval_Type,FP_Format> & y)54 ::m_swap(Multiplication_Floating_Point_Expression<FP_Interval_Type,
55                                                   FP_Format>& y) {
56   using std::swap;
57   swap(first_operand, y.first_operand);
58   swap(second_operand, y.second_operand);
59 }
60 
61 /*! \relates Multiplication_Floating_Point_Expression */
62 template <typename FP_Interval_Type, typename FP_Format>
63 inline void
swap(Multiplication_Floating_Point_Expression<FP_Interval_Type,FP_Format> & x,Multiplication_Floating_Point_Expression<FP_Interval_Type,FP_Format> & y)64 swap(Multiplication_Floating_Point_Expression<FP_Interval_Type, FP_Format>& x,
65      Multiplication_Floating_Point_Expression<FP_Interval_Type, FP_Format>& y) {
66   x.m_swap(y);
67 }
68 
69 } // namespace Parma_Polyhedra_Library
70 
71 #endif // !defined(PPL_Multiplication_Floating_Point_Expression_inlines_hh)
72