Commit 43a720b8 authored by Laurent Belcour's avatar Laurent Belcour

ALTA compiles after updating the interface to shared pointer data objects.

parent e4260bb6
...@@ -98,8 +98,9 @@ env.AppendUnique(CPPPATH = ['#sources']) ...@@ -98,8 +98,9 @@ env.AppendUnique(CPPPATH = ['#sources'])
Export('env') Export('env')
external = env.SConscript('external/SConscript') external = env.SConscript('external/SConscript')
core = env.SConscript('sources/core/SConscript') #core = env.SConscript('sources/core/SConscript')
plugins = env.SConscript('sources/plugins/SConscript') #plugins = env.SConscript('sources/plugins/SConscript')
softs = env.SConscript('sources/softs/SConscript') #softs = env.SConscript('sources/softs/SConscript')
env.SConscript(dirs=['sources/core', 'sources/softs', 'sources/plugins'])
env.NoClean(external) #env.NoClean(external)
\ No newline at end of file
...@@ -302,7 +302,7 @@ ptr<fitter> plugins_manager::get_fitter(const std::string& n) ...@@ -302,7 +302,7 @@ ptr<fitter> plugins_manager::get_fitter(const std::string& n)
#ifdef DEBUG #ifdef DEBUG
std::cout << "<<DEBUG>> no fitter plugin specified, returning null" << std::endl; std::cout << "<<DEBUG>> no fitter plugin specified, returning null" << std::endl;
#endif #endif
return ptr<NULL>; return NULL;
} }
FitterPrototype myFitter = open_library<FitterPrototype>(n, "provide_fitter"); FitterPrototype myFitter = open_library<FitterPrototype>(n, "provide_fitter");
...@@ -311,12 +311,12 @@ ptr<fitter> plugins_manager::get_fitter(const std::string& n) ...@@ -311,12 +311,12 @@ ptr<fitter> plugins_manager::get_fitter(const std::string& n)
#ifdef DEBUG #ifdef DEBUG
std::cout << "<<DEBUG>> using function provider in file \"" << n << "\"" << std::endl; std::cout << "<<DEBUG>> using function provider in file \"" << n << "\"" << std::endl;
#endif #endif
return ptr<myFitter()>; return myFitter();
} }
else else
{ {
std::cerr << "<<ERROR>> no fitter provider found in file \"" << n << "\"" << std::endl; std::cerr << "<<ERROR>> no fitter provider found in file \"" << n << "\"" << std::endl;
return ptr<NULL> ; return NULL ;
} }
} }
......
...@@ -47,7 +47,7 @@ class yoo_function : public nonlinear_function ...@@ -47,7 +47,7 @@ class yoo_function : public nonlinear_function
//! \brief Boostrap the function by defining the diffuse term //! \brief Boostrap the function by defining the diffuse term
//! //!
//! \details //! \details
virtual void bootstrap(const data* d, const arguments& args); virtual void bootstrap(const ptr<data> d, const arguments& args);
//! \brief Number of parameters to this non-linear function //! \brief Number of parameters to this non-linear function
virtual int nbParameters() const ; virtual int nbParameters() const ;
......
...@@ -169,7 +169,7 @@ class quadratic_program ...@@ -169,7 +169,7 @@ class quadratic_program
//! \brief Test all the constraints of the data. //! \brief Test all the constraints of the data.
//! Add the sample that is farest away from the function. //! Add the sample that is farest away from the function.
bool test_constraints(int ny, const rational_function_1d* r, const vertical_segment* data) bool test_constraints(int ny, const rational_function_1d* r, const ptr<vertical_segment>& data)
{ {
#ifdef PACANOWSKI2012 #ifdef PACANOWSKI2012
int nb_failed = 0; int nb_failed = 0;
......
...@@ -106,7 +106,7 @@ int main(int argc, char** argv) ...@@ -106,7 +106,7 @@ int main(int argc, char** argv)
ptr<data> d = plugins_manager::get_data(args["data"]); ptr<data> d = plugins_manager::get_data(args["data"]);
d->load(args["input"], args); d->load(args["input"], args);
if(f == NULL || d == NULL) if(f == NULL || !d)
{ {
std::cerr << "<<ERROR>> no function or data object correctly defined" << std::endl; std::cerr << "<<ERROR>> no function or data object correctly defined" << std::endl;
return 1; return 1;
......
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