MotorControlModuleSDFM_TMS3.../Projects/EFC_Communication/UMLibrary/configuration/software/AppBuilderRobust.cpp
2024-06-07 11:12:56 +03:00

86 lines
1.4 KiB
C++
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*
* AppBuilderRobust.cpp
*
* Created on: 9 сент. 2020 г.
* 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;
}