X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FDriver%2FDriver_Mesh.cxx;h=73895176fe7faa33672b36a5a1c9221a762de713;hb=43db13f33a1d75fae36db8f06fa378ed7906a332;hp=7ab7387c0043a447177feff5d98859a56c7c538f;hpb=2c607013a23bd4e7ba07e72e0c04dee2c1209cff;p=modules%2Fsmesh.git diff --git a/src/Driver/Driver_Mesh.cxx b/src/Driver/Driver_Mesh.cxx index 7ab7387c0..73895176f 100644 --- a/src/Driver/Driver_Mesh.cxx +++ b/src/Driver/Driver_Mesh.cxx @@ -1,4 +1,4 @@ -// 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 @@ -26,6 +26,8 @@ // #include "Driver_Mesh.h" +#include + using namespace std; Driver_Mesh::Driver_Mesh(): @@ -39,8 +41,42 @@ void Driver_Mesh::SetMeshId(int theMeshId) 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; +}