// * TYPE is the C++ type of the input/output
// (the one provided in the attribute 'type' of the tag 'input')
-
- spr -> SetFileName( bbGetInputIn().c_str() );
- sp = spr->GetOutput();
- sp -> Update();
- bbSetOutputOut( sp );
+ //warning: comparison with string literal results in unspecified behaviour
+ //if ( bbGetInputIn().c_str()!="")
+ std::string empty(""); // JPR
+ if ( bbGetInputIn().c_str()!=empty)
+ {
+ spr -> SetFileName( bbGetInputIn().c_str() );
+ sp = spr->GetOutput();
+ sp -> Update();
+ bbSetOutputOut( sp );
+ } else {
+ bbSetOutputOut( NULL );
+ }
}
//=====
// SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX
// Here we initialize the input 'In' to 0
bbSetInputIn("");
-
+ bbSetOutputOut( NULL );
+
}
//=====
// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)