1 //===--------------------- Range.h ------------------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #ifndef utility_Range_h_
11 #define utility_Range_h_
15 namespace lldb_utility {
19 typedef uint64_t ValueType;
21 static const ValueType OPEN_END = UINT64_MAX;
23 Range(const Range &rng);
25 Range(ValueType low = 0, ValueType high = OPEN_END);
27 Range &operator=(const Range &rhs);
29 ValueType GetLow() { return m_low; }
31 ValueType GetHigh() { return m_high; }
33 void SetLow(ValueType low) { m_low = low; }
35 void SetHigh(ValueType high) { m_high = high; }
39 void Intersection(const Range &other);
41 void Union(const Range &other);
43 typedef bool (*RangeCallback)(ValueType index);
45 void Iterate(RangeCallback callback);
58 } // namespace lldb_private
60 #endif // #ifndef utility_Range_h_