-// Copyright (C) 2007-2016 CEA/DEN, EDF R&D
+// Copyright (C) 2007-2022 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
#include "MEDCouplingRemapper.hxx"
#include "MEDCouplingUMesh.hxx"
#include "MEDCouplingFieldDouble.hxx"
-using namespace ParaMEDMEM;
+#include "MEDCouplingFieldFloat.hxx"
+using namespace MEDCoupling;
/*! This map is used for lifecycle management of fields used in this operator */
#include <map>
#include <string>
-using namespace std;
-typedef map<long,MEDCALC::DatasourceHandler*> DatasourceHandlerMap;
-typedef map<long,MEDCALC::DatasourceHandler*>::iterator DatasourceHandlerMapIterator;
+typedef std::map<long,MEDCALC::DatasourceHandler*> DatasourceHandlerMap;
+typedef std::map<long,MEDCALC::DatasourceHandler*>::iterator DatasourceHandlerMapIterator;
-typedef map<long,MEDCALC::MeshHandler*> MeshHandlerMap;
-typedef map<long,MEDCALC::MeshHandler*>::iterator MeshHandlerMapIterator;
+typedef std::map<long,MEDCALC::MeshHandler*> MeshHandlerMap;
+typedef std::map<long,MEDCALC::MeshHandler*>::iterator MeshHandlerMapIterator;
-typedef map<long,MEDCALC::FieldseriesHandler*> FieldseriesHandlerMap;
-typedef map<long,MEDCALC::FieldseriesHandler*>::iterator FieldseriesHandlerMapIterator;
+typedef std::map<long,MEDCALC::FieldseriesHandler*> FieldseriesHandlerMap;
+typedef std::map<long,MEDCALC::FieldseriesHandler*>::iterator FieldseriesHandlerMapIterator;
-typedef map<long,MEDCALC::FieldHandler*> FieldHandlerMap;
-typedef map<long,MEDCALC::FieldHandler*>::iterator FieldHandlerMapIterator;
-typedef map<long,bool> FieldPersistencyMap;
-typedef map<long,bool>::iterator FieldPersistencyMapIterator;
+typedef std::map<long,MEDCALC::FieldHandler*> FieldHandlerMap;
+typedef std::map<long,MEDCALC::FieldHandler*>::iterator FieldHandlerMapIterator;
+typedef std::map<long,bool> FieldPersistencyMap;
+typedef std::map<long,bool>::iterator FieldPersistencyMapIterator;
-typedef map<long,MEDCouplingFieldDouble*> FieldDoubleMap;
-typedef map<long,MEDCouplingFieldDouble*>::iterator FieldDoubleMapIterator;
+typedef std::map<long,MEDCouplingFieldDouble*> FieldDoubleMap;
+typedef std::map<long,MEDCouplingFieldDouble*>::iterator FieldDoubleMapIterator;
-typedef map<long,MEDCouplingUMesh*> MeshMap;
-typedef map<long,MEDCouplingUMesh*>::iterator MeshMapIterator;
+typedef std::map<long,MEDCouplingUMesh*> MeshMap;
+typedef std::map<long,MEDCouplingUMesh*>::iterator MeshMapIterator;
#include "MEDCALC.hxx"
class MEDDataManager_i: public POA_MEDCALC::MEDDataManager,
// -----------------------------------------------------------
// Mesh management
- MEDCALC_EXPORT MEDCALC::MeshHandlerList * getMeshList(CORBA::Long datasourceId);
- MEDCALC_EXPORT MEDCALC::MeshHandler * getMesh(CORBA::Long meshId);
+ MEDCALC_EXPORT MEDCALC::MeshHandlerList * getMeshHandlerList(CORBA::Long datasourceId);
+ MEDCALC_EXPORT MEDCALC::MeshHandler * getMeshHandler(CORBA::Long meshId);
// -----------------------------------------------------------
// Field management
MEDCALC_EXPORT MEDCALC::FieldseriesHandlerList * getFieldseriesListOnMesh(CORBA::Long meshId);
MEDCALC_EXPORT MEDCALC::FieldHandlerList * getFieldListInFieldseries(CORBA::Long fieldseriesId);
+ MEDCALC_EXPORT CORBA::Long getFieldIdAtTimestamp(CORBA::Long fieldseriesId, double timestamp);
+
MEDCALC_EXPORT MEDCALC::FieldHandler * getFieldHandler(CORBA::Long fieldHandlerId);
MEDCALC_EXPORT char * getFieldRepresentation(CORBA::Long fieldHandlerId);
MEDCALC_EXPORT MEDCALC::FieldHandlerList * getFieldHandlerList();
MEDCALC_EXPORT void serverlog();
+ MEDCALC_EXPORT void cleanUp();
+
//
// ===========================================================
// Other public functions (non available via CORBA)
// ===========================================================
//
static long LONG_UNDEFINED;
- static MEDDataManager_i * getInstance();
- MEDCouplingFieldDouble * getFieldDouble(const MEDCALC::FieldHandler * fieldHandler);
- MEDCALC::FieldHandler * addField(MEDCouplingFieldDouble * fieldDouble,
- long meshHandlerId=LONG_UNDEFINED);
+ MEDCALC_EXPORT static MEDDataManager_i * getInstance();
+ MEDCALC_EXPORT MEDCouplingFieldDouble * getFieldDouble(const MEDCALC::FieldHandler * fieldHandler);
+ MEDCALC_EXPORT MEDCALC::FieldHandler * addField(MEDCouplingFieldDouble * fieldDouble,
+ long meshHandlerId=LONG_UNDEFINED);
private:
MEDDataManager_i();
MeshMap _meshMap;
FieldPersistencyMap _fieldPersistencyMap;
- string _medEventListenerIOR;
+ std::string _medEventListenerIOR;
MEDCALC::FieldHandler * newFieldHandler(const char * fieldname,
const char * meshname,
std::string file_to_source(const char * filepath);
std::string source_to_file(const char * source);
+ bool isSourceInFile(const char * sourceName);
long getDatasourceId(const char *filepath);
MEDCouplingUMesh * getUMesh(long meshHandlerId);
long getUMeshId(const MEDCouplingMesh * mesh);
+ double getFieldTimestamp(CORBA::Long fieldHandlerId);
+
INTERP_KERNEL::IntersectionType _getIntersectionType(const char* intersType);
- ParaMEDMEM::NatureOfField _getNatureOfField(const char* fieldNature);
+ MEDCoupling::NatureOfField _getNatureOfField(const char* fieldNature);
};