Totally rework the Range class. Now the range is from [start, end)
authorNathan Binkert <binkertn@umich.edu>
Sat, 7 Feb 2004 06:16:50 +0000 (01:16 -0500)
committerNathan Binkert <binkertn@umich.edu>
Sat, 7 Feb 2004 06:16:50 +0000 (01:16 -0500)
commitde285ff2a0c49fdf61dba7c4fcc6b3804e045e56
tree1833b004064f005d92ad195208a1eead0d0dbde5
parent6d6c91f756a84fdf06da823b79a8e9b27e2c4a7f
Totally rework the Range class.  Now the range is from [start, end)
to be consistent with the way that the stl works.  It also makes
lots of other stuff easier.  (Maybe those guys were smart?)
Overload the various comparison operators so that you can test
for overlapping of ranges, etc.

base/range.hh:
    Totally rework the Range class.  Now the range is from [start, end)
    to be consistent with the way that the stl works.  It also makes
    lots of other stuff easier.  (Maybe those guys were smart?)
    Overload the various comparison operators so that you can test
    for overlapping of ranges, etc.

    make parse function private and offer operator= instead
    isValid -> valid
    and for you erik, I add comments
test/Makefile:
    add range.o
test/rangetest.cc:
    better tests

--HG--
extra : convert_revision : dd58720aa3d02f20b03e933f2eaa3320c82bb27a
base/range.cc [new file with mode: 0644]
base/range.hh
test/Makefile
test/rangetest.cc