}
if(file_name != "")
{
- fs::path mesh_file = fs::path(aMesh.tmp_folder) / fs::path(file_name);
+ fs::path mesh_file = fs::path(aMesh.GetTmpFolder()) / fs::path(file_name);
SMESH_DriverMesh::exportMesh(mesh_file.string(), aMesh, "MESH");
}
//Resetting threaded pool info
smToCompute->ComputeStateEngine( SMESH_subMesh::CHECK_COMPUTE_STATE );
continue;
}
- boost::asio::post(*(aMesh._pool), std::bind(compute_function, smToCompute, computeEvent,
+ boost::asio::post(*(aMesh.GetPool()), std::bind(compute_function, smToCompute, computeEvent,
shapeSM, aShapeOnly, allowedSubShapes,
aShapesId));
}
virtual bool IsParallel(){std::cout << "Should not pass here" << std::endl;return false;};
+ virtual boost::filesystem::path GetTmpFolder() {return "";};
+ virtual boost::asio::thread_pool* GetPool() {return NULL;};
+
virtual bool ComputeSubMeshes(
SMESH_Gen* gen,
SMESH_Mesh & aMesh,
const bool complexShapeFirst,
const bool aShapeOnly){(void) gen;(void) aMesh;(void) aShape;(void) aDim;(void) aShapesId;(void) allowedSubShapes;(void) computeEvent;(void) includeSelf;(void) complexShapeFirst;(void) aShapeOnly;std::cout << "Should not pass here" << std::endl;return false;};
- // TODO: Remove from SMESH_Mesh
- boost::filesystem::path tmp_folder;
- boost::asio::thread_pool * _pool = nullptr; //thread pool for computation
private:
void exportMEDCommmon(DriverMED_W_SMESHDS_Mesh& myWriter,
void CreateTmpFolder();
void DeleteTmpFolder();
+ boost::filesystem::path GetTmpFolder() override {return tmp_folder;};
+ boost::asio::thread_pool* GetPool() override {return _pool;};
+
bool ComputeSubMeshes(
SMESH_Gen* gen,
SMESH_Mesh & aMesh,
const bool includeSelf,
const bool complexShapeFirst,
const bool aShapeOnly) override;
+
+ private:
+ boost::filesystem::path tmp_folder;
+ boost::asio::thread_pool * _pool = nullptr; //thread pool for computation
};
#endif