From 6642159d0e49fda98c497bdd628cfc70502f37f0 Mon Sep 17 00:00:00 2001 From: Eduardo DAVILA Date: Mon, 28 Jun 2021 10:22:04 +0200 Subject: [PATCH] #3468 spin box --- packages/std/src/bbstdSpin.cxx | 97 ++++++++++++++++++++++++++++++++++ packages/std/src/bbstdSpin.h | 58 ++++++++++++++++++++ 2 files changed, 155 insertions(+) create mode 100644 packages/std/src/bbstdSpin.cxx create mode 100644 packages/std/src/bbstdSpin.h diff --git a/packages/std/src/bbstdSpin.cxx b/packages/std/src/bbstdSpin.cxx new file mode 100644 index 0000000..7c915d3 --- /dev/null +++ b/packages/std/src/bbstdSpin.cxx @@ -0,0 +1,97 @@ +//===== +// 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) +//===== +#include "bbstdSpin.h" +#include "bbstdPackage.h" +namespace bbstd +{ + +BBTK_ADD_BLACK_BOX_TO_PACKAGE(std,Spin) +BBTK_BLACK_BOX_IMPLEMENTATION(Spin,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) +//===== +void Spin::Process() +{ + +// THE MAIN PROCESSING METHOD BODY +// Here we simply set the input 'In' value to the output 'Out' +// And print out the output value +// INPUT/OUTPUT ACCESSORS ARE OF THE FORM : +// void bbSet{Input|Output}NAME(const TYPE&) +// const TYPE& bbGet{Input|Output}NAME() const +// Where : +// * NAME is the name of the input/output +// (the one provided in the attribute 'name' of the tag 'input') +// * TYPE is the C++ type of the input/output +// (the one provided in the attribute 'type' of the tag 'input') +// bbSetOutputOut( bbGetInputIn() ); +// std::cout << "Output value = " <bbGetInputEnd()) + { + count = bbGetInputStart(); + } // if count + }else{ + if (count>bbGetInputEnd()) + { + count = bbGetInputEnd(); + } // if count + } // if Loop + + if (count