Commit c8bed4cf authored by Laurent Belcour's avatar Laurent Belcour

Adding a todo.dox file

parent 4ae204f6
/**
\page todo_list Todo
\todo Change the automatic compilation soft to Cmake of scons
*/
......@@ -22,12 +22,7 @@ class fitter
virtual void set_parameters(const arguments& args) = 0 ;
/*
// Provide a function class and a data class
//
virtual data* provide_data() const = 0 ;
virtual function* provide_function() const = 0 ;
*/
} ;
Q_DECLARE_INTERFACE(fitter, "Fitter.Fitter")
......@@ -218,6 +218,30 @@ data* plugins_manager::get_data(const std::string& n)
}
fitter* plugins_manager::get_fitter(const std::string& n) const
{
if(n.empty())
{
#ifdef DEBUG
std::cout << "<<DEBUG>> no fitter plugin specified, returning null" << std::endl;
#endif
return NULL;
}
#ifndef USING_STATIC
FitterPrototype myFitter = (FitterPrototype) QLibrary::resolve(QString(n.c_str()), "_Z16provide_fitter");
if(myFitter != NULL)
{
#ifdef DEBUG
std::cout << "<<DEBUG>> using function provider in file \"" << n << "\"" << std::endl;
#endif
return myFitter();
}
else
{
std::cerr << "<<ERROR>> no data provider found in file \"" << n << "\"" << std::endl;
return new NULL() ;
}
#else
if(_fitters.count(n) == 0)
{
return NULL ;
......@@ -229,6 +253,7 @@ fitter* plugins_manager::get_fitter(const std::string& n) const
#endif
return _fitters.find(n)->second ;
}
#endif
}
// \todo implement the Darwin (MACOS) version.
......
......@@ -333,6 +333,11 @@ int data_merl::dimY() const
return 3 ;
}
data* provide_data()
{
return new data_merl();
}
Q_EXPORT_PLUGIN2(data_merl, data_merl)
......@@ -11,5 +11,6 @@ SUBDIRS = \
rational_fitter_matlab \
rational_fitter_dca \
nonlinear_levenberg_eigen \
nonlinear_function_phong \
data_merl
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment