-// Copyright (C) 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
#include "Driver_Mesh.h"
+#include <utilities.h>
+
using namespace std;
Driver_Mesh::Driver_Mesh():
myMeshId = theMeshId;
}
+void Driver_Mesh::SetMeshName(const std::string& theMeshName)
+{
+ myMeshName = theMeshName;
+}
+
+std::string Driver_Mesh::GetMeshName() const
+{
+ return myMeshName;
+}
+
void Driver_Mesh::SetFile(const std::string& theFileName)
{
myFile = theFileName;
}
+
+
+//================================================================================
+/*!
+ * \brief Stores an error message
+ *
+ * We consider an error fatal if none mesh can be read
+ */
+//================================================================================
+
+Driver_Mesh::Status Driver_Mesh::addMessage(const std::string& msg,
+ const bool isFatal/*=false*/)
+{
+ if ( isFatal )
+ myErrorMessages.clear(); // warnings are useless if a fatal error encounters
+
+ myErrorMessages.push_back( msg );
+
+ MESSAGE(msg);
+#ifdef _DEBUG_
+ cout << msg << endl;
+#endif
+ return isFatal ? DRS_FAIL : DRS_WARN_SKIP_ELEM;
+}