From 2013d57fe8bfd397388846079e32f2eb0aff0f3c Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Tue, 28 Dec 2010 22:54:10 +0100 Subject: [PATCH] fixed an issue in eoParallel class --- eo/src/utils/eoParallel.cpp | 30 ++++++++++++------------------ eo/src/utils/eoParallel.h | 7 ++++--- 2 files changed, 16 insertions(+), 21 deletions(-) diff --git a/eo/src/utils/eoParallel.cpp b/eo/src/utils/eoParallel.cpp index ddfec8fb6..d3fd2d665 100644 --- a/eo/src/utils/eoParallel.cpp +++ b/eo/src/utils/eoParallel.cpp @@ -38,41 +38,35 @@ std::string eoParallel::className() const return "eoParallel"; } -void eoParallel::_createParameters( eoParser& parser ) +std::string eoParallel::prefix() const { - std::string section("Parallelization"); - - parser.processParam( _isEnabled, section ); - parser.processParam( _isDynamic, section ); - - std::string default_value( _prefix.defValue() ); + std::string value( _prefix.value() ); if ( _isEnabled.value() ) { if ( _isDynamic.value() ) { - default_value += "_dynamic.out"; + value += "_dynamic.out"; } else { - default_value += "_parallel.out"; + value += "_parallel.out"; } } else { - default_value += "_sequential.out"; + value += "_sequential.out"; } - _prefix.defValue( default_value ); - - std::cout << "defvalue: " << _prefix.defValue() << std::endl; + return value; +} +void eoParallel::_createParameters( eoParser& parser ) +{ + std::string section("Parallelization"); + parser.processParam( _isEnabled, section ); + parser.processParam( _isDynamic, section ); parser.processParam( _prefix, section ); - - std::cout << "value: " << parser.getParamWithLongName("parallelize-prefix")->getValue() << std::endl; - - std::cout << "defvalue: " << _prefix.defValue() << std::endl; - } void make_parallel(eoParser& parser) diff --git a/eo/src/utils/eoParallel.h b/eo/src/utils/eoParallel.h index 397bb5f0d..4e13f8b31 100644 --- a/eo/src/utils/eoParallel.h +++ b/eo/src/utils/eoParallel.h @@ -47,9 +47,10 @@ public: virtual std::string className() const; - inline bool isEnabled() { return _isEnabled.value(); } - inline bool isDynamic() { return _isDynamic.value(); } - inline std::string prefix() { return _prefix.value(); } + inline bool isEnabled() const { return _isEnabled.value(); } + inline bool isDynamic() const { return _isDynamic.value(); } + + std::string prefix() const; friend void make_parallel(eoParser&);