MEDCouplingTimeDiscretization *ret=MEDCouplingTimeDiscretization::New(type);
ret->setTimeUnit(getTimeUnit());
const DataArrayDouble *arrSrc=getArray();
- DataArrayDouble *arr=0;
+ MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> arr;
if(arrSrc)
arr=arrSrc->performCpy(deepCpy);
- else
- arr=0;
ret->setArray(arr,0);
- arr->decrRef();
return ret;
}
const MEDCouplingNoTimeLabel *otherC=dynamic_cast<const MEDCouplingNoTimeLabel *>(other);
if(!otherC)
throw INTERP_KERNEL::Exception("NoTimeLabel::aggregation on mismatched time discretization !");
- DataArrayDouble *arr=DataArrayDouble::Aggregate(getArray(),other->getArray());
+ MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> arr=DataArrayDouble::Aggregate(getArray(),other->getArray());
MEDCouplingNoTimeLabel *ret=new MEDCouplingNoTimeLabel;
ret->setArray(arr,0);
- arr->decrRef();
return ret;
}
throw INTERP_KERNEL::Exception("NoTimeLabel::aggregate on mismatched time discretization !");
a[i]=itC->getArray();
}
- DataArrayDouble *arr=DataArrayDouble::Aggregate(a);
+ MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> arr=DataArrayDouble::Aggregate(a);
MEDCouplingNoTimeLabel *ret=new MEDCouplingNoTimeLabel;
ret->setArray(arr,0);
- arr->decrRef();
return ret;
}
const MEDCouplingNoTimeLabel *otherC=dynamic_cast<const MEDCouplingNoTimeLabel *>(other);
if(!otherC)
throw INTERP_KERNEL::Exception("NoTimeLabel::meld on mismatched time discretization !");
- DataArrayDouble *arr=DataArrayDouble::Meld(getArray(),other->getArray());
+ MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> arr=DataArrayDouble::Meld(getArray(),other->getArray());
MEDCouplingNoTimeLabel *ret=new MEDCouplingNoTimeLabel;
ret->setTimeTolerance(getTimeTolerance());
ret->setArray(arr,0);
- arr->decrRef();
return ret;
}
const MEDCouplingNoTimeLabel *otherC=dynamic_cast<const MEDCouplingNoTimeLabel *>(other);
if(!otherC)
throw INTERP_KERNEL::Exception("NoTimeLabel::dot on mismatched time discretization !");
- DataArrayDouble *arr=DataArrayDouble::Dot(getArray(),other->getArray());
+ MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> arr=DataArrayDouble::Dot(getArray(),other->getArray());
MEDCouplingNoTimeLabel *ret=new MEDCouplingNoTimeLabel;
ret->setArray(arr,0);
- arr->decrRef();
return ret;
}
const MEDCouplingNoTimeLabel *otherC=dynamic_cast<const MEDCouplingNoTimeLabel *>(other);
if(!otherC)
throw INTERP_KERNEL::Exception("NoTimeLabel::crossProduct on mismatched time discretization !");
- DataArrayDouble *arr=DataArrayDouble::CrossProduct(getArray(),other->getArray());
+ MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> arr=DataArrayDouble::CrossProduct(getArray(),other->getArray());
MEDCouplingNoTimeLabel *ret=new MEDCouplingNoTimeLabel;
ret->setArray(arr,0);
- arr->decrRef();
return ret;
}
const MEDCouplingNoTimeLabel *otherC=dynamic_cast<const MEDCouplingNoTimeLabel *>(other);
if(!otherC)
throw INTERP_KERNEL::Exception("NoTimeLabel::max on mismatched time discretization !");
- DataArrayDouble *arr=DataArrayDouble::Max(getArray(),other->getArray());
+ MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> arr=DataArrayDouble::Max(getArray(),other->getArray());
MEDCouplingNoTimeLabel *ret=new MEDCouplingNoTimeLabel;
ret->setArray(arr,0);
- arr->decrRef();
return ret;
}
const MEDCouplingNoTimeLabel *otherC=dynamic_cast<const MEDCouplingNoTimeLabel *>(other);
if(!otherC)
throw INTERP_KERNEL::Exception("NoTimeLabel::max on mismatched time discretization !");
- DataArrayDouble *arr=DataArrayDouble::Min(getArray(),other->getArray());
+ MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> arr=DataArrayDouble::Min(getArray(),other->getArray());
MEDCouplingNoTimeLabel *ret=new MEDCouplingNoTimeLabel;
ret->setArray(arr,0);
- arr->decrRef();
return ret;
}
const MEDCouplingNoTimeLabel *otherC=dynamic_cast<const MEDCouplingNoTimeLabel *>(other);
if(!otherC)
throw INTERP_KERNEL::Exception("NoTimeLabel::add on mismatched time discretization !");
- DataArrayDouble *arr=DataArrayDouble::Add(getArray(),other->getArray());
+ MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> arr=DataArrayDouble::Add(getArray(),other->getArray());
MEDCouplingNoTimeLabel *ret=new MEDCouplingNoTimeLabel;
ret->setArray(arr,0);
- arr->decrRef();
return ret;
}
const MEDCouplingNoTimeLabel *otherC=dynamic_cast<const MEDCouplingNoTimeLabel *>(other);
if(!otherC)
throw INTERP_KERNEL::Exception("NoTimeLabel::addEqual on mismatched time discretization !");
+ if(!getArray())
+ throw INTERP_KERNEL::Exception("MEDCouplingNoTimeLabel::addEqual : Data Array is NULL !");
getArray()->addEqual(other->getArray());
}
const MEDCouplingNoTimeLabel *otherC=dynamic_cast<const MEDCouplingNoTimeLabel *>(other);
if(!otherC)
throw INTERP_KERNEL::Exception("NoTimeLabel::substract on mismatched time discretization !");
- DataArrayDouble *arr=DataArrayDouble::Substract(getArray(),other->getArray());
+ if(!getArray())
+ throw INTERP_KERNEL::Exception("MEDCouplingNoTimeLabel::substract : Data Array is NULL !");
+ MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> arr=DataArrayDouble::Substract(getArray(),other->getArray());
MEDCouplingNoTimeLabel *ret=new MEDCouplingNoTimeLabel;
ret->setArray(arr,0);
- arr->decrRef();
return ret;
}
const MEDCouplingNoTimeLabel *otherC=dynamic_cast<const MEDCouplingNoTimeLabel *>(other);
if(!otherC)
throw INTERP_KERNEL::Exception("NoTimeLabel::substractEqual on mismatched time discretization !");
+ if(!getArray())
+ throw INTERP_KERNEL::Exception("MEDCouplingNoTimeLabel::substractEqual : Data Array is NULL !");
getArray()->substractEqual(other->getArray());
}
const MEDCouplingNoTimeLabel *otherC=dynamic_cast<const MEDCouplingNoTimeLabel *>(other);
if(!otherC)
throw INTERP_KERNEL::Exception("NoTimeLabel::multiply on mismatched time discretization !");
- DataArrayDouble *arr=DataArrayDouble::Multiply(getArray(),other->getArray());
+ MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> arr=DataArrayDouble::Multiply(getArray(),other->getArray());
MEDCouplingNoTimeLabel *ret=new MEDCouplingNoTimeLabel;
ret->setArray(arr,0);
- arr->decrRef();
return ret;
}
const MEDCouplingNoTimeLabel *otherC=dynamic_cast<const MEDCouplingNoTimeLabel *>(other);
if(!otherC)
throw INTERP_KERNEL::Exception("NoTimeLabel::multiplyEqual on mismatched time discretization !");
+ if(!getArray())
+ throw INTERP_KERNEL::Exception("MEDCouplingNoTimeLabel::multiplyEqual : Data Array is NULL !");
getArray()->multiplyEqual(other->getArray());
}
const MEDCouplingNoTimeLabel *otherC=dynamic_cast<const MEDCouplingNoTimeLabel *>(other);
if(!otherC)
throw INTERP_KERNEL::Exception("divide on mismatched time discretization !");
- DataArrayDouble *arr=DataArrayDouble::Divide(getArray(),other->getArray());
+ MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> arr=DataArrayDouble::Divide(getArray(),other->getArray());
MEDCouplingNoTimeLabel *ret=new MEDCouplingNoTimeLabel;
ret->setArray(arr,0);
- arr->decrRef();
return ret;
}
const MEDCouplingNoTimeLabel *otherC=dynamic_cast<const MEDCouplingNoTimeLabel *>(other);
if(!otherC)
throw INTERP_KERNEL::Exception("NoTimeLabel::divideEqual on mismatched time discretization !");
+ if(!getArray())
+ throw INTERP_KERNEL::Exception("MEDCouplingNoTimeLabel::divideEqual : Data Array is NULL !");
getArray()->divideEqual(other->getArray());
}
const MEDCouplingWithTimeStep *otherC=dynamic_cast<const MEDCouplingWithTimeStep *>(other);
if(!otherC)
throw INTERP_KERNEL::Exception("WithTimeStep::aggregation on mismatched time discretization !");
- DataArrayDouble *arr=DataArrayDouble::Aggregate(getArray(),other->getArray());
+ MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> arr=DataArrayDouble::Aggregate(getArray(),other->getArray());
MEDCouplingWithTimeStep *ret=new MEDCouplingWithTimeStep;
ret->setArray(arr,0);
- arr->decrRef();
return ret;
}
throw INTERP_KERNEL::Exception("WithTimeStep::aggregate on mismatched time discretization !");
a[i]=itC->getArray();
}
- DataArrayDouble *arr=DataArrayDouble::Aggregate(a);
+ MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> arr=DataArrayDouble::Aggregate(a);
MEDCouplingWithTimeStep *ret=new MEDCouplingWithTimeStep;
ret->setArray(arr,0);
- arr->decrRef();
return ret;
}
const MEDCouplingWithTimeStep *otherC=dynamic_cast<const MEDCouplingWithTimeStep *>(other);
if(!otherC)
throw INTERP_KERNEL::Exception("WithTimeStep::meld on mismatched time discretization !");
- DataArrayDouble *arr=DataArrayDouble::Meld(getArray(),other->getArray());
+ MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> arr=DataArrayDouble::Meld(getArray(),other->getArray());
MEDCouplingWithTimeStep *ret=new MEDCouplingWithTimeStep;
ret->setArray(arr,0);
- arr->decrRef();
return ret;
}
if(!otherC)
throw INTERP_KERNEL::Exception("WithTimeStep::dot on mismatched time discretization !");
MEDCouplingWithTimeStep *ret=new MEDCouplingWithTimeStep;
- DataArrayDouble *arr=DataArrayDouble::Dot(getArray(),other->getArray());
+ MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> arr=DataArrayDouble::Dot(getArray(),other->getArray());
ret->setArray(arr,0);
- arr->decrRef();
return ret;
}
const MEDCouplingWithTimeStep *otherC=dynamic_cast<const MEDCouplingWithTimeStep *>(other);
if(!otherC)
throw INTERP_KERNEL::Exception("WithTimeStep::crossProduct on mismatched time discretization !");
- DataArrayDouble *arr=DataArrayDouble::CrossProduct(getArray(),other->getArray());
+ MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> arr=DataArrayDouble::CrossProduct(getArray(),other->getArray());
MEDCouplingWithTimeStep *ret=new MEDCouplingWithTimeStep;
ret->setArray(arr,0);
- arr->decrRef();
return ret;
}
const MEDCouplingWithTimeStep *otherC=dynamic_cast<const MEDCouplingWithTimeStep *>(other);
if(!otherC)
throw INTERP_KERNEL::Exception("WithTimeStep::max on mismatched time discretization !");
- DataArrayDouble *arr=DataArrayDouble::Max(getArray(),other->getArray());
+ MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> arr=DataArrayDouble::Max(getArray(),other->getArray());
MEDCouplingWithTimeStep *ret=new MEDCouplingWithTimeStep;
ret->setArray(arr,0);
- arr->decrRef();
return ret;
}
const MEDCouplingWithTimeStep *otherC=dynamic_cast<const MEDCouplingWithTimeStep *>(other);
if(!otherC)
throw INTERP_KERNEL::Exception("WithTimeStep::min on mismatched time discretization !");
- DataArrayDouble *arr=DataArrayDouble::Min(getArray(),other->getArray());
+ MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> arr=DataArrayDouble::Min(getArray(),other->getArray());
MEDCouplingWithTimeStep *ret=new MEDCouplingWithTimeStep;
ret->setArray(arr,0);
- arr->decrRef();
return ret;
}
const MEDCouplingWithTimeStep *otherC=dynamic_cast<const MEDCouplingWithTimeStep *>(other);
if(!otherC)
throw INTERP_KERNEL::Exception("WithTimeStep::add on mismatched time discretization !");
- DataArrayDouble *arr=DataArrayDouble::Add(getArray(),other->getArray());
+ MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> arr=DataArrayDouble::Add(getArray(),other->getArray());
MEDCouplingWithTimeStep *ret=new MEDCouplingWithTimeStep;
ret->setArray(arr,0);
- arr->decrRef();
int tmp1,tmp2;
double tmp3=getStartTime(tmp1,tmp2);
ret->setStartTime(tmp3,tmp1,tmp2);
const MEDCouplingWithTimeStep *otherC=dynamic_cast<const MEDCouplingWithTimeStep *>(other);
if(!otherC)
throw INTERP_KERNEL::Exception("WithTimeStep::addEqual on mismatched time discretization !");
+ if(!getArray())
+ throw INTERP_KERNEL::Exception("MEDCouplingWithTimeLabel::addEqual : Data Array is NULL !");
getArray()->addEqual(other->getArray());
}
const MEDCouplingWithTimeStep *otherC=dynamic_cast<const MEDCouplingWithTimeStep *>(other);
if(!otherC)
throw INTERP_KERNEL::Exception("WithTimeStep::substract on mismatched time discretization !");
- DataArrayDouble *arr=DataArrayDouble::Substract(getArray(),other->getArray());
+ MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> arr=DataArrayDouble::Substract(getArray(),other->getArray());
MEDCouplingWithTimeStep *ret=new MEDCouplingWithTimeStep;
ret->setArray(arr,0);
- arr->decrRef();
int tmp1,tmp2;
double tmp3=getStartTime(tmp1,tmp2);
ret->setStartTime(tmp3,tmp1,tmp2);
const MEDCouplingWithTimeStep *otherC=dynamic_cast<const MEDCouplingWithTimeStep *>(other);
if(!otherC)
throw INTERP_KERNEL::Exception("WithTimeStep::substractEqual on mismatched time discretization !");
+ if(!getArray())
+ throw INTERP_KERNEL::Exception("MEDCouplingWithTimeLabel::substractEqual : Data Array is NULL !");
getArray()->substractEqual(other->getArray());
}
const MEDCouplingWithTimeStep *otherC=dynamic_cast<const MEDCouplingWithTimeStep *>(other);
if(!otherC)
throw INTERP_KERNEL::Exception("WithTimeStep::multiply on mismatched time discretization !");
- DataArrayDouble *arr=DataArrayDouble::Multiply(getArray(),other->getArray());
+ MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> arr=DataArrayDouble::Multiply(getArray(),other->getArray());
MEDCouplingWithTimeStep *ret=new MEDCouplingWithTimeStep;
ret->setArray(arr,0);
- arr->decrRef();
int tmp1,tmp2;
double tmp3=getStartTime(tmp1,tmp2);
ret->setStartTime(tmp3,tmp1,tmp2);
const MEDCouplingWithTimeStep *otherC=dynamic_cast<const MEDCouplingWithTimeStep *>(other);
if(!otherC)
throw INTERP_KERNEL::Exception("WithTimeStep::multiplyEqual on mismatched time discretization !");
+ if(!getArray())
+ throw INTERP_KERNEL::Exception("MEDCouplingWithTimeLabel::multiplyEqual : Data Array is NULL !");
getArray()->multiplyEqual(other->getArray());
}
const MEDCouplingWithTimeStep *otherC=dynamic_cast<const MEDCouplingWithTimeStep *>(other);
if(!otherC)
throw INTERP_KERNEL::Exception("WithTimeStep::divide on mismatched time discretization !");
- DataArrayDouble *arr=DataArrayDouble::Divide(getArray(),other->getArray());
+ MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> arr=DataArrayDouble::Divide(getArray(),other->getArray());
MEDCouplingWithTimeStep *ret=new MEDCouplingWithTimeStep;
ret->setArray(arr,0);
- arr->decrRef();
int tmp1,tmp2;
double tmp3=getStartTime(tmp1,tmp2);
ret->setStartTime(tmp3,tmp1,tmp2);
const MEDCouplingWithTimeStep *otherC=dynamic_cast<const MEDCouplingWithTimeStep *>(other);
if(!otherC)
throw INTERP_KERNEL::Exception("WithTimeStep::divideEqual on mismatched time discretization !");
+ if(!getArray())
+ throw INTERP_KERNEL::Exception("MEDCouplingWithTimeLabel::divideEqual : Data Array is NULL !");
getArray()->divideEqual(other->getArray());
}
const MEDCouplingConstOnTimeInterval *otherC=dynamic_cast<const MEDCouplingConstOnTimeInterval *>(other);
if(!otherC)
throw INTERP_KERNEL::Exception("ConstOnTimeInterval::aggregation on mismatched time discretization !");
- DataArrayDouble *arr=DataArrayDouble::Aggregate(getArray(),other->getArray());
+ MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> arr=DataArrayDouble::Aggregate(getArray(),other->getArray());
MEDCouplingConstOnTimeInterval *ret=new MEDCouplingConstOnTimeInterval;
ret->setArray(arr,0);
- arr->decrRef();
return ret;
}
throw INTERP_KERNEL::Exception("ConstOnTimeInterval::aggregate on mismatched time discretization !");
a[i]=itC->getArray();
}
- DataArrayDouble *arr=DataArrayDouble::Aggregate(a);
+ MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> arr=DataArrayDouble::Aggregate(a);
MEDCouplingConstOnTimeInterval *ret=new MEDCouplingConstOnTimeInterval;
ret->setArray(arr,0);
- arr->decrRef();
return ret;
}
const MEDCouplingConstOnTimeInterval *otherC=dynamic_cast<const MEDCouplingConstOnTimeInterval *>(other);
if(!otherC)
throw INTERP_KERNEL::Exception("ConstOnTimeInterval::meld on mismatched time discretization !");
- DataArrayDouble *arr=DataArrayDouble::Meld(getArray(),other->getArray());
+ MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> arr=DataArrayDouble::Meld(getArray(),other->getArray());
MEDCouplingConstOnTimeInterval *ret=new MEDCouplingConstOnTimeInterval;
ret->setTimeTolerance(getTimeTolerance());
ret->setArray(arr,0);
- arr->decrRef();
return ret;
}
const MEDCouplingConstOnTimeInterval *otherC=dynamic_cast<const MEDCouplingConstOnTimeInterval *>(other);
if(!otherC)
throw INTERP_KERNEL::Exception("ConstOnTimeInterval::dot on mismatched time discretization !");
- DataArrayDouble *arr=DataArrayDouble::Dot(getArray(),other->getArray());
+ MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> arr=DataArrayDouble::Dot(getArray(),other->getArray());
MEDCouplingConstOnTimeInterval *ret=new MEDCouplingConstOnTimeInterval;
ret->setArray(arr,0);
- arr->decrRef();
return ret;
}
const MEDCouplingConstOnTimeInterval *otherC=dynamic_cast<const MEDCouplingConstOnTimeInterval *>(other);
if(!otherC)
throw INTERP_KERNEL::Exception("ConstOnTimeInterval::crossProduct on mismatched time discretization !");
- DataArrayDouble *arr=DataArrayDouble::CrossProduct(getArray(),other->getArray());
+ MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> arr=DataArrayDouble::CrossProduct(getArray(),other->getArray());
MEDCouplingConstOnTimeInterval *ret=new MEDCouplingConstOnTimeInterval;
ret->setArray(arr,0);
- arr->decrRef();
return ret;
}
const MEDCouplingConstOnTimeInterval *otherC=dynamic_cast<const MEDCouplingConstOnTimeInterval *>(other);
if(!otherC)
throw INTERP_KERNEL::Exception("ConstOnTimeInterval::max on mismatched time discretization !");
- DataArrayDouble *arr=DataArrayDouble::Max(getArray(),other->getArray());
+ MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> arr=DataArrayDouble::Max(getArray(),other->getArray());
MEDCouplingConstOnTimeInterval *ret=new MEDCouplingConstOnTimeInterval;
ret->setArray(arr,0);
- arr->decrRef();
return ret;
}
const MEDCouplingConstOnTimeInterval *otherC=dynamic_cast<const MEDCouplingConstOnTimeInterval *>(other);
if(!otherC)
throw INTERP_KERNEL::Exception("ConstOnTimeInterval::min on mismatched time discretization !");
- DataArrayDouble *arr=DataArrayDouble::Min(getArray(),other->getArray());
+ MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> arr=DataArrayDouble::Min(getArray(),other->getArray());
MEDCouplingConstOnTimeInterval *ret=new MEDCouplingConstOnTimeInterval;
ret->setArray(arr,0);
- arr->decrRef();
return ret;
}
const MEDCouplingConstOnTimeInterval *otherC=dynamic_cast<const MEDCouplingConstOnTimeInterval *>(other);
if(!otherC)
throw INTERP_KERNEL::Exception("ConstOnTimeInterval::add on mismatched time discretization !");
- DataArrayDouble *arr=DataArrayDouble::Add(getArray(),other->getArray());
+ MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> arr=DataArrayDouble::Add(getArray(),other->getArray());
MEDCouplingConstOnTimeInterval *ret=new MEDCouplingConstOnTimeInterval;
ret->setArray(arr,0);
- arr->decrRef();
int tmp1,tmp2;
double tmp3=getStartTime(tmp1,tmp2);
ret->setStartTime(tmp3,tmp1,tmp2);
const MEDCouplingConstOnTimeInterval *otherC=dynamic_cast<const MEDCouplingConstOnTimeInterval *>(other);
if(!otherC)
throw INTERP_KERNEL::Exception("ConstOnTimeInterval::addEqual on mismatched time discretization !");
+ if(!getArray())
+ throw INTERP_KERNEL::Exception("MEDCouplingConstOnTimeInterval::substractaddEqual : Data Array is NULL !");
getArray()->addEqual(other->getArray());
}
const MEDCouplingConstOnTimeInterval *otherC=dynamic_cast<const MEDCouplingConstOnTimeInterval *>(other);
if(!otherC)
throw INTERP_KERNEL::Exception("ConstOnTimeInterval::substract on mismatched time discretization !");
- DataArrayDouble *arr=DataArrayDouble::Substract(getArray(),other->getArray());
+ MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> arr=DataArrayDouble::Substract(getArray(),other->getArray());
MEDCouplingConstOnTimeInterval *ret=new MEDCouplingConstOnTimeInterval;
ret->setArray(arr,0);
- arr->decrRef();
int tmp1,tmp2;
double tmp3=getStartTime(tmp1,tmp2);
ret->setStartTime(tmp3,tmp1,tmp2);
const MEDCouplingConstOnTimeInterval *otherC=dynamic_cast<const MEDCouplingConstOnTimeInterval *>(other);
if(!otherC)
throw INTERP_KERNEL::Exception("ConstOnTimeInterval::substractEqual on mismatched time discretization !");
+ if(!getArray())
+ throw INTERP_KERNEL::Exception("MEDCouplingConstOnTimeInterval::substractEqual : Data Array is NULL !");
getArray()->substractEqual(other->getArray());
}
const MEDCouplingConstOnTimeInterval *otherC=dynamic_cast<const MEDCouplingConstOnTimeInterval *>(other);
if(!otherC)
throw INTERP_KERNEL::Exception("multiply on mismatched time discretization !");
- DataArrayDouble *arr=DataArrayDouble::Multiply(getArray(),other->getArray());
+ MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> arr=DataArrayDouble::Multiply(getArray(),other->getArray());
MEDCouplingConstOnTimeInterval *ret=new MEDCouplingConstOnTimeInterval;
ret->setArray(arr,0);
- arr->decrRef();
int tmp1,tmp2;
double tmp3=getStartTime(tmp1,tmp2);
ret->setStartTime(tmp3,tmp1,tmp2);
const MEDCouplingConstOnTimeInterval *otherC=dynamic_cast<const MEDCouplingConstOnTimeInterval *>(other);
if(!otherC)
throw INTERP_KERNEL::Exception("ConstOnTimeInterval::multiplyEqual on mismatched time discretization !");
+ if(!getArray())
+ throw INTERP_KERNEL::Exception("MEDCouplingConstOnTimeInterval::multiplyEqual : Data Array is NULL !");
getArray()->multiplyEqual(other->getArray());
}
const MEDCouplingConstOnTimeInterval *otherC=dynamic_cast<const MEDCouplingConstOnTimeInterval *>(other);
if(!otherC)
throw INTERP_KERNEL::Exception("divide on mismatched time discretization !");
- DataArrayDouble *arr=DataArrayDouble::Divide(getArray(),other->getArray());
+ MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> arr=DataArrayDouble::Divide(getArray(),other->getArray());
MEDCouplingConstOnTimeInterval *ret=new MEDCouplingConstOnTimeInterval;
ret->setArray(arr,0);
- arr->decrRef();
int tmp1,tmp2;
double tmp3=getStartTime(tmp1,tmp2);
ret->setStartTime(tmp3,tmp1,tmp2);
const MEDCouplingConstOnTimeInterval *otherC=dynamic_cast<const MEDCouplingConstOnTimeInterval *>(other);
if(!otherC)
throw INTERP_KERNEL::Exception("ConstOnTimeInterval::divideEqual on mismatched time discretization !");
+ if(!getArray())
+ throw INTERP_KERNEL::Exception("MEDCouplingConstOnTimeInterval::divideEqual : Data Array is NULL !");
getArray()->divideEqual(other->getArray());
}
const MEDCouplingLinearTime *otherC=dynamic_cast<const MEDCouplingLinearTime *>(other);
if(!otherC)
throw INTERP_KERNEL::Exception("LinearTime::aggregation on mismatched time discretization !");
- DataArrayDouble *arr1=DataArrayDouble::Aggregate(getArray(),other->getArray());
- DataArrayDouble *arr2=DataArrayDouble::Aggregate(getEndArray(),other->getEndArray());
+ MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> arr1=DataArrayDouble::Aggregate(getArray(),other->getArray());
+ MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> arr2=DataArrayDouble::Aggregate(getEndArray(),other->getEndArray());
MEDCouplingLinearTime *ret=new MEDCouplingLinearTime;
ret->setArray(arr1,0);
- arr1->decrRef();
ret->setEndArray(arr2,0);
- arr2->decrRef();
return ret;
}
a[i]=itC->getArray();
b[i]=itC->getEndArray();
}
- DataArrayDouble *arr=DataArrayDouble::Aggregate(a);
- DataArrayDouble *arr2=DataArrayDouble::Aggregate(b);
+ MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> arr=DataArrayDouble::Aggregate(a);
+ MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> arr2=DataArrayDouble::Aggregate(b);
MEDCouplingLinearTime *ret=new MEDCouplingLinearTime;
ret->setArray(arr,0);
- arr->decrRef();
ret->setEndArray(arr2,0);
- arr2->decrRef();
return ret;
}
const MEDCouplingLinearTime *otherC=dynamic_cast<const MEDCouplingLinearTime *>(other);
if(!otherC)
throw INTERP_KERNEL::Exception("LinearTime::meld on mismatched time discretization !");
- DataArrayDouble *arr1=DataArrayDouble::Meld(getArray(),other->getArray());
- DataArrayDouble *arr2=DataArrayDouble::Meld(getEndArray(),other->getEndArray());
+ MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> arr1=DataArrayDouble::Meld(getArray(),other->getArray());
+ MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> arr2=DataArrayDouble::Meld(getEndArray(),other->getEndArray());
MEDCouplingLinearTime *ret=new MEDCouplingLinearTime;
ret->setTimeTolerance(getTimeTolerance());
ret->setArray(arr1,0);
- arr1->decrRef();
ret->setEndArray(arr2,0);
- arr2->decrRef();
return ret;
}
const MEDCouplingLinearTime *otherC=dynamic_cast<const MEDCouplingLinearTime *>(other);
if(!otherC)
throw INTERP_KERNEL::Exception("LinearTime::dot on mismatched time discretization !");
- DataArrayDouble *arr1=DataArrayDouble::Dot(getArray(),other->getArray());
- DataArrayDouble *arr2=DataArrayDouble::Dot(getEndArray(),other->getEndArray());
+ MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> arr1=DataArrayDouble::Dot(getArray(),other->getArray());
+ MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> arr2=DataArrayDouble::Dot(getEndArray(),other->getEndArray());
MEDCouplingLinearTime *ret=new MEDCouplingLinearTime;
ret->setArray(arr1,0);
- arr1->decrRef();
ret->setEndArray(arr2,0);
- arr2->decrRef();
return ret;
}
const MEDCouplingLinearTime *otherC=dynamic_cast<const MEDCouplingLinearTime *>(other);
if(!otherC)
throw INTERP_KERNEL::Exception("LinearTime::crossProduct on mismatched time discretization !");
- DataArrayDouble *arr1=DataArrayDouble::CrossProduct(getArray(),other->getArray());
- DataArrayDouble *arr2=DataArrayDouble::CrossProduct(getEndArray(),other->getEndArray());
+ MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> arr1=DataArrayDouble::CrossProduct(getArray(),other->getArray());
+ MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> arr2=DataArrayDouble::CrossProduct(getEndArray(),other->getEndArray());
MEDCouplingLinearTime *ret=new MEDCouplingLinearTime;
ret->setArray(arr1,0);
- arr1->decrRef();
ret->setEndArray(arr2,0);
- arr2->decrRef();
return ret;
}
if(!otherC)
throw INTERP_KERNEL::Exception("LinearTime::max on mismatched time discretization !");
MEDCouplingLinearTime *ret=new MEDCouplingLinearTime;
- DataArrayDouble *arr1=DataArrayDouble::Max(getArray(),other->getArray());
+ MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> arr1=DataArrayDouble::Max(getArray(),other->getArray());
+ MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> arr2=DataArrayDouble::Max(getEndArray(),other->getEndArray());
ret->setArray(arr1,0);
- arr1->decrRef();
- DataArrayDouble *arr2=DataArrayDouble::Max(getEndArray(),other->getEndArray());
ret->setEndArray(arr2,0);
- arr2->decrRef();
return ret;
}
const MEDCouplingLinearTime *otherC=dynamic_cast<const MEDCouplingLinearTime *>(other);
if(!otherC)
throw INTERP_KERNEL::Exception("LinearTime::min on mismatched time discretization !");
- DataArrayDouble *arr1=DataArrayDouble::Min(getArray(),other->getArray());
- DataArrayDouble *arr2=DataArrayDouble::Min(getEndArray(),other->getEndArray());
+ MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> arr1=DataArrayDouble::Min(getArray(),other->getArray());
+ MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> arr2=DataArrayDouble::Min(getEndArray(),other->getEndArray());
MEDCouplingLinearTime *ret=new MEDCouplingLinearTime;
ret->setArray(arr1,0);
- arr1->decrRef();
ret->setEndArray(arr2,0);
- arr2->decrRef();
return ret;
}
const MEDCouplingLinearTime *otherC=dynamic_cast<const MEDCouplingLinearTime *>(other);
if(!otherC)
throw INTERP_KERNEL::Exception("LinearTime::add on mismatched time discretization !");
- DataArrayDouble *arr1=DataArrayDouble::Add(getArray(),other->getArray());
- DataArrayDouble *arr2=DataArrayDouble::Add(getEndArray(),other->getEndArray());
+ MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> arr1=DataArrayDouble::Add(getArray(),other->getArray());
+ MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> arr2=DataArrayDouble::Add(getEndArray(),other->getEndArray());
MEDCouplingLinearTime *ret=new MEDCouplingLinearTime;
ret->setArray(arr1,0);
- arr1->decrRef();
ret->setEndArray(arr2,0);
- arr2->decrRef();
return ret;
}
const MEDCouplingLinearTime *otherC=dynamic_cast<const MEDCouplingLinearTime *>(other);
if(!otherC)
throw INTERP_KERNEL::Exception("LinearTime::addEqual on mismatched time discretization !");
+ if(!getArray())
+ throw INTERP_KERNEL::Exception("MEDCouplingLinearTime::addEqual : Data Array is NULL !");
+ if(!getEndArray())
+ throw INTERP_KERNEL::Exception("MEDCouplingLinearTime::addEqual : Data Array (end) is NULL !");
getArray()->addEqual(other->getArray());
getEndArray()->addEqual(other->getEndArray());
}
const MEDCouplingLinearTime *otherC=dynamic_cast<const MEDCouplingLinearTime *>(other);
if(!otherC)
throw INTERP_KERNEL::Exception("LinearTime::substract on mismatched time discretization !");
- DataArrayDouble *arr1=DataArrayDouble::Substract(getArray(),other->getArray());
- DataArrayDouble *arr2=DataArrayDouble::Substract(getEndArray(),other->getEndArray());
+ MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> arr1=DataArrayDouble::Substract(getArray(),other->getArray());
+ MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> arr2=DataArrayDouble::Substract(getEndArray(),other->getEndArray());
MEDCouplingLinearTime *ret=new MEDCouplingLinearTime;
ret->setArray(arr1,0);
- arr1->decrRef();
ret->setEndArray(arr2,0);
- arr2->decrRef();
return ret;
}
const MEDCouplingLinearTime *otherC=dynamic_cast<const MEDCouplingLinearTime *>(other);
if(!otherC)
throw INTERP_KERNEL::Exception("LinearTime::addEqual on mismatched time discretization !");
+ if(!getArray())
+ throw INTERP_KERNEL::Exception("MEDCouplingLinearTime::substractEqual : Data Array is NULL !");
+ if(!getEndArray())
+ throw INTERP_KERNEL::Exception("MEDCouplingLinearTime::substractEqual : Data Array (end) is NULL !");
getArray()->substractEqual(other->getArray());
getEndArray()->substractEqual(other->getEndArray());
}
const MEDCouplingLinearTime *otherC=dynamic_cast<const MEDCouplingLinearTime *>(other);
if(!otherC)
throw INTERP_KERNEL::Exception("LinearTime::multiply on mismatched time discretization !");
- DataArrayDouble *arr1=DataArrayDouble::Multiply(getArray(),other->getArray());
- DataArrayDouble *arr2=DataArrayDouble::Multiply(getEndArray(),other->getEndArray());
+ MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> arr1=DataArrayDouble::Multiply(getArray(),other->getArray());
+ MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> arr2=DataArrayDouble::Multiply(getEndArray(),other->getEndArray());
MEDCouplingLinearTime *ret=new MEDCouplingLinearTime;
ret->setArray(arr1,0);
- arr1->decrRef();
ret->setEndArray(arr2,0);
- arr2->decrRef();
return ret;
}
const MEDCouplingLinearTime *otherC=dynamic_cast<const MEDCouplingLinearTime *>(other);
if(!otherC)
throw INTERP_KERNEL::Exception("LinearTime::addEqual on mismatched time discretization !");
+ if(!getArray())
+ throw INTERP_KERNEL::Exception("MEDCouplingLinearTime::multiplyEqual : Data Array is NULL !");
+ if(!getEndArray())
+ throw INTERP_KERNEL::Exception("MEDCouplingLinearTime::multiplyEqual : Data Array (end) is NULL !");
getArray()->multiplyEqual(other->getArray());
getEndArray()->multiplyEqual(other->getEndArray());
}
const MEDCouplingLinearTime *otherC=dynamic_cast<const MEDCouplingLinearTime *>(other);
if(!otherC)
throw INTERP_KERNEL::Exception("LinearTime::divide on mismatched time discretization !");
- DataArrayDouble *arr1=DataArrayDouble::Divide(getArray(),other->getArray());
- DataArrayDouble *arr2=DataArrayDouble::Divide(getEndArray(),other->getEndArray());
+ MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> arr1=DataArrayDouble::Divide(getArray(),other->getArray());
+ MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> arr2=DataArrayDouble::Divide(getEndArray(),other->getEndArray());
MEDCouplingLinearTime *ret=new MEDCouplingLinearTime;
ret->setArray(arr1,0);
- arr1->decrRef();
ret->setEndArray(arr2,0);
- arr2->decrRef();
return ret;
}
const MEDCouplingLinearTime *otherC=dynamic_cast<const MEDCouplingLinearTime *>(other);
if(!otherC)
throw INTERP_KERNEL::Exception("LinearTime::addEqual on mismatched time discretization !");
+ if(!getArray())
+ throw INTERP_KERNEL::Exception("MEDCouplingLinearTime::divideEqual : Data Array is NULL !");
+ if(!getEndArray())
+ throw INTERP_KERNEL::Exception("MEDCouplingLinearTime::divideEqual : Data Array (end) is NULL !");
getArray()->divideEqual(other->getArray());
getEndArray()->divideEqual(other->getEndArray());
}