]> Creatis software - bbtk.git/blobdiff - packages/std/src/bbstdGetDoubleVectorSize.cxx
Feature #1742 Add a box providing the size of a vector (an example has been added).
[bbtk.git] / packages / std / src / bbstdGetDoubleVectorSize.cxx
diff --git a/packages/std/src/bbstdGetDoubleVectorSize.cxx b/packages/std/src/bbstdGetDoubleVectorSize.cxx
new file mode 100644 (file)
index 0000000..2bccfc1
--- /dev/null
@@ -0,0 +1,32 @@
+#include "bbstdGetDoubleVectorSize.h"
+#include "bbstdPackage.h"
+namespace bbstd
+{
+
+BBTK_ADD_BLACK_BOX_TO_PACKAGE(std,GetDoubleVectorSize)
+BBTK_BLACK_BOX_IMPLEMENTATION(GetDoubleVectorSize,bbtk::AtomicBlackBox);
+
+void GetDoubleVectorSize::Process()
+{
+// THE MAIN PROCESSING METHOD BODY
+   int size = bbGetInputIn().size();
+   bbSetOutputVectorSize(size);  
+}
+
+void GetDoubleVectorSize::bbUserSetDefaultValues()
+{
+   // THE DEFAULT INPUT/OUTPUT VALUES 
+   bbSetOutputVectorSize(-1);  
+}
+void GetDoubleVectorSize::bbUserInitializeProcessing()
+{
+}
+
+void GetDoubleVectorSize::bbUserFinalizeProcessing()
+{
+  
+}
+}
+// EO namespace bbstd