+
+ virtual ~SMESH_ComputeError() {}
+};
+
+struct SMESHUtils_EXPORT SMESH_BadInputElements : public SMESH_ComputeError, SMDS_ElementHolder
+{
+ typedef std::list<const SMDS_MeshElement*> TElemList;
+ TElemList myBadElements; //!< to explain COMPERR_BAD_INPUT_MESH
+
+ SMESH_BadInputElements(const SMDS_Mesh* mesh,
+ int error = COMPERR_OK,
+ std::string comment = "",
+ const SMESH_Algo* algo = 0)
+ :SMESH_ComputeError(error, comment ,algo), SMDS_ElementHolder(mesh) {}
+
+ const SMDS_Mesh* GetMesh() const { return myMesh; }
+ const TElemList& GetElements() { return myBadElements; }
+
+ virtual bool HasBadElems() const { return !myBadElements.empty(); }
+
+ // methods of SMDS_ElementHolder
+ virtual SMDS_ElemIteratorPtr getElements();
+ virtual void tmpClear();
+ virtual void add( const SMDS_MeshElement* element );
+ virtual void compact() { }