86 lines
1.4 KiB
C++
86 lines
1.4 KiB
C++
|
|
/*
|
|||
|
|
* AppBuilderRobust.cpp
|
|||
|
|
*
|
|||
|
|
* Created on: 9 <EFBFBD><EFBFBD><EFBFBD><EFBFBD>. 2020 <EFBFBD>.
|
|||
|
|
* Author: LeonidTitov
|
|||
|
|
*/
|
|||
|
|
|
|||
|
|
#include "AppBuilderRobust.hh"
|
|||
|
|
|
|||
|
|
bool configuration::software::AppBuilderRobust::do_input( Environment & env, application::ISetupStep * & step ) {
|
|||
|
|
|
|||
|
|
if( not step )
|
|||
|
|
return false;
|
|||
|
|
|
|||
|
|
const bool status = step->input(env);
|
|||
|
|
|
|||
|
|
return status;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
bool configuration::software::AppBuilderRobust::do_prepare( application::ISetupStep * & step ) {
|
|||
|
|
|
|||
|
|
if( not step )
|
|||
|
|
return false;
|
|||
|
|
|
|||
|
|
const bool status = step->prepare();
|
|||
|
|
|
|||
|
|
return status;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
bool configuration::software::AppBuilderRobust::do_build( Environment & env, application::ISetupStep * & step ) {
|
|||
|
|
|
|||
|
|
if( not step )
|
|||
|
|
return false;
|
|||
|
|
|
|||
|
|
bool status = false;
|
|||
|
|
|
|||
|
|
try {
|
|||
|
|
|
|||
|
|
step->build(env);
|
|||
|
|
|
|||
|
|
} catch(std::exception & exp) {
|
|||
|
|
|
|||
|
|
step = nullptr;
|
|||
|
|
status = false;
|
|||
|
|
|
|||
|
|
throw;
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
if( env.exception.raised() ) {
|
|||
|
|
|
|||
|
|
step = nullptr;
|
|||
|
|
status = false;
|
|||
|
|
|
|||
|
|
} else {
|
|||
|
|
|
|||
|
|
status = true;
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
return status;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
bool configuration::software::AppBuilderRobust::do_end( Environment & env, application::ISetupStep * & step ) {
|
|||
|
|
|
|||
|
|
if( not step )
|
|||
|
|
return false;
|
|||
|
|
|
|||
|
|
bool status = false;
|
|||
|
|
|
|||
|
|
step->finalize();
|
|||
|
|
|
|||
|
|
if( env.exception.raised() ) {
|
|||
|
|
|
|||
|
|
step = nullptr;
|
|||
|
|
status = false;
|
|||
|
|
|
|||
|
|
} else {
|
|||
|
|
|
|||
|
|
status = true;
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
return status;
|
|||
|
|
}
|