From a2c32c91af844c3a97bbc6228603088529131ce2 Mon Sep 17 00:00:00 2001 From: Pascal Obry Date: Tue, 25 Jun 2019 11:34:31 +0200 Subject: [PATCH] Remove trailing white spaces. --- src/Launcher/Launcher.cxx | 50 ++++++++++++++++---------------- src/Launcher/SALOME_Launcher.cxx | 28 +++++++++--------- src/Launcher/SALOME_Launcher.hxx | 1 - 3 files changed, 39 insertions(+), 40 deletions(-) diff --git a/src/Launcher/Launcher.cxx b/src/Launcher/Launcher.cxx index 2d5697dff..51642f264 100644 --- a/src/Launcher/Launcher.cxx +++ b/src/Launcher/Launcher.cxx @@ -46,7 +46,7 @@ using namespace std; //============================================================================= -/*! +/*! * Constructor * \param orb * Define a CORBA single thread policy for the server, which avoid to deal @@ -60,7 +60,7 @@ Launcher_cpp::Launcher_cpp() } //============================================================================= -/*! +/*! * destructor */ //============================================================================= @@ -81,10 +81,10 @@ Launcher_cpp::~Launcher_cpp() //============================================================================= /*! - * Add a job into the launcher - check resource and choose one - */ + * Add a job into the launcher - check resource and choose one + */ //============================================================================= -void +void Launcher_cpp::createJob(Launcher::Job * new_job) { LAUNCHER_MESSAGE("Creating a new job"); @@ -177,10 +177,10 @@ Launcher_cpp::createJob(const JobParameters_cpp& job_parameters) //============================================================================= /*! - * Launch a job - */ + * Launch a job + */ //============================================================================= -void +void Launcher_cpp::launchJob(int job_id) { LAUNCHER_MESSAGE("Launch a job"); @@ -214,7 +214,7 @@ Launcher_cpp::launchJob(int job_id) //============================================================================= /*! * Get job state - */ + */ //============================================================================= std::string Launcher_cpp::getJobState(int job_id) @@ -258,7 +258,7 @@ Launcher_cpp::getAssignedHostnames(int job_id) //============================================================================= /*! * Get Job result - the result directory could be changed - */ + */ //============================================================================= void Launcher_cpp::getJobResults(int job_id, std::string directory) @@ -267,7 +267,7 @@ Launcher_cpp::getJobResults(int job_id, std::string directory) Launcher::Job * job = findJob(job_id); std::string resource_name = job->getResourceDefinition().Name; - try + try { if (directory != "") _batchmap[job_id]->importOutputFiles(*(job->getBatchJob()), directory); @@ -308,7 +308,7 @@ Launcher_cpp::clearJobWorkingDir(int job_id) //============================================================================= /*! * Get Job dump state - the result directory could be changed - */ + */ //============================================================================= bool Launcher_cpp::getJobDumpState(int job_id, std::string directory) @@ -318,7 +318,7 @@ Launcher_cpp::getJobDumpState(int job_id, std::string directory) Launcher::Job * job = findJob(job_id); std::string resource_name = job->getResourceDefinition().Name; - try + try { if (directory != "") rtn = _batchmap[job_id]->importDumpStateFile(*(job->getBatchJob()), directory); @@ -368,7 +368,7 @@ Launcher_cpp::getJobWorkFile(int job_id, //============================================================================= /*! * Remove the job - into the Launcher and its batch manager - */ + */ //============================================================================= void Launcher_cpp::removeJob(int job_id) @@ -391,7 +391,7 @@ Launcher_cpp::removeJob(int job_id) //============================================================================= /*! * stop the job - */ + */ //============================================================================= void Launcher_cpp::stopJob(int job_id) @@ -481,13 +481,13 @@ Launcher_cpp::getJobParameters(int job_id) } //============================================================================= -/*! +/*! * create a launcher job based on a file * \param xmlExecuteFile : to define the execution on the batch cluster */ //============================================================================= -long -Launcher_cpp::createJobWithFile(const std::string xmlExecuteFile, +long +Launcher_cpp::createJobWithFile(const std::string xmlExecuteFile, const std::string clusterName) { LAUNCHER_MESSAGE("Begin of Launcher_cpp::createJobWithFile"); @@ -498,7 +498,7 @@ Launcher_cpp::createJobWithFile(const std::string xmlExecuteFile, // Creating a new job std::unique_ptr new_job(new Launcher::Job_Command); - std::string cmdFile = Kernel_Utils::GetTmpFileName(); + std::string cmdFile = Kernel_Utils::GetTmpFileName(); #ifndef WIN32 cmdFile += ".sh"; #else @@ -538,7 +538,7 @@ Launcher_cpp::createJobWithFile(const std::string xmlExecuteFile, //============================================================================= /*! * Factory to instantiate the good batch manager for chosen cluster. - */ + */ //============================================================================= Batch::BatchManager * Launcher_cpp::FactoryBatchManager(ParserResourcesType& params) @@ -649,7 +649,7 @@ Launcher_cpp::FactoryBatchManager(ParserResourcesType& params) //---------------------------------------------------------- #else -void +void Launcher_cpp::createJob(Launcher::Job * new_job) { LAUNCHER_INFOS("Launcher compiled without LIBBATCH - cannot create a job !!!"); @@ -665,7 +665,7 @@ Launcher_cpp::createJob(const JobParameters_cpp& job_parameters) "(libBatch was not present at compilation time)"); } -void +void Launcher_cpp::launchJob(int job_id) { LAUNCHER_INFOS("Launcher compiled without LIBBATCH - cannot launch a job !!!"); @@ -754,7 +754,7 @@ Launcher_cpp::restoreJob(const std::string& dumpedJob) return 0; } -long +long Launcher_cpp::createJobWithFile( const std::string xmlExecuteFile, std::string clusterName) { throw LauncherException("Method Launcher_cpp::createJobWithFile is not available " @@ -764,7 +764,7 @@ Launcher_cpp::createJobWithFile( const std::string xmlExecuteFile, std::string c #endif -ParserLauncherType +ParserLauncherType Launcher_cpp::ParseXmlFile(std::string xmlExecuteFile) { ParserLauncherType job_params; @@ -882,7 +882,7 @@ Launcher_cpp::getBatchManager(Launcher::Job * job) } #endif -void +void Launcher_cpp::addJobDirectlyToMap(Launcher::Job * new_job) { // Step 0: Calculated job_id diff --git a/src/Launcher/SALOME_Launcher.cxx b/src/Launcher/SALOME_Launcher.cxx index eace9e774..41d0b850c 100644 --- a/src/Launcher/SALOME_Launcher.cxx +++ b/src/Launcher/SALOME_Launcher.cxx @@ -53,7 +53,7 @@ using namespace std; const char *SALOME_Launcher::_LauncherNameInNS = "/SalomeLauncher"; //============================================================================= -/*! +/*! * Constructor * \param orb */ @@ -79,7 +79,7 @@ SALOME_Launcher::SALOME_Launcher(CORBA::ORB_ptr orb, PortableServer::POA_var poa } //============================================================================= -/*! +/*! * destructor */ //============================================================================= @@ -91,7 +91,7 @@ SALOME_Launcher::~SALOME_Launcher() } -CORBA::Long +CORBA::Long SALOME_Launcher::createJob(const Engines::JobParameters & job_parameters) { JobParameters_cpp cpp_parameters = JobParameters_CORBA2CPP(job_parameters); @@ -111,7 +111,7 @@ SALOME_Launcher::createJob(const Engines::JobParameters & job_parameters) return jobNumber; } -void +void SALOME_Launcher::launchJob(CORBA::Long job_id) { try @@ -218,7 +218,7 @@ SALOME_Launcher::getJobWorkFile(CORBA::Long job_id, const char * work_file, cons return rtn; } -void +void SALOME_Launcher::removeJob(CORBA::Long job_id) { try @@ -235,7 +235,7 @@ SALOME_Launcher::removeJob(CORBA::Long job_id) } } -void +void SALOME_Launcher::stopJob(CORBA::Long job_id) { try @@ -296,7 +296,7 @@ SALOME_Launcher::restoreJob(const char * dumpedJob) * \param clusterName : machine chosen */ //============================================================================= -CORBA::Long +CORBA::Long SALOME_Launcher::createJobWithFile(const char * xmlExecuteFile, const char * clusterName) { @@ -314,11 +314,11 @@ SALOME_Launcher::createJobWithFile(const char * xmlExecuteFile, //============================================================================= /*! CORBA Method: - * the test batch configuration + * the test batch configuration * \param params : The batch cluster */ //============================================================================= -CORBA::Boolean +CORBA::Boolean SALOME_Launcher::testBatch(const Engines::ResourceParameters& params) { MESSAGE("BEGIN OF SALOME_Launcher::testBatch"); @@ -337,9 +337,9 @@ SALOME_Launcher::testBatch(const Engines::ResourceParameters& params) const Engines::ResourceDefinition* p = _ResManager->GetResourceDefinition((*aMachineList)[0]); std::string resource_name(p->name); INFOS("Choose resource for test: " << resource_name); - + BatchTest t(*p); - if (t.test()) + if (t.test()) { rtn = true; } @@ -375,7 +375,7 @@ void SALOME_Launcher::Shutdown() //============================================================================= CORBA::Long SALOME_Launcher::getPID() { - return + return #ifndef WIN32 (CORBA::Long)getpid(); #else @@ -517,7 +517,7 @@ SALOME_Launcher::addObserver(Engines::SalomeLauncherObserver_ptr observer) { observer->notify("NEW_JOB", job_id.str().c_str()); } - catch (...) + catch (...) { MESSAGE("Notify Observer, exception catch"); } @@ -566,7 +566,7 @@ SALOME_Launcher::notifyObservers(const std::string & event_name, (*iter)->notify(CORBA::string_dup(event_name.c_str()), CORBA::string_dup(event_data.c_str())); } - catch (...) + catch (...) { MESSAGE("Notify Observer, exception catch"); } diff --git a/src/Launcher/SALOME_Launcher.hxx b/src/Launcher/SALOME_Launcher.hxx index c7b6701fd..49b0fdeac 100644 --- a/src/Launcher/SALOME_Launcher.hxx +++ b/src/Launcher/SALOME_Launcher.hxx @@ -77,7 +77,6 @@ public: virtual void loadJobs(const char* jobs_file); virtual void saveJobs(const char* jobs_file); - static const char *_LauncherNameInNS; static JobParameters_cpp -- 2.39.2