BBTK_DESCRIPTION("Gets the i-th element from the input vector ("+bbtk::TypeName<std::vector<T> >());
typedef std::vector<T> Tvector;
BBTK_TEMPLATE_INPUT(GetVectorElement, In,"Input",Tvector);
- BBTK_TEMPLATE_INPUT(GetVectorElement, I, "Input",int);
+ BBTK_TEMPLATE_INPUT(GetVectorElement, I, "iElement (default 0)",int);
BBTK_TEMPLATE_INPUT(GetVectorElement, ErrorValue, "ErrorValue",T);
BBTK_TEMPLATE_OUTPUT(GetVectorElement,Out,"Output",T);
BBTK_END_DESCRIBE_TEMPLATE_BLACK_BOX(GetVectorElement);
template <class T>
void GetVectorElement<T>::DoIt()
{
- if (( bbGetInputI() < bbGetInputIn().size() ) && ( bbGetInputI() >= 0 ) )
+ if (( bbGetInputI() < (int)bbGetInputIn().size() ) && ( bbGetInputI() >= 0 ) )
{
bbSetOutputOut( bbGetInputIn()[bbGetInputI()] );
} else {
template <class T>
void GetVectorElement<T>::bbUserSetDefaultValues()
{
-
+ bbSetInputI(0);
}
//=================================================================
//=================================================================