X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=packages%2Fstd%2Fsrc%2FbbstdMakeFileName.cxx;h=5ab0115bdedf0f814efc1602633726f5d6013e79;hb=4ad5b5ee44357ad873bc8c43230defb6d0a79879;hp=e450d2cbd0f7e364571c14f93c78f7ea1a8a627a;hpb=c2a4b1893412e50a3d9abff221938a2d16c4a7cb;p=bbtk.git diff --git a/packages/std/src/bbstdMakeFileName.cxx b/packages/std/src/bbstdMakeFileName.cxx index e450d2c..5ab0115 100644 --- a/packages/std/src/bbstdMakeFileName.cxx +++ b/packages/std/src/bbstdMakeFileName.cxx @@ -5,28 +5,28 @@ namespace bbstd { - BBTK_ADD_BLACK_BOX_TO_PACKAGE(std,MakeFileName) - BBTK_USER_BLACK_BOX_IMPLEMENTATION(MakeFileName,bbtk::AtomicBlackBox); - - void MakeFileName::bbUserConstructor() - { - bbSetInputDirectory(""); - bbSetInputFile(""); - bbSetInputExtent(""); - } - - void MakeFileName::DoProcess() - { - std::string fileSep = bbtk::ConfigurationFile::GetInstance().Get_file_separator(); - std::string fullFileName = bbGetInputDirectory(); - if ( fullFileName.c_str()[fullFileName.size()-1] != '/' && fullFileName.c_str()[fullFileName.size()-1] != '\\' ) - fullFileName += fileSep; - fullFileName += bbGetInputFile(); - if ( bbGetInputExtent() != "") - if ( bbGetInputExtent()[0] != '.' ) - fullFileName += "."; - fullFileName += bbGetInputExtent(); - bbSetOutputOut( fullFileName ); - } + BBTK_ADD_BLACK_BOX_TO_PACKAGE(std,MakeFileName); + BBTK_BLACK_BOX_IMPLEMENTATION(MakeFileName,bbtk::AtomicBlackBox); + + void MakeFileName::bbUserConstructor() + { + bbSetInputDirectory(""); + bbSetInputFile(""); + bbSetInputExtent(""); + } + + void MakeFileName::DoProcess() + { + std::string fileSep = bbtk::ConfigurationFile::GetInstance().Get_file_separator(); + std::string fullFileName = bbGetInputDirectory(); + if ( fullFileName.c_str()[fullFileName.size()-1] != '/' && fullFileName.c_str()[fullFileName.size()-1] != '\\' ) + fullFileName += fileSep; + fullFileName += bbGetInputFile(); + if ( bbGetInputExtent() != "") + if ( bbGetInputExtent()[0] != '.' ) + fullFileName += "."; + fullFileName += bbGetInputExtent(); + bbSetOutputOut( fullFileName ); + } } // EO namespace bbstd