void ExecSystemCommand::bbUserSetDefaultValues()
{
bbSetInputIn("help");
+ bbSetInputVerbose(true);
}
+
void ExecSystemCommand::bbUserInitializeProcessing()
{
}
+
void ExecSystemCommand::bbUserFinalizeProcessing()
{
}
// #if defined(_WIN32)
// ccommand="start /b "+ccommand;
// #endif // defined(_WIN32)
- std::cout << "*** Executing system command : '"<<ccommand<<"'"<<std::endl;
-
+
+ if (bbGetInputVerbose()==true)
+ {
+ std::cout << "*** Executing system command : '"<<ccommand<<"'"<<std::endl;
+ }
result = system ( ccommand.c_str() );
//std::cout << "DFGO - ExecSystemCommand::DoProcess result=" << result << std::endl;
public:
BBTK_BLACK_BOX_INTERFACE(ExecSystemCommand,bbtk::AtomicBlackBox);
BBTK_DECLARE_INPUT(In,std::string)
+ BBTK_DECLARE_INPUT(Verbose,bool)
BBTK_DECLARE_OUTPUT(Return,int);
BBTK_PROCESS(DoProcess);
void DoProcess();
};
BBTK_BEGIN_DESCRIBE_BLACK_BOX(ExecSystemCommand,bbtk::AtomicBlackBox);
- BBTK_NAME("ExecSystemCommand");
- BBTK_AUTHOR("eduardo.davila@creatis.insa-lyon.fr");
- BBTK_DESCRIPTION("Executes system (O.S.) commands");
- BBTK_INPUT(ExecSystemCommand,In,"system (O.S.) commands separated by ';' , use '' to indicate strings ex. help 'graph' ",std::string,"");
- BBTK_OUTPUT(ExecSystemCommand,Return,"result (0 if no error or error number of the first error",int,"");
+ BBTK_NAME("ExecSystemCommand");
+ BBTK_AUTHOR("eduardo.davila@creatis.insa-lyon.fr");
+ BBTK_DESCRIPTION("Executes system (O.S.) commands");
+ BBTK_INPUT(ExecSystemCommand,In,"system (O.S.) commands separated by ';' , use '' to indicate strings ex. help 'graph' ",std::string,"");
+ BBTK_INPUT(ExecSystemCommand,Verbose,"(true default) true with console message / false NO console message",bool,"");
+ BBTK_OUTPUT(ExecSystemCommand,Return,"result (0 if no error or error number of the first error",int,"");
BBTK_END_DESCRIBE_BLACK_BOX(ExecSystemCommand);
} // EO namespace bbstd