void setArray(DataArrayDouble *array);
void setEndArray(DataArrayDouble *array);
void setArrays(const std::vector<DataArrayDouble *>& arrs) throw(INTERP_KERNEL::Exception);
- DataArrayDouble *getArray() const { return _time_discr->getArray(); }
- DataArrayDouble *getEndArray() const { return _time_discr->getEndArray(); }
+ const DataArrayDouble *getArray() const { return _time_discr->getArray(); }
+ DataArrayDouble *getArray() { return _time_discr->getArray(); }
+ const DataArrayDouble *getEndArray() const { return _time_discr->getEndArray(); }
+ DataArrayDouble *getEndArray() { return _time_discr->getEndArray(); }
std::vector<DataArrayDouble *> getArrays() const { std::vector<DataArrayDouble *> ret; _time_discr->getArrays(ret); return ret; }
double accumulate(int compId) const;
void accumulate(double *res) const;
{
MEDCouplingTimeDiscretization *ret=MEDCouplingTimeDiscretization::New(type);
ret->setTimeUnit(getTimeUnit());
- DataArrayDouble *arrSrc=getArray();
+ const DataArrayDouble *arrSrc=getArray();
DataArrayDouble *arr=0;
if(arrSrc)
arr=arrSrc->performCpy(deepCpy);
}
}
-DataArrayDouble *MEDCouplingTimeDiscretization::getEndArray() const
+const DataArrayDouble *MEDCouplingTimeDiscretization::getEndArray() const
+{
+ throw INTERP_KERNEL::Exception("getEndArray not available for this type of time discretization !");
+}
+
+DataArrayDouble *MEDCouplingTimeDiscretization::getEndArray()
{
throw INTERP_KERNEL::Exception("getEndArray not available for this type of time discretization !");
}
_end_array->copyStringInfoFrom(*otherC->_end_array);
}
-DataArrayDouble *MEDCouplingTwoTimeSteps::getEndArray() const
+const DataArrayDouble *MEDCouplingTwoTimeSteps::getEndArray() const
+{
+ return _end_array;
+}
+
+DataArrayDouble *MEDCouplingTwoTimeSteps::getEndArray()
{
return _end_array;
}
virtual void setArray(DataArrayDouble *array, TimeLabel *owner);
virtual void setEndArray(DataArrayDouble *array, TimeLabel *owner);
virtual void setArrays(const std::vector<DataArrayDouble *>& arrays, TimeLabel *owner) throw(INTERP_KERNEL::Exception);
- DataArrayDouble *getArray() const { return _array; }
- virtual DataArrayDouble *getEndArray() const;
+ DataArrayDouble *getArray() { return _array; }
+ const DataArrayDouble *getArray() const { return _array; }
+ virtual const DataArrayDouble *getEndArray() const;
+ virtual DataArrayDouble *getEndArray();
virtual std::vector< const DataArrayDouble *> getArraysForTime(double time) const throw(INTERP_KERNEL::Exception) = 0;
virtual void getValueForTime(double time, const std::vector<double>& vals, double *res) const = 0;
virtual void getArrays(std::vector<DataArrayDouble *>& arrays) const;
void updateTime() const;
void copyTinyAttrFrom(const MEDCouplingTimeDiscretization& other);
void copyTinyStringsFrom(const MEDCouplingTimeDiscretization& other);
- DataArrayDouble *getEndArray() const;
+ const DataArrayDouble *getEndArray() const;
+ DataArrayDouble *getEndArray();
void checkCoherency() const throw(INTERP_KERNEL::Exception);
bool isEqual(const MEDCouplingTimeDiscretization *other, double prec) const;
bool isEqualWithoutConsideringStr(const MEDCouplingTimeDiscretization *other, double prec) const;
return self->simpleRepr();
}
- DataArrayDouble *getArray() const throw(INTERP_KERNEL::Exception)
+ DataArrayDouble *getArray() throw(INTERP_KERNEL::Exception)
{
DataArrayDouble *ret=self->getArray();
if(ret)
self->setArrays(arrs);
}
- DataArrayDouble *getEndArray() const throw(INTERP_KERNEL::Exception)
+ DataArrayDouble *getEndArray() throw(INTERP_KERNEL::Exception)
{
DataArrayDouble *ret=self->getEndArray();
if(ret)