Skip to content

Commit

Permalink
Merge pull request #103 from ngageoint/fix_stream_bindings
Browse files Browse the repository at this point in the history
Need to tweak a line to fix Python bindings for SICDWriteControl
  • Loading branch information
asylvest authored Aug 5, 2016
2 parents 1d195a5 + add3708 commit 0f3f729
Show file tree
Hide file tree
Showing 5 changed files with 53 additions and 5 deletions.
3 changes: 2 additions & 1 deletion six/modules/c++/six.sicd/include/six/sicd/SICDWriteControl.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ class SICDWriteControl : public six::NITFWriteControl
SICDWriteControl(const std::string& outputPathname,
const std::vector<std::string>& schemaPaths);

using NITFWriteControl::initialize;

/*!
* Initializes the control. Either this or the base class's initialize()
* function must be called prior to any of the save() methods or doing
Expand All @@ -68,7 +70,6 @@ class SICDWriteControl : public six::NITFWriteControl
*/
void initialize(const ComplexData& data);

using NITFWriteControl::initialize;
using NITFWriteControl::save;

/*!
Expand Down
4 changes: 2 additions & 2 deletions six/modules/c++/six.sicd/tests/test_streaming_write.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -329,9 +329,9 @@ class Tester
mImagePtr(&mImage[0]),
mTestPathname("streaming_write.nitf"),
mSchemaPaths(schemaPaths),
mSuccess(true),
mSetMaxProductSize(setMaxProductSize),
mMaxProductSize(maxProductSize)
mMaxProductSize(maxProductSize),
mSuccess(true)
{
for (size_t ii = 0; ii < mImage.size(); ++ii)
{
Expand Down
8 changes: 8 additions & 0 deletions six/modules/python/six.sicd/source/generated/six_sicd.py
Original file line number Diff line number Diff line change
Expand Up @@ -9646,6 +9646,14 @@ def __init__(self, outputPathname, schemaPaths):
except:
self.this = this

def initialize(self, *args):
"""
initialize(SICDWriteControl self)
initialize(SICDWriteControl self, ComplexData data)
"""
return _six_sicd.SICDWriteControl_initialize(self, *args)


def save(self, *args):
"""
save(SICDWriteControl self)
Expand Down
41 changes: 40 additions & 1 deletion six/modules/python/six.sicd/source/generated/six_sicd_wrap.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -145658,7 +145658,7 @@ SWIGINTERN PyObject *_wrap_new_SICDWriteControl(PyObject *SWIGUNUSEDPARM(self),
}


SWIGINTERN PyObject *_wrap_SICDWriteControl_initialize__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
SWIGINTERN PyObject *_wrap_SICDWriteControl_initialize__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
six::sicd::SICDWriteControl *arg1 = (six::sicd::SICDWriteControl *) 0 ;
six::sicd::ComplexData *arg2 = 0 ;
Expand Down Expand Up @@ -145721,6 +145721,41 @@ SWIGINTERN PyObject *_wrap_SICDWriteControl_initialize__SWIG_0(PyObject *SWIGUNU
}


SWIGINTERN PyObject *_wrap_SICDWriteControl_initialize(PyObject *self, PyObject *args) {
int argc;
PyObject *argv[3] = {
0
};
int ii;

if (!PyTuple_Check(args)) SWIG_fail;
argc = args ? (int)PyObject_Length(args) : 0;
for (ii = 0; (ii < 2) && (ii < argc); ii++) {
argv[ii] = PyTuple_GET_ITEM(args,ii);
}
if (argc == 2) {
int _v;
void *vptr = 0;
int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_six__sicd__SICDWriteControl, 0);
_v = SWIG_CheckState(res);
if (_v) {
int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_six__sicd__ComplexData, 0);
_v = SWIG_CheckState(res);
if (_v) {
return _wrap_SICDWriteControl_initialize__SWIG_1(self, args);
}
}
}

fail:
SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'SICDWriteControl_initialize'.\n"
" Possible C/C++ prototypes are:\n"
" six::sicd::SICDWriteControl::initialize()\n"
" six::sicd::SICDWriteControl::initialize(six::sicd::ComplexData const &)\n");
return 0;
}


SWIGINTERN PyObject *_wrap_SICDWriteControl_save__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
six::sicd::SICDWriteControl *arg1 = (six::sicd::SICDWriteControl *) 0 ;
Expand Down Expand Up @@ -148905,6 +148940,10 @@ static PyMethodDef SwigMethods[] = {
{ (char *)"getWidebandData", _wrap_getWidebandData, METH_VARARGS, (char *)"getWidebandData(std::string sicdPathname, VectorString schemaPaths, ComplexData complexData, long long arrayBuffer)"},
{ (char *)"getWidebandRegion", _wrap_getWidebandRegion, METH_VARARGS, (char *)"getWidebandRegion(std::string sicdPathname, VectorString schemaPaths, ComplexData complexData, long long startRow, long long numRows, long long startCol, long long numCols, long long arrayBuffer)"},
{ (char *)"new_SICDWriteControl", _wrap_new_SICDWriteControl, METH_VARARGS, (char *)"new_SICDWriteControl(std::string const & outputPathname, VectorString schemaPaths) -> SICDWriteControl"},
{ (char *)"SICDWriteControl_initialize", _wrap_SICDWriteControl_initialize, METH_VARARGS, (char *)"\n"
"initialize()\n"
"SICDWriteControl_initialize(SICDWriteControl self, ComplexData data)\n"
""},
{ (char *)"SICDWriteControl_save", _wrap_SICDWriteControl_save, METH_VARARGS, (char *)"\n"
"save()\n"
"save(void * imageData, RowColSizeT offset, RowColSizeT dims, bool restoreData=True)\n"
Expand Down
2 changes: 1 addition & 1 deletion six/modules/wscript
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ def options(opt):
opt.recurse()

def configure(conf):
conf.env['VERSION'] = '2.2.2-alpha'
conf.env['VERSION'] = '2.2.1'

# This allows us to build XML_DATA_CONTENT statically so that users don't
# have to set NITF_PLUGIN_PATH
Expand Down

0 comments on commit 0f3f729

Please sign in to comment.