X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FTools%2Fpadder%2Fmeshjob%2Fimpl%2FMeshJobManager_i.hxx;fp=src%2FTools%2Fpadder%2Fmeshjob%2Fimpl%2FMeshJobManager_i.hxx;h=283a92d7adac9ea52b8b532345b3fc36bfe06419;hp=0000000000000000000000000000000000000000;hb=bd4e115a78b52e3fbc016e5e30bb0e19b2a9e7d6;hpb=0635c9fc80f67d1e5dc0e94ec85f487286a92070 diff --git a/src/Tools/padder/meshjob/impl/MeshJobManager_i.hxx b/src/Tools/padder/meshjob/impl/MeshJobManager_i.hxx new file mode 100644 index 000000000..283a92d7a --- /dev/null +++ b/src/Tools/padder/meshjob/impl/MeshJobManager_i.hxx @@ -0,0 +1,81 @@ +// Copyright (C) 2011-2012 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. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// +// Authors : Guillaume Boulant (EDF) - 01/03/2011 + +#ifndef _MESHJOBMANAGER_HXX_ +#define _MESHJOBMANAGER_HXX_ + +// include the stubs generating from MESHJOB.idl +#include +#include CORBA_SERVER_HEADER(MESHJOB) +#include CORBA_SERVER_HEADER(SALOME_Component) +#include "SALOME_Component_i.hxx" + +#include "SALOME_Launcher.hxx" +#include +#include +#include + +class MeshJobManager_i: public virtual POA_MESHJOB::MeshJobManager, + public Engines_Component_i +{ +public: + MeshJobManager_i(CORBA::ORB_ptr orb, PortableServer::POA_ptr poa, + PortableServer::ObjectId * contId, + const char *instanceName, const char *interfaceName); + ~MeshJobManager_i(); + + bool configure (const char *configId, + const MESHJOB::ConfigParameter & configParameter); + CORBA::Long initialize (const MESHJOB::MeshJobParameterList & meshJobParameterList, + const char *configId); + bool start (CORBA::Long jobId); + char* getState (CORBA::Long jobId); + MESHJOB::MeshJobResults * finalize(CORBA::Long jobId); + MESHJOB::MeshJobPaths * getPaths(CORBA::Long jobId); + bool clean (CORBA::Long jobId); + + static long JOBID_UNDEFINED; + +private: + Engines::SalomeLauncher_var _salomeLauncher; + Engines::ResourcesManager_var _resourcesManager; + + // This maps the config identifier to the config parameters. A + // config is a resource with additionnal data specifying the + // location of the binary program to be executed by the task + std::map _configMap; + + // This maps a job identifier to its associated datetime tag. When + // a job is created during the initialize function, a datetime tag + // is associated to this job and can be used to characterized files + // and directories associated to this job. + std::map _jobDateTimeMap; + std::map _jobPathsMap; + + const char* _writeDataFile (std::vector listConcreteMesh, + std::vector listSteelBarMesh); + const char* _writeScriptFile (const char * dataFileName, const char * configId); + + std::vector * _getResourceNames(); + +}; + +#endif +