2 // 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)
4 #include "bbstdSplitFilePathVector.h"
5 #include "bbstdPackage.h"
9 BBTK_ADD_BLACK_BOX_TO_PACKAGE(std,SplitFilePathVector)
10 BBTK_BLACK_BOX_IMPLEMENTATION(SplitFilePathVector,bbtk::AtomicBlackBox);
12 // 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)
14 void SplitFilePathVector::Process()
17 // THE MAIN PROCESSING METHOD BODY
18 // Here we simply set the input 'In' value to the output 'Out'
19 // And print out the output value
20 // INPUT/OUTPUT ACCESSORS ARE OF THE FORM :
21 // void bbSet{Input|Output}NAME(const TYPE&)
22 // const TYPE& bbGet{Input|Output}NAME() const
24 // * NAME is the name of the input/output
25 // (the one provided in the attribute 'name' of the tag 'input')
26 // * TYPE is the C++ type of the input/output
27 // (the one provided in the attribute 'type' of the tag 'input')
29 // bbSetOutputOut( bbGetInputIn() );nt
30 // std::cout << "Output value = " <<bbGetOutputOut() << std::endl;
35 std::vector<std::string> LstPath;
36 std::vector<std::string> LstFileName;
37 std::vector<std::string> LstBaseName;
38 std::vector<std::string> LstExtention;
40 unsigned int i, size=bbGetInputIn().size();
43 found = bbGetInputIn()[i].find_last_of("/\\");
44 LstPath.push_back( bbGetInputIn()[i].substr(0,found+1) );
45 filename = bbGetInputIn()[i].substr(found+1);
46 LstFileName.push_back( filename );
47 found = filename.find_last_of(".");
48 LstBaseName.push_back( filename.substr(0,found) );
49 LstExtention.push_back( filename.substr(found+1) );
52 bbSetOutputPath( LstPath );
53 bbSetOutputBaseName( LstBaseName );
54 bbSetOutputExt( LstExtention );
55 bbSetOutputFileName( LstFileName );
58 bbSetOutputSlash("\\");
60 bbSetOutputSlash("/");
66 // 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)
68 void SplitFilePathVector::bbUserSetDefaultValues()
71 // SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX
72 // Here we initialize the input 'In' to 0
77 // 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)
79 void SplitFilePathVector::bbUserInitializeProcessing()
82 // THE INITIALIZATION METHOD BODY :
84 // but this is where you should allocate the internal/output pointers
90 // 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)
92 void SplitFilePathVector::bbUserFinalizeProcessing()
95 // THE FINALIZATION METHOD BODY :
97 // but this is where you should desallocate the internal/output pointers
102 // EO namespace bbstd