60 #ifndef VMAInterval_hpp 61 #define VMAInterval_hpp 143 {
return beg >=
end; }
183 dump(std::ostream& os)
const;
186 slurp(std::istream& is);
209 return ((x.
beg() < y.
beg()) ||
234 return ( !(x == y) );
246 :
public std::set<VMAInterval>
251 typedef std::set<key_type>
My_t;
286 std::pair<iterator, bool>
288 {
return insert(value_type(beg, end)); }
290 std::pair<iterator, bool>
291 insert(
const value_type& x);
297 {
return erase(value_type(beg, end)); }
300 erase(
const key_type& x);
324 dump(std::ostream& os)
const;
327 slurp(std::istream& is);
360 if (x.size() == 0 && y.size() >= 1) {
363 else if (x.size() >= 1 && y.size() >= 1) {
366 return (xfirst < yfirst);
392 template <
typename T>
394 :
public std::map<VMAInterval, T>
400 typedef std::map<key_type, T>
My_t;
441 reverse_iterator lb_r(this->lower_bound(toFind));
442 if (lb_r.base() == this->
end() && !this->
empty()) {
443 lb_r = this->rbegin();
445 else if (!this->
empty()) {
450 for ( ; lb_r != this->rend(); ++lb_r) {
453 return --(lb_r.base());
455 else if (vmaint < toFind) {
476 std::ostringstream os;
484 for (const_iterator it = this->begin(); it != this->
end(); ++it) {
485 os << it->first.toString() <<
" --> " << it->second << std::endl;
493 return dump(std::cerr);
VMAInterval(VMA beg, VMA end)
My_t::size_type size_type
My_t::reverse_iterator reverse_iterator
bool overlaps(VMAInterval x) const
std::ostream & dump(std::ostream &os) const
VMAIntervalMap & operator=(const VMAIntervalMap &x)
My_t::const_iterator const_iterator
VMAInterval(const VMAInterval &x)
int find(char s1[], char s2[])
void fromString(std::string &formattedstr)
My_t::allocator_type allocator_type
bool operator==(const VMAInterval &x, const VMAInterval &y)
VMAInterval & operator=(const VMAInterval &x)
My_t::reference reference
VMAInterval(const char *formattedstr)
My_t::const_reverse_iterator const_reverse_iterator
bool operator!=(const VMAInterval &x, const VMAInterval &y)
My_t::size_type size_type
void erase(const VMA beg, const VMA end)
My_t::key_compare key_compare
virtual ~VMAIntervalSet()
My_t::key_compare key_compare
void(* T)(int code, va_list_box *box, int put(int c, void *cl), void *cl, unsigned char flags[256], int width, int precision)
std::ostream & dump(std::ostream &os) const
VMAIntervalSet(const char *formattedstr)
std::istream & slurp(std::istream &is)
bool contains(VMAInterval x) const
My_t::const_reference const_reference
VMAIntervalSet & operator=(const VMAIntervalSet &GCC_ATTR_UNUSED x)
std::string toString() const
std::pair< iterator, bool > insert(const VMA beg, const VMA end)
My_t::const_iterator const_iterator
std::pair< const key_type, T > value_type
std::map< key_type, T > My_t
std::string toString() const
void fromString(const char *formattedstr)
iterator find(const key_type &toFind)
std::set< key_type > My_t
My_t::reference reference
My_t::const_reference const_reference
bool operator<(const VMAInterval &x, const VMAInterval &y)
std::ostream & ddump() const
static bool empty(VMA beg, VMA end)
void fromString(std::string &formattedstr)
My_t::allocator_type allocator_type
virtual ~VMAIntervalMap()
const_iterator find(const key_type &x) const