]> Creatis software - bbtk.git/blobdiff - packages/std/src/bbstdReadVectorFromFile.h
add ReadVectorFromFile
[bbtk.git] / packages / std / src / bbstdReadVectorFromFile.h
diff --git a/packages/std/src/bbstdReadVectorFromFile.h b/packages/std/src/bbstdReadVectorFromFile.h
new file mode 100644 (file)
index 0000000..65580a3
--- /dev/null
@@ -0,0 +1,50 @@
+//===== 
+// 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)
+//===== 
+#ifndef __bbstdReadVectorFromFile_h_INCLUDED__
+#define __bbstdReadVectorFromFile_h_INCLUDED__
+#include "bbstd_EXPORT.h"
+#include "bbtkAtomicBlackBox.h"
+#include "iostream"
+
+
+namespace bbstd
+{
+
+class bbstd_EXPORT ReadVectorFromFile
+ : 
+   public bbtk::AtomicBlackBox
+{
+  BBTK_BLACK_BOX_INTERFACE(ReadVectorFromFile,bbtk::AtomicBlackBox);
+//===== 
+// 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)
+//===== 
+       BBTK_DECLARE_INPUT(FileName,std::string);
+       BBTK_DECLARE_OUTPUT(Out,std::vector <std::vector<double> >);
+       BBTK_DECLARE_INPUT(LineLength,int);     
+       BBTK_PROCESS(Process);
+  void Process();
+//===== 
+// 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)
+//===== 
+};
+
+BBTK_BEGIN_DESCRIBE_BLACK_BOX(ReadVectorFromFile,bbtk::AtomicBlackBox);
+       BBTK_NAME("ReadVectorFromFile");
+       BBTK_AUTHOR("jpr");
+       BBTK_DESCRIPTION("Read any Vector from a text file");
+       BBTK_CATEGORY("read/write");
+       BBTK_INPUT(ReadVectorFromFile,FileName,"3D Points file name",std::string,"");
+       BBTK_INPUT(ReadVectorFromFile,LineLength,"(default 1) - The number of columns of the file",int,"");     
+       BBTK_OUTPUT(ReadVectorFromFile,Out,"vector of data",std::vector< std::vector <double> >,"");
+
+BBTK_END_DESCRIBE_BLACK_BOX(ReadVectorFromFile);
+//===== 
+// 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)
+//===== 
+
+}
+// EO namespace bbstd
+
+#endif // __bbstdReadVectorFromFile_h_INCLUDED__
+