Additional stubs for HighPrecision operators
authorTom Henderson <tomh@tomh.org>
Wed, 18 Aug 2010 15:06:26 -0700
changeset 6583b47b2f59d6a8
parent 6582 44bad54b1f97
child 6584 def4153e27cd
Additional stubs for HighPrecision operators
src/simulator/high-precision-cairo.h
src/simulator/high-precision-double.h
     1.1 --- a/src/simulator/high-precision-cairo.h	Wed Aug 18 13:58:50 2010 -0700
     1.2 +++ b/src/simulator/high-precision-cairo.h	Wed Aug 18 15:06:26 2010 -0700
     1.3 @@ -162,6 +162,17 @@
     1.4  }
     1.5  #undef HPCAIRO_MAX_64
     1.6  
     1.7 +std::ostream &operator << (std::ostream &os, const HighPrecision &hp)
     1.8 +{
     1.9 +  // XXX stubbed out
    1.10 +  return os;
    1.11 +}
    1.12 +std::istream &operator >> (std::istream &is, HighPrecision &hp)
    1.13 +{
    1.14 +  // XXX stubbed out
    1.15 +  return is;
    1.16 +}
    1.17 +
    1.18  } // namespace ns3
    1.19  
    1.20  #endif /* HIGH_PRECISION_CAIRO_H */
     2.1 --- a/src/simulator/high-precision-double.h	Wed Aug 18 13:58:50 2010 -0700
     2.2 +++ b/src/simulator/high-precision-double.h	Wed Aug 18 15:06:26 2010 -0700
     2.3 @@ -21,6 +21,7 @@
     2.4  #define HIGH_PRECISION_DOUBLE_H
     2.5  
     2.6  #include <math.h>
     2.7 +#include "ns3/fatal-error.h"
     2.8  
     2.9  namespace ns3 {
    2.10  
    2.11 @@ -56,6 +57,9 @@
    2.12    double m_value;
    2.13  };
    2.14  
    2.15 +inline std::ostream &operator << (std::ostream &os, const HighPrecision &hp);
    2.16 +inline std::istream &operator >> (std::istream &is, HighPrecision &hp);
    2.17 +
    2.18  } // namespace ns3
    2.19  
    2.20  namespace ns3 {
    2.21 @@ -131,8 +135,7 @@
    2.22  int64_t 
    2.23  HighPrecision::GetHigh (void) const
    2.24  {
    2.25 -  NS_FATAL_ERROR ("XXX this function unavailable for high-precision-as-double; patch requested");
    2.26 -  return 0;
    2.27 +  return GetInteger ();
    2.28  }
    2.29  
    2.30  uint64_t 
    2.31 @@ -142,6 +145,19 @@
    2.32    return 0;
    2.33  }
    2.34  
    2.35 +std::ostream &operator << (std::ostream &os, const HighPrecision &hp)
    2.36 +{
    2.37 +  // XXX stubbed out
    2.38 +  return os;
    2.39 +}
    2.40 +
    2.41 +std::istream &operator >> (std::istream &is, HighPrecision &hp)
    2.42 +{
    2.43 +  // XXX stubbed out
    2.44 +  return is;
    2.45 +}
    2.46 +
    2.47 +
    2.48  } // namespace ns3
    2.49  
    2.50  #endif /* HIGH_PRECISION_DOUBLE_H  */