_families=other._families;
}
+
+/*!
+ * This method clear all the groups in the map.
+ * So this method does not operate at all on arrays.
+ * So this method can lead to orphan families.
+ *
+ * \sa MEDFileMesh::clearFamMap, MEDFileMesh::clearFamGrpMaps
+ */
+void MEDFileMesh::clearGrpMap()
+{
+ _groups.clear();
+}
+
+/*!
+ * This method clear all the families in the map.
+ * So this method does not operate at all on arrays.
+ * WARNING ! if there are some groups lying on cleared families, those groups will be impacted !
+ *
+ * \sa MEDFileMesh::clearFamMap, MEDFileMesh::clearFamGrpMaps
+ */
+void MEDFileMesh::clearFamMap()
+{
+ _families.clear();
+}
+
+/*!
+ * This method clear all the families and groups in the map.
+ * So this method does not operate at all on arrays.
+ * As all groups and families entry will be removed after
+ * the call of MEDFileMesh::setFamilyFieldArr method with 0 or None (python) in the 2nd parameter can be useful to reduce the size of the object.
+ *
+ * \sa MEDFileMesh::clearFamMap, MEDFileMesh::clearFamMap
+ */
+void MEDFileMesh::clearFamGrpMaps()
+{
+ clearGrpMap();
+ clearFamMap();
+}
+
/*!
* Returns names of families constituting a group.
* \param [in] name - the name of the group of interest.
MEDLOADER_EXPORT void setFamilyInfo(const std::map<std::string,int>& info);
MEDLOADER_EXPORT void setGroupInfo(const std::map<std::string, std::vector<std::string> >&info);
MEDLOADER_EXPORT void copyFamGrpMapsFrom(const MEDFileMesh& other);
+ MEDLOADER_EXPORT void clearGrpMap();
+ MEDLOADER_EXPORT void clearFamMap();
+ MEDLOADER_EXPORT void clearFamGrpMaps();
MEDLOADER_EXPORT const std::map<std::string,int>& getFamilyInfo() const { return _families; }
MEDLOADER_EXPORT const std::map<std::string, std::vector<std::string> >& getGroupInfo() const { return _groups; }
MEDLOADER_EXPORT std::vector<std::string> getFamiliesOnGroup(const char *name) const;
virtual void createGroupOnAll(int meshDimRelToMaxExt, const char *groupName) throw(INTERP_KERNEL::Exception);
virtual bool keepFamIdsOnlyOnLevs(const std::vector<int>& famIds, const std::vector<int>& levs) throw(INTERP_KERNEL::Exception);
void copyFamGrpMapsFrom(const MEDFileMesh& other) throw(INTERP_KERNEL::Exception);
+ void clearGrpMap() throw(INTERP_KERNEL::Exception);
+ void clearFamMap() throw(INTERP_KERNEL::Exception);
+ void clearFamGrpMaps() throw(INTERP_KERNEL::Exception);
const std::map<std::string,int>& getFamilyInfo() const throw(INTERP_KERNEL::Exception);
const std::map<std::string, std::vector<std::string> >& getGroupInfo() const throw(INTERP_KERNEL::Exception);
std::vector<std::string> getFamiliesOnGroup(const char *name) const throw(INTERP_KERNEL::Exception);