#include <MRAcrange.h>
Collaboration diagram for MRAcrange:

|
|
Definition at line 181 of file MRAcrange.h. References _state, cmax, and cmin.
|
|
|
Definition at line 189 of file MRAcrange.h.
00189 {}
|
|
||||||||||||
|
Definition at line 192 of file MRAcrange.h. References _state, cmax, cmin, and goodbit.
|
|
|
Definition at line 200 of file MRAcrange.h. References _state, cmax, cmin, and goodbit.
|
|
|
Definition at line 291 of file MRAcrange.h. References _state, and goodbit. Referenced by operator()(), and set_empty().
|
|
|
Definition at line 297 of file MRAcrange.h. References _state. Referenced by Difference(), Difference(), Intersection(), Intersection(), Union(), and Union().
00297 { _state &= ~s; }
|
|
|
Definition at line 208 of file MRAcrange.h. References _state, cmax, and cmin. Referenced by operator=().
|
|
|
Definition at line 190 of file MRAcrange.cpp. References clrstate(), cmax, cmin, disjoint, failbit, fragbit, good(), goodbit, interior, is_empty(), is_null(), set_empty(), and setstate(). Referenced by operator-=().
00191 {
00192 if ( !good() || !rhs.good() || is_null() || !rhs ) {
00193 clrstate(MRAcrange::goodbit);
00194 setstate(MRAcrange::failbit);
00195 } else if ( is_empty() ) {
00196 return *this;
00197 } else if ( rhs.is_empty() ) {
00198 *this = rhs;
00199 } else if ( disjoint( *this, rhs ) ) {
00200 return *this;;
00201 } else if ( *this == rhs ) {
00202 set_empty();
00203 } else if ( *this < rhs ) {
00204 set_empty();
00205 } else if ( interior( *this, rhs) ) {
00206 clrstate(MRAcrange::goodbit);
00207 setstate(MRAcrange::failbit);
00208 setstate(MRAcrange::fragbit);
00209 } else {
00210 if ( interior( rhs, *this ) ) {
00211 clrstate(MRAcrange::goodbit);
00212 setstate(MRAcrange::failbit);
00213 setstate(MRAcrange::fragbit);
00214 } else {
00215 if ( int(rhs.cmin) > int(cmin) ) cmax = rhs.cmin - 1;
00216 if ( int(rhs.cmax) < int(cmax) ) cmin = rhs.cmax + 1;
00217 }
00218 }
00219 return *this;
00220 }
|
|
|
Definition at line 306 of file MRAcrange.h. References failbit, and rdstate(). Referenced by report().
00306 { return rdstate(failbit) != 0; }
|
|
|
Definition at line 309 of file MRAcrange.h. References fragbit, and rdstate(). Referenced by report().
00309 { return rdstate(fragbit) != 0; }
|
|
|
Definition at line 303 of file MRAcrange.h. References _state, and goodbit. Referenced by connected(), contains(), Difference(), Difference(), disjoint(), interior(), Intersection(), Intersection(), is_empty(), report(), Union(), and Union().
|
|
|
Definition at line 172 of file MRAcrange.cpp. References clrstate(), cmax, cmin, disjoint, failbit, good(), goodbit, is_empty(), is_null(), set_empty(), and setstate(). Referenced by operator *=().
00173 {
00174 if ( !good() || !rhs.good() || is_null() || !rhs ) {
00175 clrstate(MRAcrange::goodbit);
00176 setstate(MRAcrange::failbit);
00177 } else if ( is_empty() ) {
00178 return *this;
00179 } else if ( rhs.is_empty() ) {
00180 *this = rhs;
00181 } else if ( disjoint( *this, rhs ) ) {
00182 set_empty();
00183 } else {
00184 if ( int(rhs.cmin) > int(cmin) ) cmin = rhs.cmin;
00185 if ( int(rhs.cmax) < int(cmax) ) cmax = rhs.cmax;
00186 }
00187 return *this;
00188 }
|
|
|
Definition at line 282 of file MRAcrange.h. References cmax, cmin, and good(). Referenced by connected(), contains(), Difference(), Difference(), disjoint(), interior(), Intersection(), Intersection(), Union(), and Union().
|
|
|
Definition at line 257 of file MRAcrange.h. References _state. Referenced by Difference(), Intersection(), operator!(), set_empty(), and Union().
00258 {
00259 if ( _state == 0 ) return true;
00260 return false;
00261 }
|
|
|
Definition at line 318 of file MRAcrange.h. References Intersection().
00319 {
00320 return Intersection(rhs);
00321 }
|
|
|
Definition at line 264 of file MRAcrange.h. References is_null().
00265 {
00266 return is_null();
00267 }
|
|
||||||||||||
|
Definition at line 238 of file MRAcrange.h. References clear(), cmax, and cmin.
|
|
|
Definition at line 229 of file MRAcrange.h. References _state, cmax, and cmin.
00230 {
00231 _state = 0;
00232 cmin = MRAclevel::cmax_limit;
00233 cmax = MRAclevel::cmin_limit;
00234 return *this;
00235 }
|
|
|
Definition at line 220 of file MRAcrange.h. References _state, cmax, and cmin.
|
|
|
Definition at line 312 of file MRAcrange.h. References Union().
00313 {
00314 return Union(rhs);
00315 }
|
|
|
Definition at line 324 of file MRAcrange.h. References Difference().
00325 {
00326 return Difference(rhs);
00327 }
|
|
|
Definition at line 352 of file MRAcrange.h. References write().
00353 {
00354 write(buffer);
00355 return *this;
00356 }
|
|
|
Definition at line 217 of file MRAcrange.h. References copy().
00217 { return copy(rhs); }
|
|
|
Definition at line 366 of file MRAcrange.h. References read().
00367 {
00368 read(buffer);
00369 return *this;
00370 }
|
|
|
Definition at line 300 of file MRAcrange.h. References _state. Referenced by fail(), and frag().
00300 { return (_state & s); }
|
|
|
Definition at line 381 of file MRAcrange.h.
|
|
|
Definition at line 359 of file MRAcrange.h. Referenced by operator<<(), and operator>>().
|
|
|
Definition at line 333 of file MRAcrange.h. References _state, cmax, cmin, fail(), frag(), and good(). Referenced by MRAcspec.report().
00333 {
00334 os << "MRAcrange::report(){\n";
00335 os << "state = " << _state << " = 0b0000"<<frag()<<'*'<<fail()<<good()<< '\n';
00336 os << "cmin = " << int(cmin)
00337 << " cmax = " << int(cmax);
00338 if ( int(cmin) > int(cmax) ) cout << " ==> is_empty\n";
00339 else cout << "\n";
00340 os << "}\n";
00341 }
|
|
|
Definition at line 270 of file MRAcrange.h. References clear(), cmax, cmin, failbit, is_null(), and setstate(). Referenced by Difference(), Difference(), Intersection(), Intersection(), MRAsbObject.MRAsbObject(), MRAsbObject.operator()(), and MRAsbObject.set_empty().
00271 {
00272 if ( !is_null() ) {
00273 clear();
00274 cmin = MRAclevel::cmax_limit;
00275 cmax = MRAclevel::cmin_limit;
00276 } else {
00277 setstate(failbit);
00278 }
00279 }
|
|
|
Definition at line 249 of file MRAcrange.h. References _state, cmax, and cmin.
00250 {
00251 _state = 0;
00252 cmin = MRAclevel::cmax_limit;
00253 cmax = MRAclevel::cmin_limit; // implies is_empty
00254 }
|
|
|
Definition at line 294 of file MRAcrange.h. References _state. Referenced by Difference(), Difference(), Intersection(), Intersection(), set_empty(), Union(), and Union().
00294 { _state |= s; }
|
|
|
Definition at line 330 of file MRAcrange.h. References cmax, cmin, and MRAclevel.sizeb(). Referenced by MRAcspec.sizeb().
|
|
|
Definition at line 152 of file MRAcrange.cpp. References clrstate(), cmax, cmin, connected, failbit, fragbit, good(), goodbit, is_empty(), is_null(), and setstate(). Referenced by operator+=().
00153 {
00154 if ( !good() || !rhs.good() || is_null() || !rhs ) {
00155 clrstate(MRAcrange::goodbit);
00156 setstate(MRAcrange::failbit);
00157 } else if ( rhs.is_empty() ) {
00158 return *this;
00159 } else if ( is_empty() ) {
00160 *this = rhs;
00161 } else if ( !connected( *this, rhs ) ) {
00162 clrstate(MRAcrange::goodbit);
00163 setstate(MRAcrange::failbit);
00164 setstate(MRAcrange::fragbit);
00165 } else {
00166 if ( int(rhs.cmin) < int(cmin) ) cmin = rhs.cmin;
00167 if ( int(rhs.cmax) > int(cmin) ) cmax = rhs.cmax;
00168 }
00169 return *this;
00170 }
|
|
|
Definition at line 373 of file MRAcrange.h. References _state, cmax, cmin, and goodbit.
|
|
|
Definition at line 344 of file MRAcrange.h. References _state, cmax, cmin, and goodbit. Referenced by operator<<(), and operator>>().
|
|
||||||||||||
|
Definition at line 51 of file MRAcrange.cpp. Referenced by Union().
00052 {
00053 if ( !lhs.good() || !rhs.good() || !lhs || !rhs ) return false;
00054 if ( lhs.is_empty() || rhs.is_empty() ) return false;
00055 if ( lhs <= rhs || lhs >= rhs ) return true;
00056 if ( int(lhs.cmin) <= int(rhs.cmin) && int(lhs.cmax) >= int(rhs.cmin) - 1 )
00057 return true;
00058 if ( int(lhs.cmax) >= int(rhs.cmax) && int(lhs.cmin) <= int(rhs.cmax) + 1 )
00059 return true;
00060 return false;
00061 }
|
|
||||||||||||
|
Definition at line 29 of file MRAcrange.cpp.
|
|
||||||||||||
|
Definition at line 115 of file MRAcrange.cpp.
00116 {
00117 MRAcrange crange;
00118 if ( !lhs.good() || !rhs.good() || !lhs || !rhs ) {
00119 crange.clrstate(MRAcrange::goodbit);
00120 crange.setstate(MRAcrange::failbit);
00121 } else if ( lhs.is_empty() ) {
00122 crange = lhs;
00123 } else if ( rhs.is_empty() ) {
00124 crange = rhs;
00125 } else if ( disjoint( lhs, rhs ) ) {
00126 crange = lhs;
00127 } else if ( lhs == rhs ) {
00128 crange.set_empty();
00129 } else if ( lhs < rhs ) {
00130 crange.set_empty();
00131 } else if ( interior( lhs, rhs) ) {
00132 crange.clrstate(MRAcrange::goodbit);
00133 crange.setstate(MRAcrange::failbit);
00134 crange.setstate(MRAcrange::fragbit);
00135 } else {
00136 if ( interior( rhs, lhs ) ) {
00137 crange = lhs;
00138 crange.clrstate(MRAcrange::goodbit);
00139 crange.setstate(MRAcrange::failbit);
00140 crange.setstate(MRAcrange::fragbit);
00141 } else {
00142 crange = lhs;
00143 if ( int(rhs.cmin) > int(lhs.cmin) ) crange.cmax = rhs.cmin - 1;
00144 if ( int(rhs.cmax) < int(lhs.cmax) ) crange.cmin = rhs.cmax + 1;
00145 }
00146 }
00147 return crange;
00148 }
|
|
||||||||||||
|
Definition at line 39 of file MRAcrange.cpp. Referenced by Difference(), and Intersection().
00040 {
00041 if ( !lhs.good() || !rhs.good() || !lhs || !rhs ) return false;
00042 if ( lhs.is_empty() || rhs.is_empty() ) return false;
00043 if ( lhs <= rhs || lhs >= rhs ) return false;
00044 if ( int(lhs.cmin) < int(rhs.cmin) && int(lhs.cmax) < int(rhs.cmin) )
00045 return true;
00046 if ( int(lhs.cmin) > int(rhs.cmax) && int(lhs.cmax) > int(rhs.cmax) )
00047 return true;
00048 return false;
00049 }
|
|
||||||||||||
|
Definition at line 21 of file MRAcrange.cpp.
|
|
||||||||||||
|
Definition at line 63 of file MRAcrange.cpp. Referenced by Difference().
00064 {
00065 if ( !lhs.good() || !rhs.good() || !lhs || !rhs ) return false;
00066 if ( lhs.is_empty() || rhs.is_empty() ) return false;
00067 if ( lhs >= rhs || disjoint( lhs, rhs ) ) return false;
00068 if ( int(lhs.cmin) <= int(rhs.cmin) || int(lhs.cmax) >= int(rhs.cmax) )
00069 return false;
00070 return true;
00071 }
|
|
||||||||||||
|
Definition at line 95 of file MRAcrange.cpp.
00096 {
00097 MRAcrange crange;
00098 if ( !lhs.good() || !rhs.good() || !lhs || !rhs ) {
00099 crange.clrstate(MRAcrange::goodbit);
00100 crange.setstate(MRAcrange::failbit);
00101 } else if ( lhs.is_empty() ) {
00102 crange = lhs;
00103 } else if ( rhs.is_empty() ) {
00104 crange = rhs;
00105 } else if ( disjoint( lhs, rhs ) ) {
00106 crange.set_empty();
00107 } else {
00108 crange = lhs;
00109 if ( int(rhs.cmin) > int(crange.cmin) ) crange.cmin = rhs.cmin;
00110 if ( int(rhs.cmax) < int(crange.cmax) ) crange.cmax = rhs.cmax;
00111 }
00112 return crange;
00113 }
|
|
||||||||||||
|
Definition at line 165 of file MRAcrange.h.
00166 {
00167 return Intersection( lhs, rhs );
00168 }
|
|
||||||||||||
|
Definition at line 117 of file MRAcrange.h.
00118 {
00119 return !equal( rhs, lhs );
00120 }
|
|
||||||||||||
|
Definition at line 157 of file MRAcrange.h.
00158 {
00159 return Union( lhs, rhs );
00160 }
|
|
||||||||||||
|
Definition at line 173 of file MRAcrange.h.
00174 {
00175 return Difference( lhs, rhs );
00176 }
|
|
||||||||||||
|
Definition at line 125 of file MRAcrange.h.
00126 {
00127 return contains( rhs, lhs ) && lhs != rhs;
00128 }
|
|
||||||||||||
|
Definition at line 411 of file MRAcrange.h.
00412 {
00413 crange.read(os);
00414 return os;
00415 }
|
|
||||||||||||
|
Definition at line 397 of file MRAcrange.h.
00398 {
00399 crange.read(buffer);
00400 return buffer;
00401 }
|
|
||||||||||||
|
Definition at line 137 of file MRAcrange.h.
00138 {
00139 return contains( rhs, lhs );
00140 }
|
|
||||||||||||
|
Definition at line 111 of file MRAcrange.h.
00112 {
00113 return equal( rhs, lhs );
00114 }
|
|
||||||||||||
|
Definition at line 131 of file MRAcrange.h.
00132 {
00133 return contains( lhs, rhs ) && lhs != rhs;
00134 }
|
|
||||||||||||
|
Definition at line 143 of file MRAcrange.h.
00144 {
00145 return contains( lhs, rhs );
00146 }
|
|
||||||||||||
|
Definition at line 404 of file MRAcrange.h.
00405 {
00406 crange.write(is);
00407 return is;
00408 }
|
|
||||||||||||
|
Definition at line 390 of file MRAcrange.h.
00391 {
00392 crange.write(buffer);
00393 return buffer;
00394 }
|
|
||||||||||||
|
Definition at line 73 of file MRAcrange.cpp.
00074 {
00075 MRAcrange crange;
00076 if ( !lhs.good() || !rhs.good() || !lhs || !rhs ) {
00077 crange.clrstate(MRAcrange::goodbit);
00078 crange.setstate(MRAcrange::failbit);
00079 } else if ( rhs.is_empty() ) {
00080 crange = lhs;
00081 } else if ( lhs.is_empty() ) {
00082 crange = rhs;
00083 } else if ( !connected( lhs, rhs ) ) {
00084 crange.clrstate(MRAcrange::goodbit);
00085 crange.setstate(MRAcrange::failbit);
00086 crange.setstate(MRAcrange::fragbit);
00087 } else {
00088 crange = lhs;
00089 if ( int(rhs.cmin) < int(crange.cmin) ) crange.cmin = rhs.cmin;
00090 if ( int(rhs.cmax) > int(crange.cmin) ) crange.cmax = rhs.cmax;
00091 }
00092 return crange;
00093 }
|
|
|
Definition at line 79 of file MRAcrange.h. Referenced by clear(), clrstate(), copy(), equal(), good(), is_null(), MRAcrange(), operator()(), rdstate(), report(), set_null(), setstate(), and write(). |
|
|
Definition at line 28 of file MRAcrange.h. Referenced by connected(), contains(), copy(), MRAsbObject.cpart(), Difference(), Difference(), disjoint(), equal(), interior(), Intersection(), Intersection(), is_empty(), MRAcspec.is_equal(), MRAcrange(), operator()(), read(), report(), MRAsbBase.set_cspec(), MCFTPrequest.set_cspec(), MCFTPquote.set_cspec(), set_empty(), set_null(), sizeb(), Union(), Union(), and write(). |
|
|
Definition at line 28 of file MRAcrange.h. Referenced by connected(), contains(), copy(), Difference(), Difference(), disjoint(), equal(), interior(), Intersection(), Intersection(), is_empty(), MRAcspec.is_equal(), MRAcrange(), operator()(), read(), report(), MRAsbBase.set_cspec(), MCFTPrequest.set_cspec(), MCFTPquote.set_cspec(), set_empty(), set_null(), sizeb(), Union(), Union(), and write(). |
|
|
Definition at line 25 of file MRAcrange.h. Referenced by Difference(), fail(), Intersection(), set_empty(), and Union(). |
|
|
Definition at line 26 of file MRAcrange.h. Referenced by Difference(), frag(), and Union(). |
|
|
Definition at line 24 of file MRAcrange.h. Referenced by clear(), Difference(), good(), Intersection(), MRAcrange(), Union(), and write(). |
1.3.6