%extend ParaMEDMEM::DataArrayInt
{
+ void pushBackValsSilent(PyObject *li) throw(INTERP_KERNEL::Exception)
+ {
+ int szArr,sw,iTypppArr;
+ std::vector<int> stdvecTyyppArr;
+ const int *tmp=convertObjToPossibleCpp1_Safe(li,sw,szArr,iTypppArr,stdvecTyyppArr);
+ self->pushBackValsSilent(tmp,tmp+szArr);
+ }
+
PyObject *getDifferentValues() const throw(INTERP_KERNEL::Exception)
{
std::set<int> ret=self->getDifferentValues();
return ParaMEDMEM_DataArrayDouble_New__SWIG_1(elt0,nbOfTuples,elt2);
}
+ void pushBackValsSilent(PyObject *li) throw(INTERP_KERNEL::Exception)
+ {
+ double val;
+ DataArrayDouble *a;
+ DataArrayDoubleTuple *aa;
+ std::vector<double> bb;
+ int sw,nbTuples=-1;
+ const char msg[]="Python wrap of DataArrayDouble::pushBackValsSilent : ";
+ const double *tmp=convertObjToPossibleCpp5_Safe2(li,sw,val,a,aa,bb,msg,1,true,nbTuples);
+ self->pushBackValsSilent(tmp,tmp+nbTuples);
+ }
+
std::string __str__() const
{
return self->repr();
throw INTERP_KERNEL::Exception(oss.str().c_str());
}
else
- return 0;
+ { nbTuples=0; return 0; }
}
}
status=SWIG_ConvertPtr(value,&argp,SWIGTYPE_p_ParaMEDMEM__DataArrayDoubleTuple,0|0);
{
e=reinterpret_cast< ParaMEDMEM::DataArrayDoubleTuple * >(argp);
sw=3;
- if(e->getNumberOfCompo()==nbCompExpected)
+ if(e)
{
- nbTuples=1;
- return e->getConstPointer();
+ if(e->getNumberOfCompo()==nbCompExpected)
+ {
+ nbTuples=1;
+ return e->getConstPointer();
+ }
+ else
+ {
+ std::ostringstream oss; oss << msg << "nb of components expected to be " << nbCompExpected << " , and input DataArrayDoubleTuple has " << e->getNumberOfCompo() << " components !";
+ throw INTERP_KERNEL::Exception(oss.str().c_str());
+ }
}
else
{
- std::ostringstream oss; oss << msg << "nb of components expected to be " << nbCompExpected << " , and input DataArrayDoubleTuple has " << e->getNumberOfCompo() << " components !";
- throw INTERP_KERNEL::Exception(oss.str().c_str());
+ if(throwIfNullPt)
+ {
+ std::ostringstream oss; oss << msg << " null pointer not accepted!";
+ throw INTERP_KERNEL::Exception(oss.str().c_str());
+ }
+ else
+ { nbTuples=0; return 0; }
}
}
throw INTERP_KERNEL::Exception("4 types accepted : integer, double, DataArrayDouble, DataArrayDoubleTuple");