Provide stubbed HighPrecision GetHigh(), GetLow() implementations to fix builds across platforms

This commit is contained in:
Tom Henderson
2010-08-18 13:58:38 -07:00
parent 7f97723ba8
commit 2cc222c320
3 changed files with 33 additions and 0 deletions

View File

@@ -155,6 +155,20 @@ HighPrecision::Invert (uint64_t v)
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;

View File

@@ -60,6 +60,8 @@ public:
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);

View File

@@ -49,6 +49,9 @@ public:
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 @@ HighPrecision::Zero (void)
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 */