]> Creatis software - bbtk.git/blobdiff - packages/std/src/bbstdFilesFromDirectory.h
*** empty log message ***
[bbtk.git] / packages / std / src / bbstdFilesFromDirectory.h
index 10ec9b226b5859ddfc23a3ce35da3f931db7ba54..125909ba62a6373c58adf652d3ddde351af42092 100644 (file)
@@ -2,51 +2,53 @@
 #define __bbstdFilesFromDirectory_h_INCLUDED__
 #include "bbtkAtomicBlackBox.h"
 #include "iostream"
+#include "bbstd_EXPORT.h"
 
 namespace bbstd
 {
 
-class /*BBTK_EXPORT*/ FilesFromDirectory
- : 
-   public bbtk::AtomicBlackBox
-{
-  BBTK_BLACK_BOX_INTERFACE(FilesFromDirectory,bbtk::AtomicBlackBox);
-//==================================================================
-/// User callback called in the box contructor
-virtual void bbUserConstructor();
-/// User callback called in the box copy constructor
-virtual void bbUserCopyConstructor(bbtk::BlackBox::Pointer);
-/// User callback called in the box destructor
-virtual void bbUserDestructor();
-//==================================================================
-  BBTK_DECLARE_INPUT(In,std::string);
-  BBTK_DECLARE_INPUT(Recursive,bool);  
-  BBTK_DECLARE_OUTPUT(Out,std::vector<std::string>);
-  BBTK_PROCESS(Process);
-  void Process();
-  
+  class bbstd_EXPORT FilesFromDirectory
   
+    public bbtk::AtomicBlackBox
+  {
+    BBTK_BLACK_BOX_INTERFACE(FilesFromDirectory,bbtk::AtomicBlackBox);
+    //==================================================================
+    /// User callback called in the box contructor
+    virtual void bbUserConstructor();
+    /// User callback called in the box copy constructor
+    virtual void bbUserCopyConstructor(bbtk::BlackBox::Pointer);
+    /// User callback called in the box destructor
+    virtual void bbUserDestructor();
+    //==================================================================
+    BBTK_DECLARE_INPUT(In,std::string);
+    BBTK_DECLARE_INPUT(Recursive,bool);  
+    BBTK_DECLARE_OUTPUT(Out,std::vector<std::string>);
+    BBTK_PROCESS(Process);
+    void Process();
+    
   private :
-  std::string NormalizePath(std::string const &pathname);
-  int Explore(std::string const &dirpath, bool recursive);
+    std::string NormalizePath(std::string const &pathname);
+    int Explore(std::string const &dirpath, bool recursive);
+    
+    /// List of file names
+    std::vector<std::string> Filenames;
+    /// name of the root directory to explore
+    std::string DirName;
+  };
   
-  /// List of file names
-  std::vector<std::string> Filenames;
-  /// name of the root directory to explore
-  std::string DirName;
-};
-
-//=================================================================
-// UserBlackBox description
-BBTK_BEGIN_DESCRIBE_BLACK_BOX(FilesFromDirectory,bbtk::AtomicBlackBox);
-BBTK_NAME("FilesFromDirectory");
-BBTK_AUTHOR("jpr@creatis.univ-lyon1.fr");
-BBTK_DESCRIPTION("returns the fullPathNames of the files in a Directory");
-BBTK_CATEGORY("");
-BBTK_INPUT(FilesFromDirectory,In,"Directory Name",std::string,"");
-BBTK_INPUT(FilesFromDirectory,Recursive,"Recursive directory exploration",bool,"");
+  //=================================================================
+  // BlackBox description
+  BBTK_BEGIN_DESCRIBE_BLACK_BOX(FilesFromDirectory,bbtk::AtomicBlackBox);
+  BBTK_NAME("FilesFromDirectory");
+  BBTK_AUTHOR("jpr@creatis.univ-lyon1.fr");
+  BBTK_DESCRIPTION("returns the fullPathNames of the files in a Directory");
+  BBTK_CATEGORY("");
+  BBTK_INPUT(FilesFromDirectory,In,"Directory Name",std::string,"");
+  BBTK_INPUT(FilesFromDirectory,Recursive,"Recursive directory exploration",bool,"");
+  
+  BBTK_OUTPUT(FilesFromDirectory,Out,"FullPathNames of the files",std::vector<std::string>,"");
+  BBTK_END_DESCRIBE_BLACK_BOX(FilesFromDirectory);
 
-BBTK_OUTPUT(FilesFromDirectory,Out,"FullPathNames of the files",std::vector<std::string>,"");
-BBTK_END_DESCRIBE_BLACK_BOX(FilesFromDirectory);
 }
 // EO namespace bbstd