return this->buildDA(nbOfTuples,nbOfCompo);
}
-/*!
- * Returns a new instance of DataArrayInt. The caller is to delete this array
- * using decrRef() as it is no more needed.
- */
-DataArrayInt *DataArrayInt::New()
-{
- return new DataArrayInt;
-}
-
/*!
* Returns the only one value in \a this, if and only if number of elements
* (nb of tuples * nb of components) is equal to 1, and that \a this is allocated.
class DataArrayDiscrete : public DataArrayTemplateClassic<T>
{
public:
+ MEDCOUPLING_EXPORT static typename Traits<T>::ArrayType *New();
MEDCOUPLING_EXPORT bool isEqual(const DataArrayDiscrete<T>& other) const;
MEDCOUPLING_EXPORT bool isEqualIfNotWhy(const DataArrayDiscrete<T>& other, std::string& reason) const;
MEDCOUPLING_EXPORT bool isEqualWithoutConsideringStr(const DataArrayDiscrete<T>& other) const;
class DataArrayInt32 : public DataArrayDiscreteSigned<Int32>
{
+ friend class DataArrayDiscrete<Int32>;
public:
- MEDCOUPLING_EXPORT static DataArrayInt32 *New();
MEDCOUPLING_EXPORT int intValue() const;
MEDCOUPLING_EXPORT int getHashCode() const;
MEDCOUPLING_EXPORT DataArrayInt32 *deepCopy() const;//ok
MEDCOUPLING_EXPORT void reprQuickOverviewData(std::ostream& stream, std::size_t maxNbOfByteInRepr) const;
MEDCOUPLING_EXPORT void transformWithIndArr(const int *indArrBg, const int *indArrEnd);
MEDCOUPLING_EXPORT void transformWithIndArr(const MapKeyVal<int>& m);
- MEDCOUPLING_EXPORT DataArrayInt32 *transformWithIndArrR(const int *indArrBg, const int *indArrEnd) const;
+ MEDCOUPLING_EXPORT DataArrayInt32 *transformWithIndArrR(const int *indArr2Bg, const int *indArrEnd) const;
MEDCOUPLING_EXPORT void splitByValueRange(const int *arrBg, const int *arrEnd,
DataArrayInt32 *& castArr, DataArrayInt32 *& rankInsideCast, DataArrayInt32 *& castsPresent) const;
MEDCOUPLING_EXPORT bool isRange(int& strt, int& sttoopp, int& stteepp) const;
class DataArrayInt64 : public DataArrayDiscrete<Int64>
{
+ friend class DataArrayDiscrete<Int64>;
+ private:
+ ~DataArrayInt64() { }
+ DataArrayInt64() { }
};
template<class T>
std::string tmp;
return isEqualIfNotWhy(other,tmp);
}
-
+
+ /*!
+ * Returns a new instance of DataArrayInt. The caller is to delete this array
+ * using decrRef() as it is no more needed.
+ */
+ template<class T>
+ typename Traits<T>::ArrayType *DataArrayDiscrete<T>::New()
+ {
+ return new typename Traits<T>::ArrayType;
+ }
+
/*!
* Checks if values of \a this and another DataArrayInt are equal. For more info see
* \ref MEDCouplingArrayBasicsCompare.