-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
* HexoticPlugin_Hypothesis_i::SetHexoticWorkingDirectory
* HexoticPlugin_Hypothesis_i::SetHexoticSdMode
* HexoticPlugin_Hypothesis_i::SetVerbosity
+ * HexoticPlugin_Hypothesis_i::SetHexoticMaxMemory
*/
//=============================================================================
SMESH::TPythonDump() << _this() << ".SetHexoticVerbosity( " << theValue << " )";
}
+void HexoticPlugin_Hypothesis_i::SetHexoticMaxMemory (CORBA::Long theValue)
+{
+ // MESSAGE("HexoticPlugin_Hypothesis_i::SetHexoticMaxMemory");
+ ASSERT(myBaseImpl);
+ CORBA::Long oldValue = GetHexoticMaxMemory();
+ this->GetImpl()->SetHexoticMaxMemory(theValue);
+ if (theValue != oldValue)
+ SMESH::TPythonDump() << _this() << ".SetHexoticMaxMemory( " << theValue << " )";
+}
+
+HexoticPlugin::HexoticPluginSizeMapsList* HexoticPlugin_Hypothesis_i::GetSizeMaps ()
+{
+ // Get the std::map < string entry, double size >
+ HexoticPlugin::HexoticPluginSizeMapsList_var result = new HexoticPlugin::HexoticPluginSizeMapsList();
+ const ::HexoticPlugin_Hypothesis::THexoticSizeMaps sizeMaps = this->GetImpl()->GetSizeMaps();
+ result->length( sizeMaps.size() );
+
+ // Write the content into a CORBA sequence of struct{ entry=anEntry; size=aSize; }
+ ::HexoticPlugin_Hypothesis::THexoticSizeMaps::const_iterator it = sizeMaps.begin();
+ for ( int i = 0; it != sizeMaps.end(); i++, it++ )
+ {
+ HexoticPlugin::HexoticPluginSizeMap_var aSizeMap = new HexoticPlugin::HexoticPluginSizeMap();
+ aSizeMap->entry = CORBA::string_dup( it->first.c_str() );
+ aSizeMap->size = it->second;
+ result[i] = aSizeMap;
+ }
+ return result._retn();
+}
+
+void HexoticPlugin_Hypothesis_i::SetSizeMapEntry ( const char* theEntry, CORBA::Double theSize )
+{
+// MESSAGE("HexoticPlugin_Hypothesis_i::SetSizeMapEntry");
+ bool valueChanged = this->GetImpl()->AddSizeMap(theEntry, theSize);
+ if (valueChanged)
+ SMESH::TPythonDump() << _this() << ".SetSizeMap( "<< theEntry << ", " << theSize << " )";
+}
+
+void HexoticPlugin_Hypothesis_i::UnsetSizeMapEntry ( const char* theEntry )
+{
+// MESSAGE("HexoticPlugin_Hypothesis_i::UnsetSizeMapEntry");
+ bool entryRemoved = this->GetImpl()->UnsetSizeMap(theEntry);
+ if (entryRemoved)
+ SMESH::TPythonDump() << _this() << ".UnsetSizeMap( "<< theEntry << " )";
+}
+
+void HexoticPlugin_Hypothesis_i::SetSizeMap (const GEOM::GEOM_Object_ptr theGeomObj, const double theSize)
+{
+// MESSAGE("HexoticPlugin_Hypothesis_i::SetSizeMap");
+ ASSERT(myBaseImpl);
+ std::string entry = theGeomObj->GetStudyEntry();
+ SetSizeMapEntry( entry.c_str(), theSize);
+}
+
+void HexoticPlugin_Hypothesis_i::UnsetSizeMap (const GEOM::GEOM_Object_ptr theGeomObj)
+{
+// MESSAGE("HexoticPlugin_Hypothesis_i::UnsetSizeMap");
+ ASSERT(myBaseImpl);
+ std::string entry = theGeomObj->GetStudyEntry();
+ UnsetSizeMapEntry( entry.c_str());
+}
+
//=============================================================================
/*!
* HexoticPlugin_Hypothesis_i::GetHexesMinLevel
* HexoticPlugin_Hypothesis_i::GetHexoticWorkingDirectory
* HexoticPlugin_Hypothesis_i::GetHexoticSdMode
* HexoticPlugin_Hypothesis_i::GetVerbosity
+ * HexoticPlugin_Hypothesis_i::GetHexoticMaxMemory
*/
//=============================================================================
return this->GetImpl()->GetHexoticVerbosity();
}
+CORBA::Long HexoticPlugin_Hypothesis_i::GetHexoticMaxMemory()
+{
+ // MESSAGE("HexoticPlugin_Hypothesis_i::GetHexoticMaxMemory");
+ ASSERT(myBaseImpl);
+ return this->GetImpl()->GetHexoticMaxMemory();
+}
+
//=============================================================================
/*!
* HexoticPlugin_Hypothesis_i::GetImpl