stream << "\n";
}
+void DataArray::setInfoOnComponents(const std::vector<std::string>& info) throw(INTERP_KERNEL::Exception)
+{
+ if(getNumberOfComponents()!=(int)info.size())
+ {
+ std::ostringstream oss; oss << "DataArray::setInfoOnComponents : input is of size " << info.size() << " whereas number of components is equal to " << getNumberOfComponents() << " !";
+ throw INTERP_KERNEL::Exception(oss.str().c_str());
+ }
+ _info_on_compo=info;
+}
+
std::vector<std::string> DataArray::getVarsOnComponent() const
{
int nbOfCompo=(int)_info_on_compo.size();
MEDCOUPLING_EXPORT bool areInfoEquals(const DataArray& other) const;
MEDCOUPLING_EXPORT void reprWithoutNameStream(std::ostream& stream) const;
MEDCOUPLING_EXPORT std::string getName() const { return _name; }
- MEDCOUPLING_EXPORT const std::vector<std::string> &getInfoOnComponent() const { return _info_on_compo; }
+ MEDCOUPLING_EXPORT const std::vector<std::string> &getInfoOnComponents() const { return _info_on_compo; }
+ MEDCOUPLING_EXPORT void setInfoOnComponents(const std::vector<std::string>& info) throw(INTERP_KERNEL::Exception);
MEDCOUPLING_EXPORT std::vector<std::string> getVarsOnComponent() const;
MEDCOUPLING_EXPORT std::vector<std::string> getUnitsOnComponent() const;
MEDCOUPLING_EXPORT std::string getInfoOnComponent(int i) const throw(INTERP_KERNEL::Exception);