try {
OSD_File( fileName ).Remove();
}
- catch ( Standard_ProgramError ) {
+ catch ( Standard_ProgramError& ) {
MESSAGE("Can't remove file: " << fileName.ToCString() << " ; file does not exist or permission denied");
}
}
//=============================================================================
bool HexoticPlugin_Hexotic::Compute(SMESH_Mesh& aMesh,
- const TopoDS_Shape& aShape)
+ const TopoDS_Shape& /*aShape*/)
{
_computeCanceled = false;
bool Ok = true;
void HexoticPlugin_Hypothesis::SetOptionValue(const std::string& optionName,
const std::string& optionValue)
- throw (std::invalid_argument)
{
TOptionValues::iterator op_val = _option2value.find(optionName);
if (op_val == _option2value.end())
// empty if it equals a default one.
std::string HexoticPlugin_Hypothesis::GetOptionValue(const std::string& optionName,
bool* isDefault) const
- throw (std::invalid_argument)
{
TOptionValues::const_iterator op_val = _option2value.find(optionName);
if (op_val == _option2value.end())
{
GetOptionValue( optionName, &isDefault );
}
- catch ( std::invalid_argument )
+ catch ( std::invalid_argument& )
{
return false;
}
//================================================================================
bool HexoticPlugin_Hypothesis::ToBool(const std::string& str, bool* isOk )
- throw (std::invalid_argument)
{
std::string s = str;
if ( isOk ) *isOk = true;
//================================================================================
double HexoticPlugin_Hypothesis::ToDbl(const std::string& str, bool* isOk )
- throw (std::invalid_argument)
{
if ( str.empty() ) throw std::invalid_argument("Empty value provided");
//================================================================================
int HexoticPlugin_Hypothesis::ToInt(const std::string& str, bool* isOk )
- throw (std::invalid_argument)
{
if ( str.empty() ) throw std::invalid_argument("Empty value provided");
* \retval bool - always false
*/
//================================================================================
-bool HexoticPlugin_Hypothesis::SetParametersByMesh(const SMESH_Mesh* theMesh,
- const TopoDS_Shape& theShape)
+bool HexoticPlugin_Hypothesis::SetParametersByMesh(const SMESH_Mesh* /*theMesh*/,
+ const TopoDS_Shape& /*theShape*/)
{
return false;
}
typedef std::set< std::string > TOptionNames;
void SetOptionValue(const std::string& optionName,
- const std::string& optionValue) throw (std::invalid_argument);
+ const std::string& optionValue);
std::string GetOptionValue(const std::string& optionName,
- bool* isDefault=0) const throw (std::invalid_argument);
+ bool* isDefault=0) const;
bool HasOptionDefined( const std::string& optionName ) const;
void ClearOption(const std::string& optionName);
TOptionValues GetOptionValues() const;
std::string GetAdvancedOption( bool customOnly = false ) const;
void SetAdvancedOption(const std::string& theOptions); // obsolete
- static bool ToBool(const std::string& str, bool* isOk=0) throw (std::invalid_argument);
- static double ToDbl(const std::string& str, bool* isOk=0) throw (std::invalid_argument);
- static int ToInt(const std::string& str, bool* isOk=0) throw (std::invalid_argument);
+ static bool ToBool(const std::string& str, bool* isOk=0);
+ static double ToDbl(const std::string& str, bool* isOk=0);
+ static int ToInt(const std::string& str, bool* isOk=0);
// Size Maps
SMESH::TPythonDump() << _this() << ".SetHexoticNbProc( " << theValue << " )";
}
-void HexoticPlugin_Hypothesis_i::SetHexoticWorkingDirectory(const char* path) throw ( SALOME::SALOME_Exception )
+void HexoticPlugin_Hypothesis_i::SetHexoticWorkingDirectory(const char* path)
{
if (!path )
THROW_SALOME_CORBA_EXCEPTION( "Null working directory",SALOME::BAD_PARAM );
}
void HexoticPlugin_Hypothesis_i::SetOptionValue(const char* optionName, const char* optionValue)
- throw (SALOME::SALOME_Exception)
{
ASSERT(myBaseImpl);
try {
try {
valueChanged = ( this->GetImpl()->GetOptionValue( name, &isDefault ) != optionValue );
}
- catch ( std::invalid_argument ) {
+ catch ( std::invalid_argument& ) {
}
if ( valueChanged )
{
//=============================================================================
char* HexoticPlugin_Hypothesis_i::GetOptionValue(const char* optionName)
- throw (SALOME::SALOME_Exception)
{
ASSERT(myBaseImpl);
try {
//=============================================================================
void HexoticPlugin_Hypothesis_i::SetOptionValues(const HexoticPlugin::string_array& options)
- throw (SALOME::SALOME_Exception)
{
for (CORBA::ULong i = 0; i < options.length(); ++i)
{
//=============================================================================
void HexoticPlugin_Hypothesis_i::SetAdvancedOption(const char* optionsAndValues)
- throw (SALOME::SALOME_Exception)
{
if ( !optionsAndValues ) return;
void SetHexoticNbProc(CORBA::Long theVal);
CORBA::Long GetHexoticNbProc();
- void SetHexoticWorkingDirectory(const char* path) throw ( SALOME::SALOME_Exception );
+ void SetHexoticWorkingDirectory(const char* path);
char* GetHexoticWorkingDirectory();
void SetKeepFiles(::CORBA::Boolean toKeep);
void SetHexoticMaxMemory(CORBA::Long theVal);
CORBA::Long GetHexoticMaxMemory();
- void SetAdvancedOption(const char* theOptions) throw (SALOME::SALOME_Exception);
+ void SetAdvancedOption(const char* theOptions);
char* GetAdvancedOption();
void SetTextOptions(const char* theOptions); // obsolete
char* GetTextOptions();
- void SetOptionValue(const char* optionName, const char* optionValue) throw (SALOME::SALOME_Exception);
- char* GetOptionValue(const char* optionName) throw (SALOME::SALOME_Exception);
+ void SetOptionValue(const char* optionName, const char* optionValue);
+ char* GetOptionValue(const char* optionName);
void UnsetOption(const char* optionName);
HexoticPlugin::string_array* GetOptionValues();
HexoticPlugin::string_array* GetAdvancedOptionValues();
- void SetOptionValues(const HexoticPlugin::string_array& options) throw (SALOME::SALOME_Exception);
+ void SetOptionValues(const HexoticPlugin::string_array& options);
void SetAdvancedOptionValues(const HexoticPlugin::string_array& options);
void AddOption(const char* optionName, const char* optionValue);
else if (strcmp(aHypName, "Hexotic_Parameters") == 0 ||
strcmp(aHypName, "MG-Hexa Parameters") == 0)
aCreator = new HexoticPlugin_Creator_i<HexoticPlugin_Hypothesis_i>;
- else ;
return aCreator;
}
_nbRequiredTria = nb;
}
- void AddNode( double x, double y, double z, int domain )
+ void AddNode( double x, double y, double z, int /*domain*/ )
{
_xyz.push_back( x );
_xyz.push_back( y );
return true;
}
+#else // ifdef USE_MG_LIBS
+
+struct MG_Hexotic_API::LibData // to avoid compiler warnings
+{
+ volatile bool& _cancelled_flag;
+ double& _progress;
+ LibData(volatile bool& cancelled_flag, double& progress): _cancelled_flag{cancelled_flag}, _progress{progress} {}
+};
#endif // ifdef USE_MG_LIBS
MG_Hexotic_API::MG_Hexotic_API(volatile bool& cancelled_flag, double& progress)
{
_useLib = false;
+ _libData = new LibData( cancelled_flag, progress );
#ifdef USE_MG_LIBS
_useLib = true;
- _libData = new LibData( cancelled_flag, progress );
_libData->Init();
if ( getenv("MG_HEXA_USE_EXE"))
_useLib = false;
*/
//================================================================================
-void MG_Hexotic_API::GmfGetLin( int iMesh, GmfKwdCod what, int* nbNodes, int* faceInd, int* ori, int* domain, int dummy )
+void MG_Hexotic_API::GmfGetLin( int iMesh, GmfKwdCod what, int* nbNodes, int* faceInd, int* ori, int* domain, int /*dummy*/ )
{
if ( _useLib ) {
#ifdef USE_MG_LIBS