openModeller  Version 1.5.0
PreJackknifeFactory.cpp
Go to the documentation of this file.
1 
28 #include "PreJackknifeFactory.hh"
29 #include "PreJackknife.hh"
30 
32 : PreAlgorithmFactory( std::string( "PreJackknife" ) )
33 {
34 };
35 
37 {
38 };
39 
40 
42 {
43  PreAlgorithm* instance_ptr = new PreJackknife();
44 
45  if(!instance_ptr->reset( arg ))
46  {
47  std::string msg = "PreJackknifeFactory::build: Invalid parameters.\n";
48  Log::instance()->error( msg.c_str() );
49  throw InvalidParameterException( msg );
50  }
51  return instance_ptr;
52 }
53 
static Log * instance()
Returns the instance pointer, creating the object on the first call.
Definition: Log.cpp:45
bool reset(const PreParameters &params)
PreAlgorithm * build(const PreParameters &arg)
void error(const char *format,...)
'Error' level.
Definition: Log.cpp:290