BBTK_TEMPLATE_BLACK_BOX_INTERFACE(GetVectorPointer,bbtk::AtomicBlackBox,T);
BBTK_DECLARE_INPUT(In,std::vector<T>);
BBTK_DECLARE_OUTPUT(PVec,std::vector<T>*);
+ BBTK_DECLARE_OUTPUT(Vec,std::vector<T>);
BBTK_PROCESS(DoIt);
void DoIt();
std::vector<T> vec;
+
+ bool firsttime;
};
//=================================================================
// BBTK_TEMPLATE_INPUT(GetVectorPointer, ErrorValue, "ErrorValue",T);
// BBTK_TEMPLATE_OUTPUT(GetVectorPointer,Out,"Output",T);
BBTK_TEMPLATE_OUTPUT(GetVectorPointer,PVec,"Output Pointer Vector",std::vector<T>*);
+BBTK_TEMPLATE_OUTPUT(GetVectorPointer,Vec,"Output Vector",std::vector<T>);
BBTK_END_DESCRIBE_TEMPLATE_BLACK_BOX(GetVectorPointer);
//=================================================================
template <class T>
void GetVectorPointer<T>::DoIt()
{
- vec = bbGetInputIn();
+ if (firsttime==true) vec = bbGetInputIn();
+ firsttime=false;
bbSetOutputPVec( &vec );
+ bbSetOutputVec( vec );
}
//=================================================================
template <class T>
void GetVectorPointer<T>::bbUserSetDefaultValues()
{
-
+ firsttime=true;
}
//=================================================================
//=================================================================
// Get the name of the input which changed
std::string input_name = c->GetConnection()->GetBlackBoxToInput();
// Set the output to the value of the input which changed
- bbSetOutputOut( bbGetInput(input_name) );
+ bbSetOutputOut( bbGetInput(input_name) );
+ printf("EED SharedMemory::bbSetStatusAndPropagate input_name:%s \n",input_name.c_str() );
}
// No more change allowed
mCanSet = false;
{
firsttime = false;
bbSetOutputOut( bbGetInputIn() );
- }
- }
+ } // if firsttime
+}
BBTK_ADD_BLACK_BOX_TO_PACKAGE(std,SharedMemory);
BBTK_BLACK_BOX_IMPLEMENTATION(SharedMemory,bbtk::AtomicBlackBox);
{
bbSetOutputOut( atof ( bbGetInputIn().c_str() ) );
}
-
+
+ template <> void StringTo<long> ::DoIt()
+ {
+ bbSetOutputOut( (long)atoi ( bbGetInputIn().c_str() ) );
+ }
+
//====================================================================
//====================================================================
BBTK_ADD_TEMPLATE_BLACK_BOX_TO_PACKAGE(std,StringTo,uint32_t);
BBTK_ADD_TEMPLATE_BLACK_BOX_TO_PACKAGE(std,StringTo,float);
BBTK_ADD_TEMPLATE_BLACK_BOX_TO_PACKAGE(std,StringTo,double);
+ BBTK_ADD_TEMPLATE_BLACK_BOX_TO_PACKAGE(std,StringTo,long);
BBTK_ADD_TEMPLATE_BLACK_BOX_TO_PACKAGE(std,StringTo,Void);
//====================================================================
BBTK_ADD_TEMPLATE_BLACK_BOX_TO_PACKAGE(std,ToString,uint32_t);
BBTK_ADD_TEMPLATE_BLACK_BOX_TO_PACKAGE(std,ToString,float);
BBTK_ADD_TEMPLATE_BLACK_BOX_TO_PACKAGE(std,ToString,double);
+ BBTK_ADD_TEMPLATE_BLACK_BOX_TO_PACKAGE(std,ToString,long);
//====================================================================
#include "bbwxComboBox.h"
#include "bbwxPackage.h"
-
#include <vector>
#include <string>
int typeForm,
int sizeX,
int sizeY
- )
- :
+ ) :
wxPanel( parent, -1,wxDefaultPosition ) ,
mBox(box),
mTypeForm(typeForm)
wxorientation = wxSL_VERTICAL;
}
+
+ wxSize sizeSliderWidget(25,25);
+// int widthSliderWidget = wxDefaultSize;
+
//---------------------------------------------------------------------
// 1) Creation of the components of the widget
// Any top level sub-widget must have the panel returned by panel
mwxSlider = new wxSlider( panel,
-1, 0 , 0, 500 ,
wxDefaultPosition,
- wxDefaultSize, wxSL_HORIZONTAL|wxSL_LABELS, wxDefaultValidator);
+ sizeSliderWidget, wxSL_HORIZONTAL|wxSL_LABELS, wxDefaultValidator);
// mwxSlider->SetInitialSize(wxSize(sizeX,sizeY));