From 38ec318d87929fdf1d1c5464d90cd4243055d43e Mon Sep 17 00:00:00 2001 From: caremoli Date: Mon, 3 Mar 2008 11:00:36 +0000 Subject: [PATCH] CCAR: add workingdir and logfilename in parallel container --- .../SALOME_ParallelContainer_i.cxx | 31 +++++++++++++++++++ .../SALOME_ParallelContainer_i.hxx | 5 +++ 2 files changed, 36 insertions(+) diff --git a/src/ParallelContainer/SALOME_ParallelContainer_i.cxx b/src/ParallelContainer/SALOME_ParallelContainer_i.cxx index 937a2274b..97f655b39 100644 --- a/src/ParallelContainer/SALOME_ParallelContainer_i.cxx +++ b/src/ParallelContainer/SALOME_ParallelContainer_i.cxx @@ -1035,3 +1035,34 @@ Engines_Parallel_Container_i::createSalome_file(const char* origFileName) return theSalome_file; } +//============================================================================= +/*! + * CORBA attribute: Container working directory + */ +//============================================================================= + +char* +Engines_Parallel_Container_i::workingdir() +{ + char wd[256]; + getcwd (wd,256); + return CORBA::string_dup(wd) ; +} + +//============================================================================= +/*! + * CORBA attribute: Container log file name + */ +//============================================================================= + +char* +Engines_Parallel_Container_i::logfilename() +{ + return CORBA::string_dup(_logfilename.c_str()) ; +} + +void +Engines_Parallel_Container_i::logfilename(const char* name) +{ + _logfilename=name; +} diff --git a/src/ParallelContainer/SALOME_ParallelContainer_i.hxx b/src/ParallelContainer/SALOME_ParallelContainer_i.hxx index 7eaef5c7b..34d980fdb 100644 --- a/src/ParallelContainer/SALOME_ParallelContainer_i.hxx +++ b/src/ParallelContainer/SALOME_ParallelContainer_i.hxx @@ -95,6 +95,10 @@ public: virtual void ping(); char* name(); + char* workingdir(); + char* logfilename(); + void logfilename(const char* name); + virtual void Shutdown(); char* getHostName(); CORBA::Long getPID(); @@ -143,6 +147,7 @@ protected: SALOME_NamingService *_NS ; std::string _library_path; std::string _containerName; + std::string _logfilename; CORBA::ORB_var _orb; PortableServer::POA_var _poa; PortableServer::ObjectId * _id ; -- 2.39.2