throw INTERP_KERNEL::Exception("DataArrayDouble::checkAllocated : Array is defined but not allocated ! Call alloc or setValues method first !");
}
+/*!
+ * This method should be called on an allocated DataArrayDouble instance. If not an exception will be throw !
+ * This method checks the number of tupes. If it is equal to 0, it returns true, if not false is returned.
+ */
+bool DataArrayDouble::empty() const throw(INTERP_KERNEL::Exception)
+{
+ checkAllocated();
+ return getNumberOfTuples()==0;
+}
+
DataArrayDouble *DataArrayDouble::deepCpy() const
{
return new DataArrayDouble(*this);
throw INTERP_KERNEL::Exception("DataArrayInt::checkAllocated : Array is defined but not allocated ! Call alloc or setValues method first !");
}
+/*!
+ * This method should be called on an allocated DataArrayInt instance. If not an exception will be throw !
+ * This method checks the number of tupes. If it is equal to 0, it returns true, if not false is returned.
+ */
+bool DataArrayInt::empty() const throw(INTERP_KERNEL::Exception)
+{
+ checkAllocated();
+ return getNumberOfTuples()==0;
+}
+
DataArrayInt *DataArrayInt::deepCpy() const
{
return new DataArrayInt(*this);
MEDCOUPLING_EXPORT static DataArrayDouble *New();
MEDCOUPLING_EXPORT bool isAllocated() const;
MEDCOUPLING_EXPORT void checkAllocated() const throw(INTERP_KERNEL::Exception);
+ MEDCOUPLING_EXPORT bool empty() const throw(INTERP_KERNEL::Exception);
MEDCOUPLING_EXPORT DataArrayDouble *deepCpy() const;
MEDCOUPLING_EXPORT DataArrayDouble *performCpy(bool deepCpy) const;
MEDCOUPLING_EXPORT void cpyFrom(const DataArrayDouble& other) throw(INTERP_KERNEL::Exception);
MEDCOUPLING_EXPORT static DataArrayInt *New();
MEDCOUPLING_EXPORT bool isAllocated() const;
MEDCOUPLING_EXPORT void checkAllocated() const throw(INTERP_KERNEL::Exception);
+ MEDCOUPLING_EXPORT bool empty() const throw(INTERP_KERNEL::Exception);
MEDCOUPLING_EXPORT DataArrayInt *deepCpy() const;
MEDCOUPLING_EXPORT DataArrayInt *performCpy(bool deepCpy) const;
MEDCOUPLING_EXPORT void cpyFrom(const DataArrayInt& other) throw(INTERP_KERNEL::Exception);