home *** CD-ROM | disk | FTP | other *** search
- #include "range.h"
-
- #define THIS Range
- #define BASE Object
- DEFINE_CLASS(Range,Object);
-
- //======= Public member functions:
-
- Object* Range::copy() const
- {
- return shallowCopy();
- }
-
- void Range::deepenShallowCopy() {}
-
- unsigned Range::hash() const
- {
- return (first^len);
- }
-
- bool Range::isEqual(const Object& p) const
- // Test two objects for equality
- {
- return p.isSpecies(class_Range) && *this==*(Range*)&p;
- }
-
- void Range::printOn(ostream& strm) const
- {
- strm << first << ":" << len;
- }
-
- const Class* Range::species() const
- // Return a pointer to the descriptor of the species of this class
- {
- return &class_Range;
- }
-