ENH: Remove unneccesary private method from XdmfArray. Regenerate python wrappers.

parent 83237ef8
......@@ -169,10 +169,10 @@ class XdmfArrayPtr(_object):
def New(self): return _Xdmf.XdmfArrayPtr_New(self)
def copyValues(self, *args): return _Xdmf.XdmfArrayPtr_copyValues(self, *args)
def clear(self): return _Xdmf.XdmfArrayPtr_clear(self)
def getType(self): return _Xdmf.XdmfArrayPtr_getType(self)
def getHDF5Type(self): return _Xdmf.XdmfArrayPtr_getHDF5Type(self)
def getPrecision(self): return _Xdmf.XdmfArrayPtr_getPrecision(self)
def getSize(self): return _Xdmf.XdmfArrayPtr_getSize(self)
def getType(self): return _Xdmf.XdmfArrayPtr_getType(self)
def getValuesPointer(self): return _Xdmf.XdmfArrayPtr_getValuesPointer(self)
def getValuesString(self): return _Xdmf.XdmfArrayPtr_getValuesString(self)
def printSelf(self): return _Xdmf.XdmfArrayPtr_printSelf(self)
......@@ -580,10 +580,10 @@ class XdmfArray(XdmfItem):
if _newclass:New = staticmethod(_Xdmf.XdmfArray_New)
def copyValues(self, *args): return _Xdmf.XdmfArray_copyValues(self, *args)
def clear(self): return _Xdmf.XdmfArray_clear(self)
def getType(self): return _Xdmf.XdmfArray_getType(self)
def getHDF5Type(self): return _Xdmf.XdmfArray_getHDF5Type(self)
def getPrecision(self): return _Xdmf.XdmfArray_getPrecision(self)
def getSize(self): return _Xdmf.XdmfArray_getSize(self)
def getType(self): return _Xdmf.XdmfArray_getType(self)
def getValuesPointer(self): return _Xdmf.XdmfArray_getValuesPointer(self)
def getValuesString(self): return _Xdmf.XdmfArray_getValuesString(self)
def printSelf(self): return _Xdmf.XdmfArray_printSelf(self)
......
......@@ -300,11 +300,11 @@ void XdmfArray::copyValues(int startIndex, boost::shared_ptr<XdmfArray> values,
if(!mInitialized)
{
// Copy the values variant in order to get the type (only taking smart pointer so no worries about large copies)
mArray = values->getVariant();
mArray = values->mArray;
// Reinitialize variant array to contain new array with same type.
boost::apply_visitor( XdmfArrayNewArray(), mArray);
}
boost::apply_visitor( XdmfArrayCopyArrayValues(startIndex, valuesStartIndex, numValues, arrayStride, valuesStride), mArray, values->getVariant());
boost::apply_visitor( XdmfArrayCopyArrayValues(startIndex, valuesStartIndex, numValues, arrayStride, valuesStride), mArray, values->mArray);
}
void XdmfArray::clear()
......
......@@ -76,14 +76,6 @@ public:
*/
virtual void clear();
/**
* Get the data type of this array.
*
* @return a string containing the Xdmf data type for the array, this is one of
* Char, Short, Int, Float, UChar, UShort, UInt.
*/
virtual std::string getType() const;
/**
* Get the hdf5 data type of this array.
*
......@@ -105,6 +97,14 @@ public:
*/
virtual int getSize() const;
/**
* Get the data type of this array.
*
* @return a string containing the Xdmf data type for the array, this is one of
* Char, Short, Int, Float, UChar, UShort, UInt.
*/
virtual std::string getType() const;
/**
* Get a smart pointer to the values stored in this array
*
......@@ -166,11 +166,6 @@ private:
boost::shared_ptr<std::vector<unsigned short> >,
boost::shared_ptr<std::vector<unsigned int> > > ArrayVariant;
const ArrayVariant getVariant() const
{
return mArray;
}
ArrayVariant mArray;
bool mInitialized;
};
......
......@@ -5406,28 +5406,6 @@ fail:
}
SWIGINTERN PyObject *_wrap_XdmfArrayPtr_getType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
boost::shared_ptr< XdmfArray > *arg1 = (boost::shared_ptr< XdmfArray > *) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
PyObject * obj0 = 0 ;
std::string result;
if (!PyArg_ParseTuple(args,(char *)"O:XdmfArrayPtr_getType",&obj0)) SWIG_fail;
res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_XdmfArray_t, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "XdmfArrayPtr_getType" "', argument " "1"" of type '" "boost::shared_ptr< XdmfArray > const *""'");
}
arg1 = reinterpret_cast< boost::shared_ptr< XdmfArray > * >(argp1);
result = (*arg1)->getType();
resultobj = SWIG_From_std_string(static_cast< std::string >(result));
return resultobj;
fail:
return NULL;
}
SWIGINTERN PyObject *_wrap_XdmfArrayPtr_getHDF5Type(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
boost::shared_ptr< XdmfArray > *arg1 = (boost::shared_ptr< XdmfArray > *) 0 ;
......@@ -5494,6 +5472,28 @@ fail:
}
SWIGINTERN PyObject *_wrap_XdmfArrayPtr_getType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
boost::shared_ptr< XdmfArray > *arg1 = (boost::shared_ptr< XdmfArray > *) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
PyObject * obj0 = 0 ;
std::string result;
if (!PyArg_ParseTuple(args,(char *)"O:XdmfArrayPtr_getType",&obj0)) SWIG_fail;
res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_XdmfArray_t, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "XdmfArrayPtr_getType" "', argument " "1"" of type '" "boost::shared_ptr< XdmfArray > const *""'");
}
arg1 = reinterpret_cast< boost::shared_ptr< XdmfArray > * >(argp1);
result = (*arg1)->getType();
resultobj = SWIG_From_std_string(static_cast< std::string >(result));
return resultobj;
fail:
return NULL;
}
SWIGINTERN PyObject *_wrap_XdmfArrayPtr_getValuesPointer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
boost::shared_ptr< XdmfArray > *arg1 = (boost::shared_ptr< XdmfArray > *) 0 ;
......@@ -10914,28 +10914,6 @@ fail:
}
SWIGINTERN PyObject *_wrap_XdmfArray_getType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
XdmfArray *arg1 = (XdmfArray *) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
PyObject * obj0 = 0 ;
std::string result;
if (!PyArg_ParseTuple(args,(char *)"O:XdmfArray_getType",&obj0)) SWIG_fail;
res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_XdmfArray, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "XdmfArray_getType" "', argument " "1"" of type '" "XdmfArray const *""'");
}
arg1 = reinterpret_cast< XdmfArray * >(argp1);
result = ((XdmfArray const *)arg1)->getType();
resultobj = SWIG_From_std_string(static_cast< std::string >(result));
return resultobj;
fail:
return NULL;
}
SWIGINTERN PyObject *_wrap_XdmfArray_getHDF5Type(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
XdmfArray *arg1 = (XdmfArray *) 0 ;
......@@ -11002,6 +10980,28 @@ fail:
}
SWIGINTERN PyObject *_wrap_XdmfArray_getType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
XdmfArray *arg1 = (XdmfArray *) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
PyObject * obj0 = 0 ;
std::string result;
if (!PyArg_ParseTuple(args,(char *)"O:XdmfArray_getType",&obj0)) SWIG_fail;
res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_XdmfArray, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "XdmfArray_getType" "', argument " "1"" of type '" "XdmfArray const *""'");
}
arg1 = reinterpret_cast< XdmfArray * >(argp1);
result = ((XdmfArray const *)arg1)->getType();
resultobj = SWIG_From_std_string(static_cast< std::string >(result));
return resultobj;
fail:
return NULL;
}
SWIGINTERN PyObject *_wrap_XdmfArray_getValuesPointer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
XdmfArray *arg1 = (XdmfArray *) 0 ;
......@@ -13469,10 +13469,10 @@ static PyMethodDef SwigMethods[] = {
{ (char *)"XdmfArrayPtr_New", _wrap_XdmfArrayPtr_New, METH_VARARGS, NULL},
{ (char *)"XdmfArrayPtr_copyValues", _wrap_XdmfArrayPtr_copyValues, METH_VARARGS, NULL},
{ (char *)"XdmfArrayPtr_clear", _wrap_XdmfArrayPtr_clear, METH_VARARGS, NULL},
{ (char *)"XdmfArrayPtr_getType", _wrap_XdmfArrayPtr_getType, METH_VARARGS, NULL},
{ (char *)"XdmfArrayPtr_getHDF5Type", _wrap_XdmfArrayPtr_getHDF5Type, METH_VARARGS, NULL},
{ (char *)"XdmfArrayPtr_getPrecision", _wrap_XdmfArrayPtr_getPrecision, METH_VARARGS, NULL},
{ (char *)"XdmfArrayPtr_getSize", _wrap_XdmfArrayPtr_getSize, METH_VARARGS, NULL},
{ (char *)"XdmfArrayPtr_getType", _wrap_XdmfArrayPtr_getType, METH_VARARGS, NULL},
{ (char *)"XdmfArrayPtr_getValuesPointer", _wrap_XdmfArrayPtr_getValuesPointer, METH_VARARGS, NULL},
{ (char *)"XdmfArrayPtr_getValuesString", _wrap_XdmfArrayPtr_getValuesString, METH_VARARGS, NULL},
{ (char *)"XdmfArrayPtr_printSelf", _wrap_XdmfArrayPtr_printSelf, METH_VARARGS, NULL},
......@@ -13625,10 +13625,10 @@ static PyMethodDef SwigMethods[] = {
{ (char *)"XdmfArray_New", _wrap_XdmfArray_New, METH_VARARGS, NULL},
{ (char *)"XdmfArray_copyValues", _wrap_XdmfArray_copyValues, METH_VARARGS, NULL},
{ (char *)"XdmfArray_clear", _wrap_XdmfArray_clear, METH_VARARGS, NULL},
{ (char *)"XdmfArray_getType", _wrap_XdmfArray_getType, METH_VARARGS, NULL},
{ (char *)"XdmfArray_getHDF5Type", _wrap_XdmfArray_getHDF5Type, METH_VARARGS, NULL},
{ (char *)"XdmfArray_getPrecision", _wrap_XdmfArray_getPrecision, METH_VARARGS, NULL},
{ (char *)"XdmfArray_getSize", _wrap_XdmfArray_getSize, METH_VARARGS, NULL},
{ (char *)"XdmfArray_getType", _wrap_XdmfArray_getType, METH_VARARGS, NULL},
{ (char *)"XdmfArray_getValuesPointer", _wrap_XdmfArray_getValuesPointer, METH_VARARGS, NULL},
{ (char *)"XdmfArray_getValuesString", _wrap_XdmfArray_getValuesString, METH_VARARGS, NULL},
{ (char *)"XdmfArray_printSelf", _wrap_XdmfArray_printSelf, METH_VARARGS, NULL},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment