Bug 848

Summary: TAO_TIO does not correctly report the overlap type "OTContainer"
Product: TAO Reporter: Dave Zumbro <zumbro_d>
Component: Time ServiceAssignee: DOC Center Support List (internal) <tao-support>
Status: ASSIGNED ---    
Severity: normal    
Priority: P3    
Version: 1.1.9   
Hardware: All   
OS: All   

Description Dave Zumbro 2001-04-03 14:06:58 CDT
Time Service, I find that the overlaps() method for TIO (Time Interval
Object) does not correctly report the overlap type "OTContainer". 

I created a scenario like this:

Time_intervals --
fixed_int:        <------------------------------>
first_int:                    <---------->

    UTO_curr = _timeServer->universal_time();
    CosTime::UTO_ptr UTO_end =
      _timeServer->new_universal_time(UTO_curr->time()  + 9999999, inaccuracy,
tdf);
    CosTime::TIO_ptr fixed_int =  UTO_curr->time_to_interval(UTO_end);
 
    // Creating first_int interval
    CosTime::UTO_ptr UTO_start =
       _timeServer->new_universal_time(UTO_curr->time() + 10000,
           inaccuracy, tdf);    
    UTO_end = 
       _timeServer->new_universal_time(UTO_curr->time() + 100000, inaccuracy,
tdf);
    CosTime::TIO_ptr first_int =
      UTO_start->time_to_interval(UTO_end);
    
    printOTtype(first_int->overlaps(fixed_int, dummy));  ==> OTContained
    printOTtype(fixed_int->overlaps(first_int, dummy));  ==> OTContained
(wrong!)
 
void printOTtype(CosTime::OverlapType ltype)
{
  switch (ltype) {
  case CosTime::OTContainer:
    cout << "OTContainer" << endl;
    break;
    
  case CosTime::OTContained:
    cout << "OTContained" << endl;
    break;
    
  case CosTime::OTOverlap:
    cout << "OTOverlap" << endl;
    break;
    
  case CosTime::OTNoOverlap:
    cout << "OTNoOverlap" << endl;
    break;
    
  default:
    break;
    cout << "Indeterministic" << endl;
  }
}
Comment 1 Dave Zumbro 2001-04-03 14:11:42 CDT
It looks as if the TAO_TIO::spans() method also returns an incorrect overlap
type instead of "OTContainer". (A cut and paste error?!?!)
Comment 2 Ossama Othman 2001-04-10 19:15:47 CDT
Reassigned bug to tao-support placeholder.
Comment 3 Irfan Pyarali 2001-04-26 12:12:57 CDT
Accepted on behalf of tao-support.