STK++ 1.0
STK::IRunnerBase Class Reference

Abstract base class for all classes having a. More...

#include <STK_IRunner.h>

Inheritance diagram for STK::IRunnerBase:
Collaboration diagram for STK::IRunnerBase:

List of all members.

Public Member Functions

virtual ~IRunnerBase ()
 destructor
String const & error () const
 get the last error message.
virtual bool run ()=0
 run the computations.

Protected Member Functions

 IRunnerBase ()
 default constructor
 IRunnerBase (IRunnerBase const &runner)
 copy constructor

Protected Attributes

String msg_error_
 String with the last error message.

Detailed Description

Abstract base class for all classes having a.

 bool run(); 

method. All classes deriving from this class should implement the run method using this kind of code

  bool MyClass::run()
  {
    try
    {
    // do something

    }
    catch(const Exception& e)
    { msg_error_ = e.error();
      return false;
    }
    return true;
  }

Definition at line 65 of file STK_IRunner.h.


Constructor & Destructor Documentation

STK::IRunnerBase::IRunnerBase ( ) [protected]

default constructor

Definition at line 43 of file STK_IRunner.cpp.

                         : msg_error_()
{ }
STK::IRunnerBase::IRunnerBase ( IRunnerBase const &  runner) [protected]

copy constructor

Parameters:
runnerthe runner to copy

Definition at line 48 of file STK_IRunner.cpp.

                        : msg_error_(runner.msg_error_)
{}
STK::IRunnerBase::~IRunnerBase ( ) [virtual]

destructor

Definition at line 53 of file STK_IRunner.cpp.

{ }

Member Function Documentation

String const& STK::IRunnerBase::error ( ) const [inline]

get the last error message.

Returns:
the last error message

Definition at line 83 of file STK_IRunner.h.

References msg_error_.

Referenced by STK::AdditiveBSplineRegression::preRun(), STK::Stat::Multivariate< Real, TContainer2D >::run(), STK::LinearAAModel::run(), and STK::ILinearReduct::run().

{ return msg_error_;}

Member Data Documentation


The documentation for this class was generated from the following files: