Provide stubbed HighPrecision GetHigh(), GetLow() implementations to fix builds across platforms
authorTom Henderson <tomh@tomh.org>
Wed, 18 Aug 2010 13:58:38 -0700
changeset 6581 b3597c013780
parent 6580 ecb0f9a3849a
child 6582 44bad54b1f97
Provide stubbed HighPrecision GetHigh(), GetLow() implementations to fix builds across platforms
src/simulator/high-precision-cairo.cc
src/simulator/high-precision-cairo.h
src/simulator/high-precision-double.h
--- a/src/simulator/high-precision-cairo.cc	Tue Aug 17 21:28:08 2010 -0700
+++ b/src/simulator/high-precision-cairo.cc	Wed Aug 18 13:58:38 2010 -0700
@@ -155,6 +155,20 @@
   return result;
 }
 
+int64_t
+HighPrecision::GetHigh (void) const
+{
+  NS_FATAL_ERROR ("XXX this function unavailable for high-precision-as-cairo; patch requested");
+  return 0;
+}
+
+uint64_t
+HighPrecision::GetLow (void) const
+{
+  NS_FATAL_ERROR ("XXX this function unavailable for high-precision-as-cairo; patch requested");
+  return 0;
+}
+
 std::ostream &operator << (std::ostream &os, const HighPrecision &hp)
 {
   return os;
--- a/src/simulator/high-precision-cairo.h	Tue Aug 17 21:28:08 2010 -0700
+++ b/src/simulator/high-precision-cairo.h	Wed Aug 18 13:58:38 2010 -0700
@@ -60,6 +60,8 @@
 
   inline int Compare (HighPrecision const &o) const;
   inline static HighPrecision Zero (void);
+  int64_t GetHigh (void) const;
+  uint64_t GetLow (void) const;
 private:
   static cairo_uint128_t  Umul (cairo_uint128_t a, cairo_uint128_t b);
   static cairo_uint128_t Udiv (cairo_uint128_t a, cairo_uint128_t b);
--- a/src/simulator/high-precision-double.h	Tue Aug 17 21:28:08 2010 -0700
+++ b/src/simulator/high-precision-double.h	Wed Aug 18 13:58:38 2010 -0700
@@ -49,6 +49,9 @@
 
   inline int Compare (HighPrecision const &o) const;
   inline static HighPrecision Zero (void);
+  inline int64_t GetHigh (void) const;
+  inline uint64_t GetLow (void) const;
+
 private:
   double m_value;
 };
@@ -125,6 +128,20 @@
   return HighPrecision (0,0);
 }
 
+int64_t 
+HighPrecision::GetHigh (void) const
+{
+  NS_FATAL_ERROR ("XXX this function unavailable for high-precision-as-double; patch requested");
+  return 0;
+}
+
+uint64_t 
+HighPrecision::GetLow (void) const
+{
+  NS_FATAL_ERROR ("XXX this function unavailable for high-precision-as-double; patch requested");
+  return 0;
+}
+
 } // namespace ns3
 
 #endif /* HIGH_PRECISION_DOUBLE_H  */