diff --git a/ArmoryStandalone/README.txt b/ArmoryStandalone/README.txt
deleted file mode 100644
index 77ea802cb..000000000
--- a/ArmoryStandalone/README.txt
+++ /dev/null
@@ -1 +0,0 @@
-This directory will hold the compiled version of Armory, produced by the MSVS project if pywin32, py2exe and msvcp90.dll are available.
diff --git a/ArmoryStandalone/img/MsgBox_critical64.png b/ArmoryStandalone/img/MsgBox_critical64.png
deleted file mode 100644
index fa703bdad..000000000
Binary files a/ArmoryStandalone/img/MsgBox_critical64.png and /dev/null differ
diff --git a/ArmoryStandalone/img/MsgBox_error32.png b/ArmoryStandalone/img/MsgBox_error32.png
deleted file mode 100644
index d59e0ebda..000000000
Binary files a/ArmoryStandalone/img/MsgBox_error32.png and /dev/null differ
diff --git a/ArmoryStandalone/img/MsgBox_error64.png b/ArmoryStandalone/img/MsgBox_error64.png
deleted file mode 100644
index bc8a5a095..000000000
Binary files a/ArmoryStandalone/img/MsgBox_error64.png and /dev/null differ
diff --git a/ArmoryStandalone/img/MsgBox_info32.png b/ArmoryStandalone/img/MsgBox_info32.png
deleted file mode 100644
index 1c5f45129..000000000
Binary files a/ArmoryStandalone/img/MsgBox_info32.png and /dev/null differ
diff --git a/ArmoryStandalone/img/MsgBox_info48.png b/ArmoryStandalone/img/MsgBox_info48.png
deleted file mode 100644
index 66ebfd4f1..000000000
Binary files a/ArmoryStandalone/img/MsgBox_info48.png and /dev/null differ
diff --git a/ArmoryStandalone/img/MsgBox_question32.png b/ArmoryStandalone/img/MsgBox_question32.png
deleted file mode 100644
index 373186998..000000000
Binary files a/ArmoryStandalone/img/MsgBox_question32.png and /dev/null differ
diff --git a/ArmoryStandalone/img/MsgBox_question64.png b/ArmoryStandalone/img/MsgBox_question64.png
deleted file mode 100644
index 2fcfa2e17..000000000
Binary files a/ArmoryStandalone/img/MsgBox_question64.png and /dev/null differ
diff --git a/ArmoryStandalone/img/MsgBox_warning48.png b/ArmoryStandalone/img/MsgBox_warning48.png
deleted file mode 100644
index 7d675db2e..000000000
Binary files a/ArmoryStandalone/img/MsgBox_warning48.png and /dev/null differ
diff --git a/ArmoryStandalone/img/armory_icon_24x24.png b/ArmoryStandalone/img/armory_icon_24x24.png
deleted file mode 100644
index 287ac408d..000000000
Binary files a/ArmoryStandalone/img/armory_icon_24x24.png and /dev/null differ
diff --git a/ArmoryStandalone/img/armory_icon_32x32.png b/ArmoryStandalone/img/armory_icon_32x32.png
deleted file mode 100644
index 316f87c3d..000000000
Binary files a/ArmoryStandalone/img/armory_icon_32x32.png and /dev/null differ
diff --git a/ArmoryStandalone/img/armory_icon_64x64.png b/ArmoryStandalone/img/armory_icon_64x64.png
deleted file mode 100644
index 7da475fe3..000000000
Binary files a/ArmoryStandalone/img/armory_icon_64x64.png and /dev/null differ
diff --git a/ArmoryStandalone/img/armory_icon_fullres.png b/ArmoryStandalone/img/armory_icon_fullres.png
deleted file mode 100644
index 9e1897481..000000000
Binary files a/ArmoryStandalone/img/armory_icon_fullres.png and /dev/null differ
diff --git a/ArmoryStandalone/img/armory_icon_green_24x24.png b/ArmoryStandalone/img/armory_icon_green_24x24.png
deleted file mode 100644
index 5052a4c19..000000000
Binary files a/ArmoryStandalone/img/armory_icon_green_24x24.png and /dev/null differ
diff --git a/ArmoryStandalone/img/armory_icon_green_32x32.png b/ArmoryStandalone/img/armory_icon_green_32x32.png
deleted file mode 100644
index 9cffd037e..000000000
Binary files a/ArmoryStandalone/img/armory_icon_green_32x32.png and /dev/null differ
diff --git a/ArmoryStandalone/img/armory_icon_green_64x64.png b/ArmoryStandalone/img/armory_icon_green_64x64.png
deleted file mode 100644
index 73a49bc1f..000000000
Binary files a/ArmoryStandalone/img/armory_icon_green_64x64.png and /dev/null differ
diff --git a/ArmoryStandalone/img/armory_icon_green_fullres.png b/ArmoryStandalone/img/armory_icon_green_fullres.png
deleted file mode 100644
index 86b442ac0..000000000
Binary files a/ArmoryStandalone/img/armory_icon_green_fullres.png and /dev/null differ
diff --git a/ArmoryStandalone/img/armory_logo_fullres.png b/ArmoryStandalone/img/armory_logo_fullres.png
deleted file mode 100644
index 4bc6c2285..000000000
Binary files a/ArmoryStandalone/img/armory_logo_fullres.png and /dev/null differ
diff --git a/ArmoryStandalone/img/armory_logo_green_h72.png b/ArmoryStandalone/img/armory_logo_green_h72.png
deleted file mode 100644
index 1dbf62407..000000000
Binary files a/ArmoryStandalone/img/armory_logo_green_h72.png and /dev/null differ
diff --git a/ArmoryStandalone/img/armory_logo_h36.png b/ArmoryStandalone/img/armory_logo_h36.png
deleted file mode 100644
index 4f1ac2055..000000000
Binary files a/ArmoryStandalone/img/armory_logo_h36.png and /dev/null differ
diff --git a/ArmoryStandalone/img/armory_logo_h48.png b/ArmoryStandalone/img/armory_logo_h48.png
deleted file mode 100644
index edc5dcf88..000000000
Binary files a/ArmoryStandalone/img/armory_logo_h48.png and /dev/null differ
diff --git a/ArmoryStandalone/img/armory_logo_h72.png b/ArmoryStandalone/img/armory_logo_h72.png
deleted file mode 100644
index 9cf926704..000000000
Binary files a/ArmoryStandalone/img/armory_logo_h72.png and /dev/null differ
diff --git a/ArmoryStandalone/img/arrow_right_24x24.png b/ArmoryStandalone/img/arrow_right_24x24.png
deleted file mode 100644
index 682e6ba3c..000000000
Binary files a/ArmoryStandalone/img/arrow_right_24x24.png and /dev/null differ
diff --git a/ArmoryStandalone/img/arrow_right_blue_24x24.png b/ArmoryStandalone/img/arrow_right_blue_24x24.png
deleted file mode 100644
index 09bd47909..000000000
Binary files a/ArmoryStandalone/img/arrow_right_blue_24x24.png and /dev/null differ
diff --git a/ArmoryStandalone/img/arrow_right_green_24x24.png b/ArmoryStandalone/img/arrow_right_green_24x24.png
deleted file mode 100644
index e68298d84..000000000
Binary files a/ArmoryStandalone/img/arrow_right_green_24x24.png and /dev/null differ
diff --git a/ArmoryStandalone/img/arrow_right_red_24x24.png b/ArmoryStandalone/img/arrow_right_red_24x24.png
deleted file mode 100644
index f26a0f5f8..000000000
Binary files a/ArmoryStandalone/img/arrow_right_red_24x24.png and /dev/null differ
diff --git a/ArmoryStandalone/img/bitcoinlogo.png b/ArmoryStandalone/img/bitcoinlogo.png
deleted file mode 100644
index e69f960b1..000000000
Binary files a/ArmoryStandalone/img/bitcoinlogo.png and /dev/null differ
diff --git a/ArmoryStandalone/img/button-blue.png b/ArmoryStandalone/img/button-blue.png
deleted file mode 100644
index 70f7c1077..000000000
Binary files a/ArmoryStandalone/img/button-blue.png and /dev/null differ
diff --git a/ArmoryStandalone/img/button-green.png b/ArmoryStandalone/img/button-green.png
deleted file mode 100644
index d206fe128..000000000
Binary files a/ArmoryStandalone/img/button-green.png and /dev/null differ
diff --git a/ArmoryStandalone/img/button-purple.png b/ArmoryStandalone/img/button-purple.png
deleted file mode 100644
index 9a949f9d6..000000000
Binary files a/ArmoryStandalone/img/button-purple.png and /dev/null differ
diff --git a/ArmoryStandalone/img/button-red.png b/ArmoryStandalone/img/button-red.png
deleted file mode 100644
index 3a9ec172a..000000000
Binary files a/ArmoryStandalone/img/button-red.png and /dev/null differ
diff --git a/ArmoryStandalone/img/button-seagreen.png b/ArmoryStandalone/img/button-seagreen.png
deleted file mode 100644
index efafaab44..000000000
Binary files a/ArmoryStandalone/img/button-seagreen.png and /dev/null differ
diff --git a/ArmoryStandalone/img/button-yellow.png b/ArmoryStandalone/img/button-yellow.png
deleted file mode 100644
index a149c2730..000000000
Binary files a/ArmoryStandalone/img/button-yellow.png and /dev/null differ
diff --git a/ArmoryStandalone/img/checkmark32.png b/ArmoryStandalone/img/checkmark32.png
deleted file mode 100644
index a52783458..000000000
Binary files a/ArmoryStandalone/img/checkmark32.png and /dev/null differ
diff --git a/ArmoryStandalone/img/checkmark32_blue.png b/ArmoryStandalone/img/checkmark32_blue.png
deleted file mode 100644
index 636f787d4..000000000
Binary files a/ArmoryStandalone/img/checkmark32_blue.png and /dev/null differ
diff --git a/ArmoryStandalone/img/checkmark32_orange.png b/ArmoryStandalone/img/checkmark32_orange.png
deleted file mode 100644
index ec21bed86..000000000
Binary files a/ArmoryStandalone/img/checkmark32_orange.png and /dev/null differ
diff --git a/ArmoryStandalone/img/circle_blue (copy).png b/ArmoryStandalone/img/circle_blue (copy).png
deleted file mode 100644
index e4dd3c11e..000000000
Binary files a/ArmoryStandalone/img/circle_blue (copy).png and /dev/null differ
diff --git a/ArmoryStandalone/img/circle_blue.png b/ArmoryStandalone/img/circle_blue.png
deleted file mode 100644
index e4dd3c11e..000000000
Binary files a/ArmoryStandalone/img/circle_blue.png and /dev/null differ
diff --git a/ArmoryStandalone/img/circle_green (copy).png b/ArmoryStandalone/img/circle_green (copy).png
deleted file mode 100644
index 56be3a4a4..000000000
Binary files a/ArmoryStandalone/img/circle_green (copy).png and /dev/null differ
diff --git a/ArmoryStandalone/img/circle_green.png b/ArmoryStandalone/img/circle_green.png
deleted file mode 100644
index 56be3a4a4..000000000
Binary files a/ArmoryStandalone/img/circle_green.png and /dev/null differ
diff --git a/ArmoryStandalone/img/circle_grey (copy).png b/ArmoryStandalone/img/circle_grey (copy).png
deleted file mode 100644
index 3e58e59f7..000000000
Binary files a/ArmoryStandalone/img/circle_grey (copy).png and /dev/null differ
diff --git a/ArmoryStandalone/img/circle_orange (copy).png b/ArmoryStandalone/img/circle_orange (copy).png
deleted file mode 100644
index ef01145d1..000000000
Binary files a/ArmoryStandalone/img/circle_orange (copy).png and /dev/null differ
diff --git a/ArmoryStandalone/img/circle_orange.png b/ArmoryStandalone/img/circle_orange.png
deleted file mode 100644
index ef01145d1..000000000
Binary files a/ArmoryStandalone/img/circle_orange.png and /dev/null differ
diff --git a/ArmoryStandalone/img/circle_purple (copy).png b/ArmoryStandalone/img/circle_purple (copy).png
deleted file mode 100644
index c8837b7f2..000000000
Binary files a/ArmoryStandalone/img/circle_purple (copy).png and /dev/null differ
diff --git a/ArmoryStandalone/img/circle_purple.png b/ArmoryStandalone/img/circle_purple.png
deleted file mode 100644
index c8837b7f2..000000000
Binary files a/ArmoryStandalone/img/circle_purple.png and /dev/null differ
diff --git a/ArmoryStandalone/img/circle_red (copy).png b/ArmoryStandalone/img/circle_red (copy).png
deleted file mode 100644
index f7156a819..000000000
Binary files a/ArmoryStandalone/img/circle_red (copy).png and /dev/null differ
diff --git a/ArmoryStandalone/img/circle_red.png b/ArmoryStandalone/img/circle_red.png
deleted file mode 100644
index f7156a819..000000000
Binary files a/ArmoryStandalone/img/circle_red.png and /dev/null differ
diff --git a/ArmoryStandalone/img/circle_tan.png b/ArmoryStandalone/img/circle_tan.png
deleted file mode 100644
index 7ca83279a..000000000
Binary files a/ArmoryStandalone/img/circle_tan.png and /dev/null differ
diff --git a/ArmoryStandalone/img/circle_yellow.png b/ArmoryStandalone/img/circle_yellow.png
deleted file mode 100644
index c386af9de..000000000
Binary files a/ArmoryStandalone/img/circle_yellow.png and /dev/null differ
diff --git a/ArmoryStandalone/img/conf0t.png b/ArmoryStandalone/img/conf0t.png
deleted file mode 100644
index 152638d97..000000000
Binary files a/ArmoryStandalone/img/conf0t.png and /dev/null differ
diff --git a/ArmoryStandalone/img/conf1t.png b/ArmoryStandalone/img/conf1t.png
deleted file mode 100644
index b927066e0..000000000
Binary files a/ArmoryStandalone/img/conf1t.png and /dev/null differ
diff --git a/ArmoryStandalone/img/conf2t.png b/ArmoryStandalone/img/conf2t.png
deleted file mode 100644
index 3041e2a7f..000000000
Binary files a/ArmoryStandalone/img/conf2t.png and /dev/null differ
diff --git a/ArmoryStandalone/img/conf3t.png b/ArmoryStandalone/img/conf3t.png
deleted file mode 100644
index ac25ec2fb..000000000
Binary files a/ArmoryStandalone/img/conf3t.png and /dev/null differ
diff --git a/ArmoryStandalone/img/conf4t.png b/ArmoryStandalone/img/conf4t.png
deleted file mode 100644
index a361abc7d..000000000
Binary files a/ArmoryStandalone/img/conf4t.png and /dev/null differ
diff --git a/ArmoryStandalone/img/conf5t.png b/ArmoryStandalone/img/conf5t.png
deleted file mode 100644
index a628bd327..000000000
Binary files a/ArmoryStandalone/img/conf5t.png and /dev/null differ
diff --git a/ArmoryStandalone/img/conf6t.png b/ArmoryStandalone/img/conf6t.png
deleted file mode 100644
index 4ced9c3ee..000000000
Binary files a/ArmoryStandalone/img/conf6t.png and /dev/null differ
diff --git a/ArmoryStandalone/img/folder-new-5.png b/ArmoryStandalone/img/folder-new-5.png
deleted file mode 100644
index c56aff9f7..000000000
Binary files a/ArmoryStandalone/img/folder-new-5.png and /dev/null differ
diff --git a/ArmoryStandalone/img/folder.png b/ArmoryStandalone/img/folder.png
deleted file mode 100644
index 7528e7abf..000000000
Binary files a/ArmoryStandalone/img/folder.png and /dev/null differ
diff --git a/ArmoryStandalone/img/go-down-5.png b/ArmoryStandalone/img/go-down-5.png
deleted file mode 100644
index c41ae14a2..000000000
Binary files a/ArmoryStandalone/img/go-down-5.png and /dev/null differ
diff --git a/ArmoryStandalone/img/go-next-5.png b/ArmoryStandalone/img/go-next-5.png
deleted file mode 100644
index e1275e266..000000000
Binary files a/ArmoryStandalone/img/go-next-5.png and /dev/null differ
diff --git a/ArmoryStandalone/img/go-previous-5.png b/ArmoryStandalone/img/go-previous-5.png
deleted file mode 100644
index 05d7166b8..000000000
Binary files a/ArmoryStandalone/img/go-previous-5.png and /dev/null differ
diff --git a/ArmoryStandalone/img/go-up-5.png b/ArmoryStandalone/img/go-up-5.png
deleted file mode 100644
index a0df52d61..000000000
Binary files a/ArmoryStandalone/img/go-up-5.png and /dev/null differ
diff --git a/ArmoryStandalone/img/inkscapeIconFactory.svg b/ArmoryStandalone/img/inkscapeIconFactory.svg
deleted file mode 100644
index 0b496568f..000000000
--- a/ArmoryStandalone/img/inkscapeIconFactory.svg
+++ /dev/null
@@ -1,810 +0,0 @@
-
-
-
-
diff --git a/ArmoryStandalone/img/lockedIcon.png b/ArmoryStandalone/img/lockedIcon.png
deleted file mode 100644
index eafe56f2f..000000000
Binary files a/ArmoryStandalone/img/lockedIcon.png and /dev/null differ
diff --git a/ArmoryStandalone/img/logo_vert_black_text.png b/ArmoryStandalone/img/logo_vert_black_text.png
deleted file mode 100644
index 96ee740b5..000000000
Binary files a/ArmoryStandalone/img/logo_vert_black_text.png and /dev/null differ
diff --git a/ArmoryStandalone/img/logo_vert_black_text_antialiased.png b/ArmoryStandalone/img/logo_vert_black_text_antialiased.png
deleted file mode 100644
index 15cbb931d..000000000
Binary files a/ArmoryStandalone/img/logo_vert_black_text_antialiased.png and /dev/null differ
diff --git a/ArmoryStandalone/img/logo_vert_black_text_green.png b/ArmoryStandalone/img/logo_vert_black_text_green.png
deleted file mode 100644
index bb9e0966f..000000000
Binary files a/ArmoryStandalone/img/logo_vert_black_text_green.png and /dev/null differ
diff --git a/ArmoryStandalone/img/logo_vert_white_text.png b/ArmoryStandalone/img/logo_vert_white_text.png
deleted file mode 100644
index b732f301d..000000000
Binary files a/ArmoryStandalone/img/logo_vert_white_text.png and /dev/null differ
diff --git a/ArmoryStandalone/img/moneyIn.png b/ArmoryStandalone/img/moneyIn.png
deleted file mode 100644
index 19ddd7f90..000000000
Binary files a/ArmoryStandalone/img/moneyIn.png and /dev/null differ
diff --git a/ArmoryStandalone/img/moneyOut.png b/ArmoryStandalone/img/moneyOut.png
deleted file mode 100644
index fd5f36c33..000000000
Binary files a/ArmoryStandalone/img/moneyOut.png and /dev/null differ
diff --git a/ArmoryStandalone/img/moneySelf.png b/ArmoryStandalone/img/moneySelf.png
deleted file mode 100644
index 94b599746..000000000
Binary files a/ArmoryStandalone/img/moneySelf.png and /dev/null differ
diff --git a/ArmoryStandalone/img/preferences.png b/ArmoryStandalone/img/preferences.png
deleted file mode 100644
index 0ced0a237..000000000
Binary files a/ArmoryStandalone/img/preferences.png and /dev/null differ
diff --git a/ArmoryStandalone/img/preferences256.png b/ArmoryStandalone/img/preferences256.png
deleted file mode 100644
index 9d39c7cdd..000000000
Binary files a/ArmoryStandalone/img/preferences256.png and /dev/null differ
diff --git a/ArmoryStandalone/img/printer_icon.png b/ArmoryStandalone/img/printer_icon.png
deleted file mode 100644
index 6f8abe8ea..000000000
Binary files a/ArmoryStandalone/img/printer_icon.png and /dev/null differ
diff --git a/ArmoryStandalone/img/process-stop-4.png b/ArmoryStandalone/img/process-stop-4.png
deleted file mode 100644
index a73b5599f..000000000
Binary files a/ArmoryStandalone/img/process-stop-4.png and /dev/null differ
diff --git a/ArmoryStandalone/img/sent_to_self.png b/ArmoryStandalone/img/sent_to_self.png
deleted file mode 100644
index fd50ae10d..000000000
Binary files a/ArmoryStandalone/img/sent_to_self.png and /dev/null differ
diff --git a/ArmoryStandalone/img/splashlogo.png b/ArmoryStandalone/img/splashlogo.png
deleted file mode 100644
index ea7457a56..000000000
Binary files a/ArmoryStandalone/img/splashlogo.png and /dev/null differ
diff --git a/ArmoryStandalone/img/splashlogo_testnet.png b/ArmoryStandalone/img/splashlogo_testnet.png
deleted file mode 100644
index 52e4f3790..000000000
Binary files a/ArmoryStandalone/img/splashlogo_testnet.png and /dev/null differ
diff --git a/ArmoryStandalone/img/unlockedIcon.png b/ArmoryStandalone/img/unlockedIcon.png
deleted file mode 100644
index 0acdbd23c..000000000
Binary files a/ArmoryStandalone/img/unlockedIcon.png and /dev/null differ
diff --git a/ArmoryStandalone/img/view-refresh-4.png b/ArmoryStandalone/img/view-refresh-4.png
deleted file mode 100644
index 9f1cbf3b3..000000000
Binary files a/ArmoryStandalone/img/view-refresh-4.png and /dev/null differ
diff --git a/ArmoryStandalone/img/wallet_16x12.png b/ArmoryStandalone/img/wallet_16x12.png
deleted file mode 100644
index 16b460799..000000000
Binary files a/ArmoryStandalone/img/wallet_16x12.png and /dev/null differ
diff --git a/ArmoryStandalone/img/x-office-address-book.png b/ArmoryStandalone/img/x-office-address-book.png
deleted file mode 100644
index fd260acff..000000000
Binary files a/ArmoryStandalone/img/x-office-address-book.png and /dev/null differ
diff --git a/CppBlockUtils.py b/CppBlockUtils.py
new file mode 100644
index 000000000..76dfa47fe
--- /dev/null
+++ b/CppBlockUtils.py
@@ -0,0 +1,1479 @@
+# This file was automatically generated by SWIG (http://www.swig.org).
+# Version 2.0.4
+#
+# Do not make changes to this file unless you know what you are doing--modify
+# the SWIG interface file instead.
+
+
+
+from sys import version_info
+if version_info >= (2,6,0):
+ def swig_import_helper():
+ from os.path import dirname
+ import imp
+ fp = None
+ try:
+ fp, pathname, description = imp.find_module('_CppBlockUtils', [dirname(__file__)])
+ except ImportError:
+ import _CppBlockUtils
+ return _CppBlockUtils
+ if fp is not None:
+ try:
+ _mod = imp.load_module('_CppBlockUtils', fp, pathname, description)
+ finally:
+ fp.close()
+ return _mod
+ _CppBlockUtils = swig_import_helper()
+ del swig_import_helper
+else:
+ import _CppBlockUtils
+del version_info
+def _swig_setattr_nondynamic(self,class_type,name,value,static=1):
+ if (name == "thisown"): return self.this.own(value)
+ if (name == "this"):
+ if type(value).__name__ == 'SwigPyObject':
+ self.__dict__[name] = value
+ return
+ method = class_type.__swig_setmethods__.get(name,None)
+ if method: return method(self,value)
+ if (not static):
+ self.__dict__[name] = value
+ else:
+ raise AttributeError("You cannot add attributes to %s" % self)
+
+def _swig_setattr(self,class_type,name,value):
+ return _swig_setattr_nondynamic(self,class_type,name,value,0)
+
+def _swig_getattr(self,class_type,name):
+ if (name == "thisown"): return self.this.own()
+ method = class_type.__swig_getmethods__.get(name,None)
+ if method: return method(self)
+ raise AttributeError(name)
+
+def _swig_repr(self):
+ try: strthis = "proxy of " + self.this.__repr__()
+ except: strthis = ""
+ return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)
+
+class SwigPyIterator:
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, SwigPyIterator, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, SwigPyIterator, name)
+ def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined - class is abstract")
+ __repr__ = _swig_repr
+ __swig_destroy__ = _CppBlockUtils.delete_SwigPyIterator
+ __del__ = lambda self : None;
+ def value(self): return _CppBlockUtils.SwigPyIterator_value(self)
+ def incr(self, n = 1): return _CppBlockUtils.SwigPyIterator_incr(self, n)
+ def decr(self, n = 1): return _CppBlockUtils.SwigPyIterator_decr(self, n)
+ def distance(self, *args): return _CppBlockUtils.SwigPyIterator_distance(self, *args)
+ def equal(self, *args): return _CppBlockUtils.SwigPyIterator_equal(self, *args)
+ def copy(self): return _CppBlockUtils.SwigPyIterator_copy(self)
+ def next(self): return _CppBlockUtils.SwigPyIterator_next(self)
+ def __next__(self): return _CppBlockUtils.SwigPyIterator___next__(self)
+ def previous(self): return _CppBlockUtils.SwigPyIterator_previous(self)
+ def advance(self, *args): return _CppBlockUtils.SwigPyIterator_advance(self, *args)
+ def __eq__(self, *args): return _CppBlockUtils.SwigPyIterator___eq__(self, *args)
+ def __ne__(self, *args): return _CppBlockUtils.SwigPyIterator___ne__(self, *args)
+ def __iadd__(self, *args): return _CppBlockUtils.SwigPyIterator___iadd__(self, *args)
+ def __isub__(self, *args): return _CppBlockUtils.SwigPyIterator___isub__(self, *args)
+ def __add__(self, *args): return _CppBlockUtils.SwigPyIterator___add__(self, *args)
+ def __sub__(self, *args): return _CppBlockUtils.SwigPyIterator___sub__(self, *args)
+ def __iter__(self): return self
+SwigPyIterator_swigregister = _CppBlockUtils.SwigPyIterator_swigregister
+SwigPyIterator_swigregister(SwigPyIterator)
+
+class vector_int:
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, vector_int, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, vector_int, name)
+ __repr__ = _swig_repr
+ def iterator(self): return _CppBlockUtils.vector_int_iterator(self)
+ def __iter__(self): return self.iterator()
+ def __nonzero__(self): return _CppBlockUtils.vector_int___nonzero__(self)
+ def __bool__(self): return _CppBlockUtils.vector_int___bool__(self)
+ def __len__(self): return _CppBlockUtils.vector_int___len__(self)
+ def pop(self): return _CppBlockUtils.vector_int_pop(self)
+ def __getslice__(self, *args): return _CppBlockUtils.vector_int___getslice__(self, *args)
+ def __setslice__(self, *args): return _CppBlockUtils.vector_int___setslice__(self, *args)
+ def __delslice__(self, *args): return _CppBlockUtils.vector_int___delslice__(self, *args)
+ def __delitem__(self, *args): return _CppBlockUtils.vector_int___delitem__(self, *args)
+ def __getitem__(self, *args): return _CppBlockUtils.vector_int___getitem__(self, *args)
+ def __setitem__(self, *args): return _CppBlockUtils.vector_int___setitem__(self, *args)
+ def append(self, *args): return _CppBlockUtils.vector_int_append(self, *args)
+ def empty(self): return _CppBlockUtils.vector_int_empty(self)
+ def size(self): return _CppBlockUtils.vector_int_size(self)
+ def clear(self): return _CppBlockUtils.vector_int_clear(self)
+ def swap(self, *args): return _CppBlockUtils.vector_int_swap(self, *args)
+ def get_allocator(self): return _CppBlockUtils.vector_int_get_allocator(self)
+ def begin(self): return _CppBlockUtils.vector_int_begin(self)
+ def end(self): return _CppBlockUtils.vector_int_end(self)
+ def rbegin(self): return _CppBlockUtils.vector_int_rbegin(self)
+ def rend(self): return _CppBlockUtils.vector_int_rend(self)
+ def pop_back(self): return _CppBlockUtils.vector_int_pop_back(self)
+ def erase(self, *args): return _CppBlockUtils.vector_int_erase(self, *args)
+ def __init__(self, *args):
+ this = _CppBlockUtils.new_vector_int(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ def push_back(self, *args): return _CppBlockUtils.vector_int_push_back(self, *args)
+ def front(self): return _CppBlockUtils.vector_int_front(self)
+ def back(self): return _CppBlockUtils.vector_int_back(self)
+ def assign(self, *args): return _CppBlockUtils.vector_int_assign(self, *args)
+ def resize(self, *args): return _CppBlockUtils.vector_int_resize(self, *args)
+ def insert(self, *args): return _CppBlockUtils.vector_int_insert(self, *args)
+ def reserve(self, *args): return _CppBlockUtils.vector_int_reserve(self, *args)
+ def capacity(self): return _CppBlockUtils.vector_int_capacity(self)
+ __swig_destroy__ = _CppBlockUtils.delete_vector_int
+ __del__ = lambda self : None;
+vector_int_swigregister = _CppBlockUtils.vector_int_swigregister
+vector_int_swigregister(vector_int)
+
+class vector_float:
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, vector_float, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, vector_float, name)
+ __repr__ = _swig_repr
+ def iterator(self): return _CppBlockUtils.vector_float_iterator(self)
+ def __iter__(self): return self.iterator()
+ def __nonzero__(self): return _CppBlockUtils.vector_float___nonzero__(self)
+ def __bool__(self): return _CppBlockUtils.vector_float___bool__(self)
+ def __len__(self): return _CppBlockUtils.vector_float___len__(self)
+ def pop(self): return _CppBlockUtils.vector_float_pop(self)
+ def __getslice__(self, *args): return _CppBlockUtils.vector_float___getslice__(self, *args)
+ def __setslice__(self, *args): return _CppBlockUtils.vector_float___setslice__(self, *args)
+ def __delslice__(self, *args): return _CppBlockUtils.vector_float___delslice__(self, *args)
+ def __delitem__(self, *args): return _CppBlockUtils.vector_float___delitem__(self, *args)
+ def __getitem__(self, *args): return _CppBlockUtils.vector_float___getitem__(self, *args)
+ def __setitem__(self, *args): return _CppBlockUtils.vector_float___setitem__(self, *args)
+ def append(self, *args): return _CppBlockUtils.vector_float_append(self, *args)
+ def empty(self): return _CppBlockUtils.vector_float_empty(self)
+ def size(self): return _CppBlockUtils.vector_float_size(self)
+ def clear(self): return _CppBlockUtils.vector_float_clear(self)
+ def swap(self, *args): return _CppBlockUtils.vector_float_swap(self, *args)
+ def get_allocator(self): return _CppBlockUtils.vector_float_get_allocator(self)
+ def begin(self): return _CppBlockUtils.vector_float_begin(self)
+ def end(self): return _CppBlockUtils.vector_float_end(self)
+ def rbegin(self): return _CppBlockUtils.vector_float_rbegin(self)
+ def rend(self): return _CppBlockUtils.vector_float_rend(self)
+ def pop_back(self): return _CppBlockUtils.vector_float_pop_back(self)
+ def erase(self, *args): return _CppBlockUtils.vector_float_erase(self, *args)
+ def __init__(self, *args):
+ this = _CppBlockUtils.new_vector_float(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ def push_back(self, *args): return _CppBlockUtils.vector_float_push_back(self, *args)
+ def front(self): return _CppBlockUtils.vector_float_front(self)
+ def back(self): return _CppBlockUtils.vector_float_back(self)
+ def assign(self, *args): return _CppBlockUtils.vector_float_assign(self, *args)
+ def resize(self, *args): return _CppBlockUtils.vector_float_resize(self, *args)
+ def insert(self, *args): return _CppBlockUtils.vector_float_insert(self, *args)
+ def reserve(self, *args): return _CppBlockUtils.vector_float_reserve(self, *args)
+ def capacity(self): return _CppBlockUtils.vector_float_capacity(self)
+ __swig_destroy__ = _CppBlockUtils.delete_vector_float
+ __del__ = lambda self : None;
+vector_float_swigregister = _CppBlockUtils.vector_float_swigregister
+vector_float_swigregister(vector_float)
+
+class vector_BinaryData:
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, vector_BinaryData, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, vector_BinaryData, name)
+ __repr__ = _swig_repr
+ def iterator(self): return _CppBlockUtils.vector_BinaryData_iterator(self)
+ def __iter__(self): return self.iterator()
+ def __nonzero__(self): return _CppBlockUtils.vector_BinaryData___nonzero__(self)
+ def __bool__(self): return _CppBlockUtils.vector_BinaryData___bool__(self)
+ def __len__(self): return _CppBlockUtils.vector_BinaryData___len__(self)
+ def pop(self): return _CppBlockUtils.vector_BinaryData_pop(self)
+ def __getslice__(self, *args): return _CppBlockUtils.vector_BinaryData___getslice__(self, *args)
+ def __setslice__(self, *args): return _CppBlockUtils.vector_BinaryData___setslice__(self, *args)
+ def __delslice__(self, *args): return _CppBlockUtils.vector_BinaryData___delslice__(self, *args)
+ def __delitem__(self, *args): return _CppBlockUtils.vector_BinaryData___delitem__(self, *args)
+ def __getitem__(self, *args): return _CppBlockUtils.vector_BinaryData___getitem__(self, *args)
+ def __setitem__(self, *args): return _CppBlockUtils.vector_BinaryData___setitem__(self, *args)
+ def append(self, *args): return _CppBlockUtils.vector_BinaryData_append(self, *args)
+ def empty(self): return _CppBlockUtils.vector_BinaryData_empty(self)
+ def size(self): return _CppBlockUtils.vector_BinaryData_size(self)
+ def clear(self): return _CppBlockUtils.vector_BinaryData_clear(self)
+ def swap(self, *args): return _CppBlockUtils.vector_BinaryData_swap(self, *args)
+ def get_allocator(self): return _CppBlockUtils.vector_BinaryData_get_allocator(self)
+ def begin(self): return _CppBlockUtils.vector_BinaryData_begin(self)
+ def end(self): return _CppBlockUtils.vector_BinaryData_end(self)
+ def rbegin(self): return _CppBlockUtils.vector_BinaryData_rbegin(self)
+ def rend(self): return _CppBlockUtils.vector_BinaryData_rend(self)
+ def pop_back(self): return _CppBlockUtils.vector_BinaryData_pop_back(self)
+ def erase(self, *args): return _CppBlockUtils.vector_BinaryData_erase(self, *args)
+ def __init__(self, *args):
+ this = _CppBlockUtils.new_vector_BinaryData(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ def push_back(self, *args): return _CppBlockUtils.vector_BinaryData_push_back(self, *args)
+ def front(self): return _CppBlockUtils.vector_BinaryData_front(self)
+ def back(self): return _CppBlockUtils.vector_BinaryData_back(self)
+ def assign(self, *args): return _CppBlockUtils.vector_BinaryData_assign(self, *args)
+ def resize(self, *args): return _CppBlockUtils.vector_BinaryData_resize(self, *args)
+ def insert(self, *args): return _CppBlockUtils.vector_BinaryData_insert(self, *args)
+ def reserve(self, *args): return _CppBlockUtils.vector_BinaryData_reserve(self, *args)
+ def capacity(self): return _CppBlockUtils.vector_BinaryData_capacity(self)
+ __swig_destroy__ = _CppBlockUtils.delete_vector_BinaryData
+ __del__ = lambda self : None;
+vector_BinaryData_swigregister = _CppBlockUtils.vector_BinaryData_swigregister
+vector_BinaryData_swigregister(vector_BinaryData)
+
+class vector_LedgerEntry:
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, vector_LedgerEntry, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, vector_LedgerEntry, name)
+ __repr__ = _swig_repr
+ def iterator(self): return _CppBlockUtils.vector_LedgerEntry_iterator(self)
+ def __iter__(self): return self.iterator()
+ def __nonzero__(self): return _CppBlockUtils.vector_LedgerEntry___nonzero__(self)
+ def __bool__(self): return _CppBlockUtils.vector_LedgerEntry___bool__(self)
+ def __len__(self): return _CppBlockUtils.vector_LedgerEntry___len__(self)
+ def pop(self): return _CppBlockUtils.vector_LedgerEntry_pop(self)
+ def __getslice__(self, *args): return _CppBlockUtils.vector_LedgerEntry___getslice__(self, *args)
+ def __setslice__(self, *args): return _CppBlockUtils.vector_LedgerEntry___setslice__(self, *args)
+ def __delslice__(self, *args): return _CppBlockUtils.vector_LedgerEntry___delslice__(self, *args)
+ def __delitem__(self, *args): return _CppBlockUtils.vector_LedgerEntry___delitem__(self, *args)
+ def __getitem__(self, *args): return _CppBlockUtils.vector_LedgerEntry___getitem__(self, *args)
+ def __setitem__(self, *args): return _CppBlockUtils.vector_LedgerEntry___setitem__(self, *args)
+ def append(self, *args): return _CppBlockUtils.vector_LedgerEntry_append(self, *args)
+ def empty(self): return _CppBlockUtils.vector_LedgerEntry_empty(self)
+ def size(self): return _CppBlockUtils.vector_LedgerEntry_size(self)
+ def clear(self): return _CppBlockUtils.vector_LedgerEntry_clear(self)
+ def swap(self, *args): return _CppBlockUtils.vector_LedgerEntry_swap(self, *args)
+ def get_allocator(self): return _CppBlockUtils.vector_LedgerEntry_get_allocator(self)
+ def begin(self): return _CppBlockUtils.vector_LedgerEntry_begin(self)
+ def end(self): return _CppBlockUtils.vector_LedgerEntry_end(self)
+ def rbegin(self): return _CppBlockUtils.vector_LedgerEntry_rbegin(self)
+ def rend(self): return _CppBlockUtils.vector_LedgerEntry_rend(self)
+ def pop_back(self): return _CppBlockUtils.vector_LedgerEntry_pop_back(self)
+ def erase(self, *args): return _CppBlockUtils.vector_LedgerEntry_erase(self, *args)
+ def __init__(self, *args):
+ this = _CppBlockUtils.new_vector_LedgerEntry(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ def push_back(self, *args): return _CppBlockUtils.vector_LedgerEntry_push_back(self, *args)
+ def front(self): return _CppBlockUtils.vector_LedgerEntry_front(self)
+ def back(self): return _CppBlockUtils.vector_LedgerEntry_back(self)
+ def assign(self, *args): return _CppBlockUtils.vector_LedgerEntry_assign(self, *args)
+ def resize(self, *args): return _CppBlockUtils.vector_LedgerEntry_resize(self, *args)
+ def insert(self, *args): return _CppBlockUtils.vector_LedgerEntry_insert(self, *args)
+ def reserve(self, *args): return _CppBlockUtils.vector_LedgerEntry_reserve(self, *args)
+ def capacity(self): return _CppBlockUtils.vector_LedgerEntry_capacity(self)
+ __swig_destroy__ = _CppBlockUtils.delete_vector_LedgerEntry
+ __del__ = lambda self : None;
+vector_LedgerEntry_swigregister = _CppBlockUtils.vector_LedgerEntry_swigregister
+vector_LedgerEntry_swigregister(vector_LedgerEntry)
+
+class vector_TxRefPtr:
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, vector_TxRefPtr, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, vector_TxRefPtr, name)
+ __repr__ = _swig_repr
+ def iterator(self): return _CppBlockUtils.vector_TxRefPtr_iterator(self)
+ def __iter__(self): return self.iterator()
+ def __nonzero__(self): return _CppBlockUtils.vector_TxRefPtr___nonzero__(self)
+ def __bool__(self): return _CppBlockUtils.vector_TxRefPtr___bool__(self)
+ def __len__(self): return _CppBlockUtils.vector_TxRefPtr___len__(self)
+ def pop(self): return _CppBlockUtils.vector_TxRefPtr_pop(self)
+ def __getslice__(self, *args): return _CppBlockUtils.vector_TxRefPtr___getslice__(self, *args)
+ def __setslice__(self, *args): return _CppBlockUtils.vector_TxRefPtr___setslice__(self, *args)
+ def __delslice__(self, *args): return _CppBlockUtils.vector_TxRefPtr___delslice__(self, *args)
+ def __delitem__(self, *args): return _CppBlockUtils.vector_TxRefPtr___delitem__(self, *args)
+ def __getitem__(self, *args): return _CppBlockUtils.vector_TxRefPtr___getitem__(self, *args)
+ def __setitem__(self, *args): return _CppBlockUtils.vector_TxRefPtr___setitem__(self, *args)
+ def append(self, *args): return _CppBlockUtils.vector_TxRefPtr_append(self, *args)
+ def empty(self): return _CppBlockUtils.vector_TxRefPtr_empty(self)
+ def size(self): return _CppBlockUtils.vector_TxRefPtr_size(self)
+ def clear(self): return _CppBlockUtils.vector_TxRefPtr_clear(self)
+ def swap(self, *args): return _CppBlockUtils.vector_TxRefPtr_swap(self, *args)
+ def get_allocator(self): return _CppBlockUtils.vector_TxRefPtr_get_allocator(self)
+ def begin(self): return _CppBlockUtils.vector_TxRefPtr_begin(self)
+ def end(self): return _CppBlockUtils.vector_TxRefPtr_end(self)
+ def rbegin(self): return _CppBlockUtils.vector_TxRefPtr_rbegin(self)
+ def rend(self): return _CppBlockUtils.vector_TxRefPtr_rend(self)
+ def pop_back(self): return _CppBlockUtils.vector_TxRefPtr_pop_back(self)
+ def erase(self, *args): return _CppBlockUtils.vector_TxRefPtr_erase(self, *args)
+ def __init__(self, *args):
+ this = _CppBlockUtils.new_vector_TxRefPtr(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ def push_back(self, *args): return _CppBlockUtils.vector_TxRefPtr_push_back(self, *args)
+ def front(self): return _CppBlockUtils.vector_TxRefPtr_front(self)
+ def back(self): return _CppBlockUtils.vector_TxRefPtr_back(self)
+ def assign(self, *args): return _CppBlockUtils.vector_TxRefPtr_assign(self, *args)
+ def resize(self, *args): return _CppBlockUtils.vector_TxRefPtr_resize(self, *args)
+ def insert(self, *args): return _CppBlockUtils.vector_TxRefPtr_insert(self, *args)
+ def reserve(self, *args): return _CppBlockUtils.vector_TxRefPtr_reserve(self, *args)
+ def capacity(self): return _CppBlockUtils.vector_TxRefPtr_capacity(self)
+ __swig_destroy__ = _CppBlockUtils.delete_vector_TxRefPtr
+ __del__ = lambda self : None;
+vector_TxRefPtr_swigregister = _CppBlockUtils.vector_TxRefPtr_swigregister
+vector_TxRefPtr_swigregister(vector_TxRefPtr)
+
+class vector_HeaderRefPtr:
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, vector_HeaderRefPtr, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, vector_HeaderRefPtr, name)
+ __repr__ = _swig_repr
+ def iterator(self): return _CppBlockUtils.vector_HeaderRefPtr_iterator(self)
+ def __iter__(self): return self.iterator()
+ def __nonzero__(self): return _CppBlockUtils.vector_HeaderRefPtr___nonzero__(self)
+ def __bool__(self): return _CppBlockUtils.vector_HeaderRefPtr___bool__(self)
+ def __len__(self): return _CppBlockUtils.vector_HeaderRefPtr___len__(self)
+ def pop(self): return _CppBlockUtils.vector_HeaderRefPtr_pop(self)
+ def __getslice__(self, *args): return _CppBlockUtils.vector_HeaderRefPtr___getslice__(self, *args)
+ def __setslice__(self, *args): return _CppBlockUtils.vector_HeaderRefPtr___setslice__(self, *args)
+ def __delslice__(self, *args): return _CppBlockUtils.vector_HeaderRefPtr___delslice__(self, *args)
+ def __delitem__(self, *args): return _CppBlockUtils.vector_HeaderRefPtr___delitem__(self, *args)
+ def __getitem__(self, *args): return _CppBlockUtils.vector_HeaderRefPtr___getitem__(self, *args)
+ def __setitem__(self, *args): return _CppBlockUtils.vector_HeaderRefPtr___setitem__(self, *args)
+ def append(self, *args): return _CppBlockUtils.vector_HeaderRefPtr_append(self, *args)
+ def empty(self): return _CppBlockUtils.vector_HeaderRefPtr_empty(self)
+ def size(self): return _CppBlockUtils.vector_HeaderRefPtr_size(self)
+ def clear(self): return _CppBlockUtils.vector_HeaderRefPtr_clear(self)
+ def swap(self, *args): return _CppBlockUtils.vector_HeaderRefPtr_swap(self, *args)
+ def get_allocator(self): return _CppBlockUtils.vector_HeaderRefPtr_get_allocator(self)
+ def begin(self): return _CppBlockUtils.vector_HeaderRefPtr_begin(self)
+ def end(self): return _CppBlockUtils.vector_HeaderRefPtr_end(self)
+ def rbegin(self): return _CppBlockUtils.vector_HeaderRefPtr_rbegin(self)
+ def rend(self): return _CppBlockUtils.vector_HeaderRefPtr_rend(self)
+ def pop_back(self): return _CppBlockUtils.vector_HeaderRefPtr_pop_back(self)
+ def erase(self, *args): return _CppBlockUtils.vector_HeaderRefPtr_erase(self, *args)
+ def __init__(self, *args):
+ this = _CppBlockUtils.new_vector_HeaderRefPtr(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ def push_back(self, *args): return _CppBlockUtils.vector_HeaderRefPtr_push_back(self, *args)
+ def front(self): return _CppBlockUtils.vector_HeaderRefPtr_front(self)
+ def back(self): return _CppBlockUtils.vector_HeaderRefPtr_back(self)
+ def assign(self, *args): return _CppBlockUtils.vector_HeaderRefPtr_assign(self, *args)
+ def resize(self, *args): return _CppBlockUtils.vector_HeaderRefPtr_resize(self, *args)
+ def insert(self, *args): return _CppBlockUtils.vector_HeaderRefPtr_insert(self, *args)
+ def reserve(self, *args): return _CppBlockUtils.vector_HeaderRefPtr_reserve(self, *args)
+ def capacity(self): return _CppBlockUtils.vector_HeaderRefPtr_capacity(self)
+ __swig_destroy__ = _CppBlockUtils.delete_vector_HeaderRefPtr
+ __del__ = lambda self : None;
+vector_HeaderRefPtr_swigregister = _CppBlockUtils.vector_HeaderRefPtr_swigregister
+vector_HeaderRefPtr_swigregister(vector_HeaderRefPtr)
+
+class vector_UnspentTxOut:
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, vector_UnspentTxOut, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, vector_UnspentTxOut, name)
+ __repr__ = _swig_repr
+ def iterator(self): return _CppBlockUtils.vector_UnspentTxOut_iterator(self)
+ def __iter__(self): return self.iterator()
+ def __nonzero__(self): return _CppBlockUtils.vector_UnspentTxOut___nonzero__(self)
+ def __bool__(self): return _CppBlockUtils.vector_UnspentTxOut___bool__(self)
+ def __len__(self): return _CppBlockUtils.vector_UnspentTxOut___len__(self)
+ def pop(self): return _CppBlockUtils.vector_UnspentTxOut_pop(self)
+ def __getslice__(self, *args): return _CppBlockUtils.vector_UnspentTxOut___getslice__(self, *args)
+ def __setslice__(self, *args): return _CppBlockUtils.vector_UnspentTxOut___setslice__(self, *args)
+ def __delslice__(self, *args): return _CppBlockUtils.vector_UnspentTxOut___delslice__(self, *args)
+ def __delitem__(self, *args): return _CppBlockUtils.vector_UnspentTxOut___delitem__(self, *args)
+ def __getitem__(self, *args): return _CppBlockUtils.vector_UnspentTxOut___getitem__(self, *args)
+ def __setitem__(self, *args): return _CppBlockUtils.vector_UnspentTxOut___setitem__(self, *args)
+ def append(self, *args): return _CppBlockUtils.vector_UnspentTxOut_append(self, *args)
+ def empty(self): return _CppBlockUtils.vector_UnspentTxOut_empty(self)
+ def size(self): return _CppBlockUtils.vector_UnspentTxOut_size(self)
+ def clear(self): return _CppBlockUtils.vector_UnspentTxOut_clear(self)
+ def swap(self, *args): return _CppBlockUtils.vector_UnspentTxOut_swap(self, *args)
+ def get_allocator(self): return _CppBlockUtils.vector_UnspentTxOut_get_allocator(self)
+ def begin(self): return _CppBlockUtils.vector_UnspentTxOut_begin(self)
+ def end(self): return _CppBlockUtils.vector_UnspentTxOut_end(self)
+ def rbegin(self): return _CppBlockUtils.vector_UnspentTxOut_rbegin(self)
+ def rend(self): return _CppBlockUtils.vector_UnspentTxOut_rend(self)
+ def pop_back(self): return _CppBlockUtils.vector_UnspentTxOut_pop_back(self)
+ def erase(self, *args): return _CppBlockUtils.vector_UnspentTxOut_erase(self, *args)
+ def __init__(self, *args):
+ this = _CppBlockUtils.new_vector_UnspentTxOut(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ def push_back(self, *args): return _CppBlockUtils.vector_UnspentTxOut_push_back(self, *args)
+ def front(self): return _CppBlockUtils.vector_UnspentTxOut_front(self)
+ def back(self): return _CppBlockUtils.vector_UnspentTxOut_back(self)
+ def assign(self, *args): return _CppBlockUtils.vector_UnspentTxOut_assign(self, *args)
+ def resize(self, *args): return _CppBlockUtils.vector_UnspentTxOut_resize(self, *args)
+ def insert(self, *args): return _CppBlockUtils.vector_UnspentTxOut_insert(self, *args)
+ def reserve(self, *args): return _CppBlockUtils.vector_UnspentTxOut_reserve(self, *args)
+ def capacity(self): return _CppBlockUtils.vector_UnspentTxOut_capacity(self)
+ __swig_destroy__ = _CppBlockUtils.delete_vector_UnspentTxOut
+ __del__ = lambda self : None;
+vector_UnspentTxOut_swigregister = _CppBlockUtils.vector_UnspentTxOut_swigregister
+vector_UnspentTxOut_swigregister(vector_UnspentTxOut)
+
+class BlockHeader:
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, BlockHeader, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, BlockHeader, name)
+ __repr__ = _swig_repr
+ def getVersion(self): return _CppBlockUtils.BlockHeader_getVersion(self)
+ def getPrevHash(self): return _CppBlockUtils.BlockHeader_getPrevHash(self)
+ def getMerkleRoot(self): return _CppBlockUtils.BlockHeader_getMerkleRoot(self)
+ def getTimestamp(self): return _CppBlockUtils.BlockHeader_getTimestamp(self)
+ def getDiffBits(self): return _CppBlockUtils.BlockHeader_getDiffBits(self)
+ def getNonce(self): return _CppBlockUtils.BlockHeader_getNonce(self)
+ def getThisHash(self): return _CppBlockUtils.BlockHeader_getThisHash(self)
+ def getNextHash(self): return _CppBlockUtils.BlockHeader_getNextHash(self)
+ def getNumTx(self): return _CppBlockUtils.BlockHeader_getNumTx(self)
+ def getBlockHeight(self): return _CppBlockUtils.BlockHeader_getBlockHeight(self)
+ def getDifficulty(self): return _CppBlockUtils.BlockHeader_getDifficulty(self)
+ def getDifficultySum(self): return _CppBlockUtils.BlockHeader_getDifficultySum(self)
+ def isMainBranch(self): return _CppBlockUtils.BlockHeader_isMainBranch(self)
+ def isOrphan(self): return _CppBlockUtils.BlockHeader_isOrphan(self)
+ def setVersion(self, *args): return _CppBlockUtils.BlockHeader_setVersion(self, *args)
+ def setPrevHash(self, *args): return _CppBlockUtils.BlockHeader_setPrevHash(self, *args)
+ def setMerkleRoot(self, *args): return _CppBlockUtils.BlockHeader_setMerkleRoot(self, *args)
+ def setTimestamp(self, *args): return _CppBlockUtils.BlockHeader_setTimestamp(self, *args)
+ def setDiffBits(self, *args): return _CppBlockUtils.BlockHeader_setDiffBits(self, *args)
+ def setNonce(self, *args): return _CppBlockUtils.BlockHeader_setNonce(self, *args)
+ def setNextHash(self, *args): return _CppBlockUtils.BlockHeader_setNextHash(self, *args)
+ def serialize(self, *args): return _CppBlockUtils.BlockHeader_serialize(self, *args)
+ def unserialize_1_(self, *args): return _CppBlockUtils.BlockHeader_unserialize_1_(self, *args)
+ def unserialize(self, *args): return _CppBlockUtils.BlockHeader_unserialize(self, *args)
+ def __init__(self, *args):
+ this = _CppBlockUtils.new_BlockHeader(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ def pprint(self, *args): return _CppBlockUtils.BlockHeader_pprint(self, *args)
+ def findNonce(self): return _CppBlockUtils.BlockHeader_findNonce(self)
+ __swig_destroy__ = _CppBlockUtils.delete_BlockHeader
+ __del__ = lambda self : None;
+BlockHeader_swigregister = _CppBlockUtils.BlockHeader_swigregister
+BlockHeader_swigregister(BlockHeader)
+
+class OutPoint:
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, OutPoint, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, OutPoint, name)
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ this = _CppBlockUtils.new_OutPoint(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ def getTxHash(self): return _CppBlockUtils.OutPoint_getTxHash(self)
+ def getTxHashRef(self): return _CppBlockUtils.OutPoint_getTxHashRef(self)
+ def getTxOutIndex(self): return _CppBlockUtils.OutPoint_getTxOutIndex(self)
+ def setTxHash(self, *args): return _CppBlockUtils.OutPoint_setTxHash(self, *args)
+ def setTxOutIndex(self, *args): return _CppBlockUtils.OutPoint_setTxOutIndex(self, *args)
+ def __lt__(self, *args): return _CppBlockUtils.OutPoint___lt__(self, *args)
+ def __eq__(self, *args): return _CppBlockUtils.OutPoint___eq__(self, *args)
+ def serialize(self, *args): return _CppBlockUtils.OutPoint_serialize(self, *args)
+ def unserialize(self, *args): return _CppBlockUtils.OutPoint_unserialize(self, *args)
+ __swig_destroy__ = _CppBlockUtils.delete_OutPoint
+ __del__ = lambda self : None;
+OutPoint_swigregister = _CppBlockUtils.OutPoint_swigregister
+OutPoint_swigregister(OutPoint)
+
+class TxIn:
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, TxIn, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, TxIn, name)
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ this = _CppBlockUtils.new_TxIn(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ def getOutPoint(self): return _CppBlockUtils.TxIn_getOutPoint(self)
+ def getBinScript(self): return _CppBlockUtils.TxIn_getBinScript(self)
+ def getSequence(self): return _CppBlockUtils.TxIn_getSequence(self)
+ def getScriptSize(self): return _CppBlockUtils.TxIn_getScriptSize(self)
+ def getSize(self): return _CppBlockUtils.TxIn_getSize(self)
+ def setOutPoint(self, *args): return _CppBlockUtils.TxIn_setOutPoint(self, *args)
+ def setBinScript(self, *args): return _CppBlockUtils.TxIn_setBinScript(self, *args)
+ def setSequence(self, *args): return _CppBlockUtils.TxIn_setSequence(self, *args)
+ def setIsMine(self, *args): return _CppBlockUtils.TxIn_setIsMine(self, *args)
+ def serialize(self, *args): return _CppBlockUtils.TxIn_serialize(self, *args)
+ def unserialize(self, *args): return _CppBlockUtils.TxIn_unserialize(self, *args)
+ __swig_destroy__ = _CppBlockUtils.delete_TxIn
+ __del__ = lambda self : None;
+TxIn_swigregister = _CppBlockUtils.TxIn_swigregister
+TxIn_swigregister(TxIn)
+
+class TxOut:
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, TxOut, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, TxOut, name)
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ this = _CppBlockUtils.new_TxOut(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ def getValue(self): return _CppBlockUtils.TxOut_getValue(self)
+ def getPkScript(self): return _CppBlockUtils.TxOut_getPkScript(self)
+ def getScriptSize(self): return _CppBlockUtils.TxOut_getScriptSize(self)
+ def isStandard(self): return _CppBlockUtils.TxOut_isStandard(self)
+ def getRecipientAddr(self): return _CppBlockUtils.TxOut_getRecipientAddr(self)
+ def setValue(self, *args): return _CppBlockUtils.TxOut_setValue(self, *args)
+ def setPkScript(self, *args): return _CppBlockUtils.TxOut_setPkScript(self, *args)
+ def serialize(self, *args): return _CppBlockUtils.TxOut_serialize(self, *args)
+ def unserialize(self, *args): return _CppBlockUtils.TxOut_unserialize(self, *args)
+ __swig_destroy__ = _CppBlockUtils.delete_TxOut
+ __del__ = lambda self : None;
+TxOut_swigregister = _CppBlockUtils.TxOut_swigregister
+TxOut_swigregister(TxOut)
+
+class Tx:
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, Tx, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, Tx, name)
+ __repr__ = _swig_repr
+ def __init__(self):
+ this = _CppBlockUtils.new_Tx()
+ try: self.this.append(this)
+ except: self.this = this
+ def getVersion_(self): return _CppBlockUtils.Tx_getVersion_(self)
+ def getNumTxIn_(self): return _CppBlockUtils.Tx_getNumTxIn_(self)
+ def getNumTxOut_(self): return _CppBlockUtils.Tx_getNumTxOut_(self)
+ def getTxInList_(self): return _CppBlockUtils.Tx_getTxInList_(self)
+ def getTxOutList_(self): return _CppBlockUtils.Tx_getTxOutList_(self)
+ def getLockTime_(self): return _CppBlockUtils.Tx_getLockTime_(self)
+ def getNumBytes(self): return _CppBlockUtils.Tx_getNumBytes(self)
+ def getHeaderPtr(self): return _CppBlockUtils.Tx_getHeaderPtr(self)
+ def getHeaderRefPtr(self): return _CppBlockUtils.Tx_getHeaderRefPtr(self)
+ def createOutPoint(self, *args): return _CppBlockUtils.Tx_createOutPoint(self, *args)
+ def serialize(self, *args): return _CppBlockUtils.Tx_serialize(self, *args)
+ def unserialize(self, *args): return _CppBlockUtils.Tx_unserialize(self, *args)
+ __swig_destroy__ = _CppBlockUtils.delete_Tx
+ __del__ = lambda self : None;
+Tx_swigregister = _CppBlockUtils.Tx_swigregister
+Tx_swigregister(Tx)
+
+class UnspentTxOut:
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, UnspentTxOut, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, UnspentTxOut, name)
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ this = _CppBlockUtils.new_UnspentTxOut(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ def init(self, *args): return _CppBlockUtils.UnspentTxOut_init(self, *args)
+ def getTxHash(self): return _CppBlockUtils.UnspentTxOut_getTxHash(self)
+ def getTxOutIndex(self): return _CppBlockUtils.UnspentTxOut_getTxOutIndex(self)
+ def getValue(self): return _CppBlockUtils.UnspentTxOut_getValue(self)
+ def getTxHeight(self): return _CppBlockUtils.UnspentTxOut_getTxHeight(self)
+ def getNumConfirm(self): return _CppBlockUtils.UnspentTxOut_getNumConfirm(self)
+ def getScript(self): return _CppBlockUtils.UnspentTxOut_getScript(self)
+ def getRecipientAddr(self): return _CppBlockUtils.UnspentTxOut_getRecipientAddr(self)
+ def updateNumConfirm(self, *args): return _CppBlockUtils.UnspentTxOut_updateNumConfirm(self, *args)
+ __swig_getmethods__["CompareNaive"] = lambda x: _CppBlockUtils.UnspentTxOut_CompareNaive
+ __swig_getmethods__["CompareTech1"] = lambda x: _CppBlockUtils.UnspentTxOut_CompareTech1
+ __swig_getmethods__["CompareTech2"] = lambda x: _CppBlockUtils.UnspentTxOut_CompareTech2
+ __swig_getmethods__["CompareTech3"] = lambda x: _CppBlockUtils.UnspentTxOut_CompareTech3
+ __swig_getmethods__["sortTxOutVect"] = lambda x: _CppBlockUtils.UnspentTxOut_sortTxOutVect
+ def pprintOneLine(self, *args): return _CppBlockUtils.UnspentTxOut_pprintOneLine(self, *args)
+ __swig_setmethods__["txHash_"] = _CppBlockUtils.UnspentTxOut_txHash__set
+ __swig_getmethods__["txHash_"] = _CppBlockUtils.UnspentTxOut_txHash__get
+ __swig_setmethods__["txOutIndex_"] = _CppBlockUtils.UnspentTxOut_txOutIndex__set
+ __swig_getmethods__["txOutIndex_"] = _CppBlockUtils.UnspentTxOut_txOutIndex__get
+ __swig_setmethods__["txHeight_"] = _CppBlockUtils.UnspentTxOut_txHeight__set
+ __swig_getmethods__["txHeight_"] = _CppBlockUtils.UnspentTxOut_txHeight__get
+ __swig_setmethods__["value_"] = _CppBlockUtils.UnspentTxOut_value__set
+ __swig_getmethods__["value_"] = _CppBlockUtils.UnspentTxOut_value__get
+ __swig_setmethods__["script_"] = _CppBlockUtils.UnspentTxOut_script__set
+ __swig_getmethods__["script_"] = _CppBlockUtils.UnspentTxOut_script__get
+ __swig_setmethods__["numConfirm_"] = _CppBlockUtils.UnspentTxOut_numConfirm__set
+ __swig_getmethods__["numConfirm_"] = _CppBlockUtils.UnspentTxOut_numConfirm__get
+ __swig_setmethods__["targetTxAmount_"] = _CppBlockUtils.UnspentTxOut_targetTxAmount__set
+ __swig_getmethods__["targetTxAmount_"] = _CppBlockUtils.UnspentTxOut_targetTxAmount__get
+ __swig_destroy__ = _CppBlockUtils.delete_UnspentTxOut
+ __del__ = lambda self : None;
+UnspentTxOut_swigregister = _CppBlockUtils.UnspentTxOut_swigregister
+UnspentTxOut_swigregister(UnspentTxOut)
+
+def UnspentTxOut_CompareNaive(*args):
+ return _CppBlockUtils.UnspentTxOut_CompareNaive(*args)
+UnspentTxOut_CompareNaive = _CppBlockUtils.UnspentTxOut_CompareNaive
+
+def UnspentTxOut_CompareTech1(*args):
+ return _CppBlockUtils.UnspentTxOut_CompareTech1(*args)
+UnspentTxOut_CompareTech1 = _CppBlockUtils.UnspentTxOut_CompareTech1
+
+def UnspentTxOut_CompareTech2(*args):
+ return _CppBlockUtils.UnspentTxOut_CompareTech2(*args)
+UnspentTxOut_CompareTech2 = _CppBlockUtils.UnspentTxOut_CompareTech2
+
+def UnspentTxOut_CompareTech3(*args):
+ return _CppBlockUtils.UnspentTxOut_CompareTech3(*args)
+UnspentTxOut_CompareTech3 = _CppBlockUtils.UnspentTxOut_CompareTech3
+
+def UnspentTxOut_sortTxOutVect(*args):
+ return _CppBlockUtils.UnspentTxOut_sortTxOutVect(*args)
+UnspentTxOut_sortTxOutVect = _CppBlockUtils.UnspentTxOut_sortTxOutVect
+
+class BlockHeaderRef:
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, BlockHeaderRef, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, BlockHeaderRef, name)
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ this = _CppBlockUtils.new_BlockHeaderRef(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ def unserialize_1_(self, *args): return _CppBlockUtils.BlockHeaderRef_unserialize_1_(self, *args)
+ def getVersion(self): return _CppBlockUtils.BlockHeaderRef_getVersion(self)
+ def getThisHash(self): return _CppBlockUtils.BlockHeaderRef_getThisHash(self)
+ def getPrevHash(self): return _CppBlockUtils.BlockHeaderRef_getPrevHash(self)
+ def getNextHash(self): return _CppBlockUtils.BlockHeaderRef_getNextHash(self)
+ def getMerkleRoot(self): return _CppBlockUtils.BlockHeaderRef_getMerkleRoot(self)
+ def getDiffBits(self): return _CppBlockUtils.BlockHeaderRef_getDiffBits(self)
+ def getTimestamp(self): return _CppBlockUtils.BlockHeaderRef_getTimestamp(self)
+ def getNonce(self): return _CppBlockUtils.BlockHeaderRef_getNonce(self)
+ def getBlockHeight(self): return _CppBlockUtils.BlockHeaderRef_getBlockHeight(self)
+ def isMainBranch(self): return _CppBlockUtils.BlockHeaderRef_isMainBranch(self)
+ def isOrphan(self): return _CppBlockUtils.BlockHeaderRef_isOrphan(self)
+ def getDifficulty(self): return _CppBlockUtils.BlockHeaderRef_getDifficulty(self)
+ def getDifficultySum(self): return _CppBlockUtils.BlockHeaderRef_getDifficultySum(self)
+ def getThisHashRef(self): return _CppBlockUtils.BlockHeaderRef_getThisHashRef(self)
+ def getPrevHashRef(self): return _CppBlockUtils.BlockHeaderRef_getPrevHashRef(self)
+ def getNextHashRef(self): return _CppBlockUtils.BlockHeaderRef_getNextHashRef(self)
+ def getMerkleRootRef(self): return _CppBlockUtils.BlockHeaderRef_getMerkleRootRef(self)
+ def getDiffBitsRef(self): return _CppBlockUtils.BlockHeaderRef_getDiffBitsRef(self)
+ def getBlkStartByte(self): return _CppBlockUtils.BlockHeaderRef_getBlkStartByte(self)
+ def getNumTx(self): return _CppBlockUtils.BlockHeaderRef_getNumTx(self)
+ def getPtr(self): return _CppBlockUtils.BlockHeaderRef_getPtr(self)
+ def getSize(self): return _CppBlockUtils.BlockHeaderRef_getSize(self)
+ def isInitialized(self): return _CppBlockUtils.BlockHeaderRef_isInitialized(self)
+ def getBlockSize(self): return _CppBlockUtils.BlockHeaderRef_getBlockSize(self)
+ def getTxRefPtrList(self): return _CppBlockUtils.BlockHeaderRef_getTxRefPtrList(self)
+ def getTxHashList(self): return _CppBlockUtils.BlockHeaderRef_getTxHashList(self)
+ def calcMerkleRoot(self, treeOut = None): return _CppBlockUtils.BlockHeaderRef_calcMerkleRoot(self, treeOut)
+ def verifyMerkleRoot(self): return _CppBlockUtils.BlockHeaderRef_verifyMerkleRoot(self)
+ def verifyIntegrity(self): return _CppBlockUtils.BlockHeaderRef_verifyIntegrity(self)
+ def getCopy(self): return _CppBlockUtils.BlockHeaderRef_getCopy(self)
+ def pprint(self, *args): return _CppBlockUtils.BlockHeaderRef_pprint(self, *args)
+ def pprintAlot(self, *args): return _CppBlockUtils.BlockHeaderRef_pprintAlot(self, *args)
+ def serialize(self): return _CppBlockUtils.BlockHeaderRef_serialize(self)
+ def serializeRef(self): return _CppBlockUtils.BlockHeaderRef_serializeRef(self)
+ def serializeWholeBlock(self, *args): return _CppBlockUtils.BlockHeaderRef_serializeWholeBlock(self, *args)
+ def unserialize(self, *args): return _CppBlockUtils.BlockHeaderRef_unserialize(self, *args)
+ __swig_destroy__ = _CppBlockUtils.delete_BlockHeaderRef
+ __del__ = lambda self : None;
+BlockHeaderRef_swigregister = _CppBlockUtils.BlockHeaderRef_swigregister
+BlockHeaderRef_swigregister(BlockHeaderRef)
+
+class OutPointRef:
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, OutPointRef, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, OutPointRef, name)
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ this = _CppBlockUtils.new_OutPointRef(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ def getPtr(self): return _CppBlockUtils.OutPointRef_getPtr(self)
+ def getSize(self): return _CppBlockUtils.OutPointRef_getSize(self)
+ def getCopy(self): return _CppBlockUtils.OutPointRef_getCopy(self)
+ def getTxHash(self): return _CppBlockUtils.OutPointRef_getTxHash(self)
+ def getTxHashRef(self): return _CppBlockUtils.OutPointRef_getTxHashRef(self)
+ def getTxOutIndex(self): return _CppBlockUtils.OutPointRef_getTxOutIndex(self)
+ def serialize(self): return _CppBlockUtils.OutPointRef_serialize(self)
+ def serializeRef(self): return _CppBlockUtils.OutPointRef_serializeRef(self)
+ def unserialize(self, *args): return _CppBlockUtils.OutPointRef_unserialize(self, *args)
+ __swig_destroy__ = _CppBlockUtils.delete_OutPointRef
+ __del__ = lambda self : None;
+OutPointRef_swigregister = _CppBlockUtils.OutPointRef_swigregister
+OutPointRef_swigregister(OutPointRef)
+
+class TxInRef:
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, TxInRef, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, TxInRef, name)
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ this = _CppBlockUtils.new_TxInRef(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ def getPtr(self): return _CppBlockUtils.TxInRef_getPtr(self)
+ def getSize(self): return _CppBlockUtils.TxInRef_getSize(self)
+ def isStandard(self): return _CppBlockUtils.TxInRef_isStandard(self)
+ def isCoinbase(self): return _CppBlockUtils.TxInRef_isCoinbase(self)
+ def isInitialized(self): return _CppBlockUtils.TxInRef_isInitialized(self)
+ def getScriptType(self): return _CppBlockUtils.TxInRef_getScriptType(self)
+ def getScriptOffset(self): return _CppBlockUtils.TxInRef_getScriptOffset(self)
+ def getCopy(self): return _CppBlockUtils.TxInRef_getCopy(self)
+ def getParentTxPtr(self): return _CppBlockUtils.TxInRef_getParentTxPtr(self)
+ def getIndex(self): return _CppBlockUtils.TxInRef_getIndex(self)
+ def setParentTx(self, *args): return _CppBlockUtils.TxInRef_setParentTx(self, *args)
+ def getSequence(self): return _CppBlockUtils.TxInRef_getSequence(self)
+ def getScriptSize(self): return _CppBlockUtils.TxInRef_getScriptSize(self)
+ def getOutPoint(self): return _CppBlockUtils.TxInRef_getOutPoint(self)
+ def getOutPointRef(self): return _CppBlockUtils.TxInRef_getOutPointRef(self)
+ def getScript(self): return _CppBlockUtils.TxInRef_getScript(self)
+ def getScriptRef(self): return _CppBlockUtils.TxInRef_getScriptRef(self)
+ def isScriptStandard(self): return _CppBlockUtils.TxInRef_isScriptStandard(self)
+ def isScriptCoinbase(self): return _CppBlockUtils.TxInRef_isScriptCoinbase(self)
+ def isScriptSpendCB(self): return _CppBlockUtils.TxInRef_isScriptSpendCB(self)
+ def isScriptUnknown(self): return _CppBlockUtils.TxInRef_isScriptUnknown(self)
+ def serialize(self): return _CppBlockUtils.TxInRef_serialize(self)
+ def serializeRef(self): return _CppBlockUtils.TxInRef_serializeRef(self)
+ def unserialize(self, *args): return _CppBlockUtils.TxInRef_unserialize(self, *args)
+ def getSenderAddrIfAvailable(self, *args): return _CppBlockUtils.TxInRef_getSenderAddrIfAvailable(self, *args)
+ def pprint(self, *args): return _CppBlockUtils.TxInRef_pprint(self, *args)
+ __swig_destroy__ = _CppBlockUtils.delete_TxInRef
+ __del__ = lambda self : None;
+TxInRef_swigregister = _CppBlockUtils.TxInRef_swigregister
+TxInRef_swigregister(TxInRef)
+
+class TxOutRef:
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, TxOutRef, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, TxOutRef, name)
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ this = _CppBlockUtils.new_TxOutRef(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ def getPtr(self): return _CppBlockUtils.TxOutRef_getPtr(self)
+ def getSize(self): return _CppBlockUtils.TxOutRef_getSize(self)
+ def getValue(self): return _CppBlockUtils.TxOutRef_getValue(self)
+ def isStandard(self): return _CppBlockUtils.TxOutRef_isStandard(self)
+ def isInitialized(self): return _CppBlockUtils.TxOutRef_isInitialized(self)
+ def getParentTxPtr(self): return _CppBlockUtils.TxOutRef_getParentTxPtr(self)
+ def getIndex(self): return _CppBlockUtils.TxOutRef_getIndex(self)
+ def setParentTx(self, *args): return _CppBlockUtils.TxOutRef_setParentTx(self, *args)
+ def getScriptType(self): return _CppBlockUtils.TxOutRef_getScriptType(self)
+ def getScriptSize(self): return _CppBlockUtils.TxOutRef_getScriptSize(self)
+ def getRecipientAddr(self): return _CppBlockUtils.TxOutRef_getRecipientAddr(self)
+ def getRecipientAddrRef(self): return _CppBlockUtils.TxOutRef_getRecipientAddrRef(self)
+ def getScript(self): return _CppBlockUtils.TxOutRef_getScript(self)
+ def getScriptRef(self): return _CppBlockUtils.TxOutRef_getScriptRef(self)
+ def isScriptStandard(self): return _CppBlockUtils.TxOutRef_isScriptStandard(self)
+ def isScriptCoinbase(self): return _CppBlockUtils.TxOutRef_isScriptCoinbase(self)
+ def isScriptUnknown(self): return _CppBlockUtils.TxOutRef_isScriptUnknown(self)
+ def serialize(self): return _CppBlockUtils.TxOutRef_serialize(self)
+ def serializeRef(self): return _CppBlockUtils.TxOutRef_serializeRef(self)
+ def unserialize(self, *args): return _CppBlockUtils.TxOutRef_unserialize(self, *args)
+ def getCopy(self): return _CppBlockUtils.TxOutRef_getCopy(self)
+ def pprint(self, *args): return _CppBlockUtils.TxOutRef_pprint(self, *args)
+ __swig_destroy__ = _CppBlockUtils.delete_TxOutRef
+ __del__ = lambda self : None;
+TxOutRef_swigregister = _CppBlockUtils.TxOutRef_swigregister
+TxOutRef_swigregister(TxOutRef)
+
+class TxRef:
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, TxRef, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, TxRef, name)
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ this = _CppBlockUtils.new_TxRef(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ def getPtr(self): return _CppBlockUtils.TxRef_getPtr(self)
+ def getSize(self): return _CppBlockUtils.TxRef_getSize(self)
+ def getVersion(self): return _CppBlockUtils.TxRef_getVersion(self)
+ def getNumTxIn(self): return _CppBlockUtils.TxRef_getNumTxIn(self)
+ def getNumTxOut(self): return _CppBlockUtils.TxRef_getNumTxOut(self)
+ def getThisHash(self): return _CppBlockUtils.TxRef_getThisHash(self)
+ def getThisHashRef(self): return _CppBlockUtils.TxRef_getThisHashRef(self)
+ def setMainBranch(self, b = True): return _CppBlockUtils.TxRef_setMainBranch(self, b)
+ def isMainBranch(self): return _CppBlockUtils.TxRef_isMainBranch(self)
+ def getTxStartByte(self): return _CppBlockUtils.TxRef_getTxStartByte(self)
+ def setTxStartByte(self, *args): return _CppBlockUtils.TxRef_setTxStartByte(self, *args)
+ def getTxInOffset(self, *args): return _CppBlockUtils.TxRef_getTxInOffset(self, *args)
+ def getTxOutOffset(self, *args): return _CppBlockUtils.TxRef_getTxOutOffset(self, *args)
+ def createFromStr(self, *args): return _CppBlockUtils.TxRef_createFromStr(self, *args)
+ def getCopy(self): return _CppBlockUtils.TxRef_getCopy(self)
+ def getHeaderPtr(self): return _CppBlockUtils.TxRef_getHeaderPtr(self)
+ def setHeaderPtr(self, *args): return _CppBlockUtils.TxRef_setHeaderPtr(self, *args)
+ def serialize(self): return _CppBlockUtils.TxRef_serialize(self)
+ def serializeRef(self): return _CppBlockUtils.TxRef_serializeRef(self)
+ def unserialize(self, *args): return _CppBlockUtils.TxRef_unserialize(self, *args)
+ def getLockTime(self): return _CppBlockUtils.TxRef_getLockTime(self)
+ def getSumOfOutputs(self): return _CppBlockUtils.TxRef_getSumOfOutputs(self)
+ def getTxInRef(self, *args): return _CppBlockUtils.TxRef_getTxInRef(self, *args)
+ def getTxOutRef(self, *args): return _CppBlockUtils.TxRef_getTxOutRef(self, *args)
+ def getBlockTimestamp(self): return _CppBlockUtils.TxRef_getBlockTimestamp(self)
+ def getBlockHeight(self): return _CppBlockUtils.TxRef_getBlockHeight(self)
+ def getBlockTxIndex(self): return _CppBlockUtils.TxRef_getBlockTxIndex(self)
+ def pprint(self, *args): return _CppBlockUtils.TxRef_pprint(self, *args)
+ def pprintAlot(self, *args): return _CppBlockUtils.TxRef_pprintAlot(self, *args)
+ __swig_destroy__ = _CppBlockUtils.delete_TxRef
+ __del__ = lambda self : None;
+TxRef_swigregister = _CppBlockUtils.TxRef_swigregister
+TxRef_swigregister(TxRef)
+
+TX_0_UNCONFIRMED = _CppBlockUtils.TX_0_UNCONFIRMED
+TX_NOT_EXIST = _CppBlockUtils.TX_NOT_EXIST
+TX_OFF_MAIN_BRANCH = _CppBlockUtils.TX_OFF_MAIN_BRANCH
+class TxIOPair:
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, TxIOPair, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, TxIOPair, name)
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ this = _CppBlockUtils.new_TxIOPair(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ def hasTxOut(self): return _CppBlockUtils.TxIOPair_hasTxOut(self)
+ def hasTxIn(self): return _CppBlockUtils.TxIOPair_hasTxIn(self)
+ def hasTxOutInMain(self): return _CppBlockUtils.TxIOPair_hasTxOutInMain(self)
+ def hasTxInInMain(self): return _CppBlockUtils.TxIOPair_hasTxInInMain(self)
+ def hasTxOutZC(self): return _CppBlockUtils.TxIOPair_hasTxOutZC(self)
+ def hasTxInZC(self): return _CppBlockUtils.TxIOPair_hasTxInZC(self)
+ def hasValue(self): return _CppBlockUtils.TxIOPair_hasValue(self)
+ def getValue(self): return _CppBlockUtils.TxIOPair_getValue(self)
+ def getTxOutRef(self): return _CppBlockUtils.TxIOPair_getTxOutRef(self)
+ def getTxInRef(self): return _CppBlockUtils.TxIOPair_getTxInRef(self)
+ def getTxOutRefZC(self): return _CppBlockUtils.TxIOPair_getTxOutRefZC(self)
+ def getTxInRefZC(self): return _CppBlockUtils.TxIOPair_getTxInRefZC(self)
+ def getTxRefOfOutput(self): return _CppBlockUtils.TxIOPair_getTxRefOfOutput(self)
+ def getTxRefOfInput(self): return _CppBlockUtils.TxIOPair_getTxRefOfInput(self)
+ def getOutPoint(self): return _CppBlockUtils.TxIOPair_getOutPoint(self)
+ def reassessValidity(self): return _CppBlockUtils.TxIOPair_reassessValidity(self)
+ def isTxOutFromSelf(self): return _CppBlockUtils.TxIOPair_isTxOutFromSelf(self)
+ def setTxOutFromSelf(self, isTrue = True): return _CppBlockUtils.TxIOPair_setTxOutFromSelf(self, isTrue)
+ def getTxHashOfInput(self): return _CppBlockUtils.TxIOPair_getTxHashOfInput(self)
+ def getTxHashOfOutput(self): return _CppBlockUtils.TxIOPair_getTxHashOfOutput(self)
+ def setTxInRef(self, *args): return _CppBlockUtils.TxIOPair_setTxInRef(self, *args)
+ def setTxOutRef(self, *args): return _CppBlockUtils.TxIOPair_setTxOutRef(self, *args)
+ def isSourceUnknown(self): return _CppBlockUtils.TxIOPair_isSourceUnknown(self)
+ def isStandardTxOutScript(self): return _CppBlockUtils.TxIOPair_isStandardTxOutScript(self)
+ def isSpent(self): return _CppBlockUtils.TxIOPair_isSpent(self)
+ def isUnspent(self): return _CppBlockUtils.TxIOPair_isUnspent(self)
+ def isSpendable(self): return _CppBlockUtils.TxIOPair_isSpendable(self)
+ def isMineButUnconfirmed(self, *args): return _CppBlockUtils.TxIOPair_isMineButUnconfirmed(self, *args)
+ def clearZCFields(self): return _CppBlockUtils.TxIOPair_clearZCFields(self)
+ def pprintOneLine(self): return _CppBlockUtils.TxIOPair_pprintOneLine(self)
+ __swig_destroy__ = _CppBlockUtils.delete_TxIOPair
+ __del__ = lambda self : None;
+TxIOPair_swigregister = _CppBlockUtils.TxIOPair_swigregister
+TxIOPair_swigregister(TxIOPair)
+
+class LedgerEntry:
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, LedgerEntry, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, LedgerEntry, name)
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ this = _CppBlockUtils.new_LedgerEntry(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ def getAddrStr20(self): return _CppBlockUtils.LedgerEntry_getAddrStr20(self)
+ def getValue(self): return _CppBlockUtils.LedgerEntry_getValue(self)
+ def getBlockNum(self): return _CppBlockUtils.LedgerEntry_getBlockNum(self)
+ def getTxHash(self): return _CppBlockUtils.LedgerEntry_getTxHash(self)
+ def getIndex(self): return _CppBlockUtils.LedgerEntry_getIndex(self)
+ def getTxTime(self): return _CppBlockUtils.LedgerEntry_getTxTime(self)
+ def isValid(self): return _CppBlockUtils.LedgerEntry_isValid(self)
+ def isSentToSelf(self): return _CppBlockUtils.LedgerEntry_isSentToSelf(self)
+ def isChangeBack(self): return _CppBlockUtils.LedgerEntry_isChangeBack(self)
+ def setAddr20(self, *args): return _CppBlockUtils.LedgerEntry_setAddr20(self, *args)
+ def setValid(self, b = True): return _CppBlockUtils.LedgerEntry_setValid(self, b)
+ def changeBlkNum(self, *args): return _CppBlockUtils.LedgerEntry_changeBlkNum(self, *args)
+ def __lt__(self, *args): return _CppBlockUtils.LedgerEntry___lt__(self, *args)
+ def __eq__(self, *args): return _CppBlockUtils.LedgerEntry___eq__(self, *args)
+ def pprint(self): return _CppBlockUtils.LedgerEntry_pprint(self)
+ def pprintOneLine(self): return _CppBlockUtils.LedgerEntry_pprintOneLine(self)
+ __swig_destroy__ = _CppBlockUtils.delete_LedgerEntry
+ __del__ = lambda self : None;
+LedgerEntry_swigregister = _CppBlockUtils.LedgerEntry_swigregister
+LedgerEntry_swigregister(LedgerEntry)
+
+class BtcAddress:
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, BtcAddress, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, BtcAddress, name)
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ this = _CppBlockUtils.new_BtcAddress(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ def getAddrStr20(self): return _CppBlockUtils.BtcAddress_getAddrStr20(self)
+ def getFirstBlockNum(self): return _CppBlockUtils.BtcAddress_getFirstBlockNum(self)
+ def getFirstTimestamp(self): return _CppBlockUtils.BtcAddress_getFirstTimestamp(self)
+ def getLastBlockNum(self): return _CppBlockUtils.BtcAddress_getLastBlockNum(self)
+ def getLastTimestamp(self): return _CppBlockUtils.BtcAddress_getLastTimestamp(self)
+ def setFirstBlockNum(self, *args): return _CppBlockUtils.BtcAddress_setFirstBlockNum(self, *args)
+ def setFirstTimestamp(self, *args): return _CppBlockUtils.BtcAddress_setFirstTimestamp(self, *args)
+ def setLastBlockNum(self, *args): return _CppBlockUtils.BtcAddress_setLastBlockNum(self, *args)
+ def setLastTimestamp(self, *args): return _CppBlockUtils.BtcAddress_setLastTimestamp(self, *args)
+ def isUnused(self): return _CppBlockUtils.BtcAddress_isUnused(self)
+ def setUnused(self): return _CppBlockUtils.BtcAddress_setUnused(self)
+ def setAddrStr20(self, *args): return _CppBlockUtils.BtcAddress_setAddrStr20(self, *args)
+ def sortLedger(self): return _CppBlockUtils.BtcAddress_sortLedger(self)
+ def removeInvalidEntries(self): return _CppBlockUtils.BtcAddress_removeInvalidEntries(self)
+ def getFullBalance(self): return _CppBlockUtils.BtcAddress_getFullBalance(self)
+ def getSpendableBalance(self): return _CppBlockUtils.BtcAddress_getSpendableBalance(self)
+ def getUnconfirmedBalance(self, *args): return _CppBlockUtils.BtcAddress_getUnconfirmedBalance(self, *args)
+ def getFullTxOutList(self, currBlk = 0): return _CppBlockUtils.BtcAddress_getFullTxOutList(self, currBlk)
+ def getSpendableTxOutList(self, currBlk = 0): return _CppBlockUtils.BtcAddress_getSpendableTxOutList(self, currBlk)
+ def clearZeroConfPool(self): return _CppBlockUtils.BtcAddress_clearZeroConfPool(self)
+ def getTxLedger(self): return _CppBlockUtils.BtcAddress_getTxLedger(self)
+ def getZeroConfLedger(self): return _CppBlockUtils.BtcAddress_getZeroConfLedger(self)
+ def getTxIOList(self): return _CppBlockUtils.BtcAddress_getTxIOList(self)
+ def addTxIO(self, *args): return _CppBlockUtils.BtcAddress_addTxIO(self, *args)
+ def addLedgerEntry(self, *args): return _CppBlockUtils.BtcAddress_addLedgerEntry(self, *args)
+ def pprintLedger(self): return _CppBlockUtils.BtcAddress_pprintLedger(self)
+ __swig_destroy__ = _CppBlockUtils.delete_BtcAddress
+ __del__ = lambda self : None;
+BtcAddress_swigregister = _CppBlockUtils.BtcAddress_swigregister
+BtcAddress_swigregister(BtcAddress)
+
+class BtcWallet:
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, BtcWallet, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, BtcWallet, name)
+ __repr__ = _swig_repr
+ def __init__(self):
+ this = _CppBlockUtils.new_BtcWallet()
+ try: self.this.append(this)
+ except: self.this = this
+ def addAddress(self, *args): return _CppBlockUtils.BtcWallet_addAddress(self, *args)
+ def addAddress_BtcAddress_(self, *args): return _CppBlockUtils.BtcWallet_addAddress_BtcAddress_(self, *args)
+ def addAddress_1_(self, *args): return _CppBlockUtils.BtcWallet_addAddress_1_(self, *args)
+ def addAddress_3_(self, *args): return _CppBlockUtils.BtcWallet_addAddress_3_(self, *args)
+ def addAddress_5_(self, *args): return _CppBlockUtils.BtcWallet_addAddress_5_(self, *args)
+ def hasAddr(self, *args): return _CppBlockUtils.BtcWallet_hasAddr(self, *args)
+ def isMineBulkFilter(self, *args): return _CppBlockUtils.BtcWallet_isMineBulkFilter(self, *args)
+ def scanTx(self, *args): return _CppBlockUtils.BtcWallet_scanTx(self, *args)
+ def scanNonStdTx(self, *args): return _CppBlockUtils.BtcWallet_scanNonStdTx(self, *args)
+ def getFullBalance(self): return _CppBlockUtils.BtcWallet_getFullBalance(self)
+ def getSpendableBalance(self): return _CppBlockUtils.BtcWallet_getSpendableBalance(self)
+ def getUnconfirmedBalance(self, *args): return _CppBlockUtils.BtcWallet_getUnconfirmedBalance(self, *args)
+ def getFullTxOutList(self, currBlk = 0): return _CppBlockUtils.BtcWallet_getFullTxOutList(self, currBlk)
+ def getSpendableTxOutList(self, currBlk = 0): return _CppBlockUtils.BtcWallet_getSpendableTxOutList(self, currBlk)
+ def clearZeroConfPool(self): return _CppBlockUtils.BtcWallet_clearZeroConfPool(self)
+ def getNumAddr(self): return _CppBlockUtils.BtcWallet_getNumAddr(self)
+ def getAddrByIndex(self, *args): return _CppBlockUtils.BtcWallet_getAddrByIndex(self, *args)
+ def getAddrByHash160(self, *args): return _CppBlockUtils.BtcWallet_getAddrByHash160(self, *args)
+ def sortLedger(self): return _CppBlockUtils.BtcWallet_sortLedger(self)
+ def removeInvalidEntries(self): return _CppBlockUtils.BtcWallet_removeInvalidEntries(self)
+ def getZeroConfLedger(self, addr160 = None): return _CppBlockUtils.BtcWallet_getZeroConfLedger(self, addr160)
+ def getTxLedger(self, addr160 = None): return _CppBlockUtils.BtcWallet_getTxLedger(self, addr160)
+ def getTxIOMap(self): return _CppBlockUtils.BtcWallet_getTxIOMap(self)
+ def getNonStdTxIO(self): return _CppBlockUtils.BtcWallet_getNonStdTxIO(self)
+ def isOutPointMine(self, *args): return _CppBlockUtils.BtcWallet_isOutPointMine(self, *args)
+ def pprintLedger(self): return _CppBlockUtils.BtcWallet_pprintLedger(self)
+ def pprintAlot(self, topBlk = 0, withAddr = False): return _CppBlockUtils.BtcWallet_pprintAlot(self, topBlk, withAddr)
+ __swig_destroy__ = _CppBlockUtils.delete_BtcWallet
+ __del__ = lambda self : None;
+BtcWallet_swigregister = _CppBlockUtils.BtcWallet_swigregister
+BtcWallet_swigregister(BtcWallet)
+
+class ZeroConfData:
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, ZeroConfData, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, ZeroConfData, name)
+ __repr__ = _swig_repr
+ __swig_setmethods__["txref_"] = _CppBlockUtils.ZeroConfData_txref__set
+ __swig_getmethods__["txref_"] = _CppBlockUtils.ZeroConfData_txref__get
+ __swig_setmethods__["txtime_"] = _CppBlockUtils.ZeroConfData_txtime__set
+ __swig_getmethods__["txtime_"] = _CppBlockUtils.ZeroConfData_txtime__get
+ __swig_setmethods__["iter_"] = _CppBlockUtils.ZeroConfData_iter__set
+ __swig_getmethods__["iter_"] = _CppBlockUtils.ZeroConfData_iter__get
+ def __init__(self):
+ this = _CppBlockUtils.new_ZeroConfData()
+ try: self.this.append(this)
+ except: self.this = this
+ __swig_destroy__ = _CppBlockUtils.delete_ZeroConfData
+ __del__ = lambda self : None;
+ZeroConfData_swigregister = _CppBlockUtils.ZeroConfData_swigregister
+ZeroConfData_swigregister(ZeroConfData)
+
+BDM_MODE_FULL_BLOCKCHAIN = _CppBlockUtils.BDM_MODE_FULL_BLOCKCHAIN
+BDM_MODE_LIGHT_STORAGE = _CppBlockUtils.BDM_MODE_LIGHT_STORAGE
+BDM_MODE_NO_STORAGE = _CppBlockUtils.BDM_MODE_NO_STORAGE
+BDM_MODE_COUNT = _CppBlockUtils.BDM_MODE_COUNT
+ADD_BLOCK_SUCCEEDED = _CppBlockUtils.ADD_BLOCK_SUCCEEDED
+ADD_BLOCK_NEW_TOP_BLOCK = _CppBlockUtils.ADD_BLOCK_NEW_TOP_BLOCK
+ADD_BLOCK_CAUSED_REORG = _CppBlockUtils.ADD_BLOCK_CAUSED_REORG
+class BlockDataManager_FullRAM:
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, BlockDataManager_FullRAM, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, BlockDataManager_FullRAM, name)
+ def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined")
+ __repr__ = _swig_repr
+ __swig_getmethods__["GetInstance"] = lambda x: _CppBlockUtils.BlockDataManager_FullRAM_GetInstance
+ def isInitialized(self): return _CppBlockUtils.BlockDataManager_FullRAM_isInitialized(self)
+ def SetBtcNetworkParams(self, *args): return _CppBlockUtils.BlockDataManager_FullRAM_SetBtcNetworkParams(self, *args)
+ def SelectNetwork(self, *args): return _CppBlockUtils.BlockDataManager_FullRAM_SelectNetwork(self, *args)
+ def Reset(self): return _CppBlockUtils.BlockDataManager_FullRAM_Reset(self)
+ def getNumConfirmations(self, *args): return _CppBlockUtils.BlockDataManager_FullRAM_getNumConfirmations(self, *args)
+ def getTopBlockHeader(self): return _CppBlockUtils.BlockDataManager_FullRAM_getTopBlockHeader(self)
+ def getGenesisBlock(self): return _CppBlockUtils.BlockDataManager_FullRAM_getGenesisBlock(self)
+ def getHeaderByHeight(self, *args): return _CppBlockUtils.BlockDataManager_FullRAM_getHeaderByHeight(self, *args)
+ def getHeaderByHash(self, *args): return _CppBlockUtils.BlockDataManager_FullRAM_getHeaderByHash(self, *args)
+ def getTxByHash(self, *args): return _CppBlockUtils.BlockDataManager_FullRAM_getTxByHash(self, *args)
+ def getBlockfilePath(self): return _CppBlockUtils.BlockDataManager_FullRAM_getBlockfilePath(self)
+ def parseNewBlockData(self, *args): return _CppBlockUtils.BlockDataManager_FullRAM_parseNewBlockData(self, *args)
+ def addNewBlockData(self, *args): return _CppBlockUtils.BlockDataManager_FullRAM_addNewBlockData(self, *args)
+ def addNewBlockDataRef(self, *args): return _CppBlockUtils.BlockDataManager_FullRAM_addNewBlockDataRef(self, *args)
+ def reassessAfterReorg(self, *args): return _CppBlockUtils.BlockDataManager_FullRAM_reassessAfterReorg(self, *args)
+ def hasTxWithHash(self, *args): return _CppBlockUtils.BlockDataManager_FullRAM_hasTxWithHash(self, *args)
+ def hasHeaderWithHash(self, *args): return _CppBlockUtils.BlockDataManager_FullRAM_hasHeaderWithHash(self, *args)
+ def getNumBlocks(self): return _CppBlockUtils.BlockDataManager_FullRAM_getNumBlocks(self)
+ def getNumTx(self): return _CppBlockUtils.BlockDataManager_FullRAM_getNumTx(self)
+ def getHeadersNotOnMainChain(self): return _CppBlockUtils.BlockDataManager_FullRAM_getHeadersNotOnMainChain(self)
+ def prefixSearchHeaders(self, *args): return _CppBlockUtils.BlockDataManager_FullRAM_prefixSearchHeaders(self, *args)
+ def prefixSearchTx(self, *args): return _CppBlockUtils.BlockDataManager_FullRAM_prefixSearchTx(self, *args)
+ def prefixSearchAddress(self, *args): return _CppBlockUtils.BlockDataManager_FullRAM_prefixSearchAddress(self, *args)
+ def scanBlockchainForTx(self, *args): return _CppBlockUtils.BlockDataManager_FullRAM_scanBlockchainForTx(self, *args)
+ def readBlkFile_FromScratch(self, *args): return _CppBlockUtils.BlockDataManager_FullRAM_readBlkFile_FromScratch(self, *args)
+ def readBlkFileUpdate(self, filename = ""): return _CppBlockUtils.BlockDataManager_FullRAM_readBlkFileUpdate(self, filename)
+ def verifyBlkFileIntegrity(self): return _CppBlockUtils.BlockDataManager_FullRAM_verifyBlkFileIntegrity(self)
+ def scanBlockchainForTx_FromScratch_AllAddr(self): return _CppBlockUtils.BlockDataManager_FullRAM_scanBlockchainForTx_FromScratch_AllAddr(self)
+ def findAllNonStdTx(self): return _CppBlockUtils.BlockDataManager_FullRAM_findAllNonStdTx(self)
+ def enableZeroConf(self, *args): return _CppBlockUtils.BlockDataManager_FullRAM_enableZeroConf(self, *args)
+ def disableZeroConf(self, *args): return _CppBlockUtils.BlockDataManager_FullRAM_disableZeroConf(self, *args)
+ def readZeroConfFile(self, *args): return _CppBlockUtils.BlockDataManager_FullRAM_readZeroConfFile(self, *args)
+ def addNewZeroConfTx(self, *args): return _CppBlockUtils.BlockDataManager_FullRAM_addNewZeroConfTx(self, *args)
+ def purgeZeroConfPool(self): return _CppBlockUtils.BlockDataManager_FullRAM_purgeZeroConfPool(self)
+ def pprintZeroConfPool(self): return _CppBlockUtils.BlockDataManager_FullRAM_pprintZeroConfPool(self)
+ def rewriteZeroConfFile(self): return _CppBlockUtils.BlockDataManager_FullRAM_rewriteZeroConfFile(self)
+ def rescanWalletZeroConf(self, *args): return _CppBlockUtils.BlockDataManager_FullRAM_rescanWalletZeroConf(self, *args)
+ def organizeChain(self, forceRebuild = False): return _CppBlockUtils.BlockDataManager_FullRAM_organizeChain(self, forceRebuild)
+ def isLastBlockReorg(self): return _CppBlockUtils.BlockDataManager_FullRAM_isLastBlockReorg(self)
+ def getTxJustInvalidated(self): return _CppBlockUtils.BlockDataManager_FullRAM_getTxJustInvalidated(self)
+ def getTxJustAffected(self): return _CppBlockUtils.BlockDataManager_FullRAM_getTxJustAffected(self)
+ def updateWalletAfterReorg(self, *args): return _CppBlockUtils.BlockDataManager_FullRAM_updateWalletAfterReorg(self, *args)
+ def updateWalletsAfterReorg(self, *args): return _CppBlockUtils.BlockDataManager_FullRAM_updateWalletsAfterReorg(self, *args)
+ def getPrevTxOut(self, *args): return _CppBlockUtils.BlockDataManager_FullRAM_getPrevTxOut(self, *args)
+ def getSenderAddr20(self, *args): return _CppBlockUtils.BlockDataManager_FullRAM_getSenderAddr20(self, *args)
+ def getSentValue(self, *args): return _CppBlockUtils.BlockDataManager_FullRAM_getSentValue(self, *args)
+ __swig_destroy__ = _CppBlockUtils.delete_BlockDataManager_FullRAM
+ __del__ = lambda self : None;
+BlockDataManager_FullRAM_swigregister = _CppBlockUtils.BlockDataManager_FullRAM_swigregister
+BlockDataManager_FullRAM_swigregister(BlockDataManager_FullRAM)
+
+def BlockDataManager_FullRAM_GetInstance():
+ return _CppBlockUtils.BlockDataManager_FullRAM_GetInstance()
+BlockDataManager_FullRAM_GetInstance = _CppBlockUtils.BlockDataManager_FullRAM_GetInstance
+
+class BlockDataManager:
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, BlockDataManager, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, BlockDataManager, name)
+ __repr__ = _swig_repr
+ def __init__(self):
+ this = _CppBlockUtils.new_BlockDataManager()
+ try: self.this.append(this)
+ except: self.this = this
+ def getBDM(self): return _CppBlockUtils.BlockDataManager_getBDM(self)
+ __swig_destroy__ = _CppBlockUtils.delete_BlockDataManager
+ __del__ = lambda self : None;
+BlockDataManager_swigregister = _CppBlockUtils.BlockDataManager_swigregister
+BlockDataManager_swigregister(BlockDataManager)
+
+HEADER_SIZE = _CppBlockUtils.HEADER_SIZE
+CONVERTBTC = _CppBlockUtils.CONVERTBTC
+TESTNET_MAGIC_BYTES = _CppBlockUtils.TESTNET_MAGIC_BYTES
+TESTNET_GENESIS_HASH_HEX = _CppBlockUtils.TESTNET_GENESIS_HASH_HEX
+TESTNET_GENESIS_TX_HASH_HEX = _CppBlockUtils.TESTNET_GENESIS_TX_HASH_HEX
+MAINNET_MAGIC_BYTES = _CppBlockUtils.MAINNET_MAGIC_BYTES
+MAINNET_GENESIS_HASH_HEX = _CppBlockUtils.MAINNET_GENESIS_HASH_HEX
+MAINNET_GENESIS_TX_HASH_HEX = _CppBlockUtils.MAINNET_GENESIS_TX_HASH_HEX
+TXOUT_SCRIPT_STANDARD = _CppBlockUtils.TXOUT_SCRIPT_STANDARD
+TXOUT_SCRIPT_COINBASE = _CppBlockUtils.TXOUT_SCRIPT_COINBASE
+TXOUT_SCRIPT_UNKNOWN = _CppBlockUtils.TXOUT_SCRIPT_UNKNOWN
+TXIN_SCRIPT_STANDARD = _CppBlockUtils.TXIN_SCRIPT_STANDARD
+TXIN_SCRIPT_COINBASE = _CppBlockUtils.TXIN_SCRIPT_COINBASE
+TXIN_SCRIPT_SPENDCB = _CppBlockUtils.TXIN_SCRIPT_SPENDCB
+TXIN_SCRIPT_UNKNOWN = _CppBlockUtils.TXIN_SCRIPT_UNKNOWN
+OP_0 = _CppBlockUtils.OP_0
+OP_FALSE = _CppBlockUtils.OP_FALSE
+OP_PUSHDATA1 = _CppBlockUtils.OP_PUSHDATA1
+OP_PUSHDATA2 = _CppBlockUtils.OP_PUSHDATA2
+OP_PUSHDATA4 = _CppBlockUtils.OP_PUSHDATA4
+OP_1NEGATE = _CppBlockUtils.OP_1NEGATE
+OP_RESERVED = _CppBlockUtils.OP_RESERVED
+OP_1 = _CppBlockUtils.OP_1
+OP_TRUE = _CppBlockUtils.OP_TRUE
+OP_2 = _CppBlockUtils.OP_2
+OP_3 = _CppBlockUtils.OP_3
+OP_4 = _CppBlockUtils.OP_4
+OP_5 = _CppBlockUtils.OP_5
+OP_6 = _CppBlockUtils.OP_6
+OP_7 = _CppBlockUtils.OP_7
+OP_8 = _CppBlockUtils.OP_8
+OP_9 = _CppBlockUtils.OP_9
+OP_10 = _CppBlockUtils.OP_10
+OP_11 = _CppBlockUtils.OP_11
+OP_12 = _CppBlockUtils.OP_12
+OP_13 = _CppBlockUtils.OP_13
+OP_14 = _CppBlockUtils.OP_14
+OP_15 = _CppBlockUtils.OP_15
+OP_16 = _CppBlockUtils.OP_16
+OP_NOP = _CppBlockUtils.OP_NOP
+OP_VER = _CppBlockUtils.OP_VER
+OP_IF = _CppBlockUtils.OP_IF
+OP_NOTIF = _CppBlockUtils.OP_NOTIF
+OP_VERIF = _CppBlockUtils.OP_VERIF
+OP_VERNOTIF = _CppBlockUtils.OP_VERNOTIF
+OP_ELSE = _CppBlockUtils.OP_ELSE
+OP_ENDIF = _CppBlockUtils.OP_ENDIF
+OP_VERIFY = _CppBlockUtils.OP_VERIFY
+OP_RETURN = _CppBlockUtils.OP_RETURN
+OP_TOALTSTACK = _CppBlockUtils.OP_TOALTSTACK
+OP_FROMALTSTACK = _CppBlockUtils.OP_FROMALTSTACK
+OP_2DROP = _CppBlockUtils.OP_2DROP
+OP_2DUP = _CppBlockUtils.OP_2DUP
+OP_3DUP = _CppBlockUtils.OP_3DUP
+OP_2OVER = _CppBlockUtils.OP_2OVER
+OP_2ROT = _CppBlockUtils.OP_2ROT
+OP_2SWAP = _CppBlockUtils.OP_2SWAP
+OP_IFDUP = _CppBlockUtils.OP_IFDUP
+OP_DEPTH = _CppBlockUtils.OP_DEPTH
+OP_DROP = _CppBlockUtils.OP_DROP
+OP_DUP = _CppBlockUtils.OP_DUP
+OP_NIP = _CppBlockUtils.OP_NIP
+OP_OVER = _CppBlockUtils.OP_OVER
+OP_PICK = _CppBlockUtils.OP_PICK
+OP_ROLL = _CppBlockUtils.OP_ROLL
+OP_ROT = _CppBlockUtils.OP_ROT
+OP_SWAP = _CppBlockUtils.OP_SWAP
+OP_TUCK = _CppBlockUtils.OP_TUCK
+OP_CAT = _CppBlockUtils.OP_CAT
+OP_SUBSTR = _CppBlockUtils.OP_SUBSTR
+OP_LEFT = _CppBlockUtils.OP_LEFT
+OP_RIGHT = _CppBlockUtils.OP_RIGHT
+OP_SIZE = _CppBlockUtils.OP_SIZE
+OP_INVERT = _CppBlockUtils.OP_INVERT
+OP_AND = _CppBlockUtils.OP_AND
+OP_OR = _CppBlockUtils.OP_OR
+OP_XOR = _CppBlockUtils.OP_XOR
+OP_EQUAL = _CppBlockUtils.OP_EQUAL
+OP_EQUALVERIFY = _CppBlockUtils.OP_EQUALVERIFY
+OP_RESERVED1 = _CppBlockUtils.OP_RESERVED1
+OP_RESERVED2 = _CppBlockUtils.OP_RESERVED2
+OP_1ADD = _CppBlockUtils.OP_1ADD
+OP_1SUB = _CppBlockUtils.OP_1SUB
+OP_2MUL = _CppBlockUtils.OP_2MUL
+OP_2DIV = _CppBlockUtils.OP_2DIV
+OP_NEGATE = _CppBlockUtils.OP_NEGATE
+OP_ABS = _CppBlockUtils.OP_ABS
+OP_NOT = _CppBlockUtils.OP_NOT
+OP_0NOTEQUAL = _CppBlockUtils.OP_0NOTEQUAL
+OP_ADD = _CppBlockUtils.OP_ADD
+OP_SUB = _CppBlockUtils.OP_SUB
+OP_MUL = _CppBlockUtils.OP_MUL
+OP_DIV = _CppBlockUtils.OP_DIV
+OP_MOD = _CppBlockUtils.OP_MOD
+OP_LSHIFT = _CppBlockUtils.OP_LSHIFT
+OP_RSHIFT = _CppBlockUtils.OP_RSHIFT
+OP_BOOLAND = _CppBlockUtils.OP_BOOLAND
+OP_BOOLOR = _CppBlockUtils.OP_BOOLOR
+OP_NUMEQUAL = _CppBlockUtils.OP_NUMEQUAL
+OP_NUMEQUALVERIFY = _CppBlockUtils.OP_NUMEQUALVERIFY
+OP_NUMNOTEQUAL = _CppBlockUtils.OP_NUMNOTEQUAL
+OP_LESSTHAN = _CppBlockUtils.OP_LESSTHAN
+OP_GREATERTHAN = _CppBlockUtils.OP_GREATERTHAN
+OP_LESSTHANOREQUAL = _CppBlockUtils.OP_LESSTHANOREQUAL
+OP_GREATERTHANOREQUAL = _CppBlockUtils.OP_GREATERTHANOREQUAL
+OP_MIN = _CppBlockUtils.OP_MIN
+OP_MAX = _CppBlockUtils.OP_MAX
+OP_WITHIN = _CppBlockUtils.OP_WITHIN
+OP_RIPEMD160 = _CppBlockUtils.OP_RIPEMD160
+OP_SHA1 = _CppBlockUtils.OP_SHA1
+OP_SHA256 = _CppBlockUtils.OP_SHA256
+OP_HASH160 = _CppBlockUtils.OP_HASH160
+OP_HASH256 = _CppBlockUtils.OP_HASH256
+OP_CODESEPARATOR = _CppBlockUtils.OP_CODESEPARATOR
+OP_CHECKSIG = _CppBlockUtils.OP_CHECKSIG
+OP_CHECKSIGVERIFY = _CppBlockUtils.OP_CHECKSIGVERIFY
+OP_CHECKMULTISIG = _CppBlockUtils.OP_CHECKMULTISIG
+OP_CHECKMULTISIGVERIFY = _CppBlockUtils.OP_CHECKMULTISIGVERIFY
+OP_NOP1 = _CppBlockUtils.OP_NOP1
+OP_NOP2 = _CppBlockUtils.OP_NOP2
+OP_NOP3 = _CppBlockUtils.OP_NOP3
+OP_NOP4 = _CppBlockUtils.OP_NOP4
+OP_NOP5 = _CppBlockUtils.OP_NOP5
+OP_NOP6 = _CppBlockUtils.OP_NOP6
+OP_NOP7 = _CppBlockUtils.OP_NOP7
+OP_NOP8 = _CppBlockUtils.OP_NOP8
+OP_NOP9 = _CppBlockUtils.OP_NOP9
+OP_NOP10 = _CppBlockUtils.OP_NOP10
+OP_PUBKEYHASH = _CppBlockUtils.OP_PUBKEYHASH
+OP_PUBKEY = _CppBlockUtils.OP_PUBKEY
+OP_INVALIDOPCODE = _CppBlockUtils.OP_INVALIDOPCODE
+class BtcUtils:
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, BtcUtils, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, BtcUtils, name)
+ __repr__ = _swig_repr
+ def __init__(self):
+ this = _CppBlockUtils.new_BtcUtils()
+ try: self.this.append(this)
+ except: self.this = this
+ def hash256(self, *args): return _CppBlockUtils.BtcUtils_hash256(self, *args)
+ def hash160(self, *args): return _CppBlockUtils.BtcUtils_hash160(self, *args)
+ __swig_setmethods__["BadAddress_"] = _CppBlockUtils.BtcUtils_BadAddress__set
+ __swig_getmethods__["BadAddress_"] = _CppBlockUtils.BtcUtils_BadAddress__get
+ __swig_setmethods__["EmptyHash_"] = _CppBlockUtils.BtcUtils_EmptyHash__set
+ __swig_getmethods__["EmptyHash_"] = _CppBlockUtils.BtcUtils_EmptyHash__get
+ __swig_getmethods__["readVarInt"] = lambda x: _CppBlockUtils.BtcUtils_readVarInt
+ __swig_getmethods__["readVarIntLength"] = lambda x: _CppBlockUtils.BtcUtils_readVarIntLength
+ __swig_getmethods__["calcVarIntSize"] = lambda x: _CppBlockUtils.BtcUtils_calcVarIntSize
+ __swig_getmethods__["getHash256_NoSafetyCheck"] = lambda x: _CppBlockUtils.BtcUtils_getHash256_NoSafetyCheck
+ __swig_getmethods__["getHash256"] = lambda x: _CppBlockUtils.BtcUtils_getHash256
+ __swig_getmethods__["getHash160_NoSafetyCheck"] = lambda x: _CppBlockUtils.BtcUtils_getHash160_NoSafetyCheck
+ __swig_getmethods__["getHash160"] = lambda x: _CppBlockUtils.BtcUtils_getHash160
+ def getHash160_SWIG(self, *args): return _CppBlockUtils.BtcUtils_getHash160_SWIG(self, *args)
+ def ripemd160_SWIG(self, *args): return _CppBlockUtils.BtcUtils_ripemd160_SWIG(self, *args)
+ __swig_getmethods__["calculateMerkleRoot"] = lambda x: _CppBlockUtils.BtcUtils_calculateMerkleRoot
+ __swig_getmethods__["calculateMerkleTree"] = lambda x: _CppBlockUtils.BtcUtils_calculateMerkleTree
+ __swig_getmethods__["TxInCalcLength"] = lambda x: _CppBlockUtils.BtcUtils_TxInCalcLength
+ __swig_getmethods__["TxOutCalcLength"] = lambda x: _CppBlockUtils.BtcUtils_TxOutCalcLength
+ __swig_getmethods__["TxCalcLength"] = lambda x: _CppBlockUtils.BtcUtils_TxCalcLength
+ __swig_getmethods__["getTxOutScriptType"] = lambda x: _CppBlockUtils.BtcUtils_getTxOutScriptType
+ __swig_getmethods__["getTxInScriptType"] = lambda x: _CppBlockUtils.BtcUtils_getTxInScriptType
+ __swig_getmethods__["getTxOutRecipientAddr"] = lambda x: _CppBlockUtils.BtcUtils_getTxOutRecipientAddr
+ __swig_getmethods__["getTxInAddr"] = lambda x: _CppBlockUtils.BtcUtils_getTxInAddr
+ __swig_getmethods__["convertDiffBitsToDouble"] = lambda x: _CppBlockUtils.BtcUtils_convertDiffBitsToDouble
+ __swig_getmethods__["getOpCodeName"] = lambda x: _CppBlockUtils.BtcUtils_getOpCodeName
+ __swig_getmethods__["convertScriptToOpStrings"] = lambda x: _CppBlockUtils.BtcUtils_convertScriptToOpStrings
+ __swig_getmethods__["num2str"] = lambda x: _CppBlockUtils.BtcUtils_num2str
+ __swig_getmethods__["pprintScript"] = lambda x: _CppBlockUtils.BtcUtils_pprintScript
+ __swig_getmethods__["verifyProofOfWork"] = lambda x: _CppBlockUtils.BtcUtils_verifyProofOfWork
+ __swig_destroy__ = _CppBlockUtils.delete_BtcUtils
+ __del__ = lambda self : None;
+BtcUtils_swigregister = _CppBlockUtils.BtcUtils_swigregister
+BtcUtils_swigregister(BtcUtils)
+cvar = _CppBlockUtils.cvar
+
+def BtcUtils_readVarInt(*args):
+ return _CppBlockUtils.BtcUtils_readVarInt(*args)
+BtcUtils_readVarInt = _CppBlockUtils.BtcUtils_readVarInt
+
+def BtcUtils_readVarIntLength(*args):
+ return _CppBlockUtils.BtcUtils_readVarIntLength(*args)
+BtcUtils_readVarIntLength = _CppBlockUtils.BtcUtils_readVarIntLength
+
+def BtcUtils_calcVarIntSize(*args):
+ return _CppBlockUtils.BtcUtils_calcVarIntSize(*args)
+BtcUtils_calcVarIntSize = _CppBlockUtils.BtcUtils_calcVarIntSize
+
+def BtcUtils_getHash256_NoSafetyCheck(*args):
+ return _CppBlockUtils.BtcUtils_getHash256_NoSafetyCheck(*args)
+BtcUtils_getHash256_NoSafetyCheck = _CppBlockUtils.BtcUtils_getHash256_NoSafetyCheck
+
+def BtcUtils_getHash256(*args):
+ return _CppBlockUtils.BtcUtils_getHash256(*args)
+BtcUtils_getHash256 = _CppBlockUtils.BtcUtils_getHash256
+
+def BtcUtils_getHash160_NoSafetyCheck(*args):
+ return _CppBlockUtils.BtcUtils_getHash160_NoSafetyCheck(*args)
+BtcUtils_getHash160_NoSafetyCheck = _CppBlockUtils.BtcUtils_getHash160_NoSafetyCheck
+
+def BtcUtils_getHash160(*args):
+ return _CppBlockUtils.BtcUtils_getHash160(*args)
+BtcUtils_getHash160 = _CppBlockUtils.BtcUtils_getHash160
+
+def BtcUtils_calculateMerkleRoot(*args):
+ return _CppBlockUtils.BtcUtils_calculateMerkleRoot(*args)
+BtcUtils_calculateMerkleRoot = _CppBlockUtils.BtcUtils_calculateMerkleRoot
+
+def BtcUtils_calculateMerkleTree(*args):
+ return _CppBlockUtils.BtcUtils_calculateMerkleTree(*args)
+BtcUtils_calculateMerkleTree = _CppBlockUtils.BtcUtils_calculateMerkleTree
+
+def BtcUtils_TxInCalcLength(*args):
+ return _CppBlockUtils.BtcUtils_TxInCalcLength(*args)
+BtcUtils_TxInCalcLength = _CppBlockUtils.BtcUtils_TxInCalcLength
+
+def BtcUtils_TxOutCalcLength(*args):
+ return _CppBlockUtils.BtcUtils_TxOutCalcLength(*args)
+BtcUtils_TxOutCalcLength = _CppBlockUtils.BtcUtils_TxOutCalcLength
+
+def BtcUtils_TxCalcLength(*args):
+ return _CppBlockUtils.BtcUtils_TxCalcLength(*args)
+BtcUtils_TxCalcLength = _CppBlockUtils.BtcUtils_TxCalcLength
+
+def BtcUtils_getTxOutScriptType(*args):
+ return _CppBlockUtils.BtcUtils_getTxOutScriptType(*args)
+BtcUtils_getTxOutScriptType = _CppBlockUtils.BtcUtils_getTxOutScriptType
+
+def BtcUtils_getTxInScriptType(*args):
+ return _CppBlockUtils.BtcUtils_getTxInScriptType(*args)
+BtcUtils_getTxInScriptType = _CppBlockUtils.BtcUtils_getTxInScriptType
+
+def BtcUtils_getTxOutRecipientAddr(*args):
+ return _CppBlockUtils.BtcUtils_getTxOutRecipientAddr(*args)
+BtcUtils_getTxOutRecipientAddr = _CppBlockUtils.BtcUtils_getTxOutRecipientAddr
+
+def BtcUtils_getTxInAddr(*args):
+ return _CppBlockUtils.BtcUtils_getTxInAddr(*args)
+BtcUtils_getTxInAddr = _CppBlockUtils.BtcUtils_getTxInAddr
+
+def BtcUtils_convertDiffBitsToDouble(*args):
+ return _CppBlockUtils.BtcUtils_convertDiffBitsToDouble(*args)
+BtcUtils_convertDiffBitsToDouble = _CppBlockUtils.BtcUtils_convertDiffBitsToDouble
+
+def BtcUtils_getOpCodeName(*args):
+ return _CppBlockUtils.BtcUtils_getOpCodeName(*args)
+BtcUtils_getOpCodeName = _CppBlockUtils.BtcUtils_getOpCodeName
+
+def BtcUtils_convertScriptToOpStrings(*args):
+ return _CppBlockUtils.BtcUtils_convertScriptToOpStrings(*args)
+BtcUtils_convertScriptToOpStrings = _CppBlockUtils.BtcUtils_convertScriptToOpStrings
+
+def BtcUtils_num2str(*args):
+ return _CppBlockUtils.BtcUtils_num2str(*args)
+BtcUtils_num2str = _CppBlockUtils.BtcUtils_num2str
+
+def BtcUtils_pprintScript(*args):
+ return _CppBlockUtils.BtcUtils_pprintScript(*args)
+BtcUtils_pprintScript = _CppBlockUtils.BtcUtils_pprintScript
+
+def BtcUtils_verifyProofOfWork(*args):
+ return _CppBlockUtils.BtcUtils_verifyProofOfWork(*args)
+BtcUtils_verifyProofOfWork = _CppBlockUtils.BtcUtils_verifyProofOfWork
+
+DEFAULT_KDF_MAX_MEMORY = _CppBlockUtils.DEFAULT_KDF_MAX_MEMORY
+class SecureBinaryData:
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, SecureBinaryData, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, SecureBinaryData, name)
+ __repr__ = _swig_repr
+ __swig_destroy__ = _CppBlockUtils.delete_SecureBinaryData
+ __del__ = lambda self : None;
+ def getPtr(self, *args): return _CppBlockUtils.SecureBinaryData_getPtr(self, *args)
+ def getSize(self): return _CppBlockUtils.SecureBinaryData_getSize(self)
+ def copy(self): return _CppBlockUtils.SecureBinaryData_copy(self)
+ def toHexStr(self, BE = False): return _CppBlockUtils.SecureBinaryData_toHexStr(self, BE)
+ def toBinStr(self): return _CppBlockUtils.SecureBinaryData_toBinStr(self)
+ def __init__(self, *args):
+ this = _CppBlockUtils.new_SecureBinaryData(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ def resize(self, *args): return _CppBlockUtils.SecureBinaryData_resize(self, *args)
+ def reserve(self, *args): return _CppBlockUtils.SecureBinaryData_reserve(self, *args)
+ def getRawCopy(self): return _CppBlockUtils.SecureBinaryData_getRawCopy(self)
+ def getRawRef(self): return _CppBlockUtils.SecureBinaryData_getRawRef(self)
+ def copySwapEndian(self, pos1 = 0, pos2 = 0): return _CppBlockUtils.SecureBinaryData_copySwapEndian(self, pos1, pos2)
+ def append(self, *args): return _CppBlockUtils.SecureBinaryData_append(self, *args)
+ def __add__(self, *args): return _CppBlockUtils.SecureBinaryData___add__(self, *args)
+ def __eq__(self, *args): return _CppBlockUtils.SecureBinaryData___eq__(self, *args)
+ def getHash256(self): return _CppBlockUtils.SecureBinaryData_getHash256(self)
+ def getHash160(self): return _CppBlockUtils.SecureBinaryData_getHash160(self)
+ def GenerateRandom(self, *args): return _CppBlockUtils.SecureBinaryData_GenerateRandom(self, *args)
+ def lockData(self): return _CppBlockUtils.SecureBinaryData_lockData(self)
+ def destroy(self): return _CppBlockUtils.SecureBinaryData_destroy(self)
+SecureBinaryData_swigregister = _CppBlockUtils.SecureBinaryData_swigregister
+SecureBinaryData_swigregister(SecureBinaryData)
+
+class KdfRomix:
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, KdfRomix, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, KdfRomix, name)
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ this = _CppBlockUtils.new_KdfRomix(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ def computeKdfParams(self, targetComputeSec = 0.25, maxMemReqtsBytes = 32*1024*1024): return _CppBlockUtils.KdfRomix_computeKdfParams(self, targetComputeSec, maxMemReqtsBytes)
+ def usePrecomputedKdfParams(self, *args): return _CppBlockUtils.KdfRomix_usePrecomputedKdfParams(self, *args)
+ def printKdfParams(self): return _CppBlockUtils.KdfRomix_printKdfParams(self)
+ def DeriveKey_OneIter(self, *args): return _CppBlockUtils.KdfRomix_DeriveKey_OneIter(self, *args)
+ def DeriveKey(self, *args): return _CppBlockUtils.KdfRomix_DeriveKey(self, *args)
+ def getHashFunctionName(self): return _CppBlockUtils.KdfRomix_getHashFunctionName(self)
+ def getMemoryReqtBytes(self): return _CppBlockUtils.KdfRomix_getMemoryReqtBytes(self)
+ def getNumIterations(self): return _CppBlockUtils.KdfRomix_getNumIterations(self)
+ def getSalt(self): return _CppBlockUtils.KdfRomix_getSalt(self)
+ __swig_destroy__ = _CppBlockUtils.delete_KdfRomix
+ __del__ = lambda self : None;
+KdfRomix_swigregister = _CppBlockUtils.KdfRomix_swigregister
+KdfRomix_swigregister(KdfRomix)
+
+class CryptoAES:
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, CryptoAES, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, CryptoAES, name)
+ __repr__ = _swig_repr
+ def __init__(self):
+ this = _CppBlockUtils.new_CryptoAES()
+ try: self.this.append(this)
+ except: self.this = this
+ def Encrypt(self, *args): return _CppBlockUtils.CryptoAES_Encrypt(self, *args)
+ def Decrypt(self, *args): return _CppBlockUtils.CryptoAES_Decrypt(self, *args)
+ __swig_destroy__ = _CppBlockUtils.delete_CryptoAES
+ __del__ = lambda self : None;
+CryptoAES_swigregister = _CppBlockUtils.CryptoAES_swigregister
+CryptoAES_swigregister(CryptoAES)
+
+class CryptoECDSA:
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, CryptoECDSA, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, CryptoECDSA, name)
+ __repr__ = _swig_repr
+ def __init__(self):
+ this = _CppBlockUtils.new_CryptoECDSA()
+ try: self.this.append(this)
+ except: self.this = this
+ __swig_getmethods__["CreateNewPrivateKey"] = lambda x: _CppBlockUtils.CryptoECDSA_CreateNewPrivateKey
+ __swig_getmethods__["ParsePrivateKey"] = lambda x: _CppBlockUtils.CryptoECDSA_ParsePrivateKey
+ __swig_getmethods__["ParsePublicKey"] = lambda x: _CppBlockUtils.CryptoECDSA_ParsePublicKey
+ __swig_getmethods__["SerializePrivateKey"] = lambda x: _CppBlockUtils.CryptoECDSA_SerializePrivateKey
+ __swig_getmethods__["SerializePublicKey"] = lambda x: _CppBlockUtils.CryptoECDSA_SerializePublicKey
+ def GenerateNewPrivateKey(self): return _CppBlockUtils.CryptoECDSA_GenerateNewPrivateKey(self)
+ def ComputePublicKey(self, *args): return _CppBlockUtils.CryptoECDSA_ComputePublicKey(self, *args)
+ def VerifyPublicKeyValid(self, *args): return _CppBlockUtils.CryptoECDSA_VerifyPublicKeyValid(self, *args)
+ def CheckPubPrivKeyMatch(self, *args): return _CppBlockUtils.CryptoECDSA_CheckPubPrivKeyMatch(self, *args)
+ def SignData(self, *args): return _CppBlockUtils.CryptoECDSA_SignData(self, *args)
+ def VerifyData(self, *args): return _CppBlockUtils.CryptoECDSA_VerifyData(self, *args)
+ def ComputeChainedPrivateKey(self, *args): return _CppBlockUtils.CryptoECDSA_ComputeChainedPrivateKey(self, *args)
+ def ComputeChainedPublicKey(self, *args): return _CppBlockUtils.CryptoECDSA_ComputeChainedPublicKey(self, *args)
+ __swig_destroy__ = _CppBlockUtils.delete_CryptoECDSA
+ __del__ = lambda self : None;
+CryptoECDSA_swigregister = _CppBlockUtils.CryptoECDSA_swigregister
+CryptoECDSA_swigregister(CryptoECDSA)
+
+def CryptoECDSA_CreateNewPrivateKey():
+ return _CppBlockUtils.CryptoECDSA_CreateNewPrivateKey()
+CryptoECDSA_CreateNewPrivateKey = _CppBlockUtils.CryptoECDSA_CreateNewPrivateKey
+
+def CryptoECDSA_ParsePrivateKey(*args):
+ return _CppBlockUtils.CryptoECDSA_ParsePrivateKey(*args)
+CryptoECDSA_ParsePrivateKey = _CppBlockUtils.CryptoECDSA_ParsePrivateKey
+
+def CryptoECDSA_ParsePublicKey(*args):
+ return _CppBlockUtils.CryptoECDSA_ParsePublicKey(*args)
+CryptoECDSA_ParsePublicKey = _CppBlockUtils.CryptoECDSA_ParsePublicKey
+
+def CryptoECDSA_SerializePrivateKey(*args):
+ return _CppBlockUtils.CryptoECDSA_SerializePrivateKey(*args)
+CryptoECDSA_SerializePrivateKey = _CppBlockUtils.CryptoECDSA_SerializePrivateKey
+
+def CryptoECDSA_SerializePublicKey(*args):
+ return _CppBlockUtils.CryptoECDSA_SerializePublicKey(*args)
+CryptoECDSA_SerializePublicKey = _CppBlockUtils.CryptoECDSA_SerializePublicKey
+
+# This file is compatible with both classic and new-style classes.
+
+
diff --git a/README b/README
index 1d634b0b8..f42c70488 100755
--- a/README
+++ b/README
@@ -10,55 +10,63 @@
*
* Project: Armory
* Author: Alan Reiner
-* Orig Date: 20 November, 2011
-* Descr: This file serves as an engine for python-based Bitcoin software.
-* I forked this from my own project -- PyBtcEngine -- because I
-* I needed to start including/rewriting code to use CppBlockUtils
-* but did not want to break the pure-python methods in PyBtcEngine.
-* If you are interested in in a pure-python set of bitcoin utils
-* please go checkout the PyBtcEngine github project.
+* Orig Date: 02 Feb, 2011
+* Descr: Armory is a full-featured Bitcoin client, offering a dozen
+* innovative features not found in any other client software!
+* Manage multiple wallets (deterministic and watching-only),
+* print paper backups that work forever, import or sweep private
+* keys, and keep your savings in a computer that never touches
+* the internet, while still being able to manage incoming payments,
+* and create outgoing payments with the help of a USB key.
+*
+* Multi-signature transactions are also implemented but not tested
+* (especailly because the network does not support such transaction
+* types yet). However, once multi-signature transactions become
+* a standard type in the Bitcoin network, Armory will have only a
+* short path to adopting it, and producing an intuitive interface
+* For using them.
+*
*
-* The biggest advatage of using SWIG is that you have access to
-* the blockchain through BlockObj/BlockObjRef/BlockUtils, as found
-* in the CppForSWIG directory. This is available in PyBtcEngine,
-* but I had to split out the modules, and I didn't have a good way
-* to maintain the pure-python module while also implementing all
-* the great SWIG-imported C++ utilities I built.
+* ***As of version 0.5-alpha, Armory requires holding the entire
+* blockchain in RAM, which will have serious performance impacts
+* on any computer with less than 4 GB of RAM. The first upgrade
+* on the path to a beta release, will be to use a file-based
+* blockchain which will only require HDD space, not RAM.
*
-* ***NOTE*** This is still the Full-RAM implementation, which
-* requires holding the *entire* blockchain in memory.
-* This is not a problem for newer computers, which
-* usually have 4GB to 16GB of RAM, and this only uses
-* 1.1 GB to hold the blockchain.
-*
-* In the future, I plan to try to make this more
-* lightweight, but I am going to forego that yet
-* in favor of making a utility that works for some
-* users (there's a lot of top-level reorg that needs
-* to be done to not store the entire blockchain).
+* On the other hand, having the entire blockchain in RAM, along
+* with the ultra-optimized C++ engine for blockchain scanning,
+* one could create a very powerful server implementation which
+* can compute complete balances/unspent-output-list in a fraction
+* of a second. Please contact me if you are interested in using
+* Armory for this purpose.
*
-* This module replaces the ECDSA operations, with faster ones
-* implemented in C++ from Crypto++. This also enables the ability
-* to use SecureBinaryData objects for moving around private keys,
-* though I'm not entirely clear if python-based memory management
-* is going to properly clean up after itself, even with a page-
-* locked, destructable data container.
+* ***Additionally, Armory has no independent networking components,
+* instead relying on on the Satoshi client to securely connect
+* to peers, validate blockchain data, and broadcast transactions
+* for us. Although it was initially planned to cut the umbilical
+* cord to the Satoshi client and implement independent networking,
+* that could be a multi-month task, and instead I may resort to
+* cannabilizing the Satoshi code to integrate existing, secure
+* networking protocols already available.
+*
*
********************************************************************************
*
-* Please take a moment to donate 1.0 BTC! 1Gffm7LKXcNFPrtxy6yF4JBoe5rVka4sn1
+* Please take a moment to donate 1.0 BTC! 1ArmoryXcfq7TnCSuZa9fQjRYwJ4bkRKfv
*
********************************************************************************
********************************************************************************
-* STATUS: Last Updated - 08 Dec, 2011
+* STATUS: Last Updated - 02 Feb, 2011
* Legend:
* _ not implemented
* . implemented but not tested
* + implemented and partially tested
* X implemented and tested
*
- *
+*
+* Library Functional Status (armoryengine.py)
+*
* ---------------------------------------------------------------
* (01) Ser/Unser Block Objects X
* (02) Hash160/Hash256 X
@@ -103,42 +111,38 @@
* (35) Distribution Proposals (std) X
* (36*) Distribution Proposals (multi-sig) .
* ---------------------------------------------------------------
-* (37) Connect to localhost bitcoind X
-* (38) Connect to nodes (bootstrap IRC)
-* (39) Blockchain download
-* (40) Get tx data not in block yet X
-* (41) Tx broadcast X
*
*
-* Notes:
-* (09) I have THOROUGHLY tested the blockchain reorg code. and making
-* sure everything looks exactly right at each step. After a reorg,
-* invalidated Tx's show up in the address ledger with a flag
-* that identifies it has been removed. This is really important in
-* the event of oddities in the blockchain -- normally the transaction
-* would just disappear without evidence it ever existed, which can
-* cause a lot of user confusion.
-*
-* (11) Is "mostly" tested because there are a few TxIn scripts that I fail
-* to identify as "standard." This is because it appears that a few
-* TxIns (less than 50 of 1,500,000) have a couple extra bytes in the
-* DER signature that throws me off. I'm not sure whether I need to
-* turn around and reimplement the signauture reading based on a real
-* DER library, or just hack it to accept extra 0x00 bytes at the end.
-*
-* (14*) I have tested a variety of very complicated scripts, mostly from
-* the testnet, including OP_CHECKSIG and OP_CHECKMULTISIG. Both the
-* C++ and python code can parse all these scripts, and the python
-* code can execute these scripts successfully. HOWEVER, I have
-* NOT implemented the OP_IF/OP_NOTIF/OP_ELSE/OP_ENDIF op-codes.
-* These codes require a bit of work to get right, and not currently
-* part of any near-term isStandard() transaction types.
+* GUI/Client Functionality Status (ArmoryQt.py + supporting python files):
+* ---------------------------------------------------------------
+* (01) Multiple wallets X
+* (02) Deterministic Wallets X
+* (03) Watching-only wallets X
+* (04) Printing Paper Backups X
+* (05) Restore paper backup (typed) X
+* ---------------------------------------------------------------
+* (06) Restore paper backup (scann QR)
+* (07) Import/Sweep Hex Priv Keys X
+* (08) Import/Sweep Base58 Priv Keys X
+* (09) Import/Sweep Mini-Priv Key Format X
+* (10) Zero-confirmation transactions X
+* ---------------------------------------------------------------
+* (11) Spend change outputs immediately X
+* (12) User modes (Std/Adv/Dev) X
+* (13) SelectCoins customization X (impl but no GUI options, yet)
+* (14) Guaranateed Tx Fee calculation X (force zero fee possible)
+* (15) Full Wallet encryption with KDF X
+* ---------------------------------------------------------------
+* (16) Change encryption passphrase X
+* (17) Change key-derivation time/mem
+* (18) COMPLETE OFFLINE WALLET MANAGEMENT X
+* (19) Individual Key/Address backup X
+* (20) Convert Satoshi wallets to Armory
+* ---------------------------------------------------------------
+* (21) Address books
+* (22) System-tray notifications
+* (23) Multi-signature Tx handling .
*
-* (36*) In anticipation of supporting multi-signature transactions, I have
-* created a specification for handling multi-sig transactions, which
-* also happens to work well for offline wallets/transactions. I
-* have called these "Distribution Proposals". See the following BIP:
-* https://gist.github.com/1321518
*
*
* More Notes:
@@ -155,321 +159,676 @@
*
********************************************************************************
+
+Building Armory from Source:
+ http://bitcoinarmory.com/index.php/building-armory-from-source
+
+
********************************************************************************
- For information on dependencies and compiling, see Using_PyBtcEngine.README
+ Information on dependencies (mainly for developers)
+ (much of this information may be out-of-date: use at your own risk!)
********************************************************************************
-#####
-08 Dec, 2011
-
- *** Fixed major blockchain-wallet scan bottleneck! ***
-
- Added a bulk filter to the wallet-tx scanning of the blockchain, to quickly
- identify the 99.99%+ tx that are not ours, I got run time down to less than
- 1 second per wallet! And this run time should be O(log(N)) in the number
- of addr in the wallet. So it may be to 2 or 3 seconds for massive wallets,
- but it's much better than 5-15s it was before for only a few addresses (and
- was O(N) before).
-
-
-#####
-05 Dec, 2011
-
- ***
- *** All crypto, addresses, deterministic wallets, TxDPs, networking!
- ***
-
- TONS OF NEW FEATURES, AND ALL OF IT HAS BEEN UNIT TESTED!
-
- -- PyBtcAddress: Complete address management, with in-place priv key
- encryption, time- and memory-bound KDF, and address
- chaining even when locked. By "address chaining",
- we mean deterministic addresses via a chain code,
- applying Diffie-Hellman shared-secret logic with the
- 32-byte chaincode as one "private key". This produces
- secure deterministic wallets, and new public keys can
- be computed *without private keys*. This makes it
- possible to have online/watching-only wallets!
-
- -- PyBtcWallet: Complete, atomic-file-operation, error-correcting
- wallet system! Uses manual binary file format
- (not susceptible to the 0.4.0 encryption bug), and
- uses a backup to do COMPLETELY ATOMIC file operations,
- guaranteeing that all wallet updates either complete
- without corruption, or that we have an uncorrupted
- file from which we can restore an interrupted op.
+
+Armory contains over 20,000 lines of code, between the C++ and python
+libraries. This can be very confusing for someone unfamiliar with the
+code (you). Below I have attempted to illustrate the CONOPS (concept of
+operations) that the library was designed for, so you know how to use it
+in your own development activities. There is a TON of sample code in
+the following three files:
+
+ [**SWIG**] unittest.py (this has almost everything!)
+
+ [ C++ ] cppForSwig/BlockUtilsTest.cpp
+ [ Python ] armoryengine.py
+
+But of course, sample code alone does not make great documentation. I will
+attempt to provide reference info for everything else you need to know, here.
+For a list of library features, see the STATUS table in the README. Note
+that all features with an X in either column are accessible in SWIG.
+
+
+################################################################################
+***Dependencies (from README) ***
+
+ - Crypto++
+ Linux: Install package "libcrypto++-dev"
+ Windows: Download from "http://www.cryptopp.com/#download"
+ (MSVS: Copy cryptopp source dir into same location as .sln)
+
+ - SWIG
+ Linux: Install package "swig"
+ Windows: "http://www.swig.org/download.html"
+ (MSVS: Copy swigwin-2.x directory next to cryptopp as "swigwin")
+
+ - Python 2.6/2.7
+ Linux: Should be preinstalled...
+ Windows: "http://www.python.org/getit/"
+
+ - Python Twisted -- asynchronous networking
+ Linux: Install package 'python-twisted'
+ Windows: "http://twistedmatrix.com/trac/wiki/Downloads"
+
+ - PyQt 4 (for Python 2.X)
+ Linux: Install "libqtcore4", "libqt4-dev" and "python-qt4"
+ Windows: "http://www.riverbankcomputing.co.uk/software/pyqt/download"
+ Also will need the QtSDK
+
+ - qt4reactor.py -- combined eventloop for PyQt and Twisted
+ All OS: https://launchpad.net/qt4reactor
+ Windows Only: qt4reactor relies on pywin32 (for win32event module)
+ http://sourceforge.net/projects/pywin32/files/pywin32/Build216/
+
+ - pywin32
+ - py2exe
+ (OPTIONAL - if you want to make a standalone executable in Windows)
+ Windows: http://www.py2exe.org/
+
+
+
+*** Compiling ***
+
+ Linux: From the cppForSwig directory "make" to make the C++ code alone,
+ "make swig" to create and compile the SWIG wrappers
+
+
+ sudo apt-get install git-core build-essential libcrypto++-dev swig libqtcore4 libqt4-dev python-qt4 python-dev python-twisted
+ git clone git://github.com/etotheipi/BitcoinArmory.git
+ cd BitcoinArmory
+ git checkout qtdev
+ cd cppForSwig
+ make swig
+ cd ..
+ python ArmoryQt.py
+
+
+ NOTE: If you get a "undefined reference in QtCore.so", it's likely
+ due to another library installed that hijacked the system
+ Qt installation. In my case, it was a CUDA installation
+ which provided its own, older version of QtCore which was
+ causing this issue.
+
+ Windows: MSVS 2010 vcxproj included but not maintained. Only compiles C++.
+ MSVS 2005 vcproj included. Setup to compile everything,
+ and even runs swig and py2exe as pre- and post-build events.
+
+ In windows you're going to have to do a bit more work than just
+ installing the programs below. Specifically, you need to add
+ a few libraries I couldn't distributed through git (for various
+ reasons), and also make sure the MSVS has the right includes
+ for your python version/location.
+
+ Most importantly, check that the following settings match your
+ python installation (currently configured for Python 2.6 in
+ the MSVS 2005 project):
+
+ C/C++ --> General --> Additional Include Directories:
+ Linker --> General --> Additional Library Directories:
+ Linker --> Input --> Additional Library Directories:
+
+
+
+ SWIG Notes:
+ Running SWIG takes in all the source code and the CppBlockUtils.i
+ and creates a C++ source file called CppBlockUtils_wrap.cxx, as
+ well as CppBlockUtils.py.
+ The result of compiling this source file in linux:
+ _CppBlockUtils.so
+ In windows, compiling will generally produce
+ _CppBlockUtils.dll --> MUST BE RENAMED --> _CppBlockUtils.pyd
+
+ The previously-created CppBlockUtils.py expects to find this
+ shared-object or pyd in the same directory.
+
+
+ PyQt4 Notes:
+ Getting PyQt4 setup in Linux is trivial: "apt-get" install as above
+
+ Getting PyQt4 setup in Windows was a pain. I'm still not positive
+ I could repeat the process and succeed. It does involve:
+ -- Getting and installing QtSDK
+ -- Getting mingw matching you QtSDK version
+ -- Unzip mingw somewhere and referencing it when install QtSDK
+ -- Download PyQt4 matching your python version
+ -- Manipulate your PATH (environment variables) to make sure
+ it has PyQt4 directory (C:\Python2X\Lib\site-packages\PyQt4)
+
+
+
+################################################################################
+#
+# NOTE: 05 Dec, 2011
+# This documentation is accurate, but only represents a fraction of the
+# available functionality in the libraries. I will update this as soon
+# as I get the first client release out of the way. For now, you can
+# can see most of the C++ methods below (accessed via Python), and then
+# do an "import armoryengine; help(armoryengine)" to see a MASSIVE
+# list of the available classes and methods. Seriously... it's huge.
+#
+################################################################################
+*** Documentation ***
+
+ This documentation is broken into three sections:
+
+ - SWIG
+ - C++
+ - Python
+
+ Most of what you need to know is actually in the C++ section, since every
+ C++ function call is mapped directly into python calls through SWIG. These
+ C++ functions are at the heart of everything you do that touches the block-
+ chain.
+
+ If you are impatient, just jump to the "C++ Code Overview" and you will
+ see 80% of what you need in the methods lists there.
+
+ Python will be needed for anything involving Base-58 address strings,
+ or ECDSA operations. Signing and verification works, though, it's not part
+ of any demo, besides unittest.py which verifies a tx from the blockchain
+
+ I will eventually be adding sample projects that exhaustively demonstrate
+ each feature of the library in the combined SWIG interface.
+
+
+
+################################################################################
+*** SWIG Code Overview ***
+
+ There is no explicit library file for combining python and C++ methods. You
+ import both CppBlockUtils and pybtcengine in python, and off you go.
+
+ The one important thing to know is that the modules are spread out in the
+ project directory, and thus you need to add some directories to your path.
+ The best solution is to append the paths you need at the top of your python
+ file. You need to make sure that the directories containing
+ pybtcengine.py
+ CppBlockUtils.py
+ _CppBlockUtils.so (linux) _CppBlockUtils.pyd (windows)
+
+ are all on your path.
+
+ For instance, if you are running the example blockexplorer in the pyqt dir,
+ you will need the following lines at the top of your script to point python
+ to search the other directories for the modules:
+
+ import sys
+ sys.path.append('..')
+ sys.path.append('../cppForSwig')
+ from pybtcengine import *
+ from CppBlockUtils import *
+
+
+ Most of the CONOPS for using the combined library is actually knowing how
+ to use the C++ code. Most calls you make will be on SWIGified objects
+ pulled in through the .dll(.pyd)/.so. In this case, the best documentation
+ really is the example code. Look at cppForSwig/testswig.py; this file
+ has examples of nearly every function. You can use this as a reference
+ for what functions require C++ calls, and which ones are from pybtcengine.py.
+ In general, if it came from the BlockDataManager:
+
+ bdm = BlockDataManager_FullRam.GetInstance()
+ bdm.getTxByHash(...)
+ ...
+
+ Then the resulting objects will be C++/SWIG objects. The list of useful
+ methods in the C++ documentation, below, will identify all the available
+ methods.
+
+ **** One other important note:
+ SWIG does *not* work with any overloaded methods involving
+ BinaryData objects: this is because I created a SWIG typemap to
+ simplify passing binary data between python and C++, but it led to a few
+ important methods getting disabled. Instead of
+ BtcWallet::addAddress(...)
+ use:
+ BtcWallet::addAddress_1_(...)
+ BtcWallet::addAddress_3_(...)
+ BtcWallet::addAddress_5_(...)
+ The number at the end specifies how many arguments the method takes.
+ The original method has 4 optional arguments, but SWIG didn't know
+ what to do with it.
+
+ The same thing needed to be done with
+ BlockDataRef::unserialize()
+ replaced with:
+ BlockDataRef::unserialize_1_()
+
+ This might be necessary for a few other methods, but I haven't run into
+ any of them yet.
+
+
+
+
+
+
+################################################################################
+*** C++ Code Overview ***
+
+What's there:
+ - Blockchain reading from file, scanning
+ - Checking blk0001.dat file integrity
+ - Organizing and finding the longest chain
+ - Efficient access to ALL data in the blockchain
+ - Standard and Non-standard script detection
+ - Binary wallet tracking, with address ledgers
+
+What's NOT there:
+ - BigNum library: cannot do any Base58/address manipulations.
+ - ECDSA library: cannot do any signing/verification operations
+ (however, crypto++ is linked, could be easy to add)
+ - Address storage: addresses that have not
+ information on a given address, you must do a full
+ scan of the blockchain, which takes about 5s. If
+ you need to do this quicker, you can revive some
+ old code I had which took about 30s
+ - Constructing transaction packets: this could be easy to add, since
+ the library does make it easy to find all TxOuts for a given wallet
+
+
+The basics: The goal of the C++ code is to provide an optimized layer for
+ accessing the blockchain. It reads the specified blk0001.dat
+ file (where the blockchain is stored in raw, binary form)
+ and maintains a series of maps and pointers to this data with
+ minimal copy operations. IT IS VERY FAST.
+
+ The C++ code has no BigNum or ECDSA code in it, which means
+ it cannot sign/verify anything, or calculate address strings.
+
+
+*************************
+Class BinaryData:
+ This class is a simple wrapper for {vector, uint32_t size}.
+ It has a ton of convenience methods for searching, slicing and hashing
+ these objects. All data that isn't human-readable strings will be
+ passed around with BinaryData objects (typedef'd to "HashString")
+
+*************************
+Class BinaryDataRef:
+ This class is REFERENCE class for what would otherwise be used by
+ BinaryData. It holds a {uint8_t*, uint32_t size}. Since many of our
+ objects are persistent (see rule 1), it's safe to pass around
+ references to them. This class has easy conversions to and from
+ BinaryData, and has most of the same methods.
+
+*************************
+Class BtcUtils:
+ This is a helper class that contains methods and constants that might be
+ shared between multiple classes. THIS IS A STATIC-METHOD-ONLY class.
+ Therefore all methods and members must be scoped with BtcUtils::
+
+ Useful Methods:
+ BtcUtils::GenesisHash_;
+ BtcUtils::EmptyHash_;
+ BtcUtils::MagicBytes_;
+
+ BtcUtils::readVarInt()
+ BtcUtils::readVarIntLength()
+ BtcUtils::getHash256()
+ BtcUtils::getHash160()
+ BtcUtils::calculateMerkleRoot()
+ BtcUtils::calculateMerkleTree()
+
+ BtcUtils::TxInCalcLength()
+ BtcUtils::TxOutCalcLength()
+ BtcUtils::TxCalcLength()
+
+ BtcUtils::getTxInScriptType()
+ BtcUtils::getTxOutScriptType()
+ BtcUtils::getTxOutRecipientAddr()
+ BtcUtils::convertDiffBitsToDouble()
+
+ BtcUtils::getOpCodeName()
+ BtcUtils::convertScriptToOpStrings()
+
+
+*************************
+Classes in BlockObjRef:
+ These are the core of the library; all these objects have a serialize()
+ and unserialize() method which uses the specified formats in:
+
+ https://en.bitcoin.it/wiki/Protocol_specification
+
+ These objects do not hold any serialized information, only a BinaryDataRef
+ to where it is serialized in RAM by the BlockDataManager. All data that
+ is not officially part of its serialized state is stored as extra members
+
+ Useful methods:
+
+ BlockHeaderRef
+ BlockHeaderRef::getVersion()
+ BlockHeaderRef::getPrevHash()
+ BlockHeaderRef::getMerkleRoot()
+ BlockHeaderRef::getDifficulty()
+ BlockHeaderRef::getTimestamp()
+ BlockHeaderRef::getNonce()
+ BlockHeaderRef::pprint()
+
+ BlockHeaderRef::serialize()
+ BlockHeaderRef::unserialize()
+
+ BlockHeaderRef::getThisHash()
+ BlockHeaderRef::getDifficultySum()
+ BlockHeaderRef::getBlockSize() // in bytes
+ BlockHeaderRef::getTxRefPtrList() // access to all Tx's in this block
+ BlockHeaderRef::getTxHashList() // access to all Tx's in this block
+
+ BlockHeaderRef::verifyMerkleRoot()
+ BlockHeaderRef::verifyIntegrity() // checks merkleroot and hash zeros
+
- Easy private key import for physical bitcoins, or
- offline storage of private keys, only to be spent
- when the user types/copies in the private key.
-
- Thoroughly tested all the encryption options (AES256)
- with encryption/passphrase changing, KDF parameter
- changing, wallet serialize/unserialize, single-byte
- error correction, adjustable lock/unlock frequency,
- and ONLINE-WALLET-FORK: rewrites the wallet without
- any private key data, but can be used from an online
- to monitor transactions, and generate new addresses.
-
- -- TxDPs: Based on BIP 0010:
- https://github.com/genjix/bips/blob/master/bip-0010.md
- All transaction operations in Armory go through
- "Tx Distribution Proposals", which is an ASCII-able
- serialization for unsigned transactions, which can be
- easily transmitted through email, and used to collect
- signatures. THIS IS ALSO A MECHANISM FOR THE EASIEST
- OFFLINE-WALLET capability, ever. If you are using an
- online wallet, you "Send Coins" in the same way you
- would if you had the private keys, but instead it puts
- a txdp file on a USB key, which can then be taken to
- the offline computer for signing: THE OFFLINE COMPUTER
- DOES NOT NEED THE BLOCKCHAIN IN ORDER TO REVIEW AND
- SIGN THE TXDP. Sign it and take back to your online
- computer for broadcast.
+ OutPointRef
+ OutPointRef::getTxHash()
+ OutPointRef::getTxOutIndex()
+
+ OutPointRef::serialize()
+ OutPointRef::unserialize()
+
+ TxInRef
+ TxInRef::getOutPoint()
+ TxInRef::getScript()
+ TxInRef::getSequence()
+ TxInRef::isCoinbase()
+ TxInRef::pprint()
+
+ TxInRef::serialize()
+ TxInRef::unserialize()
+ TxInRef::getSize() // number of serialized bytes
+ TxInRef::getScriptSize() // number of serialized bytes
+
+ TxInRef::getScriptType()
+ TxInRef::isScriptStandard()
+ TxInRef::isScriptCoinbase()
+ TxInRef::isScriptSpendCB()
+ TxInRef::isScriptUnknown()
+ TxInRef::getSenderAddrIfAvailable() // Coinbase TxIns don't have this
+
+ TxInRef::getCopy() // Creates TxIn; not used much/ever
+ TxInRef::getParentTxPtr() // Coinbase TxIns don't have this
+ TxOutRef
+ TxOutRef::getValue()
+ TxOutRef::getScript()
+ TxOutRef::pprint()
+
+ TxOutRef::serialize()
+ TxOutRef::unserialize()
+ TxOutRef::getSize() // number of serialized bytes
+ TxOutRef::getScriptSize() // number of serialized bytes
+
+ TxOutRef::isScriptStandard()
+ TxOutRef::isScriptCoinbase()
+ TxOutRef::isScriptUnknown()
+
+ TxOutRef::getRecipientAddr()
+ TxOutRef::getParentTxPtr()
+ TxOutRef::getCopy() // Creates TxOut; not used much/ever
+
+
+ TxRef
+ TxRef::getVersion()
+ TxRef::getNumTxIn()
+ TxRef::getNumTxOut()
+ TxRef::getTxInRef(index)
+ TxRef::getTxOutRef(index)
+ TxRef::getLockTime()
+ TxRef::pprint()
+
+ TxRef::serialize()
+ TxRef::unserialize()
+ TxRef::getSize() // number of serialized bytes
+
+ TxRef::getThisHash()
+
+ TxRef::getHeaderPtr()
+ TxRef::setHeaderPtr()
+ TxRef::getBlockTimestamp()
+ TxRef::getBlockHeight()
+
- -- Multi-sig tx: The TxDP concept is integrated so tightly into this
- codebase, because it will be A CORE ELEMENT OF MULTI-
- SIGNATURE TRANSACTIONS!
-
- This exactly same technique will be used for multi-sigs,
- in fact, the offline-wallet signing is just a special
- case of a 1-of-1 multi-sig tx, solved by TxDPs.
- Multi-sig support is integrated into the TxDPs/wallets,
- but it has not been tested yet. This will be tested
- as soon as my testnet coins receive enough confirmations.
-
- -- NETWORKING: Using python-twisted and all the bitcoin network messages
- I will need for getting transactions not in the blockchain
- yet, and broadcasting pre-generated transactions.
-
- NOTE: right now it only connects to localhost, requiring
- bitcoin/bitcoind to be running. With the robustness of
- the networking code, it should be fairly easy to implement
- "normal" multiple-connection node behavior... I just need
- to add/test the capability to collect blocks, update the
- blockchain, and maintain peer/address lists with a variety
- of connections. This is one of my main priorities after
- the first client release!
-
- -- qt4reactor.py: Found a robust version of the qt4reactor, which is a
- combined, asynchronous event loop for both, Twisted, and
- PyQt4. With this file, I can integrate my existing
- networking code with PyQt UIs
-
- -- Double Broadcast Detection:
- With access to all messages moving through the network,
- it is easy to see whether multiple zero-confirmation txs
- are spending the same outputs. This could be indicative
- of a double-broadcast attack, where someone sends you a
- tx first, then broadcasts a competing one to the other
- half of the network. This will show up as a zero-conf tx
- in the user's client, and might even get 1 confirmation,
- before it disappears. The attack won't succeed very
- often, but it's basically free for the attacker to execute
- it ... unless you have double-broadcast detection!
-
- A master list of TxOuts waiting to enter the blockchain
- is maintained in the ArmoryClientFactory, and a
- flag is raised if a tx is received which tries to spend
- any outputs already in the queue. The client will usually
- just drop the tx because it conflicts with another one in
- the memory pool, but there's no reason we can't examine it
- for double-broadcast attacks. An "alert" flag will be
- raised in the client for two-hours, and the outer app
- can check the factory.doubleBroadcastAlerts for their
- wallet addresses to find out if they are at risk.
- A warning can be raised to say "MAKE SURE YOU WAIT FOR
- 6 CONFIRMATIONS BEFORE ACCEPTING THIS TX. ESPECIALLY
- IMPORTANT FOR THIS TX!!!"
-
-
-
-
-#####
-20 Nov, 2011
-
- *** Implemented ECDSA in C++, AES encryption, KDF, SecureBinaryData
-
-#####
-28 Oct, 2011
-
- *** Implemented SelectCoins and started "Tx Distribution Proposals."
-
- Actually spent a bit of time writing the following specification instead
- of coding:
- https://gist.github.com/1321518
-
- I figured that ironing out a good way to implement it before I actually do,
- would be a good investment of time.
-
- Fantastically, this method of dealing with multi-signature transactions,
- also works surprisingly well for offline transactions: you can use the
- exact same mechanism, as a 1-of-1 tx that needs to be signed. The way
- the TxDP works, this can be done by an offline computer without access to
- the blockchain, and thus only needs the ECDSA private keys.
-
- The only problem is, this complicates my TxDP code, because most TxDPs will
- only involve signing a single TxIn, whereas this is a "regular" transaction
- which will potentially have multiple TxIns. It's going to get done, but it
- is extra complexity...
-
-
-18 Oct, 2011
-
- *** Working blockchain reorgs with double-spend detection, GUI works in 10.04
-
- I added a createTestChain.py script that can be modified to create any kind
- of difficulty-1 blockchain, starting with the actual genesis block. I have
- used it to create a reorg-double-spend test, and crushed some pretty heavy
- bugs in that code. Next I will be working on the Tx/Ledger handling, so
- that any transactions that were, at any point, marked valid, will remain in
- the DB/memorypool for some amount of time, to let the user know what
- happened.
-
- Along the way, also had to iron out my tx-construction code in python. It's
- a complete pain in the ass (endianness is a bitch), but it's finally done
- now and the python code can construct Txs from a list of Addr-Txout-pairs
- and a list of recipient-value-pairs. (I do not have TxOut selection
- implemented, but it should be straightforward compared to the ECDSA and
- OP_CHECKSIG stuff).
-
-#####
-06 Oct, 2011
-
- *** A working block-explorer demo in PyQt4! (Linux/Ubuntu, only, right now)
-
- Got enough of the interface working in SWIG to be able to create a full
- blockchain explorer. It does not include anything to do with addresses,
- besides identifying the addresses involved in the particular block you
- are browsing. In the immediate future I plan to include a separate
- tab/view for doing address searches and display.
-
- I had implemented a feature to auto-update the GUI in realtime if you
- are simultaneously running the BTC client and it updates blk0001.dat.
- Unfortunately, there's a bug in the addBlockData() method which causes
- a segfault. This feature will be back soon, but I think I need the help
- of MSVS to thoroughly test/debug addBlockData().
-
-#####
-25 Sep, 2011:
-
- *** Address scanning, Tx ledgers, wallet balance, etc, ADDED
+*************************
+Classes in BlockObj:
+ These are not used much, except for OutPoint which is used as the key
+ for some of the maps. Generally these objects are used if you need to
+ make a copy of a *Ref object, but this isn't common. Also, because of
+ their lack of use, they may not have all methods you would expect them
+ to have.
- The directory cppForSwig contains a C++ implementation of the block objects
- with everything that doesn't require a bignum library. The goal was to
- create C++ code that could be accessed via SWIG/python to do the heavy
- lifting, since python isn't very good at doing it quickly/efficiently.
+ (NOTE: you cannot create a BlockObjRef from a BlockObj, because the
+ BlockObj does not store a serialization of itself, which is
+ what is needed to create a *Ref object. You can only go the
+ other way. )
+
+
+*************************
+Class TxIORefPair:
+ All Bitcoin transfers are simply converting older TxOuts to newer TxOuts
+ by signing a TxIn to prove that you own them. As such, each TxOut has
+ exactly one or zero TxIns. If it has a TxIn, it is spent and can be
+ forgotten. If not, it is unspent, and availble for use.
+
+ Given the above, maintaining a wallet is much simpler if these objects
+ are paired intelligently. Finding a TxOut during a blockchain scan
+ will create an unspent TxIORefPair in your wallet (and a pointer to the
+ Tx in which it is found). When you find a TxIn, it must reference a
+ TxOut that you have already seen, and so we retreive the TxIORefPair
+ and update it. It has now been spent.
+
+ One major benefit of this technique is that it becomes painfully obvious
+ which of your TxOuts are available to be spent, and if you are creating
+ a lightweight client, you can purge all TxIORefPairs that have both
+ objects to save space.
+
+ Useful methods:
+
+ TxIORefPair::hasTxOut()
+ TxIORefPair::hasTxIn()
+ TxIORefPair::hasValue()
+
+ TxIORefPair::getValue()
+ TxIORefPair::getTxOutRef()
+ TxIORefPair::getTxInRef()
+ TxIORefPair::getTxRefOfOutput()
+ TxIORefPair::getTxRefOfInput()
+
+ TxIORefPair::setTxInRef()
+ TxIORefPair::setTxOutRef()
+
+ TxIORefPair::isUnspent()
+ TxIORefPair::isSpent()
- At the moment, the BlockDataManager_FullRAM will store the entire blockchain
- in RAM, and do all calculations on it there. I anticipate in the future, to
- convert this to a file-based approach with an initial scan.
-
- Below is a list of the operations the C++ code supports, as well as timings
- based on my decent AMD Phenom II X4 840 CPU and WD 1TB HDD, using a file
- containing the blockchain up to about block 145,000: 600 MB.
-
- -- Reading blockchain from disk: 5.4s
- -- Populating header and tx maps: 10.2s
- -- Organizing headers into chain: 0.6s
- -- Scan blockchain or wallet-txs: 2.7s
-
- Note that these operations are all from scratch, meaning you don't need to
- keep any other files on your HDD except for your address list, and the
- client could start up, read the entire blkchain file, and find all of your
- transactions and compute your balances from scratch, in under 30s. I'm
- very pleased with these results! (NOTE: This does not involve any kind
- of verification, or crypto operations).
-
- Some additional features:
- -- Will maintain a tx ledger for each address individually, as well
- as for the entire wallet as a whole (this should aggregate multiple
- TxIn objects in a single Tx into a single ledger entry, though I
- haven't tested this specific feature yet).
- -- The ledgers can be sorted by order in the blockchain
- -- A separate list of your TxOut-TxIn pairs provides a simple way
- to access your unspent TxOuts, and prune off TxOuts that have
- already been spent
- -- The organize-blockchain should detect reorganizations and invalid
- blocks, but does not yet do anything other than return a flag
- I will eventually go through and populate the previouslyValid list.
- -- The basics of the SWIG interface are in place: I've made sure that
- std::strings and std::vectors are handled properly and that the
- blockchain reading works from python. But that was a few commits
- ago and the interface needs to be updated.
+ TxIORefPair::isStandardTxOutScript()
+
+
+*************************
+Class LedgerEntry:
+ This is a reduced form of a transaction. IT HAS DUAL-UTILITY: it can
+ represent a ledger entry for a single address, or for an entire wallet.
+ This is an important distinction since an address is maintained via a
+ list of TxIns and TxOuts, but a wallet only cares about the sum of TxIns
+ and TxOuts in the transaction.
+
+ When we use the BtcWallet::scanTx() method, the list of ledger entries
+ for both wallet and child addresses will be updated. They can also be
+ sorted by timestamp, or made invalid
+
+ Useful methods:
+ LedgerEntry::getAddrStr20()
+ LedgerEntry::getValue()
+ LedgerEntry::getBlockNum()
+ LedgerEntry::getTxHash()
+ LedgerEntry::getIndex() // index of Tx for wallet, TxIn/TxOut for addr
+
+
+*************************
+Class BtcAddress:
+ Holds as much information as we know about a given address. Will also
+ hold an updated balance/ledger everytime it's parent BtcWallet is updated
+ Since there are multiple ways to represent each field, we label each
+ member with the number of bytes
+
+ NOTE: The C++ address objects no longer have fields for public and
+ private keys. All that data will be handled by Python/SWIG
-
-#####
-20 Aug, 2011:
+ Useful Methods:
+ BtcAddress::get/setAddrStr20()
+ BtcAddress::get/setFirstBlockNum()
+ BtcAddress::get/setFirstTimestamp()
+ BtcAddress::get/setLastBlockNum()
+ BtcAddress::get/setLastTimestamp()
+
+ BtcAddress::getBalance()
+ BtcAddress::cleanLedger() // remove invalid entries, sort by time
+
+ BtcAddress::addTxIO() // add a ref/ptr to this address's list
+ BtcAddress::addLedgerEntry()
+ BtcAddress::getTxIOList() // Get all relevant TxIORefPair objects
+ BtcAddress::getTxLedger() // get a vector of ledger entries
+
+*************************
+Class BtcWallet:
+ This basically just holds a bunch of BtcAddresses, and will aggregate
+ information relevant to all addresses in it.
+
+ Useful methods:
+
+ BtcWallet::addAddress()
+ BtcWallet::addAddress_X_() // needed to play nicely with SWIG
+ BtcWallet::hasAddr()
+
+ BtcWallet::scanTx()
+ BtcWallet::scanNonStdTx()
+
+ BtcWallet::getBalance()
+ BtcWallet::getNumAddr()
+ BtcWallet::getAddrByIndex()
+ BtcWallet::getAddrByHash160()
+
+ BtcWallet::getTxLedger()
+ BtcWallet::cleanLedger()
+
+ BtcWallet::getTxIOMap() // all relevant TxIORefPairs
+ BtcWallet::getNonStdTxIO() // in this list if TxOut has nonstd script
+
+ BtcWallet::getUnspentOutPoints() // all relevant TxIORefPairs
+ BtcWallet::getNonStdUnspentOutPoints() // all relevant TxIORefPairs
+
+ BtcWallet::lockTxOut() // may want to lock when attempting tx
+ BtcWallet::unlockTxOut()
+
+*************************
+Class BlockDataManager (BDM):
+ This is your one-stop-shopping location for anything related to the
+ blockchain. It is a SINGLETON meaning only one of them can ever
+ be created, and it is accessed via:
+
+ BlockDataManager bdm = BlockDataManager::GetInstance()
+
+ Useful methods in BlockDataManager:
+
+ BlockDataManager::readBlkFile_FromScratch (filename)
+ BlockDataManager::organizeChain (void)
+ BlockDataManager::getHeaderByHash (BinaryData)
+ BlockDataManager::getHeaderByHeight (uint32_t)
+ BlockDataManager::getTxByHash (BinaryData)
+ BlockDataManager::scanBlockchainForTx_FromScratch (BtcWallet)
+ BlockDataManager::scanBlockchainForTx_FromScratch (vector)
+ BlockDataManager::findAllNonStdTx (void)
- PyBtcEngine is a finally a fairly complete set of tools that addresses most
- of the calculations, manipulations and crypto that is involved in analyzing
- the blockchain. It's not particularly fast, which is why I started creating
- a C++ backend to handle all the block data, to be imported via SWIG. This
- is not yet complete, but believe will be the most efficient method possible
- to process the entire blockchain at once.
-
-
- Due to many requests on the forum, as well as personal desire to identify
- large chunks of binary/hex data, I have created a separate script called
- mysteryHex.py which will try to completely break down a chunk of data and
- find BTC-related strings in it, using PyBtcEngine. It should be a fairly
- versatile tool, allowing for quick ID of headers, transactions, public keys,
- etc. Also allows the user to read their blockfile store to construct a
- dictionary of 1-2 million hashes to include in the block file identification
- (use -s to enable hash searching from knownHashes.bin, and -u to create or
- update your knownHashes.bin file from blk0001.dat in your BTC directory).
+
+
+
+*** Using the C++ code ***
+
+***RULE 1: DON'T COPY PERSISTENT OBJECTS
+
+ The following object types are stored EXACTLY once by BlockDataManager:
+
+ -BlockHeaderRef
+ -TxRef
+
+ The following object types are stored EXACTLY once by BtcWallet/BtcAddress:
+
+ -TxIORefPair
+
+ All operations involving one of these object types should use pointers
+ to the single instance of them. This is not as hard as it sounds, because
+ all methods that using these objects as inputs/outputs only use pointers.
+
+ While the point of the *Ref classes was to not have to worry about copy
+ operations, THEY CONTAIN POST-CONSTRUCTION MEMBERS that may be large
+ and slow/complicated to re-compute. For instance: TxRef contains a pointer
+ to a BlockHeaderRef. However, this pointer can change (upon reorg) and
+ thus, if we had multiple copies of the TxRef, we'd have to make sure they
+ all get updated.
+
+
+
+***RULE 2: ONLY COPY OutPointRef, TxInRef, TxOutRef OBJECTS
+
+ Unlike BlockHeadeRef and TxRef, these three classes contain no members
+ that are created post-construction. They are also very fast to recompute
+ given a pointer to where they are serialized.
+
+ Therefore, we rarely use ptrs/refs to these objects, and instead create
+ new ones on the fly whenever we need them. Use
+
+ uint32_t TxRef::getNumTxIn (void);
+ uint32_t TxRef::getNumTxOut (void);
+
+ TxInRef TxRef::getTxInRef (index i);
+ TxOutRef TxRef::getTxOutRef (index i);
+
- In fact, here's the output of ./mysteryHex.py --help:
-
- Try to identify Bitcoin-related strings in a block of data
- Usage: mysteryHex.py [--binary|-b] -f FILE
- or: mysteryHex.py unidentifiedHex
-
- Options:
- -h, --help show this help message and exit
- -f FILENAME, --file=FILENAME
- Get unidentified data from this file
- -k BLK0001FILE, --blkfile=BLK0001FILE
- Update hashlist from this file (default
- ~/.bitcoin/blk0001.dat)
- -g HASHFILE, --hashfile=HASHFILE
- The file to store and retrieve header/tx hashes
- -b, --binary Specified file is in binary
- -s, --usehashes Import header/tx hashes to be used in searching
- -u, --updatehashes Search blk0001.dat to update hashlist
- -r, --rescanhashes Rescan blkfile for header/tx hashes
-
+***RULE 3: TxIns ARE COMPLICATED
+ (I know this isn't "rule", but it is important)
+
+ We'd like to think that TxIns contain all the information we need about
+ where and how much money is coming from in a Tx. However, this is not
+ actually the case. Standard TxIn serializations do not hold the values
+ and MAY NOT EVEN HOLD THE SENDER ADDRESS. To get this information, you
+ have to follow its OutPoint and get it's TxOut, you need the help of
+ the BlockDataManager to find it. Three convenience methods have been
+ created for this purpose:
+
+ TxOutRef BlockDataManager::getPrevTxOut (TxInRef & txin);
+ BinaryData BlockDataManager::getSenderAddr20 (TxInRef & txin);
+ int64_t BlockDataManager::getSentValue (TxInRef & txin);
-#####
-16 July, 2011:
+***RULE 4: ALWAYS RESCAN YOUR WALLET(S) AFTER BLOCKCHAIN UPDATES
+ (OR PASS NEW TX DATA DIRECTLY TO YOUR WALLET, IN ADDITION TO BDM)
- After a ton of work, I have finally completed much of the calculation engine!
- All number/binary conversions work, with easy endianness swapping.
- Complete, recursive serialization and unserialization of all block/tx data
- MerkleTree calculation and verification done
- Cryptography library from "Lis" wrapped and tested on arbitrary data
- Most script OP_CODEs implemented, and OP_CHECKSIG works on example tx data!
+ You create a BtcWallet object and then add your addresses to it. However,
+ the BlockDataManager has no persistent knowledge of your wallet. You must
+ update your wallet balances/ledgers with a call to:
- Basically, everything else that I need to do (besides networking), should
- be very easy to implement. With all the endianness, serialization and
- crypto methods tested, packet construction, block verification, data
- structures, and crypto anything should be a breeze.
+ BlockDataManager::scanBlockchainForTx_FromScratch(MyBtcWallets)
- Of course, this does not include networking. The networking engine is going
- to be a whole different beast... but luckily Sam's code already has a lot of
- that written. When it comes to networking, I might just stick to using other
- people's code, instead of re-writing it in my own way.
+ Or you can plug the new Tx information directly into the wallet:
- Some immeidate things that I need to do:
- SIGHASH_ALL/NONE/SINGLE/ANYONCANPAY
- Wallet/Account file formats and implementation
+ BtcWallet::scanTx( TxRef, txIndex, blockNumber, blockTimestamp)
+
+ The extra information is to make sure that you wallet can update all of its
+ pointers correctly, and store first-seen information (to improve searching)
+
+
+
+################################################################################
+*** Python Code Overview ***
- Long term:
- Networking engine (ugh)
+ Coming soon!
+ Until then, there are examples of every python capability distributed
+ throughout random scripts. Here's the most useful example code:
+ unittest.py (mostly lower-level stuff, like Base58-ops, endianness, etc)
+ extras/mysteryHex.py
+ extras/createTestChain.py (includes block creation, signing)
+
+ Less-useful example code:
+ extras/extractKeysFromWallet.py
+ extras/findaddr.py
+
diff --git a/Using_Armory.README b/Using_Armory.README
deleted file mode 100755
index b0ba64ef0..000000000
--- a/Using_Armory.README
+++ /dev/null
@@ -1,675 +0,0 @@
-################################################################################
-## ##
-## Copyright (C) 2011, Alan C. Reiner ##
-## Distributed under the GNU Affero General Public License (AGPL v3) ##
-## See LICENSE or http:##www.gnu.org#licenses#agpl.html ##
-## ##
-################################################################################
-
-Armory contains over 15,000 lines of code, between the C++ and python
-libraries. This can be very confusing for someone unfamiliar with the
-code (you). Below I have attempted to illustrate the CONOPS (concept of
-operations) that the library was designed for, so you know how to use it
-in your own development activities. There is a TON of sample code in
-the following three files:
-
- [**SWIG**] unittest.py (this has almost everything!)
-
- [ C++ ] cppForSwig/BlockUtilsTest.cpp
- [ Python ] armoryengine.py
-
-But of course, sample code alone does not make great documentation. I will
-attempt to provide reference info for everything else you need to know, here.
-For a list of library features, see the STATUS table in the README. Note
-that all features with an X in either column are accessible in SWIG.
-
-
-################################################################################
-***Dependencies (from README) ***
-
- - Crypto++
- Linux: Install package "libcrypto++-dev"
- Windows: Download from "http://www.cryptopp.com/#download"
- (MSVS: Copy cryptopp source dir into same location as .sln)
-
- - SWIG
- Linux: Install package "swig"
- Windows: "http://www.swig.org/download.html"
- (MSVS: Copy swigwin-2.x directory next to cryptopp as "swigwin")
-
- - Python 2.6/2.7
- Linux: Should be preinstalled...
- Windows: "http://www.python.org/getit/"
-
- - Python Twisted -- asynchronous networking
- Linux: Install package 'python-twisted'
- Windows: "http://twistedmatrix.com/trac/wiki/Downloads"
-
- - PyQt 4 (for Python 2.X)
- Linux: Install "libqtcore4", "libqt4-dev" and "python-qt4"
- Windows: "http://www.riverbankcomputing.co.uk/software/pyqt/download"
- Also will need the QtSDK
-
- - qt4reactor.py -- combined eventloop for PyQt and Twisted
- All OS: https://launchpad.net/qt4reactor
- Windows Only: qt4reactor relies on pywin32 (for win32event module)
- http://sourceforge.net/projects/pywin32/files/pywin32/Build216/
-
- - pywin32
- - py2exe
- (OPTIONAL - if you want to make a standalone executable in Windows)
- Windows: http://www.py2exe.org/
-
-
-
-*** Compiling ***
-
- Linux: From the cppForSwig directory "make" to make the C++ code alone,
- "make swig" to create and compile the SWIG wrappers
-
-
- sudo apt-get install git-core build-essential libcrypto++-dev swig libqtcore4 libqt4-dev python-qt4 python-dev python-twisted
- git clone git://github.com/etotheipi/BitcoinArmory.git
- cd BitcoinArmory
- git checkout qtdev
- cd cppForSwig
- make swig
- cd ..
- python ArmoryQt.py
-
-
- NOTE: If you get a "undefined reference in QtCore.so", it's likely
- due to another library installed that hijacked the system
- Qt installation. In my case, it was a CUDA installation
- which provided its own, older version of QtCore which was
- causing this issue.
-
- Windows: MSVS 2010 vcxproj included but not maintained. Only compiles C++.
- MSVS 2005 vcproj included. Setup to compile everything,
- and even runs swig and py2exe as pre- and post-build events.
-
- In windows you're going to have to do a bit more work than just
- installing the programs below. Specifically, you need to add
- a few libraries I couldn't distributed through git (for various
- reasons), and also make sure the MSVS has the right includes
- for your python version/location.
-
- Most importantly, check that the following settings match your
- python installation (currently configured for Python 2.6 in
- the MSVS 2005 project):
-
- C/C++ --> General --> Additional Include Directories:
- Linker --> General --> Additional Library Directories:
- Linker --> Input --> Additional Library Directories:
-
-
-
- SWIG Notes:
- Running SWIG takes in all the source code and the CppBlockUtils.i
- and creates a C++ source file called CppBlockUtils_wrap.cxx, as
- well as CppBlockUtils.py.
- The result of compiling this source file in linux:
- _CppBlockUtils.so
- In windows, compiling will generally produce
- _CppBlockUtils.dll --> MUST BE RENAMED --> _CppBlockUtils.pyd
-
- The previously-created CppBlockUtils.py expects to find this
- shared-object or pyd in the same directory.
-
-
- PyQt4 Notes:
- Getting PyQt4 setup in Linux is trivial: "apt-get" install as above
-
- Getting PyQt4 setup in Windows was a pain. I'm still not positive
- I could repeat the process and succeed. It does involve:
- -- Getting and installing QtSDK
- -- Getting mingw matching you QtSDK version
- -- Unzip mingw somewhere and referencing it when install QtSDK
- -- Download PyQt4 matching your python version
- -- Manipulate your PATH (environment variables) to make sure
- it has PyQt4 directory (C:\Python2X\Lib\site-packages\PyQt4)
-
-
-
-################################################################################
-#
-# NOTE: 05 Dec, 2011
-# This documentation is accurate, but only represents a fraction of the
-# available functionality in the libraries. I will update this as soon
-# as I get the first client release out of the way. For now, you can
-# can see most of the C++ methods below (accessed via Python), and then
-# do an "import armoryengine; help(armoryengine)" to see a MASSIVE
-# list of the available classes and methods. Seriously... it's huge.
-#
-################################################################################
-*** Documentation ***
-
- This documentation is broken into three sections:
-
- - SWIG
- - C++
- - Python
-
- Most of what you need to know is actually in the C++ section, since every
- C++ function call is mapped directly into python calls through SWIG. These
- C++ functions are at the heart of everything you do that touches the block-
- chain.
-
- If you are impatient, just jump to the "C++ Code Overview" and you will
- see 80% of what you need in the methods lists there.
-
- Python will be needed for anything involving Base-58 address strings,
- or ECDSA operations. Signing and verification works, though, it's not part
- of any demo, besides unittest.py which verifies a tx from the blockchain
-
- I will eventually be adding sample projects that exhaustively demonstrate
- each feature of the library in the combined SWIG interface.
-
-
-
-################################################################################
-*** SWIG Code Overview ***
-
- There is no explicit library file for combining python and C++ methods. You
- import both CppBlockUtils and pybtcengine in python, and off you go.
-
- The one important thing to know is that the modules are spread out in the
- project directory, and thus you need to add some directories to your path.
- The best solution is to append the paths you need at the top of your python
- file. You need to make sure that the directories containing
- pybtcengine.py
- CppBlockUtils.py
- _CppBlockUtils.so (linux) _CppBlockUtils.pyd (windows)
-
- are all on your path.
-
- For instance, if you are running the example blockexplorer in the pyqt dir,
- you will need the following lines at the top of your script to point python
- to search the other directories for the modules:
-
- import sys
- sys.path.append('..')
- sys.path.append('../cppForSwig')
- from pybtcengine import *
- from CppBlockUtils import *
-
-
- Most of the CONOPS for using the combined library is actually knowing how
- to use the C++ code. Most calls you make will be on SWIGified objects
- pulled in through the .dll(.pyd)/.so. In this case, the best documentation
- really is the example code. Look at cppForSwig/testswig.py; this file
- has examples of nearly every function. You can use this as a reference
- for what functions require C++ calls, and which ones are from pybtcengine.py.
- In general, if it came from the BlockDataManager:
-
- bdm = BlockDataManager_FullRam.GetInstance()
- bdm.getTxByHash(...)
- ...
-
- Then the resulting objects will be C++/SWIG objects. The list of useful
- methods in the C++ documentation, below, will identify all the available
- methods.
-
- **** One other important note:
- SWIG does *not* work with any overloaded methods involving
- BinaryData objects: this is because I created a SWIG typemap to
- simplify passing binary data between python and C++, but it led to a few
- important methods getting disabled. Instead of
- BtcWallet::addAddress(...)
- use:
- BtcWallet::addAddress_1_(...)
- BtcWallet::addAddress_3_(...)
- BtcWallet::addAddress_5_(...)
- The number at the end specifies how many arguments the method takes.
- The original method has 4 optional arguments, but SWIG didn't know
- what to do with it.
-
- The same thing needed to be done with
- BlockDataRef::unserialize()
- replaced with:
- BlockDataRef::unserialize_1_()
-
- This might be necessary for a few other methods, but I haven't run into
- any of them yet.
-
-
-
-
-
-
-################################################################################
-*** C++ Code Overview ***
-
-What's there:
- - Blockchain reading from file, scanning
- - Checking blk0001.dat file integrity
- - Organizing and finding the longest chain
- - Efficient access to ALL data in the blockchain
- - Standard and Non-standard script detection
- - Binary wallet tracking, with address ledgers
-
-What's NOT there:
- - BigNum library: cannot do any Base58/address manipulations.
- - ECDSA library: cannot do any signing/verification operations
- (however, crypto++ is linked, could be easy to add)
- - Address storage: addresses that have not
- information on a given address, you must do a full
- scan of the blockchain, which takes about 5s. If
- you need to do this quicker, you can revive some
- old code I had which took about 30s
- - Constructing transaction packets: this could be easy to add, since
- the library does make it easy to find all TxOuts for a given wallet
-
-
-The basics: The goal of the C++ code is to provide an optimized layer for
- accessing the blockchain. It reads the specified blk0001.dat
- file (where the blockchain is stored in raw, binary form)
- and maintains a series of maps and pointers to this data with
- minimal copy operations. IT IS VERY FAST.
-
- The C++ code has no BigNum or ECDSA code in it, which means
- it cannot sign/verify anything, or calculate address strings.
-
-
-*************************
-Class BinaryData:
- This class is a simple wrapper for {vector, uint32_t size}.
- It has a ton of convenience methods for searching, slicing and hashing
- these objects. All data that isn't human-readable strings will be
- passed around with BinaryData objects (typedef'd to "HashString")
-
-*************************
-Class BinaryDataRef:
- This class is REFERENCE class for what would otherwise be used by
- BinaryData. It holds a {uint8_t*, uint32_t size}. Since many of our
- objects are persistent (see rule 1), it's safe to pass around
- references to them. This class has easy conversions to and from
- BinaryData, and has most of the same methods.
-
-*************************
-Class BtcUtils:
- This is a helper class that contains methods and constants that might be
- shared between multiple classes. THIS IS A STATIC-METHOD-ONLY class.
- Therefore all methods and members must be scoped with BtcUtils::
-
- Useful Methods:
- BtcUtils::GenesisHash_;
- BtcUtils::EmptyHash_;
- BtcUtils::MagicBytes_;
-
- BtcUtils::readVarInt()
- BtcUtils::readVarIntLength()
- BtcUtils::getHash256()
- BtcUtils::getHash160()
- BtcUtils::calculateMerkleRoot()
- BtcUtils::calculateMerkleTree()
-
- BtcUtils::TxInCalcLength()
- BtcUtils::TxOutCalcLength()
- BtcUtils::TxCalcLength()
-
- BtcUtils::getTxInScriptType()
- BtcUtils::getTxOutScriptType()
- BtcUtils::getTxOutRecipientAddr()
- BtcUtils::convertDiffBitsToDouble()
-
- BtcUtils::getOpCodeName()
- BtcUtils::convertScriptToOpStrings()
-
-
-*************************
-Classes in BlockObjRef:
- These are the core of the library; all these objects have a serialize()
- and unserialize() method which uses the specified formats in:
-
- https://en.bitcoin.it/wiki/Protocol_specification
-
- These objects do not hold any serialized information, only a BinaryDataRef
- to where it is serialized in RAM by the BlockDataManager. All data that
- is not officially part of its serialized state is stored as extra members
-
- Useful methods:
-
- BlockHeaderRef
- BlockHeaderRef::getVersion()
- BlockHeaderRef::getPrevHash()
- BlockHeaderRef::getMerkleRoot()
- BlockHeaderRef::getDifficulty()
- BlockHeaderRef::getTimestamp()
- BlockHeaderRef::getNonce()
- BlockHeaderRef::pprint()
-
- BlockHeaderRef::serialize()
- BlockHeaderRef::unserialize()
-
- BlockHeaderRef::getThisHash()
- BlockHeaderRef::getDifficultySum()
- BlockHeaderRef::getBlockSize() // in bytes
- BlockHeaderRef::getTxRefPtrList() // access to all Tx's in this block
- BlockHeaderRef::getTxHashList() // access to all Tx's in this block
-
- BlockHeaderRef::verifyMerkleRoot()
- BlockHeaderRef::verifyIntegrity() // checks merkleroot and hash zeros
-
-
- OutPointRef
- OutPointRef::getTxHash()
- OutPointRef::getTxOutIndex()
-
- OutPointRef::serialize()
- OutPointRef::unserialize()
-
- TxInRef
- TxInRef::getOutPoint()
- TxInRef::getScript()
- TxInRef::getSequence()
- TxInRef::isCoinbase()
- TxInRef::pprint()
-
- TxInRef::serialize()
- TxInRef::unserialize()
- TxInRef::getSize() // number of serialized bytes
- TxInRef::getScriptSize() // number of serialized bytes
-
- TxInRef::getScriptType()
- TxInRef::isScriptStandard()
- TxInRef::isScriptCoinbase()
- TxInRef::isScriptSpendCB()
- TxInRef::isScriptUnknown()
- TxInRef::getSenderAddrIfAvailable() // Coinbase TxIns don't have this
-
- TxInRef::getCopy() // Creates TxIn; not used much/ever
- TxInRef::getParentTxPtr() // Coinbase TxIns don't have this
-
- TxOutRef
- TxOutRef::getValue()
- TxOutRef::getScript()
- TxOutRef::pprint()
-
- TxOutRef::serialize()
- TxOutRef::unserialize()
- TxOutRef::getSize() // number of serialized bytes
- TxOutRef::getScriptSize() // number of serialized bytes
-
- TxOutRef::isScriptStandard()
- TxOutRef::isScriptCoinbase()
- TxOutRef::isScriptUnknown()
-
- TxOutRef::getRecipientAddr()
- TxOutRef::getParentTxPtr()
- TxOutRef::getCopy() // Creates TxOut; not used much/ever
-
-
- TxRef
- TxRef::getVersion()
- TxRef::getNumTxIn()
- TxRef::getNumTxOut()
- TxRef::getTxInRef(index)
- TxRef::getTxOutRef(index)
- TxRef::getLockTime()
- TxRef::pprint()
-
- TxRef::serialize()
- TxRef::unserialize()
- TxRef::getSize() // number of serialized bytes
-
- TxRef::getThisHash()
-
- TxRef::getHeaderPtr()
- TxRef::setHeaderPtr()
- TxRef::getBlockTimestamp()
- TxRef::getBlockHeight()
-
-
-
-*************************
-Classes in BlockObj:
- These are not used much, except for OutPoint which is used as the key
- for some of the maps. Generally these objects are used if you need to
- make a copy of a *Ref object, but this isn't common. Also, because of
- their lack of use, they may not have all methods you would expect them
- to have.
-
- (NOTE: you cannot create a BlockObjRef from a BlockObj, because the
- BlockObj does not store a serialization of itself, which is
- what is needed to create a *Ref object. You can only go the
- other way. )
-
-
-*************************
-Class TxIORefPair:
- All Bitcoin transfers are simply converting older TxOuts to newer TxOuts
- by signing a TxIn to prove that you own them. As such, each TxOut has
- exactly one or zero TxIns. If it has a TxIn, it is spent and can be
- forgotten. If not, it is unspent, and availble for use.
-
- Given the above, maintaining a wallet is much simpler if these objects
- are paired intelligently. Finding a TxOut during a blockchain scan
- will create an unspent TxIORefPair in your wallet (and a pointer to the
- Tx in which it is found). When you find a TxIn, it must reference a
- TxOut that you have already seen, and so we retreive the TxIORefPair
- and update it. It has now been spent.
-
- One major benefit of this technique is that it becomes painfully obvious
- which of your TxOuts are available to be spent, and if you are creating
- a lightweight client, you can purge all TxIORefPairs that have both
- objects to save space.
-
- Useful methods:
-
- TxIORefPair::hasTxOut()
- TxIORefPair::hasTxIn()
- TxIORefPair::hasValue()
-
- TxIORefPair::getValue()
- TxIORefPair::getTxOutRef()
- TxIORefPair::getTxInRef()
- TxIORefPair::getTxRefOfOutput()
- TxIORefPair::getTxRefOfInput()
-
- TxIORefPair::setTxInRef()
- TxIORefPair::setTxOutRef()
-
- TxIORefPair::isUnspent()
- TxIORefPair::isSpent()
-
- TxIORefPair::isStandardTxOutScript()
-
-
-*************************
-Class LedgerEntry:
- This is a reduced form of a transaction. IT HAS DUAL-UTILITY: it can
- represent a ledger entry for a single address, or for an entire wallet.
- This is an important distinction since an address is maintained via a
- list of TxIns and TxOuts, but a wallet only cares about the sum of TxIns
- and TxOuts in the transaction.
-
- When we use the BtcWallet::scanTx() method, the list of ledger entries
- for both wallet and child addresses will be updated. They can also be
- sorted by timestamp, or made invalid
-
- Useful methods:
- LedgerEntry::getAddrStr20()
- LedgerEntry::getValue()
- LedgerEntry::getBlockNum()
- LedgerEntry::getTxHash()
- LedgerEntry::getIndex() // index of Tx for wallet, TxIn/TxOut for addr
-
-
-*************************
-Class BtcAddress:
- Holds as much information as we know about a given address. Will also
- hold an updated balance/ledger everytime it's parent BtcWallet is updated
- Since there are multiple ways to represent each field, we label each
- member with the number of bytes
-
- NOTE: The C++ address objects no longer have fields for public and
- private keys. All that data will be handled by Python/SWIG
-
- Useful Methods:
- BtcAddress::get/setAddrStr20()
- BtcAddress::get/setFirstBlockNum()
- BtcAddress::get/setFirstTimestamp()
- BtcAddress::get/setLastBlockNum()
- BtcAddress::get/setLastTimestamp()
-
- BtcAddress::getBalance()
- BtcAddress::cleanLedger() // remove invalid entries, sort by time
-
- BtcAddress::addTxIO() // add a ref/ptr to this address's list
- BtcAddress::addLedgerEntry()
- BtcAddress::getTxIOList() // Get all relevant TxIORefPair objects
- BtcAddress::getTxLedger() // get a vector of ledger entries
-
-*************************
-Class BtcWallet:
- This basically just holds a bunch of BtcAddresses, and will aggregate
- information relevant to all addresses in it.
-
- Useful methods:
-
- BtcWallet::addAddress()
- BtcWallet::addAddress_X_() // needed to play nicely with SWIG
- BtcWallet::hasAddr()
-
- BtcWallet::scanTx()
- BtcWallet::scanNonStdTx()
-
- BtcWallet::getBalance()
- BtcWallet::getNumAddr()
- BtcWallet::getAddrByIndex()
- BtcWallet::getAddrByHash160()
-
- BtcWallet::getTxLedger()
- BtcWallet::cleanLedger()
-
- BtcWallet::getTxIOMap() // all relevant TxIORefPairs
- BtcWallet::getNonStdTxIO() // in this list if TxOut has nonstd script
-
- BtcWallet::getUnspentOutPoints() // all relevant TxIORefPairs
- BtcWallet::getNonStdUnspentOutPoints() // all relevant TxIORefPairs
-
- BtcWallet::lockTxOut() // may want to lock when attempting tx
- BtcWallet::unlockTxOut()
-
-*************************
-Class BlockDataManager (BDM):
- This is your one-stop-shopping location for anything related to the
- blockchain. It is a SINGLETON meaning only one of them can ever
- be created, and it is accessed via:
-
- BlockDataManager bdm = BlockDataManager::GetInstance()
-
- Useful methods in BlockDataManager:
-
- BlockDataManager::readBlkFile_FromScratch (filename)
- BlockDataManager::organizeChain (void)
- BlockDataManager::getHeaderByHash (BinaryData)
- BlockDataManager::getHeaderByHeight (uint32_t)
- BlockDataManager::getTxByHash (BinaryData)
- BlockDataManager::scanBlockchainForTx_FromScratch (BtcWallet)
- BlockDataManager::scanBlockchainForTx_FromScratch (vector)
- BlockDataManager::findAllNonStdTx (void)
-
-
-
-
-*** Using the C++ code ***
-
-***RULE 1: DON'T COPY PERSISTENT OBJECTS
-
- The following object types are stored EXACTLY once by BlockDataManager:
-
- -BlockHeaderRef
- -TxRef
-
- The following object types are stored EXACTLY once by BtcWallet/BtcAddress:
-
- -TxIORefPair
-
- All operations involving one of these object types should use pointers
- to the single instance of them. This is not as hard as it sounds, because
- all methods that using these objects as inputs/outputs only use pointers.
-
- While the point of the *Ref classes was to not have to worry about copy
- operations, THEY CONTAIN POST-CONSTRUCTION MEMBERS that may be large
- and slow/complicated to re-compute. For instance: TxRef contains a pointer
- to a BlockHeaderRef. However, this pointer can change (upon reorg) and
- thus, if we had multiple copies of the TxRef, we'd have to make sure they
- all get updated.
-
-
-
-***RULE 2: ONLY COPY OutPointRef, TxInRef, TxOutRef OBJECTS
-
- Unlike BlockHeadeRef and TxRef, these three classes contain no members
- that are created post-construction. They are also very fast to recompute
- given a pointer to where they are serialized.
-
- Therefore, we rarely use ptrs/refs to these objects, and instead create
- new ones on the fly whenever we need them. Use
-
- uint32_t TxRef::getNumTxIn (void);
- uint32_t TxRef::getNumTxOut (void);
-
- TxInRef TxRef::getTxInRef (index i);
- TxOutRef TxRef::getTxOutRef (index i);
-
-
-***RULE 3: TxIns ARE COMPLICATED
- (I know this isn't "rule", but it is important)
-
- We'd like to think that TxIns contain all the information we need about
- where and how much money is coming from in a Tx. However, this is not
- actually the case. Standard TxIn serializations do not hold the values
- and MAY NOT EVEN HOLD THE SENDER ADDRESS. To get this information, you
- have to follow its OutPoint and get it's TxOut, you need the help of
- the BlockDataManager to find it. Three convenience methods have been
- created for this purpose:
-
- TxOutRef BlockDataManager::getPrevTxOut (TxInRef & txin);
- BinaryData BlockDataManager::getSenderAddr20 (TxInRef & txin);
- int64_t BlockDataManager::getSentValue (TxInRef & txin);
-
-
-***RULE 4: ALWAYS RESCAN YOUR WALLET(S) AFTER BLOCKCHAIN UPDATES
- (OR PASS NEW TX DATA DIRECTLY TO YOUR WALLET, IN ADDITION TO BDM)
-
- You create a BtcWallet object and then add your addresses to it. However,
- the BlockDataManager has no persistent knowledge of your wallet. You must
- update your wallet balances/ledgers with a call to:
-
- BlockDataManager::scanBlockchainForTx_FromScratch(MyBtcWallets)
-
- Or you can plug the new Tx information directly into the wallet:
-
- BtcWallet::scanTx( TxRef, txIndex, blockNumber, blockTimestamp)
-
- The extra information is to make sure that you wallet can update all of its
- pointers correctly, and store first-seen information (to improve searching)
-
-
-
-################################################################################
-*** Python Code Overview ***
-
- Coming soon!
-
- Until then, there are examples of every python capability distributed
- throughout random scripts. Here's the most useful example code:
-
- unittest.py (mostly lower-level stuff, like Base58-ops, endianness, etc)
- extras/mysteryHex.py
- extras/createTestChain.py (includes block creation, signing)
-
- Less-useful example code:
- extras/extractKeysFromWallet.py
- extras/findaddr.py
-
-
-
-
-
-
-
-
diff --git a/convertWalletVersion.py b/convertWalletVersion.py
deleted file mode 100644
index 8ef0c6392..000000000
--- a/convertWalletVersion.py
+++ /dev/null
@@ -1,39 +0,0 @@
-from armoryengine import *
-import CppBlockUtils as Cpp
-import armoryengine
-
-print 'Loading wallets...'
-wltPaths = []
-for f in os.listdir(ARMORY_HOME_DIR):
- fullPath = os.path.join(ARMORY_HOME_DIR, f)
- if os.path.isfile(fullPath) and not fullPath.endswith('backup.wallet'):
- openfile = open(fullPath, 'r')
- first8 = openfile.read(8)
- openfile.close()
- if first8=='\xbaWALLET\x00':
- wltPaths.append(fullPath)
-
-for fpath in wltPaths:
- wltLoad = PyBtcWallet().readWalletFile(fpath)
- wltID = wltLoad.uniqueIDB58
- print 'Read wallet:', wltID, 'version:', wltLoad.version
- oldPath = wltLoad.walletPath
- print 'Will upgrade version to:', oldPath, PYBTCWALLET_VERSION
-
- fileparts = os.path.splitext(oldPath)
- oldBackup = fileparts[0] + 'backup' + fileparts[1]
- tempPath = oldPath + '.new_version'
-
- print 'Forking wallet...'
- wltLoad.version = PYBTCWALLET_VERSION
- wltLoad.writeFreshWalletFile(tempPath)
-
- os.remove(oldPath)
- os.remove(oldBackup)
- shutil.move(tempPath, oldPath)
-
-
-
-
-
-
diff --git a/cppForSwig/CppBlockUtils_wrap.cxx b/cppForSwig/CppBlockUtils_wrap.cxx
new file mode 100644
index 000000000..a97ec41ee
--- /dev/null
+++ b/cppForSwig/CppBlockUtils_wrap.cxx
@@ -0,0 +1,47918 @@
+/* ----------------------------------------------------------------------------
+ * This file was automatically generated by SWIG (http://www.swig.org).
+ * Version 2.0.4
+ *
+ * This file is not intended to be easily readable and contains a number of
+ * coding conventions designed to improve portability and efficiency. Do not make
+ * changes to this file unless you know what you are doing--modify the SWIG
+ * interface file instead.
+ * ----------------------------------------------------------------------------- */
+
+#define SWIGPYTHON
+#define SWIG_PYTHON_DIRECTOR_NO_VTABLE
+#define SWIG_PYTHON_CLASSIC
+
+
+#ifdef __cplusplus
+/* SwigValueWrapper is described in swig.swg */
+template class SwigValueWrapper {
+ struct SwigMovePointer {
+ T *ptr;
+ SwigMovePointer(T *p) : ptr(p) { }
+ ~SwigMovePointer() { delete ptr; }
+ SwigMovePointer& operator=(SwigMovePointer& rhs) { T* oldptr = ptr; ptr = 0; delete oldptr; ptr = rhs.ptr; rhs.ptr = 0; return *this; }
+ } pointer;
+ SwigValueWrapper& operator=(const SwigValueWrapper& rhs);
+ SwigValueWrapper(const SwigValueWrapper& rhs);
+public:
+ SwigValueWrapper() : pointer(0) { }
+ SwigValueWrapper& operator=(const T& t) { SwigMovePointer tmp(new T(t)); pointer = tmp; return *this; }
+ operator T&() const { return *pointer.ptr; }
+ T *operator&() { return pointer.ptr; }
+};
+
+template T SwigValueInit() {
+ return T();
+}
+#endif
+
+/* -----------------------------------------------------------------------------
+ * This section contains generic SWIG labels for method/variable
+ * declarations/attributes, and other compiler dependent labels.
+ * ----------------------------------------------------------------------------- */
+
+/* template workaround for compilers that cannot correctly implement the C++ standard */
+#ifndef SWIGTEMPLATEDISAMBIGUATOR
+# if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560)
+# define SWIGTEMPLATEDISAMBIGUATOR template
+# elif defined(__HP_aCC)
+/* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */
+/* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */
+# define SWIGTEMPLATEDISAMBIGUATOR template
+# else
+# define SWIGTEMPLATEDISAMBIGUATOR
+# endif
+#endif
+
+/* inline attribute */
+#ifndef SWIGINLINE
+# if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__))
+# define SWIGINLINE inline
+# else
+# define SWIGINLINE
+# endif
+#endif
+
+/* attribute recognised by some compilers to avoid 'unused' warnings */
+#ifndef SWIGUNUSED
+# if defined(__GNUC__)
+# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
+# define SWIGUNUSED __attribute__ ((__unused__))
+# else
+# define SWIGUNUSED
+# endif
+# elif defined(__ICC)
+# define SWIGUNUSED __attribute__ ((__unused__))
+# else
+# define SWIGUNUSED
+# endif
+#endif
+
+#ifndef SWIG_MSC_UNSUPPRESS_4505
+# if defined(_MSC_VER)
+# pragma warning(disable : 4505) /* unreferenced local function has been removed */
+# endif
+#endif
+
+#ifndef SWIGUNUSEDPARM
+# ifdef __cplusplus
+# define SWIGUNUSEDPARM(p)
+# else
+# define SWIGUNUSEDPARM(p) p SWIGUNUSED
+# endif
+#endif
+
+/* internal SWIG method */
+#ifndef SWIGINTERN
+# define SWIGINTERN static SWIGUNUSED
+#endif
+
+/* internal inline SWIG method */
+#ifndef SWIGINTERNINLINE
+# define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
+#endif
+
+/* exporting methods */
+#if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
+# ifndef GCC_HASCLASSVISIBILITY
+# define GCC_HASCLASSVISIBILITY
+# endif
+#endif
+
+#ifndef SWIGEXPORT
+# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
+# if defined(STATIC_LINKED)
+# define SWIGEXPORT
+# else
+# define SWIGEXPORT __declspec(dllexport)
+# endif
+# else
+# if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY)
+# define SWIGEXPORT __attribute__ ((visibility("default")))
+# else
+# define SWIGEXPORT
+# endif
+# endif
+#endif
+
+/* calling conventions for Windows */
+#ifndef SWIGSTDCALL
+# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
+# define SWIGSTDCALL __stdcall
+# else
+# define SWIGSTDCALL
+# endif
+#endif
+
+/* Deal with Microsoft's attempt at deprecating C standard runtime functions */
+#if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
+# define _CRT_SECURE_NO_DEPRECATE
+#endif
+
+/* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */
+#if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE)
+# define _SCL_SECURE_NO_DEPRECATE
+#endif
+
+
+
+/* Python.h has to appear first */
+#include
+
+/* -----------------------------------------------------------------------------
+ * swigrun.swg
+ *
+ * This file contains generic C API SWIG runtime support for pointer
+ * type checking.
+ * ----------------------------------------------------------------------------- */
+
+/* This should only be incremented when either the layout of swig_type_info changes,
+ or for whatever reason, the runtime changes incompatibly */
+#define SWIG_RUNTIME_VERSION "4"
+
+/* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */
+#ifdef SWIG_TYPE_TABLE
+# define SWIG_QUOTE_STRING(x) #x
+# define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x)
+# define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE)
+#else
+# define SWIG_TYPE_TABLE_NAME
+#endif
+
+/*
+ You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for
+ creating a static or dynamic library from the SWIG runtime code.
+ In 99.9% of the cases, SWIG just needs to declare them as 'static'.
+
+ But only do this if strictly necessary, ie, if you have problems
+ with your compiler or suchlike.
+*/
+
+#ifndef SWIGRUNTIME
+# define SWIGRUNTIME SWIGINTERN
+#endif
+
+#ifndef SWIGRUNTIMEINLINE
+# define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE
+#endif
+
+/* Generic buffer size */
+#ifndef SWIG_BUFFER_SIZE
+# define SWIG_BUFFER_SIZE 1024
+#endif
+
+/* Flags for pointer conversions */
+#define SWIG_POINTER_DISOWN 0x1
+#define SWIG_CAST_NEW_MEMORY 0x2
+
+/* Flags for new pointer objects */
+#define SWIG_POINTER_OWN 0x1
+
+
+/*
+ Flags/methods for returning states.
+
+ The SWIG conversion methods, as ConvertPtr, return an integer
+ that tells if the conversion was successful or not. And if not,
+ an error code can be returned (see swigerrors.swg for the codes).
+
+ Use the following macros/flags to set or process the returning
+ states.
+
+ In old versions of SWIG, code such as the following was usually written:
+
+ if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) {
+ // success code
+ } else {
+ //fail code
+ }
+
+ Now you can be more explicit:
+
+ int res = SWIG_ConvertPtr(obj,vptr,ty.flags);
+ if (SWIG_IsOK(res)) {
+ // success code
+ } else {
+ // fail code
+ }
+
+ which is the same really, but now you can also do
+
+ Type *ptr;
+ int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags);
+ if (SWIG_IsOK(res)) {
+ // success code
+ if (SWIG_IsNewObj(res) {
+ ...
+ delete *ptr;
+ } else {
+ ...
+ }
+ } else {
+ // fail code
+ }
+
+ I.e., now SWIG_ConvertPtr can return new objects and you can
+ identify the case and take care of the deallocation. Of course that
+ also requires SWIG_ConvertPtr to return new result values, such as
+
+ int SWIG_ConvertPtr(obj, ptr,...) {
+ if () {
+ if () {
+ *ptr = ;
+ return SWIG_NEWOBJ;
+ } else {
+ *ptr = ;
+ return SWIG_OLDOBJ;
+ }
+ } else {
+ return SWIG_BADOBJ;
+ }
+ }
+
+ Of course, returning the plain '0(success)/-1(fail)' still works, but you can be
+ more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the
+ SWIG errors code.
+
+ Finally, if the SWIG_CASTRANK_MODE is enabled, the result code
+ allows to return the 'cast rank', for example, if you have this
+
+ int food(double)
+ int fooi(int);
+
+ and you call
+
+ food(1) // cast rank '1' (1 -> 1.0)
+ fooi(1) // cast rank '0'
+
+ just use the SWIG_AddCast()/SWIG_CheckState()
+*/
+
+#define SWIG_OK (0)
+#define SWIG_ERROR (-1)
+#define SWIG_IsOK(r) (r >= 0)
+#define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError)
+
+/* The CastRankLimit says how many bits are used for the cast rank */
+#define SWIG_CASTRANKLIMIT (1 << 8)
+/* The NewMask denotes the object was created (using new/malloc) */
+#define SWIG_NEWOBJMASK (SWIG_CASTRANKLIMIT << 1)
+/* The TmpMask is for in/out typemaps that use temporal objects */
+#define SWIG_TMPOBJMASK (SWIG_NEWOBJMASK << 1)
+/* Simple returning values */
+#define SWIG_BADOBJ (SWIG_ERROR)
+#define SWIG_OLDOBJ (SWIG_OK)
+#define SWIG_NEWOBJ (SWIG_OK | SWIG_NEWOBJMASK)
+#define SWIG_TMPOBJ (SWIG_OK | SWIG_TMPOBJMASK)
+/* Check, add and del mask methods */
+#define SWIG_AddNewMask(r) (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r)
+#define SWIG_DelNewMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r)
+#define SWIG_IsNewObj(r) (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK))
+#define SWIG_AddTmpMask(r) (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r)
+#define SWIG_DelTmpMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r)
+#define SWIG_IsTmpObj(r) (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK))
+
+/* Cast-Rank Mode */
+#if defined(SWIG_CASTRANK_MODE)
+# ifndef SWIG_TypeRank
+# define SWIG_TypeRank unsigned long
+# endif
+# ifndef SWIG_MAXCASTRANK /* Default cast allowed */
+# define SWIG_MAXCASTRANK (2)
+# endif
+# define SWIG_CASTRANKMASK ((SWIG_CASTRANKLIMIT) -1)
+# define SWIG_CastRank(r) (r & SWIG_CASTRANKMASK)
+SWIGINTERNINLINE int SWIG_AddCast(int r) {
+ return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r;
+}
+SWIGINTERNINLINE int SWIG_CheckState(int r) {
+ return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0;
+}
+#else /* no cast-rank mode */
+# define SWIG_AddCast
+# define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0)
+#endif
+
+
+#include
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef void *(*swig_converter_func)(void *, int *);
+typedef struct swig_type_info *(*swig_dycast_func)(void **);
+
+/* Structure to store information on one type */
+typedef struct swig_type_info {
+ const char *name; /* mangled name of this type */
+ const char *str; /* human readable name of this type */
+ swig_dycast_func dcast; /* dynamic cast function down a hierarchy */
+ struct swig_cast_info *cast; /* linked list of types that can cast into this type */
+ void *clientdata; /* language specific type data */
+ int owndata; /* flag if the structure owns the clientdata */
+} swig_type_info;
+
+/* Structure to store a type and conversion function used for casting */
+typedef struct swig_cast_info {
+ swig_type_info *type; /* pointer to type that is equivalent to this type */
+ swig_converter_func converter; /* function to cast the void pointers */
+ struct swig_cast_info *next; /* pointer to next cast in linked list */
+ struct swig_cast_info *prev; /* pointer to the previous cast */
+} swig_cast_info;
+
+/* Structure used to store module information
+ * Each module generates one structure like this, and the runtime collects
+ * all of these structures and stores them in a circularly linked list.*/
+typedef struct swig_module_info {
+ swig_type_info **types; /* Array of pointers to swig_type_info structures that are in this module */
+ size_t size; /* Number of types in this module */
+ struct swig_module_info *next; /* Pointer to next element in circularly linked list */
+ swig_type_info **type_initial; /* Array of initially generated type structures */
+ swig_cast_info **cast_initial; /* Array of initially generated casting structures */
+ void *clientdata; /* Language specific module data */
+} swig_module_info;
+
+/*
+ Compare two type names skipping the space characters, therefore
+ "char*" == "char *" and "Class" == "Class", etc.
+
+ Return 0 when the two name types are equivalent, as in
+ strncmp, but skipping ' '.
+*/
+SWIGRUNTIME int
+SWIG_TypeNameComp(const char *f1, const char *l1,
+ const char *f2, const char *l2) {
+ for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) {
+ while ((*f1 == ' ') && (f1 != l1)) ++f1;
+ while ((*f2 == ' ') && (f2 != l2)) ++f2;
+ if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1;
+ }
+ return (int)((l1 - f1) - (l2 - f2));
+}
+
+/*
+ Check type equivalence in a name list like ||...
+ Return 0 if not equal, 1 if equal
+*/
+SWIGRUNTIME int
+SWIG_TypeEquiv(const char *nb, const char *tb) {
+ int equiv = 0;
+ const char* te = tb + strlen(tb);
+ const char* ne = nb;
+ while (!equiv && *ne) {
+ for (nb = ne; *ne; ++ne) {
+ if (*ne == '|') break;
+ }
+ equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0;
+ if (*ne) ++ne;
+ }
+ return equiv;
+}
+
+/*
+ Check type equivalence in a name list like ||...
+ Return 0 if equal, -1 if nb < tb, 1 if nb > tb
+*/
+SWIGRUNTIME int
+SWIG_TypeCompare(const char *nb, const char *tb) {
+ int equiv = 0;
+ const char* te = tb + strlen(tb);
+ const char* ne = nb;
+ while (!equiv && *ne) {
+ for (nb = ne; *ne; ++ne) {
+ if (*ne == '|') break;
+ }
+ equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0;
+ if (*ne) ++ne;
+ }
+ return equiv;
+}
+
+
+/*
+ Check the typename
+*/
+SWIGRUNTIME swig_cast_info *
+SWIG_TypeCheck(const char *c, swig_type_info *ty) {
+ if (ty) {
+ swig_cast_info *iter = ty->cast;
+ while (iter) {
+ if (strcmp(iter->type->name, c) == 0) {
+ if (iter == ty->cast)
+ return iter;
+ /* Move iter to the top of the linked list */
+ iter->prev->next = iter->next;
+ if (iter->next)
+ iter->next->prev = iter->prev;
+ iter->next = ty->cast;
+ iter->prev = 0;
+ if (ty->cast) ty->cast->prev = iter;
+ ty->cast = iter;
+ return iter;
+ }
+ iter = iter->next;
+ }
+ }
+ return 0;
+}
+
+/*
+ Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison
+*/
+SWIGRUNTIME swig_cast_info *
+SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *ty) {
+ if (ty) {
+ swig_cast_info *iter = ty->cast;
+ while (iter) {
+ if (iter->type == from) {
+ if (iter == ty->cast)
+ return iter;
+ /* Move iter to the top of the linked list */
+ iter->prev->next = iter->next;
+ if (iter->next)
+ iter->next->prev = iter->prev;
+ iter->next = ty->cast;
+ iter->prev = 0;
+ if (ty->cast) ty->cast->prev = iter;
+ ty->cast = iter;
+ return iter;
+ }
+ iter = iter->next;
+ }
+ }
+ return 0;
+}
+
+/*
+ Cast a pointer up an inheritance hierarchy
+*/
+SWIGRUNTIMEINLINE void *
+SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) {
+ return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory);
+}
+
+/*
+ Dynamic pointer casting. Down an inheritance hierarchy
+*/
+SWIGRUNTIME swig_type_info *
+SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) {
+ swig_type_info *lastty = ty;
+ if (!ty || !ty->dcast) return ty;
+ while (ty && (ty->dcast)) {
+ ty = (*ty->dcast)(ptr);
+ if (ty) lastty = ty;
+ }
+ return lastty;
+}
+
+/*
+ Return the name associated with this type
+*/
+SWIGRUNTIMEINLINE const char *
+SWIG_TypeName(const swig_type_info *ty) {
+ return ty->name;
+}
+
+/*
+ Return the pretty name associated with this type,
+ that is an unmangled type name in a form presentable to the user.
+*/
+SWIGRUNTIME const char *
+SWIG_TypePrettyName(const swig_type_info *type) {
+ /* The "str" field contains the equivalent pretty names of the
+ type, separated by vertical-bar characters. We choose
+ to print the last name, as it is often (?) the most
+ specific. */
+ if (!type) return NULL;
+ if (type->str != NULL) {
+ const char *last_name = type->str;
+ const char *s;
+ for (s = type->str; *s; s++)
+ if (*s == '|') last_name = s+1;
+ return last_name;
+ }
+ else
+ return type->name;
+}
+
+/*
+ Set the clientdata field for a type
+*/
+SWIGRUNTIME void
+SWIG_TypeClientData(swig_type_info *ti, void *clientdata) {
+ swig_cast_info *cast = ti->cast;
+ /* if (ti->clientdata == clientdata) return; */
+ ti->clientdata = clientdata;
+
+ while (cast) {
+ if (!cast->converter) {
+ swig_type_info *tc = cast->type;
+ if (!tc->clientdata) {
+ SWIG_TypeClientData(tc, clientdata);
+ }
+ }
+ cast = cast->next;
+ }
+}
+SWIGRUNTIME void
+SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) {
+ SWIG_TypeClientData(ti, clientdata);
+ ti->owndata = 1;
+}
+
+/*
+ Search for a swig_type_info structure only by mangled name
+ Search is a O(log #types)
+
+ We start searching at module start, and finish searching when start == end.
+ Note: if start == end at the beginning of the function, we go all the way around
+ the circular list.
+*/
+SWIGRUNTIME swig_type_info *
+SWIG_MangledTypeQueryModule(swig_module_info *start,
+ swig_module_info *end,
+ const char *name) {
+ swig_module_info *iter = start;
+ do {
+ if (iter->size) {
+ register size_t l = 0;
+ register size_t r = iter->size - 1;
+ do {
+ /* since l+r >= 0, we can (>> 1) instead (/ 2) */
+ register size_t i = (l + r) >> 1;
+ const char *iname = iter->types[i]->name;
+ if (iname) {
+ register int compare = strcmp(name, iname);
+ if (compare == 0) {
+ return iter->types[i];
+ } else if (compare < 0) {
+ if (i) {
+ r = i - 1;
+ } else {
+ break;
+ }
+ } else if (compare > 0) {
+ l = i + 1;
+ }
+ } else {
+ break; /* should never happen */
+ }
+ } while (l <= r);
+ }
+ iter = iter->next;
+ } while (iter != end);
+ return 0;
+}
+
+/*
+ Search for a swig_type_info structure for either a mangled name or a human readable name.
+ It first searches the mangled names of the types, which is a O(log #types)
+ If a type is not found it then searches the human readable names, which is O(#types).
+
+ We start searching at module start, and finish searching when start == end.
+ Note: if start == end at the beginning of the function, we go all the way around
+ the circular list.
+*/
+SWIGRUNTIME swig_type_info *
+SWIG_TypeQueryModule(swig_module_info *start,
+ swig_module_info *end,
+ const char *name) {
+ /* STEP 1: Search the name field using binary search */
+ swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name);
+ if (ret) {
+ return ret;
+ } else {
+ /* STEP 2: If the type hasn't been found, do a complete search
+ of the str field (the human readable name) */
+ swig_module_info *iter = start;
+ do {
+ register size_t i = 0;
+ for (; i < iter->size; ++i) {
+ if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name)))
+ return iter->types[i];
+ }
+ iter = iter->next;
+ } while (iter != end);
+ }
+
+ /* neither found a match */
+ return 0;
+}
+
+/*
+ Pack binary data into a string
+*/
+SWIGRUNTIME char *
+SWIG_PackData(char *c, void *ptr, size_t sz) {
+ static const char hex[17] = "0123456789abcdef";
+ register const unsigned char *u = (unsigned char *) ptr;
+ register const unsigned char *eu = u + sz;
+ for (; u != eu; ++u) {
+ register unsigned char uu = *u;
+ *(c++) = hex[(uu & 0xf0) >> 4];
+ *(c++) = hex[uu & 0xf];
+ }
+ return c;
+}
+
+/*
+ Unpack binary data from a string
+*/
+SWIGRUNTIME const char *
+SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
+ register unsigned char *u = (unsigned char *) ptr;
+ register const unsigned char *eu = u + sz;
+ for (; u != eu; ++u) {
+ register char d = *(c++);
+ register unsigned char uu;
+ if ((d >= '0') && (d <= '9'))
+ uu = ((d - '0') << 4);
+ else if ((d >= 'a') && (d <= 'f'))
+ uu = ((d - ('a'-10)) << 4);
+ else
+ return (char *) 0;
+ d = *(c++);
+ if ((d >= '0') && (d <= '9'))
+ uu |= (d - '0');
+ else if ((d >= 'a') && (d <= 'f'))
+ uu |= (d - ('a'-10));
+ else
+ return (char *) 0;
+ *u = uu;
+ }
+ return c;
+}
+
+/*
+ Pack 'void *' into a string buffer.
+*/
+SWIGRUNTIME char *
+SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) {
+ char *r = buff;
+ if ((2*sizeof(void *) + 2) > bsz) return 0;
+ *(r++) = '_';
+ r = SWIG_PackData(r,&ptr,sizeof(void *));
+ if (strlen(name) + 1 > (bsz - (r - buff))) return 0;
+ strcpy(r,name);
+ return buff;
+}
+
+SWIGRUNTIME const char *
+SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) {
+ if (*c != '_') {
+ if (strcmp(c,"NULL") == 0) {
+ *ptr = (void *) 0;
+ return name;
+ } else {
+ return 0;
+ }
+ }
+ return SWIG_UnpackData(++c,ptr,sizeof(void *));
+}
+
+SWIGRUNTIME char *
+SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) {
+ char *r = buff;
+ size_t lname = (name ? strlen(name) : 0);
+ if ((2*sz + 2 + lname) > bsz) return 0;
+ *(r++) = '_';
+ r = SWIG_PackData(r,ptr,sz);
+ if (lname) {
+ strncpy(r,name,lname+1);
+ } else {
+ *r = 0;
+ }
+ return buff;
+}
+
+SWIGRUNTIME const char *
+SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
+ if (*c != '_') {
+ if (strcmp(c,"NULL") == 0) {
+ memset(ptr,0,sz);
+ return name;
+ } else {
+ return 0;
+ }
+ }
+ return SWIG_UnpackData(++c,ptr,sz);
+}
+
+#ifdef __cplusplus
+}
+#endif
+
+/* Errors in SWIG */
+#define SWIG_UnknownError -1
+#define SWIG_IOError -2
+#define SWIG_RuntimeError -3
+#define SWIG_IndexError -4
+#define SWIG_TypeError -5
+#define SWIG_DivisionByZero -6
+#define SWIG_OverflowError -7
+#define SWIG_SyntaxError -8
+#define SWIG_ValueError -9
+#define SWIG_SystemError -10
+#define SWIG_AttributeError -11
+#define SWIG_MemoryError -12
+#define SWIG_NullReferenceError -13
+
+
+
+/* Compatibility macros for Python 3 */
+#if PY_VERSION_HEX >= 0x03000000
+
+#define PyClass_Check(obj) PyObject_IsInstance(obj, (PyObject *)&PyType_Type)
+#define PyInt_Check(x) PyLong_Check(x)
+#define PyInt_AsLong(x) PyLong_AsLong(x)
+#define PyInt_FromLong(x) PyLong_FromLong(x)
+#define PyString_Check(name) PyBytes_Check(name)
+#define PyString_FromString(x) PyUnicode_FromString(x)
+#define PyString_Format(fmt, args) PyUnicode_Format(fmt, args)
+#define PyString_AsString(str) PyBytes_AsString(str)
+#define PyString_Size(str) PyBytes_Size(str)
+#define PyString_InternFromString(key) PyUnicode_InternFromString(key)
+#define Py_TPFLAGS_HAVE_CLASS Py_TPFLAGS_BASETYPE
+#define PyString_AS_STRING(x) PyUnicode_AS_STRING(x)
+#define _PyLong_FromSsize_t(x) PyLong_FromSsize_t(x)
+
+#endif
+
+#ifndef Py_TYPE
+# define Py_TYPE(op) ((op)->ob_type)
+#endif
+
+/* SWIG APIs for compatibility of both Python 2 & 3 */
+
+#if PY_VERSION_HEX >= 0x03000000
+# define SWIG_Python_str_FromFormat PyUnicode_FromFormat
+#else
+# define SWIG_Python_str_FromFormat PyString_FromFormat
+#endif
+
+
+/* Warning: This function will allocate a new string in Python 3,
+ * so please call SWIG_Python_str_DelForPy3(x) to free the space.
+ */
+SWIGINTERN char*
+SWIG_Python_str_AsChar(PyObject *str)
+{
+#if PY_VERSION_HEX >= 0x03000000
+ char *cstr;
+ char *newstr;
+ Py_ssize_t len;
+ str = PyUnicode_AsUTF8String(str);
+ PyBytes_AsStringAndSize(str, &cstr, &len);
+ newstr = (char *) malloc(len+1);
+ memcpy(newstr, cstr, len+1);
+ Py_XDECREF(str);
+ return newstr;
+#else
+ return PyString_AsString(str);
+#endif
+}
+
+#if PY_VERSION_HEX >= 0x03000000
+# define SWIG_Python_str_DelForPy3(x) free( (void*) (x) )
+#else
+# define SWIG_Python_str_DelForPy3(x)
+#endif
+
+
+SWIGINTERN PyObject*
+SWIG_Python_str_FromChar(const char *c)
+{
+#if PY_VERSION_HEX >= 0x03000000
+ return PyUnicode_FromString(c);
+#else
+ return PyString_FromString(c);
+#endif
+}
+
+/* Add PyOS_snprintf for old Pythons */
+#if PY_VERSION_HEX < 0x02020000
+# if defined(_MSC_VER) || defined(__BORLANDC__) || defined(_WATCOM)
+# define PyOS_snprintf _snprintf
+# else
+# define PyOS_snprintf snprintf
+# endif
+#endif
+
+/* A crude PyString_FromFormat implementation for old Pythons */
+#if PY_VERSION_HEX < 0x02020000
+
+#ifndef SWIG_PYBUFFER_SIZE
+# define SWIG_PYBUFFER_SIZE 1024
+#endif
+
+static PyObject *
+PyString_FromFormat(const char *fmt, ...) {
+ va_list ap;
+ char buf[SWIG_PYBUFFER_SIZE * 2];
+ int res;
+ va_start(ap, fmt);
+ res = vsnprintf(buf, sizeof(buf), fmt, ap);
+ va_end(ap);
+ return (res < 0 || res >= (int)sizeof(buf)) ? 0 : PyString_FromString(buf);
+}
+#endif
+
+/* Add PyObject_Del for old Pythons */
+#if PY_VERSION_HEX < 0x01060000
+# define PyObject_Del(op) PyMem_DEL((op))
+#endif
+#ifndef PyObject_DEL
+# define PyObject_DEL PyObject_Del
+#endif
+
+/* A crude PyExc_StopIteration exception for old Pythons */
+#if PY_VERSION_HEX < 0x02020000
+# ifndef PyExc_StopIteration
+# define PyExc_StopIteration PyExc_RuntimeError
+# endif
+# ifndef PyObject_GenericGetAttr
+# define PyObject_GenericGetAttr 0
+# endif
+#endif
+
+/* Py_NotImplemented is defined in 2.1 and up. */
+#if PY_VERSION_HEX < 0x02010000
+# ifndef Py_NotImplemented
+# define Py_NotImplemented PyExc_RuntimeError
+# endif
+#endif
+
+/* A crude PyString_AsStringAndSize implementation for old Pythons */
+#if PY_VERSION_HEX < 0x02010000
+# ifndef PyString_AsStringAndSize
+# define PyString_AsStringAndSize(obj, s, len) {*s = PyString_AsString(obj); *len = *s ? strlen(*s) : 0;}
+# endif
+#endif
+
+/* PySequence_Size for old Pythons */
+#if PY_VERSION_HEX < 0x02000000
+# ifndef PySequence_Size
+# define PySequence_Size PySequence_Length
+# endif
+#endif
+
+/* PyBool_FromLong for old Pythons */
+#if PY_VERSION_HEX < 0x02030000
+static
+PyObject *PyBool_FromLong(long ok)
+{
+ PyObject *result = ok ? Py_True : Py_False;
+ Py_INCREF(result);
+ return result;
+}
+#endif
+
+/* Py_ssize_t for old Pythons */
+/* This code is as recommended by: */
+/* http://www.python.org/dev/peps/pep-0353/#conversion-guidelines */
+#if PY_VERSION_HEX < 0x02050000 && !defined(PY_SSIZE_T_MIN)
+typedef int Py_ssize_t;
+# define PY_SSIZE_T_MAX INT_MAX
+# define PY_SSIZE_T_MIN INT_MIN
+typedef inquiry lenfunc;
+typedef intargfunc ssizeargfunc;
+typedef intintargfunc ssizessizeargfunc;
+typedef intobjargproc ssizeobjargproc;
+typedef intintobjargproc ssizessizeobjargproc;
+typedef getreadbufferproc readbufferproc;
+typedef getwritebufferproc writebufferproc;
+typedef getsegcountproc segcountproc;
+typedef getcharbufferproc charbufferproc;
+static long PyNumber_AsSsize_t (PyObject *x, void *SWIGUNUSEDPARM(exc))
+{
+ long result = 0;
+ PyObject *i = PyNumber_Int(x);
+ if (i) {
+ result = PyInt_AsLong(i);
+ Py_DECREF(i);
+ }
+ return result;
+}
+#endif
+
+#if PY_VERSION_HEX < 0x02040000
+#define Py_VISIT(op) \
+ do { \
+ if (op) { \
+ int vret = visit((op), arg); \
+ if (vret) \
+ return vret; \
+ } \
+ } while (0)
+#endif
+
+#if PY_VERSION_HEX < 0x02030000
+typedef struct {
+ PyTypeObject type;
+ PyNumberMethods as_number;
+ PyMappingMethods as_mapping;
+ PySequenceMethods as_sequence;
+ PyBufferProcs as_buffer;
+ PyObject *name, *slots;
+} PyHeapTypeObject;
+#endif
+
+#if PY_VERSION_HEX < 0x02030000
+typedef destructor freefunc;
+#endif
+
+#if ((PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION > 6) || \
+ (PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION > 0) || \
+ (PY_MAJOR_VERSION > 3))
+# define SWIGPY_USE_CAPSULE
+# define SWIGPY_CAPSULE_NAME ((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION ".type_pointer_capsule" SWIG_TYPE_TABLE_NAME)
+#endif
+
+#if PY_VERSION_HEX < 0x03020000
+#define PyDescr_TYPE(x) (((PyDescrObject *)(x))->d_type)
+#define PyDescr_NAME(x) (((PyDescrObject *)(x))->d_name)
+#endif
+
+/* -----------------------------------------------------------------------------
+ * error manipulation
+ * ----------------------------------------------------------------------------- */
+
+SWIGRUNTIME PyObject*
+SWIG_Python_ErrorType(int code) {
+ PyObject* type = 0;
+ switch(code) {
+ case SWIG_MemoryError:
+ type = PyExc_MemoryError;
+ break;
+ case SWIG_IOError:
+ type = PyExc_IOError;
+ break;
+ case SWIG_RuntimeError:
+ type = PyExc_RuntimeError;
+ break;
+ case SWIG_IndexError:
+ type = PyExc_IndexError;
+ break;
+ case SWIG_TypeError:
+ type = PyExc_TypeError;
+ break;
+ case SWIG_DivisionByZero:
+ type = PyExc_ZeroDivisionError;
+ break;
+ case SWIG_OverflowError:
+ type = PyExc_OverflowError;
+ break;
+ case SWIG_SyntaxError:
+ type = PyExc_SyntaxError;
+ break;
+ case SWIG_ValueError:
+ type = PyExc_ValueError;
+ break;
+ case SWIG_SystemError:
+ type = PyExc_SystemError;
+ break;
+ case SWIG_AttributeError:
+ type = PyExc_AttributeError;
+ break;
+ default:
+ type = PyExc_RuntimeError;
+ }
+ return type;
+}
+
+
+SWIGRUNTIME void
+SWIG_Python_AddErrorMsg(const char* mesg)
+{
+ PyObject *type = 0;
+ PyObject *value = 0;
+ PyObject *traceback = 0;
+
+ if (PyErr_Occurred()) PyErr_Fetch(&type, &value, &traceback);
+ if (value) {
+ char *tmp;
+ PyObject *old_str = PyObject_Str(value);
+ PyErr_Clear();
+ Py_XINCREF(type);
+
+ PyErr_Format(type, "%s %s", tmp = SWIG_Python_str_AsChar(old_str), mesg);
+ SWIG_Python_str_DelForPy3(tmp);
+ Py_DECREF(old_str);
+ Py_DECREF(value);
+ } else {
+ PyErr_SetString(PyExc_RuntimeError, mesg);
+ }
+}
+
+#if defined(SWIG_PYTHON_NO_THREADS)
+# if defined(SWIG_PYTHON_THREADS)
+# undef SWIG_PYTHON_THREADS
+# endif
+#endif
+#if defined(SWIG_PYTHON_THREADS) /* Threading support is enabled */
+# if !defined(SWIG_PYTHON_USE_GIL) && !defined(SWIG_PYTHON_NO_USE_GIL)
+# if (PY_VERSION_HEX >= 0x02030000) /* For 2.3 or later, use the PyGILState calls */
+# define SWIG_PYTHON_USE_GIL
+# endif
+# endif
+# if defined(SWIG_PYTHON_USE_GIL) /* Use PyGILState threads calls */
+# ifndef SWIG_PYTHON_INITIALIZE_THREADS
+# define SWIG_PYTHON_INITIALIZE_THREADS PyEval_InitThreads()
+# endif
+# ifdef __cplusplus /* C++ code */
+ class SWIG_Python_Thread_Block {
+ bool status;
+ PyGILState_STATE state;
+ public:
+ void end() { if (status) { PyGILState_Release(state); status = false;} }
+ SWIG_Python_Thread_Block() : status(true), state(PyGILState_Ensure()) {}
+ ~SWIG_Python_Thread_Block() { end(); }
+ };
+ class SWIG_Python_Thread_Allow {
+ bool status;
+ PyThreadState *save;
+ public:
+ void end() { if (status) { PyEval_RestoreThread(save); status = false; }}
+ SWIG_Python_Thread_Allow() : status(true), save(PyEval_SaveThread()) {}
+ ~SWIG_Python_Thread_Allow() { end(); }
+ };
+# define SWIG_PYTHON_THREAD_BEGIN_BLOCK SWIG_Python_Thread_Block _swig_thread_block
+# define SWIG_PYTHON_THREAD_END_BLOCK _swig_thread_block.end()
+# define SWIG_PYTHON_THREAD_BEGIN_ALLOW SWIG_Python_Thread_Allow _swig_thread_allow
+# define SWIG_PYTHON_THREAD_END_ALLOW _swig_thread_allow.end()
+# else /* C code */
+# define SWIG_PYTHON_THREAD_BEGIN_BLOCK PyGILState_STATE _swig_thread_block = PyGILState_Ensure()
+# define SWIG_PYTHON_THREAD_END_BLOCK PyGILState_Release(_swig_thread_block)
+# define SWIG_PYTHON_THREAD_BEGIN_ALLOW PyThreadState *_swig_thread_allow = PyEval_SaveThread()
+# define SWIG_PYTHON_THREAD_END_ALLOW PyEval_RestoreThread(_swig_thread_allow)
+# endif
+# else /* Old thread way, not implemented, user must provide it */
+# if !defined(SWIG_PYTHON_INITIALIZE_THREADS)
+# define SWIG_PYTHON_INITIALIZE_THREADS
+# endif
+# if !defined(SWIG_PYTHON_THREAD_BEGIN_BLOCK)
+# define SWIG_PYTHON_THREAD_BEGIN_BLOCK
+# endif
+# if !defined(SWIG_PYTHON_THREAD_END_BLOCK)
+# define SWIG_PYTHON_THREAD_END_BLOCK
+# endif
+# if !defined(SWIG_PYTHON_THREAD_BEGIN_ALLOW)
+# define SWIG_PYTHON_THREAD_BEGIN_ALLOW
+# endif
+# if !defined(SWIG_PYTHON_THREAD_END_ALLOW)
+# define SWIG_PYTHON_THREAD_END_ALLOW
+# endif
+# endif
+#else /* No thread support */
+# define SWIG_PYTHON_INITIALIZE_THREADS
+# define SWIG_PYTHON_THREAD_BEGIN_BLOCK
+# define SWIG_PYTHON_THREAD_END_BLOCK
+# define SWIG_PYTHON_THREAD_BEGIN_ALLOW
+# define SWIG_PYTHON_THREAD_END_ALLOW
+#endif
+
+/* -----------------------------------------------------------------------------
+ * Python API portion that goes into the runtime
+ * ----------------------------------------------------------------------------- */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* -----------------------------------------------------------------------------
+ * Constant declarations
+ * ----------------------------------------------------------------------------- */
+
+/* Constant Types */
+#define SWIG_PY_POINTER 4
+#define SWIG_PY_BINARY 5
+
+/* Constant information structure */
+typedef struct swig_const_info {
+ int type;
+ char *name;
+ long lvalue;
+ double dvalue;
+ void *pvalue;
+ swig_type_info **ptype;
+} swig_const_info;
+
+
+/* -----------------------------------------------------------------------------
+ * Wrapper of PyInstanceMethod_New() used in Python 3
+ * It is exported to the generated module, used for -fastproxy
+ * ----------------------------------------------------------------------------- */
+#if PY_VERSION_HEX >= 0x03000000
+SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func)
+{
+ return PyInstanceMethod_New(func);
+}
+#else
+SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *SWIGUNUSEDPARM(func))
+{
+ return NULL;
+}
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+
+/* -----------------------------------------------------------------------------
+ * pyrun.swg
+ *
+ * This file contains the runtime support for Python modules
+ * and includes code for managing global variables and pointer
+ * type checking.
+ *
+ * ----------------------------------------------------------------------------- */
+
+/* Common SWIG API */
+
+/* for raw pointers */
+#define SWIG_Python_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, 0)
+#define SWIG_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtr(obj, pptr, type, flags)
+#define SWIG_ConvertPtrAndOwn(obj,pptr,type,flags,own) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, own)
+
+#ifdef SWIGPYTHON_BUILTIN
+#define SWIG_NewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(self, ptr, type, flags)
+#else
+#define SWIG_NewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(NULL, ptr, type, flags)
+#endif
+
+#define SWIG_InternalNewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(NULL, ptr, type, flags)
+
+#define SWIG_CheckImplicit(ty) SWIG_Python_CheckImplicit(ty)
+#define SWIG_AcquirePtr(ptr, src) SWIG_Python_AcquirePtr(ptr, src)
+#define swig_owntype int
+
+/* for raw packed data */
+#define SWIG_ConvertPacked(obj, ptr, sz, ty) SWIG_Python_ConvertPacked(obj, ptr, sz, ty)
+#define SWIG_NewPackedObj(ptr, sz, type) SWIG_Python_NewPackedObj(ptr, sz, type)
+
+/* for class or struct pointers */
+#define SWIG_ConvertInstance(obj, pptr, type, flags) SWIG_ConvertPtr(obj, pptr, type, flags)
+#define SWIG_NewInstanceObj(ptr, type, flags) SWIG_NewPointerObj(ptr, type, flags)
+
+/* for C or C++ function pointers */
+#define SWIG_ConvertFunctionPtr(obj, pptr, type) SWIG_Python_ConvertFunctionPtr(obj, pptr, type)
+#define SWIG_NewFunctionPtrObj(ptr, type) SWIG_Python_NewPointerObj(NULL, ptr, type, 0)
+
+/* for C++ member pointers, ie, member methods */
+#define SWIG_ConvertMember(obj, ptr, sz, ty) SWIG_Python_ConvertPacked(obj, ptr, sz, ty)
+#define SWIG_NewMemberObj(ptr, sz, type) SWIG_Python_NewPackedObj(ptr, sz, type)
+
+
+/* Runtime API */
+
+#define SWIG_GetModule(clientdata) SWIG_Python_GetModule()
+#define SWIG_SetModule(clientdata, pointer) SWIG_Python_SetModule(pointer)
+#define SWIG_NewClientData(obj) SwigPyClientData_New(obj)
+
+#define SWIG_SetErrorObj SWIG_Python_SetErrorObj
+#define SWIG_SetErrorMsg SWIG_Python_SetErrorMsg
+#define SWIG_ErrorType(code) SWIG_Python_ErrorType(code)
+#define SWIG_Error(code, msg) SWIG_Python_SetErrorMsg(SWIG_ErrorType(code), msg)
+#define SWIG_fail goto fail
+
+
+/* Runtime API implementation */
+
+/* Error manipulation */
+
+SWIGINTERN void
+SWIG_Python_SetErrorObj(PyObject *errtype, PyObject *obj) {
+ SWIG_PYTHON_THREAD_BEGIN_BLOCK;
+ PyErr_SetObject(errtype, obj);
+ Py_DECREF(obj);
+ SWIG_PYTHON_THREAD_END_BLOCK;
+}
+
+SWIGINTERN void
+SWIG_Python_SetErrorMsg(PyObject *errtype, const char *msg) {
+ SWIG_PYTHON_THREAD_BEGIN_BLOCK;
+ PyErr_SetString(errtype, (char *) msg);
+ SWIG_PYTHON_THREAD_END_BLOCK;
+}
+
+#define SWIG_Python_Raise(obj, type, desc) SWIG_Python_SetErrorObj(SWIG_Python_ExceptionType(desc), obj)
+
+/* Set a constant value */
+
+#if defined(SWIGPYTHON_BUILTIN)
+
+SWIGINTERN void
+SwigPyBuiltin_AddPublicSymbol(PyObject *seq, const char *key) {
+ PyObject *s = PyString_InternFromString(key);
+ PyList_Append(seq, s);
+ Py_DECREF(s);
+}
+
+SWIGINTERN void
+SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *name, PyObject *obj) {
+ PyDict_SetItemString(d, (char *)name, obj);
+ Py_DECREF(obj);
+ if (public_interface)
+ SwigPyBuiltin_AddPublicSymbol(public_interface, name);
+}
+
+#else
+
+SWIGINTERN void
+SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) {
+ PyDict_SetItemString(d, (char *)name, obj);
+ Py_DECREF(obj);
+}
+
+#endif
+
+/* Append a value to the result obj */
+
+SWIGINTERN PyObject*
+SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) {
+#if !defined(SWIG_PYTHON_OUTPUT_TUPLE)
+ if (!result) {
+ result = obj;
+ } else if (result == Py_None) {
+ Py_DECREF(result);
+ result = obj;
+ } else {
+ if (!PyList_Check(result)) {
+ PyObject *o2 = result;
+ result = PyList_New(1);
+ PyList_SetItem(result, 0, o2);
+ }
+ PyList_Append(result,obj);
+ Py_DECREF(obj);
+ }
+ return result;
+#else
+ PyObject* o2;
+ PyObject* o3;
+ if (!result) {
+ result = obj;
+ } else if (result == Py_None) {
+ Py_DECREF(result);
+ result = obj;
+ } else {
+ if (!PyTuple_Check(result)) {
+ o2 = result;
+ result = PyTuple_New(1);
+ PyTuple_SET_ITEM(result, 0, o2);
+ }
+ o3 = PyTuple_New(1);
+ PyTuple_SET_ITEM(o3, 0, obj);
+ o2 = result;
+ result = PySequence_Concat(o2, o3);
+ Py_DECREF(o2);
+ Py_DECREF(o3);
+ }
+ return result;
+#endif
+}
+
+/* Unpack the argument tuple */
+
+SWIGINTERN int
+SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssize_t max, PyObject **objs)
+{
+ if (!args) {
+ if (!min && !max) {
+ return 1;
+ } else {
+ PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got none",
+ name, (min == max ? "" : "at least "), (int)min);
+ return 0;
+ }
+ }
+ if (!PyTuple_Check(args)) {
+ if (min <= 1 && max >= 1) {
+ register int i;
+ objs[0] = args;
+ for (i = 1; i < max; ++i) {
+ objs[i] = 0;
+ }
+ return 2;
+ }
+ PyErr_SetString(PyExc_SystemError, "UnpackTuple() argument list is not a tuple");
+ return 0;
+ } else {
+ register Py_ssize_t l = PyTuple_GET_SIZE(args);
+ if (l < min) {
+ PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d",
+ name, (min == max ? "" : "at least "), (int)min, (int)l);
+ return 0;
+ } else if (l > max) {
+ PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d",
+ name, (min == max ? "" : "at most "), (int)max, (int)l);
+ return 0;
+ } else {
+ register int i;
+ for (i = 0; i < l; ++i) {
+ objs[i] = PyTuple_GET_ITEM(args, i);
+ }
+ for (; l < max; ++l) {
+ objs[l] = 0;
+ }
+ return i + 1;
+ }
+ }
+}
+
+/* A functor is a function object with one single object argument */
+#if PY_VERSION_HEX >= 0x02020000
+#define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunctionObjArgs(functor, obj, NULL);
+#else
+#define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunction(functor, "O", obj);
+#endif
+
+/*
+ Helper for static pointer initialization for both C and C++ code, for example
+ static PyObject *SWIG_STATIC_POINTER(MyVar) = NewSomething(...);
+*/
+#ifdef __cplusplus
+#define SWIG_STATIC_POINTER(var) var
+#else
+#define SWIG_STATIC_POINTER(var) var = 0; if (!var) var
+#endif
+
+/* -----------------------------------------------------------------------------
+ * Pointer declarations
+ * ----------------------------------------------------------------------------- */
+
+/* Flags for new pointer objects */
+#define SWIG_POINTER_NOSHADOW (SWIG_POINTER_OWN << 1)
+#define SWIG_POINTER_NEW (SWIG_POINTER_NOSHADOW | SWIG_POINTER_OWN)
+
+#define SWIG_POINTER_IMPLICIT_CONV (SWIG_POINTER_DISOWN << 1)
+
+#define SWIG_BUILTIN_TP_INIT (SWIG_POINTER_OWN << 2)
+#define SWIG_BUILTIN_INIT (SWIG_BUILTIN_TP_INIT | SWIG_POINTER_OWN)
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* How to access Py_None */
+#if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
+# ifndef SWIG_PYTHON_NO_BUILD_NONE
+# ifndef SWIG_PYTHON_BUILD_NONE
+# define SWIG_PYTHON_BUILD_NONE
+# endif
+# endif
+#endif
+
+#ifdef SWIG_PYTHON_BUILD_NONE
+# ifdef Py_None
+# undef Py_None
+# define Py_None SWIG_Py_None()
+# endif
+SWIGRUNTIMEINLINE PyObject *
+_SWIG_Py_None(void)
+{
+ PyObject *none = Py_BuildValue((char*)"");
+ Py_DECREF(none);
+ return none;
+}
+SWIGRUNTIME PyObject *
+SWIG_Py_None(void)
+{
+ static PyObject *SWIG_STATIC_POINTER(none) = _SWIG_Py_None();
+ return none;
+}
+#endif
+
+/* The python void return value */
+
+SWIGRUNTIMEINLINE PyObject *
+SWIG_Py_Void(void)
+{
+ PyObject *none = Py_None;
+ Py_INCREF(none);
+ return none;
+}
+
+/* SwigPyClientData */
+
+typedef struct {
+ PyObject *klass;
+ PyObject *newraw;
+ PyObject *newargs;
+ PyObject *destroy;
+ int delargs;
+ int implicitconv;
+ PyTypeObject *pytype;
+} SwigPyClientData;
+
+SWIGRUNTIMEINLINE int
+SWIG_Python_CheckImplicit(swig_type_info *ty)
+{
+ SwigPyClientData *data = (SwigPyClientData *)ty->clientdata;
+ return data ? data->implicitconv : 0;
+}
+
+SWIGRUNTIMEINLINE PyObject *
+SWIG_Python_ExceptionType(swig_type_info *desc) {
+ SwigPyClientData *data = desc ? (SwigPyClientData *) desc->clientdata : 0;
+ PyObject *klass = data ? data->klass : 0;
+ return (klass ? klass : PyExc_RuntimeError);
+}
+
+
+SWIGRUNTIME SwigPyClientData *
+SwigPyClientData_New(PyObject* obj)
+{
+ if (!obj) {
+ return 0;
+ } else {
+ SwigPyClientData *data = (SwigPyClientData *)malloc(sizeof(SwigPyClientData));
+ /* the klass element */
+ data->klass = obj;
+ Py_INCREF(data->klass);
+ /* the newraw method and newargs arguments used to create a new raw instance */
+ if (PyClass_Check(obj)) {
+ data->newraw = 0;
+ data->newargs = obj;
+ Py_INCREF(obj);
+ } else {
+#if (PY_VERSION_HEX < 0x02020000)
+ data->newraw = 0;
+#else
+ data->newraw = PyObject_GetAttrString(data->klass, (char *)"__new__");
+#endif
+ if (data->newraw) {
+ Py_INCREF(data->newraw);
+ data->newargs = PyTuple_New(1);
+ PyTuple_SetItem(data->newargs, 0, obj);
+ } else {
+ data->newargs = obj;
+ }
+ Py_INCREF(data->newargs);
+ }
+ /* the destroy method, aka as the C++ delete method */
+ data->destroy = PyObject_GetAttrString(data->klass, (char *)"__swig_destroy__");
+ if (PyErr_Occurred()) {
+ PyErr_Clear();
+ data->destroy = 0;
+ }
+ if (data->destroy) {
+ int flags;
+ Py_INCREF(data->destroy);
+ flags = PyCFunction_GET_FLAGS(data->destroy);
+#ifdef METH_O
+ data->delargs = !(flags & (METH_O));
+#else
+ data->delargs = 0;
+#endif
+ } else {
+ data->delargs = 0;
+ }
+ data->implicitconv = 0;
+ data->pytype = 0;
+ return data;
+ }
+}
+
+SWIGRUNTIME void
+SwigPyClientData_Del(SwigPyClientData *data) {
+ Py_XDECREF(data->newraw);
+ Py_XDECREF(data->newargs);
+ Py_XDECREF(data->destroy);
+}
+
+/* =============== SwigPyObject =====================*/
+
+typedef struct {
+ PyObject_HEAD
+ void *ptr;
+ swig_type_info *ty;
+ int own;
+ PyObject *next;
+#ifdef SWIGPYTHON_BUILTIN
+ PyObject *dict;
+#endif
+} SwigPyObject;
+
+SWIGRUNTIME PyObject *
+SwigPyObject_long(SwigPyObject *v)
+{
+ return PyLong_FromVoidPtr(v->ptr);
+}
+
+SWIGRUNTIME PyObject *
+SwigPyObject_format(const char* fmt, SwigPyObject *v)
+{
+ PyObject *res = NULL;
+ PyObject *args = PyTuple_New(1);
+ if (args) {
+ if (PyTuple_SetItem(args, 0, SwigPyObject_long(v)) == 0) {
+ PyObject *ofmt = SWIG_Python_str_FromChar(fmt);
+ if (ofmt) {
+#if PY_VERSION_HEX >= 0x03000000
+ res = PyUnicode_Format(ofmt,args);
+#else
+ res = PyString_Format(ofmt,args);
+#endif
+ Py_DECREF(ofmt);
+ }
+ Py_DECREF(args);
+ }
+ }
+ return res;
+}
+
+SWIGRUNTIME PyObject *
+SwigPyObject_oct(SwigPyObject *v)
+{
+ return SwigPyObject_format("%o",v);
+}
+
+SWIGRUNTIME PyObject *
+SwigPyObject_hex(SwigPyObject *v)
+{
+ return SwigPyObject_format("%x",v);
+}
+
+SWIGRUNTIME PyObject *
+#ifdef METH_NOARGS
+SwigPyObject_repr(SwigPyObject *v)
+#else
+SwigPyObject_repr(SwigPyObject *v, PyObject *args)
+#endif
+{
+ const char *name = SWIG_TypePrettyName(v->ty);
+ PyObject *repr = SWIG_Python_str_FromFormat("", name, (void *)v);
+ if (v->next) {
+# ifdef METH_NOARGS
+ PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next);
+# else
+ PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next, args);
+# endif
+# if PY_VERSION_HEX >= 0x03000000
+ PyObject *joined = PyUnicode_Concat(repr, nrep);
+ Py_DecRef(repr);
+ Py_DecRef(nrep);
+ repr = joined;
+# else
+ PyString_ConcatAndDel(&repr,nrep);
+# endif
+ }
+ return repr;
+}
+
+SWIGRUNTIME int
+SwigPyObject_print(SwigPyObject *v, FILE *fp, int SWIGUNUSEDPARM(flags))
+{
+ char *str;
+#ifdef METH_NOARGS
+ PyObject *repr = SwigPyObject_repr(v);
+#else
+ PyObject *repr = SwigPyObject_repr(v, NULL);
+#endif
+ if (repr) {
+ str = SWIG_Python_str_AsChar(repr);
+ fputs(str, fp);
+ SWIG_Python_str_DelForPy3(str);
+ Py_DECREF(repr);
+ return 0;
+ } else {
+ return 1;
+ }
+}
+
+SWIGRUNTIME PyObject *
+SwigPyObject_str(SwigPyObject *v)
+{
+ char result[SWIG_BUFFER_SIZE];
+ return SWIG_PackVoidPtr(result, v->ptr, v->ty->name, sizeof(result)) ?
+ SWIG_Python_str_FromChar(result) : 0;
+}
+
+SWIGRUNTIME int
+SwigPyObject_compare(SwigPyObject *v, SwigPyObject *w)
+{
+ void *i = v->ptr;
+ void *j = w->ptr;
+ return (i < j) ? -1 : ((i > j) ? 1 : 0);
+}
+
+/* Added for Python 3.x, would it also be useful for Python 2.x? */
+SWIGRUNTIME PyObject*
+SwigPyObject_richcompare(SwigPyObject *v, SwigPyObject *w, int op)
+{
+ PyObject* res;
+ if( op != Py_EQ && op != Py_NE ) {
+ Py_INCREF(Py_NotImplemented);
+ return Py_NotImplemented;
+ }
+ res = PyBool_FromLong( (SwigPyObject_compare(v, w)==0) == (op == Py_EQ) ? 1 : 0);
+ return res;
+}
+
+
+SWIGRUNTIME PyTypeObject* SwigPyObject_TypeOnce(void);
+
+#ifdef SWIGPYTHON_BUILTIN
+static swig_type_info *SwigPyObject_stype = 0;
+SWIGRUNTIME PyTypeObject*
+SwigPyObject_type(void) {
+ SwigPyClientData *cd;
+ assert(SwigPyObject_stype);
+ cd = (SwigPyClientData*) SwigPyObject_stype->clientdata;
+ assert(cd);
+ assert(cd->pytype);
+ return cd->pytype;
+}
+#else
+SWIGRUNTIME PyTypeObject*
+SwigPyObject_type(void) {
+ static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyObject_TypeOnce();
+ return type;
+}
+#endif
+
+SWIGRUNTIMEINLINE int
+SwigPyObject_Check(PyObject *op) {
+#ifdef SWIGPYTHON_BUILTIN
+ PyTypeObject *target_tp = SwigPyObject_type();
+ if (PyType_IsSubtype(op->ob_type, target_tp))
+ return 1;
+ return (strcmp(op->ob_type->tp_name, "SwigPyObject") == 0);
+#else
+ return (Py_TYPE(op) == SwigPyObject_type())
+ || (strcmp(Py_TYPE(op)->tp_name,"SwigPyObject") == 0);
+#endif
+}
+
+SWIGRUNTIME PyObject *
+SwigPyObject_New(void *ptr, swig_type_info *ty, int own);
+
+SWIGRUNTIME void
+SwigPyObject_dealloc(PyObject *v)
+{
+ SwigPyObject *sobj = (SwigPyObject *) v;
+ PyObject *next = sobj->next;
+ if (sobj->own == SWIG_POINTER_OWN) {
+ swig_type_info *ty = sobj->ty;
+ SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0;
+ PyObject *destroy = data ? data->destroy : 0;
+ if (destroy) {
+ /* destroy is always a VARARGS method */
+ PyObject *res;
+ if (data->delargs) {
+ /* we need to create a temporary object to carry the destroy operation */
+ PyObject *tmp = SwigPyObject_New(sobj->ptr, ty, 0);
+ res = SWIG_Python_CallFunctor(destroy, tmp);
+ Py_DECREF(tmp);
+ } else {
+ PyCFunction meth = PyCFunction_GET_FUNCTION(destroy);
+ PyObject *mself = PyCFunction_GET_SELF(destroy);
+ res = ((*meth)(mself, v));
+ }
+ Py_XDECREF(res);
+ }
+#if !defined(SWIG_PYTHON_SILENT_MEMLEAK)
+ else {
+ const char *name = SWIG_TypePrettyName(ty);
+ printf("swig/python detected a memory leak of type '%s', no destructor found.\n", (name ? name : "unknown"));
+ }
+#endif
+ }
+ Py_XDECREF(next);
+ PyObject_DEL(v);
+}
+
+SWIGRUNTIME PyObject*
+SwigPyObject_append(PyObject* v, PyObject* next)
+{
+ SwigPyObject *sobj = (SwigPyObject *) v;
+#ifndef METH_O
+ PyObject *tmp = 0;
+ if (!PyArg_ParseTuple(next,(char *)"O:append", &tmp)) return NULL;
+ next = tmp;
+#endif
+ if (!SwigPyObject_Check(next)) {
+ return NULL;
+ }
+ sobj->next = next;
+ Py_INCREF(next);
+ return SWIG_Py_Void();
+}
+
+SWIGRUNTIME PyObject*
+#ifdef METH_NOARGS
+SwigPyObject_next(PyObject* v)
+#else
+SwigPyObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
+#endif
+{
+ SwigPyObject *sobj = (SwigPyObject *) v;
+ if (sobj->next) {
+ Py_INCREF(sobj->next);
+ return sobj->next;
+ } else {
+ return SWIG_Py_Void();
+ }
+}
+
+SWIGINTERN PyObject*
+#ifdef METH_NOARGS
+SwigPyObject_disown(PyObject *v)
+#else
+SwigPyObject_disown(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
+#endif
+{
+ SwigPyObject *sobj = (SwigPyObject *)v;
+ sobj->own = 0;
+ return SWIG_Py_Void();
+}
+
+SWIGINTERN PyObject*
+#ifdef METH_NOARGS
+SwigPyObject_acquire(PyObject *v)
+#else
+SwigPyObject_acquire(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
+#endif
+{
+ SwigPyObject *sobj = (SwigPyObject *)v;
+ sobj->own = SWIG_POINTER_OWN;
+ return SWIG_Py_Void();
+}
+
+SWIGINTERN PyObject*
+SwigPyObject_own(PyObject *v, PyObject *args)
+{
+ PyObject *val = 0;
+#if (PY_VERSION_HEX < 0x02020000)
+ if (!PyArg_ParseTuple(args,(char *)"|O:own",&val))
+#else
+ if (!PyArg_UnpackTuple(args, (char *)"own", 0, 1, &val))
+#endif
+ {
+ return NULL;
+ }
+ else
+ {
+ SwigPyObject *sobj = (SwigPyObject *)v;
+ PyObject *obj = PyBool_FromLong(sobj->own);
+ if (val) {
+#ifdef METH_NOARGS
+ if (PyObject_IsTrue(val)) {
+ SwigPyObject_acquire(v);
+ } else {
+ SwigPyObject_disown(v);
+ }
+#else
+ if (PyObject_IsTrue(val)) {
+ SwigPyObject_acquire(v,args);
+ } else {
+ SwigPyObject_disown(v,args);
+ }
+#endif
+ }
+ return obj;
+ }
+}
+
+#ifdef METH_O
+static PyMethodDef
+swigobject_methods[] = {
+ {(char *)"disown", (PyCFunction)SwigPyObject_disown, METH_NOARGS, (char *)"releases ownership of the pointer"},
+ {(char *)"acquire", (PyCFunction)SwigPyObject_acquire, METH_NOARGS, (char *)"aquires ownership of the pointer"},
+ {(char *)"own", (PyCFunction)SwigPyObject_own, METH_VARARGS, (char *)"returns/sets ownership of the pointer"},
+ {(char *)"append", (PyCFunction)SwigPyObject_append, METH_O, (char *)"appends another 'this' object"},
+ {(char *)"next", (PyCFunction)SwigPyObject_next, METH_NOARGS, (char *)"returns the next 'this' object"},
+ {(char *)"__repr__",(PyCFunction)SwigPyObject_repr, METH_NOARGS, (char *)"returns object representation"},
+ {0, 0, 0, 0}
+};
+#else
+static PyMethodDef
+swigobject_methods[] = {
+ {(char *)"disown", (PyCFunction)SwigPyObject_disown, METH_VARARGS, (char *)"releases ownership of the pointer"},
+ {(char *)"acquire", (PyCFunction)SwigPyObject_acquire, METH_VARARGS, (char *)"aquires ownership of the pointer"},
+ {(char *)"own", (PyCFunction)SwigPyObject_own, METH_VARARGS, (char *)"returns/sets ownership of the pointer"},
+ {(char *)"append", (PyCFunction)SwigPyObject_append, METH_VARARGS, (char *)"appends another 'this' object"},
+ {(char *)"next", (PyCFunction)SwigPyObject_next, METH_VARARGS, (char *)"returns the next 'this' object"},
+ {(char *)"__repr__",(PyCFunction)SwigPyObject_repr, METH_VARARGS, (char *)"returns object representation"},
+ {0, 0, 0, 0}
+};
+#endif
+
+#if PY_VERSION_HEX < 0x02020000
+SWIGINTERN PyObject *
+SwigPyObject_getattr(SwigPyObject *sobj,char *name)
+{
+ return Py_FindMethod(swigobject_methods, (PyObject *)sobj, name);
+}
+#endif
+
+SWIGRUNTIME PyTypeObject*
+SwigPyObject_TypeOnce(void) {
+ static char swigobject_doc[] = "Swig object carries a C/C++ instance pointer";
+
+ static PyNumberMethods SwigPyObject_as_number = {
+ (binaryfunc)0, /*nb_add*/
+ (binaryfunc)0, /*nb_subtract*/
+ (binaryfunc)0, /*nb_multiply*/
+ /* nb_divide removed in Python 3 */
+#if PY_VERSION_HEX < 0x03000000
+ (binaryfunc)0, /*nb_divide*/
+#endif
+ (binaryfunc)0, /*nb_remainder*/
+ (binaryfunc)0, /*nb_divmod*/
+ (ternaryfunc)0,/*nb_power*/
+ (unaryfunc)0, /*nb_negative*/
+ (unaryfunc)0, /*nb_positive*/
+ (unaryfunc)0, /*nb_absolute*/
+ (inquiry)0, /*nb_nonzero*/
+ 0, /*nb_invert*/
+ 0, /*nb_lshift*/
+ 0, /*nb_rshift*/
+ 0, /*nb_and*/
+ 0, /*nb_xor*/
+ 0, /*nb_or*/
+#if PY_VERSION_HEX < 0x03000000
+ 0, /*nb_coerce*/
+#endif
+ (unaryfunc)SwigPyObject_long, /*nb_int*/
+#if PY_VERSION_HEX < 0x03000000
+ (unaryfunc)SwigPyObject_long, /*nb_long*/
+#else
+ 0, /*nb_reserved*/
+#endif
+ (unaryfunc)0, /*nb_float*/
+#if PY_VERSION_HEX < 0x03000000
+ (unaryfunc)SwigPyObject_oct, /*nb_oct*/
+ (unaryfunc)SwigPyObject_hex, /*nb_hex*/
+#endif
+#if PY_VERSION_HEX >= 0x03000000 /* 3.0 */
+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index, nb_inplace_divide removed */
+#elif PY_VERSION_HEX >= 0x02050000 /* 2.5.0 */
+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index */
+#elif PY_VERSION_HEX >= 0x02020000 /* 2.2.0 */
+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_true_divide */
+#elif PY_VERSION_HEX >= 0x02000000 /* 2.0.0 */
+ 0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_or */
+#endif
+ };
+
+ static PyTypeObject swigpyobject_type;
+ static int type_init = 0;
+ if (!type_init) {
+ const PyTypeObject tmp = {
+ /* PyObject header changed in Python 3 */
+#if PY_VERSION_HEX >= 0x03000000
+ PyVarObject_HEAD_INIT(NULL, 0)
+#else
+ PyObject_HEAD_INIT(NULL)
+ 0, /* ob_size */
+#endif
+ (char *)"SwigPyObject", /* tp_name */
+ sizeof(SwigPyObject), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ (destructor)SwigPyObject_dealloc, /* tp_dealloc */
+ (printfunc)SwigPyObject_print, /* tp_print */
+#if PY_VERSION_HEX < 0x02020000
+ (getattrfunc)SwigPyObject_getattr, /* tp_getattr */
+#else
+ (getattrfunc)0, /* tp_getattr */
+#endif
+ (setattrfunc)0, /* tp_setattr */
+#if PY_VERSION_HEX >= 0x03000000
+ 0, /* tp_reserved in 3.0.1, tp_compare in 3.0.0 but not used */
+#else
+ (cmpfunc)SwigPyObject_compare, /* tp_compare */
+#endif
+ (reprfunc)SwigPyObject_repr, /* tp_repr */
+ &SwigPyObject_as_number, /* tp_as_number */
+ 0, /* tp_as_sequence */
+ 0, /* tp_as_mapping */
+ (hashfunc)0, /* tp_hash */
+ (ternaryfunc)0, /* tp_call */
+ (reprfunc)SwigPyObject_str, /* tp_str */
+ PyObject_GenericGetAttr, /* tp_getattro */
+ 0, /* tp_setattro */
+ 0, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT, /* tp_flags */
+ swigobject_doc, /* tp_doc */
+ 0, /* tp_traverse */
+ 0, /* tp_clear */
+ (richcmpfunc)SwigPyObject_richcompare,/* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+#if PY_VERSION_HEX >= 0x02020000
+ 0, /* tp_iter */
+ 0, /* tp_iternext */
+ swigobject_methods, /* tp_methods */
+ 0, /* tp_members */
+ 0, /* tp_getset */
+ 0, /* tp_base */
+ 0, /* tp_dict */
+ 0, /* tp_descr_get */
+ 0, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ 0, /* tp_init */
+ 0, /* tp_alloc */
+ 0, /* tp_new */
+ 0, /* tp_free */
+ 0, /* tp_is_gc */
+ 0, /* tp_bases */
+ 0, /* tp_mro */
+ 0, /* tp_cache */
+ 0, /* tp_subclasses */
+ 0, /* tp_weaklist */
+#endif
+#if PY_VERSION_HEX >= 0x02030000
+ 0, /* tp_del */
+#endif
+#if PY_VERSION_HEX >= 0x02060000
+ 0, /* tp_version */
+#endif
+#ifdef COUNT_ALLOCS
+ 0,0,0,0 /* tp_alloc -> tp_next */
+#endif
+ };
+ swigpyobject_type = tmp;
+ type_init = 1;
+#if PY_VERSION_HEX < 0x02020000
+ swigpyobject_type.ob_type = &PyType_Type;
+#else
+ if (PyType_Ready(&swigpyobject_type) < 0)
+ return NULL;
+#endif
+ }
+ return &swigpyobject_type;
+}
+
+SWIGRUNTIME PyObject *
+SwigPyObject_New(void *ptr, swig_type_info *ty, int own)
+{
+ SwigPyObject *sobj = PyObject_NEW(SwigPyObject, SwigPyObject_type());
+ if (sobj) {
+ sobj->ptr = ptr;
+ sobj->ty = ty;
+ sobj->own = own;
+ sobj->next = 0;
+ }
+ return (PyObject *)sobj;
+}
+
+/* -----------------------------------------------------------------------------
+ * Implements a simple Swig Packed type, and use it instead of string
+ * ----------------------------------------------------------------------------- */
+
+typedef struct {
+ PyObject_HEAD
+ void *pack;
+ swig_type_info *ty;
+ size_t size;
+} SwigPyPacked;
+
+SWIGRUNTIME int
+SwigPyPacked_print(SwigPyPacked *v, FILE *fp, int SWIGUNUSEDPARM(flags))
+{
+ char result[SWIG_BUFFER_SIZE];
+ fputs("pack, v->size, 0, sizeof(result))) {
+ fputs("at ", fp);
+ fputs(result, fp);
+ }
+ fputs(v->ty->name,fp);
+ fputs(">", fp);
+ return 0;
+}
+
+SWIGRUNTIME PyObject *
+SwigPyPacked_repr(SwigPyPacked *v)
+{
+ char result[SWIG_BUFFER_SIZE];
+ if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))) {
+ return SWIG_Python_str_FromFormat("", result, v->ty->name);
+ } else {
+ return SWIG_Python_str_FromFormat("", v->ty->name);
+ }
+}
+
+SWIGRUNTIME PyObject *
+SwigPyPacked_str(SwigPyPacked *v)
+{
+ char result[SWIG_BUFFER_SIZE];
+ if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))){
+ return SWIG_Python_str_FromFormat("%s%s", result, v->ty->name);
+ } else {
+ return SWIG_Python_str_FromChar(v->ty->name);
+ }
+}
+
+SWIGRUNTIME int
+SwigPyPacked_compare(SwigPyPacked *v, SwigPyPacked *w)
+{
+ size_t i = v->size;
+ size_t j = w->size;
+ int s = (i < j) ? -1 : ((i > j) ? 1 : 0);
+ return s ? s : strncmp((char *)v->pack, (char *)w->pack, 2*v->size);
+}
+
+SWIGRUNTIME PyTypeObject* SwigPyPacked_TypeOnce(void);
+
+SWIGRUNTIME PyTypeObject*
+SwigPyPacked_type(void) {
+ static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyPacked_TypeOnce();
+ return type;
+}
+
+SWIGRUNTIMEINLINE int
+SwigPyPacked_Check(PyObject *op) {
+ return ((op)->ob_type == SwigPyPacked_TypeOnce())
+ || (strcmp((op)->ob_type->tp_name,"SwigPyPacked") == 0);
+}
+
+SWIGRUNTIME void
+SwigPyPacked_dealloc(PyObject *v)
+{
+ if (SwigPyPacked_Check(v)) {
+ SwigPyPacked *sobj = (SwigPyPacked *) v;
+ free(sobj->pack);
+ }
+ PyObject_DEL(v);
+}
+
+SWIGRUNTIME PyTypeObject*
+SwigPyPacked_TypeOnce(void) {
+ static char swigpacked_doc[] = "Swig object carries a C/C++ instance pointer";
+ static PyTypeObject swigpypacked_type;
+ static int type_init = 0;
+ if (!type_init) {
+ const PyTypeObject tmp = {
+ /* PyObject header changed in Python 3 */
+#if PY_VERSION_HEX>=0x03000000
+ PyVarObject_HEAD_INIT(NULL, 0)
+#else
+ PyObject_HEAD_INIT(NULL)
+ 0, /* ob_size */
+#endif
+ (char *)"SwigPyPacked", /* tp_name */
+ sizeof(SwigPyPacked), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ (destructor)SwigPyPacked_dealloc, /* tp_dealloc */
+ (printfunc)SwigPyPacked_print, /* tp_print */
+ (getattrfunc)0, /* tp_getattr */
+ (setattrfunc)0, /* tp_setattr */
+#if PY_VERSION_HEX>=0x03000000
+ 0, /* tp_reserved in 3.0.1 */
+#else
+ (cmpfunc)SwigPyPacked_compare, /* tp_compare */
+#endif
+ (reprfunc)SwigPyPacked_repr, /* tp_repr */
+ 0, /* tp_as_number */
+ 0, /* tp_as_sequence */
+ 0, /* tp_as_mapping */
+ (hashfunc)0, /* tp_hash */
+ (ternaryfunc)0, /* tp_call */
+ (reprfunc)SwigPyPacked_str, /* tp_str */
+ PyObject_GenericGetAttr, /* tp_getattro */
+ 0, /* tp_setattro */
+ 0, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT, /* tp_flags */
+ swigpacked_doc, /* tp_doc */
+ 0, /* tp_traverse */
+ 0, /* tp_clear */
+ 0, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+#if PY_VERSION_HEX >= 0x02020000
+ 0, /* tp_iter */
+ 0, /* tp_iternext */
+ 0, /* tp_methods */
+ 0, /* tp_members */
+ 0, /* tp_getset */
+ 0, /* tp_base */
+ 0, /* tp_dict */
+ 0, /* tp_descr_get */
+ 0, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ 0, /* tp_init */
+ 0, /* tp_alloc */
+ 0, /* tp_new */
+ 0, /* tp_free */
+ 0, /* tp_is_gc */
+ 0, /* tp_bases */
+ 0, /* tp_mro */
+ 0, /* tp_cache */
+ 0, /* tp_subclasses */
+ 0, /* tp_weaklist */
+#endif
+#if PY_VERSION_HEX >= 0x02030000
+ 0, /* tp_del */
+#endif
+#if PY_VERSION_HEX >= 0x02060000
+ 0, /* tp_version */
+#endif
+#ifdef COUNT_ALLOCS
+ 0,0,0,0 /* tp_alloc -> tp_next */
+#endif
+ };
+ swigpypacked_type = tmp;
+ type_init = 1;
+#if PY_VERSION_HEX < 0x02020000
+ swigpypacked_type.ob_type = &PyType_Type;
+#else
+ if (PyType_Ready(&swigpypacked_type) < 0)
+ return NULL;
+#endif
+ }
+ return &swigpypacked_type;
+}
+
+SWIGRUNTIME PyObject *
+SwigPyPacked_New(void *ptr, size_t size, swig_type_info *ty)
+{
+ SwigPyPacked *sobj = PyObject_NEW(SwigPyPacked, SwigPyPacked_type());
+ if (sobj) {
+ void *pack = malloc(size);
+ if (pack) {
+ memcpy(pack, ptr, size);
+ sobj->pack = pack;
+ sobj->ty = ty;
+ sobj->size = size;
+ } else {
+ PyObject_DEL((PyObject *) sobj);
+ sobj = 0;
+ }
+ }
+ return (PyObject *) sobj;
+}
+
+SWIGRUNTIME swig_type_info *
+SwigPyPacked_UnpackData(PyObject *obj, void *ptr, size_t size)
+{
+ if (SwigPyPacked_Check(obj)) {
+ SwigPyPacked *sobj = (SwigPyPacked *)obj;
+ if (sobj->size != size) return 0;
+ memcpy(ptr, sobj->pack, size);
+ return sobj->ty;
+ } else {
+ return 0;
+ }
+}
+
+/* -----------------------------------------------------------------------------
+ * pointers/data manipulation
+ * ----------------------------------------------------------------------------- */
+
+SWIGRUNTIMEINLINE PyObject *
+_SWIG_This(void)
+{
+ return SWIG_Python_str_FromChar("this");
+}
+
+static PyObject *swig_this = NULL;
+
+SWIGRUNTIME PyObject *
+SWIG_This(void)
+{
+ if (swig_this == NULL)
+ swig_this = _SWIG_This();
+ return swig_this;
+}
+
+/* #define SWIG_PYTHON_SLOW_GETSET_THIS */
+
+/* TODO: I don't know how to implement the fast getset in Python 3 right now */
+#if PY_VERSION_HEX>=0x03000000
+#define SWIG_PYTHON_SLOW_GETSET_THIS
+#endif
+
+SWIGRUNTIME SwigPyObject *
+SWIG_Python_GetSwigThis(PyObject *pyobj)
+{
+ PyObject *obj;
+
+ if (SwigPyObject_Check(pyobj))
+ return (SwigPyObject *) pyobj;
+
+#ifdef SWIGPYTHON_BUILTIN
+ (void)obj;
+# ifdef PyWeakref_CheckProxy
+ if (PyWeakref_CheckProxy(pyobj)) {
+ pyobj = PyWeakref_GET_OBJECT(pyobj);
+ if (pyobj && SwigPyObject_Check(pyobj))
+ return (SwigPyObject*) pyobj;
+ }
+# endif
+ return NULL;
+#else
+
+ obj = 0;
+
+#if (!defined(SWIG_PYTHON_SLOW_GETSET_THIS) && (PY_VERSION_HEX >= 0x02030000))
+ if (PyInstance_Check(pyobj)) {
+ obj = _PyInstance_Lookup(pyobj, SWIG_This());
+ } else {
+ PyObject **dictptr = _PyObject_GetDictPtr(pyobj);
+ if (dictptr != NULL) {
+ PyObject *dict = *dictptr;
+ obj = dict ? PyDict_GetItem(dict, SWIG_This()) : 0;
+ } else {
+#ifdef PyWeakref_CheckProxy
+ if (PyWeakref_CheckProxy(pyobj)) {
+ PyObject *wobj = PyWeakref_GET_OBJECT(pyobj);
+ return wobj ? SWIG_Python_GetSwigThis(wobj) : 0;
+ }
+#endif
+ obj = PyObject_GetAttr(pyobj,SWIG_This());
+ if (obj) {
+ Py_DECREF(obj);
+ } else {
+ if (PyErr_Occurred()) PyErr_Clear();
+ return 0;
+ }
+ }
+ }
+#else
+ obj = PyObject_GetAttr(pyobj,SWIG_This());
+ if (obj) {
+ Py_DECREF(obj);
+ } else {
+ if (PyErr_Occurred()) PyErr_Clear();
+ return 0;
+ }
+#endif
+ if (obj && !SwigPyObject_Check(obj)) {
+ /* a PyObject is called 'this', try to get the 'real this'
+ SwigPyObject from it */
+ return SWIG_Python_GetSwigThis(obj);
+ }
+ return (SwigPyObject *)obj;
+#endif
+}
+
+/* Acquire a pointer value */
+
+SWIGRUNTIME int
+SWIG_Python_AcquirePtr(PyObject *obj, int own) {
+ if (own == SWIG_POINTER_OWN) {
+ SwigPyObject *sobj = SWIG_Python_GetSwigThis(obj);
+ if (sobj) {
+ int oldown = sobj->own;
+ sobj->own = own;
+ return oldown;
+ }
+ }
+ return 0;
+}
+
+/* Convert a pointer value */
+
+SWIGRUNTIME int
+SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int flags, int *own) {
+ int res;
+ SwigPyObject *sobj;
+
+ if (!obj)
+ return SWIG_ERROR;
+ if (obj == Py_None) {
+ if (ptr)
+ *ptr = 0;
+ return SWIG_OK;
+ }
+
+ res = SWIG_ERROR;
+
+ sobj = SWIG_Python_GetSwigThis(obj);
+ if (own)
+ *own = 0;
+ while (sobj) {
+ void *vptr = sobj->ptr;
+ if (ty) {
+ swig_type_info *to = sobj->ty;
+ if (to == ty) {
+ /* no type cast needed */
+ if (ptr) *ptr = vptr;
+ break;
+ } else {
+ swig_cast_info *tc = SWIG_TypeCheck(to->name,ty);
+ if (!tc) {
+ sobj = (SwigPyObject *)sobj->next;
+ } else {
+ if (ptr) {
+ int newmemory = 0;
+ *ptr = SWIG_TypeCast(tc,vptr,&newmemory);
+ if (newmemory == SWIG_CAST_NEW_MEMORY) {
+ assert(own); /* badly formed typemap which will lead to a memory leak - it must set and use own to delete *ptr */
+ if (own)
+ *own = *own | SWIG_CAST_NEW_MEMORY;
+ }
+ }
+ break;
+ }
+ }
+ } else {
+ if (ptr) *ptr = vptr;
+ break;
+ }
+ }
+ if (sobj) {
+ if (own)
+ *own = *own | sobj->own;
+ if (flags & SWIG_POINTER_DISOWN) {
+ sobj->own = 0;
+ }
+ res = SWIG_OK;
+ } else {
+ if (flags & SWIG_POINTER_IMPLICIT_CONV) {
+ SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0;
+ if (data && !data->implicitconv) {
+ PyObject *klass = data->klass;
+ if (klass) {
+ PyObject *impconv;
+ data->implicitconv = 1; /* avoid recursion and call 'explicit' constructors*/
+ impconv = SWIG_Python_CallFunctor(klass, obj);
+ data->implicitconv = 0;
+ if (PyErr_Occurred()) {
+ PyErr_Clear();
+ impconv = 0;
+ }
+ if (impconv) {
+ SwigPyObject *iobj = SWIG_Python_GetSwigThis(impconv);
+ if (iobj) {
+ void *vptr;
+ res = SWIG_Python_ConvertPtrAndOwn((PyObject*)iobj, &vptr, ty, 0, 0);
+ if (SWIG_IsOK(res)) {
+ if (ptr) {
+ *ptr = vptr;
+ /* transfer the ownership to 'ptr' */
+ iobj->own = 0;
+ res = SWIG_AddCast(res);
+ res = SWIG_AddNewMask(res);
+ } else {
+ res = SWIG_AddCast(res);
+ }
+ }
+ }
+ Py_DECREF(impconv);
+ }
+ }
+ }
+ }
+ }
+ return res;
+}
+
+/* Convert a function ptr value */
+
+SWIGRUNTIME int
+SWIG_Python_ConvertFunctionPtr(PyObject *obj, void **ptr, swig_type_info *ty) {
+ if (!PyCFunction_Check(obj)) {
+ return SWIG_ConvertPtr(obj, ptr, ty, 0);
+ } else {
+ void *vptr = 0;
+
+ /* here we get the method pointer for callbacks */
+ const char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc);
+ const char *desc = doc ? strstr(doc, "swig_ptr: ") : 0;
+ if (desc)
+ desc = ty ? SWIG_UnpackVoidPtr(desc + 10, &vptr, ty->name) : 0;
+ if (!desc)
+ return SWIG_ERROR;
+ if (ty) {
+ swig_cast_info *tc = SWIG_TypeCheck(desc,ty);
+ if (tc) {
+ int newmemory = 0;
+ *ptr = SWIG_TypeCast(tc,vptr,&newmemory);
+ assert(!newmemory); /* newmemory handling not yet implemented */
+ } else {
+ return SWIG_ERROR;
+ }
+ } else {
+ *ptr = vptr;
+ }
+ return SWIG_OK;
+ }
+}
+
+/* Convert a packed value value */
+
+SWIGRUNTIME int
+SWIG_Python_ConvertPacked(PyObject *obj, void *ptr, size_t sz, swig_type_info *ty) {
+ swig_type_info *to = SwigPyPacked_UnpackData(obj, ptr, sz);
+ if (!to) return SWIG_ERROR;
+ if (ty) {
+ if (to != ty) {
+ /* check type cast? */
+ swig_cast_info *tc = SWIG_TypeCheck(to->name,ty);
+ if (!tc) return SWIG_ERROR;
+ }
+ }
+ return SWIG_OK;
+}
+
+/* -----------------------------------------------------------------------------
+ * Create a new pointer object
+ * ----------------------------------------------------------------------------- */
+
+/*
+ Create a new instance object, without calling __init__, and set the
+ 'this' attribute.
+*/
+
+SWIGRUNTIME PyObject*
+SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this)
+{
+#if (PY_VERSION_HEX >= 0x02020000)
+ PyObject *inst = 0;
+ PyObject *newraw = data->newraw;
+ if (newraw) {
+ inst = PyObject_Call(newraw, data->newargs, NULL);
+ if (inst) {
+#if !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
+ PyObject **dictptr = _PyObject_GetDictPtr(inst);
+ if (dictptr != NULL) {
+ PyObject *dict = *dictptr;
+ if (dict == NULL) {
+ dict = PyDict_New();
+ *dictptr = dict;
+ PyDict_SetItem(dict, SWIG_This(), swig_this);
+ }
+ }
+#else
+ PyObject *key = SWIG_This();
+ PyObject_SetAttr(inst, key, swig_this);
+#endif
+ }
+ } else {
+#if PY_VERSION_HEX >= 0x03000000
+ inst = PyBaseObject_Type.tp_new((PyTypeObject*) data->newargs, Py_None, Py_None);
+ PyObject_SetAttr(inst, SWIG_This(), swig_this);
+ Py_TYPE(inst)->tp_flags &= ~Py_TPFLAGS_VALID_VERSION_TAG;
+#else
+ PyObject *dict = PyDict_New();
+ PyDict_SetItem(dict, SWIG_This(), swig_this);
+ inst = PyInstance_NewRaw(data->newargs, dict);
+ Py_DECREF(dict);
+#endif
+ }
+ return inst;
+#else
+#if (PY_VERSION_HEX >= 0x02010000)
+ PyObject *inst;
+ PyObject *dict = PyDict_New();
+ PyDict_SetItem(dict, SWIG_This(), swig_this);
+ inst = PyInstance_NewRaw(data->newargs, dict);
+ Py_DECREF(dict);
+ return (PyObject *) inst;
+#else
+ PyInstanceObject *inst = PyObject_NEW(PyInstanceObject, &PyInstance_Type);
+ if (inst == NULL) {
+ return NULL;
+ }
+ inst->in_class = (PyClassObject *)data->newargs;
+ Py_INCREF(inst->in_class);
+ inst->in_dict = PyDict_New();
+ if (inst->in_dict == NULL) {
+ Py_DECREF(inst);
+ return NULL;
+ }
+#ifdef Py_TPFLAGS_HAVE_WEAKREFS
+ inst->in_weakreflist = NULL;
+#endif
+#ifdef Py_TPFLAGS_GC
+ PyObject_GC_Init(inst);
+#endif
+ PyDict_SetItem(inst->in_dict, SWIG_This(), swig_this);
+ return (PyObject *) inst;
+#endif
+#endif
+}
+
+SWIGRUNTIME void
+SWIG_Python_SetSwigThis(PyObject *inst, PyObject *swig_this)
+{
+ PyObject *dict;
+#if (PY_VERSION_HEX >= 0x02020000) && !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
+ PyObject **dictptr = _PyObject_GetDictPtr(inst);
+ if (dictptr != NULL) {
+ dict = *dictptr;
+ if (dict == NULL) {
+ dict = PyDict_New();
+ *dictptr = dict;
+ }
+ PyDict_SetItem(dict, SWIG_This(), swig_this);
+ return;
+ }
+#endif
+ dict = PyObject_GetAttrString(inst, (char*)"__dict__");
+ PyDict_SetItem(dict, SWIG_This(), swig_this);
+ Py_DECREF(dict);
+}
+
+
+SWIGINTERN PyObject *
+SWIG_Python_InitShadowInstance(PyObject *args) {
+ PyObject *obj[2];
+ if (!SWIG_Python_UnpackTuple(args,(char*)"swiginit", 2, 2, obj)) {
+ return NULL;
+ } else {
+ SwigPyObject *sthis = SWIG_Python_GetSwigThis(obj[0]);
+ if (sthis) {
+ SwigPyObject_append((PyObject*) sthis, obj[1]);
+ } else {
+ SWIG_Python_SetSwigThis(obj[0], obj[1]);
+ }
+ return SWIG_Py_Void();
+ }
+}
+
+/* Create a new pointer object */
+
+SWIGRUNTIME PyObject *
+SWIG_Python_NewPointerObj(PyObject *self, void *ptr, swig_type_info *type, int flags) {
+ SwigPyClientData *clientdata;
+ PyObject * robj;
+ int own;
+
+ if (!ptr)
+ return SWIG_Py_Void();
+
+ clientdata = type ? (SwigPyClientData *)(type->clientdata) : 0;
+ own = (flags & SWIG_POINTER_OWN) ? SWIG_POINTER_OWN : 0;
+ if (clientdata && clientdata->pytype) {
+ SwigPyObject *newobj;
+ if (flags & SWIG_BUILTIN_TP_INIT) {
+ newobj = (SwigPyObject*) self;
+ if (newobj->ptr) {
+ PyObject *next_self = clientdata->pytype->tp_alloc(clientdata->pytype, 0);
+ while (newobj->next)
+ newobj = (SwigPyObject *) newobj->next;
+ newobj->next = next_self;
+ newobj = (SwigPyObject *)next_self;
+ }
+ } else {
+ newobj = PyObject_New(SwigPyObject, clientdata->pytype);
+ }
+ if (newobj) {
+ newobj->ptr = ptr;
+ newobj->ty = type;
+ newobj->own = own;
+ newobj->next = 0;
+#ifdef SWIGPYTHON_BUILTIN
+ newobj->dict = 0;
+#endif
+ return (PyObject*) newobj;
+ }
+ return SWIG_Py_Void();
+ }
+
+ assert(!(flags & SWIG_BUILTIN_TP_INIT));
+
+ robj = SwigPyObject_New(ptr, type, own);
+ if (clientdata && !(flags & SWIG_POINTER_NOSHADOW)) {
+ PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj);
+ if (inst) {
+ Py_DECREF(robj);
+ robj = inst;
+ }
+ }
+ return robj;
+}
+
+/* Create a new packed object */
+
+SWIGRUNTIMEINLINE PyObject *
+SWIG_Python_NewPackedObj(void *ptr, size_t sz, swig_type_info *type) {
+ return ptr ? SwigPyPacked_New((void *) ptr, sz, type) : SWIG_Py_Void();
+}
+
+/* -----------------------------------------------------------------------------*
+ * Get type list
+ * -----------------------------------------------------------------------------*/
+
+#ifdef SWIG_LINK_RUNTIME
+void *SWIG_ReturnGlobalTypeList(void *);
+#endif
+
+SWIGRUNTIME swig_module_info *
+SWIG_Python_GetModule(void) {
+ static void *type_pointer = (void *)0;
+ /* first check if module already created */
+ if (!type_pointer) {
+#ifdef SWIG_LINK_RUNTIME
+ type_pointer = SWIG_ReturnGlobalTypeList((void *)0);
+#else
+# ifdef SWIGPY_USE_CAPSULE
+ type_pointer = PyCapsule_Import(SWIGPY_CAPSULE_NAME, 0);
+# else
+ type_pointer = PyCObject_Import((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION,
+ (char*)"type_pointer" SWIG_TYPE_TABLE_NAME);
+# endif
+ if (PyErr_Occurred()) {
+ PyErr_Clear();
+ type_pointer = (void *)0;
+ }
+#endif
+ }
+ return (swig_module_info *) type_pointer;
+}
+
+#if PY_MAJOR_VERSION < 2
+/* PyModule_AddObject function was introduced in Python 2.0. The following function
+ is copied out of Python/modsupport.c in python version 2.3.4 */
+SWIGINTERN int
+PyModule_AddObject(PyObject *m, char *name, PyObject *o)
+{
+ PyObject *dict;
+ if (!PyModule_Check(m)) {
+ PyErr_SetString(PyExc_TypeError,
+ "PyModule_AddObject() needs module as first arg");
+ return SWIG_ERROR;
+ }
+ if (!o) {
+ PyErr_SetString(PyExc_TypeError,
+ "PyModule_AddObject() needs non-NULL value");
+ return SWIG_ERROR;
+ }
+
+ dict = PyModule_GetDict(m);
+ if (dict == NULL) {
+ /* Internal error -- modules must have a dict! */
+ PyErr_Format(PyExc_SystemError, "module '%s' has no __dict__",
+ PyModule_GetName(m));
+ return SWIG_ERROR;
+ }
+ if (PyDict_SetItemString(dict, name, o))
+ return SWIG_ERROR;
+ Py_DECREF(o);
+ return SWIG_OK;
+}
+#endif
+
+SWIGRUNTIME void
+#ifdef SWIGPY_USE_CAPSULE
+SWIG_Python_DestroyModule(PyObject *obj)
+#else
+SWIG_Python_DestroyModule(void *vptr)
+#endif
+{
+#ifdef SWIGPY_USE_CAPSULE
+ swig_module_info *swig_module = (swig_module_info *) PyCapsule_GetPointer(obj, SWIGPY_CAPSULE_NAME);
+#else
+ swig_module_info *swig_module = (swig_module_info *) vptr;
+#endif
+ swig_type_info **types = swig_module->types;
+ size_t i;
+ for (i =0; i < swig_module->size; ++i) {
+ swig_type_info *ty = types[i];
+ if (ty->owndata) {
+ SwigPyClientData *data = (SwigPyClientData *) ty->clientdata;
+ if (data) SwigPyClientData_Del(data);
+ }
+ }
+ Py_DECREF(SWIG_This());
+ swig_this = NULL;
+}
+
+SWIGRUNTIME void
+SWIG_Python_SetModule(swig_module_info *swig_module) {
+#if PY_VERSION_HEX >= 0x03000000
+ /* Add a dummy module object into sys.modules */
+ PyObject *module = PyImport_AddModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION);
+#else
+ static PyMethodDef swig_empty_runtime_method_table[] = { {NULL, NULL, 0, NULL} }; /* Sentinel */
+ PyObject *module = Py_InitModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION, swig_empty_runtime_method_table);
+#endif
+#ifdef SWIGPY_USE_CAPSULE
+ PyObject *pointer = PyCapsule_New((void *) swig_module, SWIGPY_CAPSULE_NAME, SWIG_Python_DestroyModule);
+ if (pointer && module) {
+ PyModule_AddObject(module, (char*)"type_pointer_capsule" SWIG_TYPE_TABLE_NAME, pointer);
+ } else {
+ Py_XDECREF(pointer);
+ }
+#else
+ PyObject *pointer = PyCObject_FromVoidPtr((void *) swig_module, SWIG_Python_DestroyModule);
+ if (pointer && module) {
+ PyModule_AddObject(module, (char*)"type_pointer" SWIG_TYPE_TABLE_NAME, pointer);
+ } else {
+ Py_XDECREF(pointer);
+ }
+#endif
+}
+
+/* The python cached type query */
+SWIGRUNTIME PyObject *
+SWIG_Python_TypeCache(void) {
+ static PyObject *SWIG_STATIC_POINTER(cache) = PyDict_New();
+ return cache;
+}
+
+SWIGRUNTIME swig_type_info *
+SWIG_Python_TypeQuery(const char *type)
+{
+ PyObject *cache = SWIG_Python_TypeCache();
+ PyObject *key = SWIG_Python_str_FromChar(type);
+ PyObject *obj = PyDict_GetItem(cache, key);
+ swig_type_info *descriptor;
+ if (obj) {
+#ifdef SWIGPY_USE_CAPSULE
+ descriptor = (swig_type_info *) PyCapsule_GetPointer(obj, NULL);
+#else
+ descriptor = (swig_type_info *) PyCObject_AsVoidPtr(obj);
+#endif
+ } else {
+ swig_module_info *swig_module = SWIG_Python_GetModule();
+ descriptor = SWIG_TypeQueryModule(swig_module, swig_module, type);
+ if (descriptor) {
+#ifdef SWIGPY_USE_CAPSULE
+ obj = PyCapsule_New((void*) descriptor, NULL, NULL);
+#else
+ obj = PyCObject_FromVoidPtr(descriptor, NULL);
+#endif
+ PyDict_SetItem(cache, key, obj);
+ Py_DECREF(obj);
+ }
+ }
+ Py_DECREF(key);
+ return descriptor;
+}
+
+/*
+ For backward compatibility only
+*/
+#define SWIG_POINTER_EXCEPTION 0
+#define SWIG_arg_fail(arg) SWIG_Python_ArgFail(arg)
+#define SWIG_MustGetPtr(p, type, argnum, flags) SWIG_Python_MustGetPtr(p, type, argnum, flags)
+
+SWIGRUNTIME int
+SWIG_Python_AddErrMesg(const char* mesg, int infront)
+{
+ if (PyErr_Occurred()) {
+ PyObject *type = 0;
+ PyObject *value = 0;
+ PyObject *traceback = 0;
+ PyErr_Fetch(&type, &value, &traceback);
+ if (value) {
+ char *tmp;
+ PyObject *old_str = PyObject_Str(value);
+ Py_XINCREF(type);
+ PyErr_Clear();
+ if (infront) {
+ PyErr_Format(type, "%s %s", mesg, tmp = SWIG_Python_str_AsChar(old_str));
+ } else {
+ PyErr_Format(type, "%s %s", tmp = SWIG_Python_str_AsChar(old_str), mesg);
+ }
+ SWIG_Python_str_DelForPy3(tmp);
+ Py_DECREF(old_str);
+ }
+ return 1;
+ } else {
+ return 0;
+ }
+}
+
+SWIGRUNTIME int
+SWIG_Python_ArgFail(int argnum)
+{
+ if (PyErr_Occurred()) {
+ /* add information about failing argument */
+ char mesg[256];
+ PyOS_snprintf(mesg, sizeof(mesg), "argument number %d:", argnum);
+ return SWIG_Python_AddErrMesg(mesg, 1);
+ } else {
+ return 0;
+ }
+}
+
+SWIGRUNTIMEINLINE const char *
+SwigPyObject_GetDesc(PyObject *self)
+{
+ SwigPyObject *v = (SwigPyObject *)self;
+ swig_type_info *ty = v ? v->ty : 0;
+ return ty ? ty->str : (char*)"";
+}
+
+SWIGRUNTIME void
+SWIG_Python_TypeError(const char *type, PyObject *obj)
+{
+ if (type) {
+#if defined(SWIG_COBJECT_TYPES)
+ if (obj && SwigPyObject_Check(obj)) {
+ const char *otype = (const char *) SwigPyObject_GetDesc(obj);
+ if (otype) {
+ PyErr_Format(PyExc_TypeError, "a '%s' is expected, 'SwigPyObject(%s)' is received",
+ type, otype);
+ return;
+ }
+ } else
+#endif
+ {
+ const char *otype = (obj ? obj->ob_type->tp_name : 0);
+ if (otype) {
+ PyObject *str = PyObject_Str(obj);
+ const char *cstr = str ? SWIG_Python_str_AsChar(str) : 0;
+ if (cstr) {
+ PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s(%s)' is received",
+ type, otype, cstr);
+ SWIG_Python_str_DelForPy3(cstr);
+ } else {
+ PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s' is received",
+ type, otype);
+ }
+ Py_XDECREF(str);
+ return;
+ }
+ }
+ PyErr_Format(PyExc_TypeError, "a '%s' is expected", type);
+ } else {
+ PyErr_Format(PyExc_TypeError, "unexpected type is received");
+ }
+}
+
+
+/* Convert a pointer value, signal an exception on a type mismatch */
+SWIGRUNTIME void *
+SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int SWIGUNUSEDPARM(argnum), int flags) {
+ void *result;
+ if (SWIG_Python_ConvertPtr(obj, &result, ty, flags) == -1) {
+ PyErr_Clear();
+#if SWIG_POINTER_EXCEPTION
+ if (flags) {
+ SWIG_Python_TypeError(SWIG_TypePrettyName(ty), obj);
+ SWIG_Python_ArgFail(argnum);
+ }
+#endif
+ }
+ return result;
+}
+
+SWIGRUNTIME int
+SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) {
+ PyTypeObject *tp = obj->ob_type;
+ PyObject *descr;
+ PyObject *encoded_name;
+ descrsetfunc f;
+ int res;
+
+#ifdef Py_USING_UNICODE
+ if (PyString_Check(name)) {
+ name = PyUnicode_Decode(PyString_AsString(name), PyString_Size(name), NULL, NULL);
+ if (!name)
+ return -1;
+ } else if (!PyUnicode_Check(name))
+#else
+ if (!PyString_Check(name))
+#endif
+ {
+ PyErr_Format(PyExc_TypeError, "attribute name must be string, not '%.200s'", name->ob_type->tp_name);
+ return -1;
+ } else {
+ Py_INCREF(name);
+ }
+
+ if (!tp->tp_dict) {
+ if (PyType_Ready(tp) < 0)
+ goto done;
+ }
+
+ res = -1;
+ descr = _PyType_Lookup(tp, name);
+ f = NULL;
+ if (descr != NULL)
+ f = descr->ob_type->tp_descr_set;
+ if (!f) {
+ if (PyString_Check(name)) {
+ encoded_name = name;
+ Py_INCREF(name);
+ } else {
+ encoded_name = PyUnicode_AsUTF8String(name);
+ }
+ PyErr_Format(PyExc_AttributeError, "'%.100s' object has no attribute '%.200s'", tp->tp_name, PyString_AsString(encoded_name));
+ Py_DECREF(encoded_name);
+ } else {
+ res = f(descr, obj, value);
+ }
+
+ done:
+ Py_DECREF(name);
+ return res;
+}
+
+
+#ifdef __cplusplus
+}
+#endif
+
+
+
+#define SWIG_exception_fail(code, msg) do { SWIG_Error(code, msg); SWIG_fail; } while(0)
+
+#define SWIG_contract_assert(expr, msg) if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } else
+
+
+
+ #define SWIG_exception(code, msg) do { SWIG_Error(code, msg); SWIG_fail;; } while(0)
+
+
+/* -------- TYPES TABLE (BEGIN) -------- */
+
+#define SWIGTYPE_p_ADD_BLOCK_RESULT_INDEX swig_types[0]
+#define SWIGTYPE_p_BDM_MODE swig_types[1]
+#define SWIGTYPE_p_BinaryData swig_types[2]
+#define SWIGTYPE_p_BinaryDataRef swig_types[3]
+#define SWIGTYPE_p_BinaryReader swig_types[4]
+#define SWIGTYPE_p_BinaryRefReader swig_types[5]
+#define SWIGTYPE_p_BinaryWriter swig_types[6]
+#define SWIGTYPE_p_BlockDataManager swig_types[7]
+#define SWIGTYPE_p_BlockDataManager_FullRAM swig_types[8]
+#define SWIGTYPE_p_BlockHeader swig_types[9]
+#define SWIGTYPE_p_BlockHeaderRef swig_types[10]
+#define SWIGTYPE_p_BtcAddress swig_types[11]
+#define SWIGTYPE_p_BtcUtils swig_types[12]
+#define SWIGTYPE_p_BtcWallet swig_types[13]
+#define SWIGTYPE_p_CryptoAES swig_types[14]
+#define SWIGTYPE_p_CryptoECDSA swig_types[15]
+#define SWIGTYPE_p_CryptoPP__ECDSAT_CryptoPP__ECP_CryptoPP__SHA256_t__PrivateKey swig_types[16]
+#define SWIGTYPE_p_CryptoPP__ECDSAT_CryptoPP__ECP_CryptoPP__SHA256_t__PublicKey swig_types[17]
+#define SWIGTYPE_p_KdfRomix swig_types[18]
+#define SWIGTYPE_p_LedgerEntry swig_types[19]
+#define SWIGTYPE_p_OutPoint swig_types[20]
+#define SWIGTYPE_p_OutPointRef swig_types[21]
+#define SWIGTYPE_p_SecureBinaryData swig_types[22]
+#define SWIGTYPE_p_Tx swig_types[23]
+#define SWIGTYPE_p_TxIOPair swig_types[24]
+#define SWIGTYPE_p_TxIn swig_types[25]
+#define SWIGTYPE_p_TxInRef swig_types[26]
+#define SWIGTYPE_p_TxOut swig_types[27]
+#define SWIGTYPE_p_TxOutRef swig_types[28]
+#define SWIGTYPE_p_TxRef swig_types[29]
+#define SWIGTYPE_p_UnspentTxOut swig_types[30]
+#define SWIGTYPE_p_ZeroConfData swig_types[31]
+#define SWIGTYPE_p_allocator_type swig_types[32]
+#define SWIGTYPE_p_char swig_types[33]
+#define SWIGTYPE_p_const_reference swig_types[34]
+#define SWIGTYPE_p_difference_type swig_types[35]
+#define SWIGTYPE_p_int swig_types[36]
+#define SWIGTYPE_p_listT_BinaryData_t__iterator swig_types[37]
+#define SWIGTYPE_p_long_long swig_types[38]
+#define SWIGTYPE_p_mapT_OutPoint_TxIOPair_t swig_types[39]
+#define SWIGTYPE_p_ostream swig_types[40]
+#define SWIGTYPE_p_p_PyObject swig_types[41]
+#define SWIGTYPE_p_pairT_bool_bool_t swig_types[42]
+#define SWIGTYPE_p_reference swig_types[43]
+#define SWIGTYPE_p_setT_HashString_t swig_types[44]
+#define SWIGTYPE_p_short swig_types[45]
+#define SWIGTYPE_p_size_type swig_types[46]
+#define SWIGTYPE_p_std__allocatorT_BinaryData_t swig_types[47]
+#define SWIGTYPE_p_std__allocatorT_BlockHeaderRef_p_t swig_types[48]
+#define SWIGTYPE_p_std__allocatorT_LedgerEntry_t swig_types[49]
+#define SWIGTYPE_p_std__allocatorT_TxRef_p_t swig_types[50]
+#define SWIGTYPE_p_std__allocatorT_UnspentTxOut_t swig_types[51]
+#define SWIGTYPE_p_std__allocatorT_float_t swig_types[52]
+#define SWIGTYPE_p_std__allocatorT_int_t swig_types[53]
+#define SWIGTYPE_p_std__invalid_argument swig_types[54]
+#define SWIGTYPE_p_std__string swig_types[55]
+#define SWIGTYPE_p_std__vectorT_BinaryData_std__allocatorT_BinaryData_t_t swig_types[56]
+#define SWIGTYPE_p_std__vectorT_BlockHeaderRef_p_std__allocatorT_BlockHeaderRef_p_t_t swig_types[57]
+#define SWIGTYPE_p_std__vectorT_BtcWallet_p_std__allocatorT_BtcWallet_p_t_t swig_types[58]
+#define SWIGTYPE_p_std__vectorT_LedgerEntry_std__allocatorT_LedgerEntry_t_t swig_types[59]
+#define SWIGTYPE_p_std__vectorT_TxIOPair_p_std__allocatorT_TxIOPair_p_t_t swig_types[60]
+#define SWIGTYPE_p_std__vectorT_TxIn_std__allocatorT_TxIn_t_t swig_types[61]
+#define SWIGTYPE_p_std__vectorT_TxOut_std__allocatorT_TxOut_t_t swig_types[62]
+#define SWIGTYPE_p_std__vectorT_TxRef_p_std__allocatorT_TxRef_p_t_t swig_types[63]
+#define SWIGTYPE_p_std__vectorT_UnspentTxOut_std__allocatorT_UnspentTxOut_t_t swig_types[64]
+#define SWIGTYPE_p_std__vectorT__Tp__Alloc_t swig_types[65]
+#define SWIGTYPE_p_std__vectorT__Tp_p__Alloc_t swig_types[66]
+#define SWIGTYPE_p_std__vectorT_bool_std__allocatorT_bool_t_t swig_types[67]
+#define SWIGTYPE_p_std__vectorT_float_std__allocatorT_float_t_t swig_types[68]
+#define SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t swig_types[69]
+#define SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t swig_types[70]
+#define SWIGTYPE_p_std__vectorT_unsigned_int_std__allocatorT_unsigned_int_t_t swig_types[71]
+#define SWIGTYPE_p_swig__SwigPyIterator swig_types[72]
+#define SWIGTYPE_p_unsigned_char swig_types[73]
+#define SWIGTYPE_p_unsigned_int swig_types[74]
+#define SWIGTYPE_p_unsigned_long_long swig_types[75]
+#define SWIGTYPE_p_unsigned_short swig_types[76]
+#define SWIGTYPE_p_value_type swig_types[77]
+static swig_type_info *swig_types[79];
+static swig_module_info swig_module = {swig_types, 78, 0, 0, 0, 0};
+#define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
+#define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
+
+/* -------- TYPES TABLE (END) -------- */
+
+#if (PY_VERSION_HEX <= 0x02000000)
+# if !defined(SWIG_PYTHON_CLASSIC)
+# error "This python version requires swig to be run with the '-classic' option"
+# endif
+#endif
+
+/*-----------------------------------------------
+ @(target):= _CppBlockUtils.so
+ ------------------------------------------------*/
+#if PY_VERSION_HEX >= 0x03000000
+# define SWIG_init PyInit__CppBlockUtils
+
+#else
+# define SWIG_init init_CppBlockUtils
+
+#endif
+#define SWIG_name "_CppBlockUtils"
+
+#define SWIGVERSION 0x020004
+#define SWIG_VERSION SWIGVERSION
+
+
+#define SWIG_as_voidptr(a) const_cast< void * >(static_cast< const void * >(a))
+#define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),reinterpret_cast< void** >(a))
+
+
+#include
+
+
+namespace swig {
+ class SwigPtr_PyObject {
+ protected:
+ PyObject *_obj;
+
+ public:
+ SwigPtr_PyObject() :_obj(0)
+ {
+ }
+
+ SwigPtr_PyObject(const SwigPtr_PyObject& item) : _obj(item._obj)
+ {
+ Py_XINCREF(_obj);
+ }
+
+ SwigPtr_PyObject(PyObject *obj, bool initial_ref = true) :_obj(obj)
+ {
+ if (initial_ref) {
+ Py_XINCREF(_obj);
+ }
+ }
+
+ SwigPtr_PyObject & operator=(const SwigPtr_PyObject& item)
+ {
+ Py_XINCREF(item._obj);
+ Py_XDECREF(_obj);
+ _obj = item._obj;
+ return *this;
+ }
+
+ ~SwigPtr_PyObject()
+ {
+ Py_XDECREF(_obj);
+ }
+
+ operator PyObject *() const
+ {
+ return _obj;
+ }
+
+ PyObject *operator->() const
+ {
+ return _obj;
+ }
+ };
+}
+
+
+namespace swig {
+ struct SwigVar_PyObject : SwigPtr_PyObject {
+ SwigVar_PyObject(PyObject* obj = 0) : SwigPtr_PyObject(obj, false) { }
+
+ SwigVar_PyObject & operator = (PyObject* obj)
+ {
+ Py_XDECREF(_obj);
+ _obj = obj;
+ return *this;
+ }
+ };
+}
+
+
+#define SWIG_PYTHON_EXTRA_NATIVE_CONTAINERS
+#include "BlockObj.h"
+#include "BlockObjRef.h"
+#include "BlockUtils.h"
+#include "BtcUtils.h"
+#include "EncryptionUtils.h"
+
+
+#include
+
+
+#include
+
+#if PY_VERSION_HEX >= 0x03020000
+# define SWIGPY_SLICE_ARG(obj) ((PyObject*) (obj))
+#else
+# define SWIGPY_SLICE_ARG(obj) ((PySliceObject*) (obj))
+#endif
+
+
+#include
+
+
+#if defined(__GNUC__)
+# if __GNUC__ == 2 && __GNUC_MINOR <= 96
+# define SWIG_STD_NOMODERN_STL
+# endif
+#endif
+
+
+#include
+#include
+#include
+
+
+namespace swig {
+ struct stop_iteration {
+ };
+
+ struct SwigPyIterator {
+ private:
+ SwigPtr_PyObject _seq;
+
+ protected:
+ SwigPyIterator(PyObject *seq) : _seq(seq)
+ {
+ }
+
+ public:
+ virtual ~SwigPyIterator() {}
+
+ // Access iterator method, required by Python
+ virtual PyObject *value() const = 0;
+
+ // Forward iterator method, required by Python
+ virtual SwigPyIterator *incr(size_t n = 1) = 0;
+
+ // Backward iterator method, very common in C++, but not required in Python
+ virtual SwigPyIterator *decr(size_t /*n*/ = 1)
+ {
+ throw stop_iteration();
+ }
+
+ // Random access iterator methods, but not required in Python
+ virtual ptrdiff_t distance(const SwigPyIterator &/*x*/) const
+ {
+ throw std::invalid_argument("operation not supported");
+ }
+
+ virtual bool equal (const SwigPyIterator &/*x*/) const
+ {
+ throw std::invalid_argument("operation not supported");
+ }
+
+ // C++ common/needed methods
+ virtual SwigPyIterator *copy() const = 0;
+
+ PyObject *next()
+ {
+ SWIG_PYTHON_THREAD_BEGIN_BLOCK; // disable threads
+ PyObject *obj = value();
+ incr();
+ SWIG_PYTHON_THREAD_END_BLOCK; // re-enable threads
+ return obj;
+ }
+
+ /* Make an alias for Python 3.x */
+ PyObject *__next__()
+ {
+ return next();
+ }
+
+ PyObject *previous()
+ {
+ SWIG_PYTHON_THREAD_BEGIN_BLOCK; // disable threads
+ decr();
+ PyObject *obj = value();
+ SWIG_PYTHON_THREAD_END_BLOCK; // re-enable threads
+ return obj;
+ }
+
+ SwigPyIterator *advance(ptrdiff_t n)
+ {
+ return (n > 0) ? incr(n) : decr(-n);
+ }
+
+ bool operator == (const SwigPyIterator& x) const
+ {
+ return equal(x);
+ }
+
+ bool operator != (const SwigPyIterator& x) const
+ {
+ return ! operator==(x);
+ }
+
+ SwigPyIterator& operator += (ptrdiff_t n)
+ {
+ return *advance(n);
+ }
+
+ SwigPyIterator& operator -= (ptrdiff_t n)
+ {
+ return *advance(-n);
+ }
+
+ SwigPyIterator* operator + (ptrdiff_t n) const
+ {
+ return copy()->advance(n);
+ }
+
+ SwigPyIterator* operator - (ptrdiff_t n) const
+ {
+ return copy()->advance(-n);
+ }
+
+ ptrdiff_t operator - (const SwigPyIterator& x) const
+ {
+ return x.distance(*this);
+ }
+
+ static swig_type_info* descriptor() {
+ static int init = 0;
+ static swig_type_info* desc = 0;
+ if (!init) {
+ desc = SWIG_TypeQuery("swig::SwigPyIterator *");
+ init = 1;
+ }
+ return desc;
+ }
+ };
+
+#if defined(SWIGPYTHON_BUILTIN)
+ inline PyObject* make_output_iterator_builtin (PyObject *pyself)
+ {
+ Py_INCREF(pyself);
+ return pyself;
+ }
+#endif
+}
+
+
+SWIGINTERN int
+SWIG_AsVal_double (PyObject *obj, double *val)
+{
+ int res = SWIG_TypeError;
+ if (PyFloat_Check(obj)) {
+ if (val) *val = PyFloat_AsDouble(obj);
+ return SWIG_OK;
+ } else if (PyInt_Check(obj)) {
+ if (val) *val = PyInt_AsLong(obj);
+ return SWIG_OK;
+ } else if (PyLong_Check(obj)) {
+ double v = PyLong_AsDouble(obj);
+ if (!PyErr_Occurred()) {
+ if (val) *val = v;
+ return SWIG_OK;
+ } else {
+ PyErr_Clear();
+ }
+ }
+#ifdef SWIG_PYTHON_CAST_MODE
+ {
+ int dispatch = 0;
+ double d = PyFloat_AsDouble(obj);
+ if (!PyErr_Occurred()) {
+ if (val) *val = d;
+ return SWIG_AddCast(SWIG_OK);
+ } else {
+ PyErr_Clear();
+ }
+ if (!dispatch) {
+ long v = PyLong_AsLong(obj);
+ if (!PyErr_Occurred()) {
+ if (val) *val = v;
+ return SWIG_AddCast(SWIG_AddCast(SWIG_OK));
+ } else {
+ PyErr_Clear();
+ }
+ }
+ }
+#endif
+ return res;
+}
+
+
+#include
+
+
+#include
+
+
+SWIGINTERNINLINE int
+SWIG_CanCastAsInteger(double *d, double min, double max) {
+ double x = *d;
+ if ((min <= x && x <= max)) {
+ double fx = floor(x);
+ double cx = ceil(x);
+ double rd = ((x - fx) < 0.5) ? fx : cx; /* simple rint */
+ if ((errno == EDOM) || (errno == ERANGE)) {
+ errno = 0;
+ } else {
+ double summ, reps, diff;
+ if (rd < x) {
+ diff = x - rd;
+ } else if (rd > x) {
+ diff = rd - x;
+ } else {
+ return 1;
+ }
+ summ = rd + x;
+ reps = diff/summ;
+ if (reps < 8*DBL_EPSILON) {
+ *d = rd;
+ return 1;
+ }
+ }
+ }
+ return 0;
+}
+
+
+SWIGINTERN int
+SWIG_AsVal_unsigned_SS_long (PyObject *obj, unsigned long *val)
+{
+ if (PyInt_Check(obj)) {
+ long v = PyInt_AsLong(obj);
+ if (v >= 0) {
+ if (val) *val = v;
+ return SWIG_OK;
+ } else {
+ return SWIG_OverflowError;
+ }
+ } else if (PyLong_Check(obj)) {
+ unsigned long v = PyLong_AsUnsignedLong(obj);
+ if (!PyErr_Occurred()) {
+ if (val) *val = v;
+ return SWIG_OK;
+ } else {
+ PyErr_Clear();
+ }
+ }
+#ifdef SWIG_PYTHON_CAST_MODE
+ {
+ int dispatch = 0;
+ unsigned long v = PyLong_AsUnsignedLong(obj);
+ if (!PyErr_Occurred()) {
+ if (val) *val = v;
+ return SWIG_AddCast(SWIG_OK);
+ } else {
+ PyErr_Clear();
+ }
+ if (!dispatch) {
+ double d;
+ int res = SWIG_AddCast(SWIG_AsVal_double (obj,&d));
+ if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, 0, ULONG_MAX)) {
+ if (val) *val = (unsigned long)(d);
+ return res;
+ }
+ }
+ }
+#endif
+ return SWIG_TypeError;
+}
+
+
+SWIGINTERNINLINE int
+SWIG_AsVal_size_t (PyObject * obj, size_t *val)
+{
+ unsigned long v;
+ int res = SWIG_AsVal_unsigned_SS_long (obj, val ? &v : 0);
+ if (SWIG_IsOK(res) && val) *val = static_cast< size_t >(v);
+ return res;
+}
+
+
+ #define SWIG_From_long PyInt_FromLong
+
+
+SWIGINTERNINLINE PyObject *
+SWIG_From_ptrdiff_t (ptrdiff_t value)
+{
+ return SWIG_From_long (static_cast< long >(value));
+}
+
+
+SWIGINTERNINLINE PyObject*
+ SWIG_From_bool (bool value)
+{
+ return PyBool_FromLong(value ? 1 : 0);
+}
+
+
+SWIGINTERN int
+SWIG_AsVal_long (PyObject *obj, long* val)
+{
+ if (PyInt_Check(obj)) {
+ if (val) *val = PyInt_AsLong(obj);
+ return SWIG_OK;
+ } else if (PyLong_Check(obj)) {
+ long v = PyLong_AsLong(obj);
+ if (!PyErr_Occurred()) {
+ if (val) *val = v;
+ return SWIG_OK;
+ } else {
+ PyErr_Clear();
+ }
+ }
+#ifdef SWIG_PYTHON_CAST_MODE
+ {
+ int dispatch = 0;
+ long v = PyInt_AsLong(obj);
+ if (!PyErr_Occurred()) {
+ if (val) *val = v;
+ return SWIG_AddCast(SWIG_OK);
+ } else {
+ PyErr_Clear();
+ }
+ if (!dispatch) {
+ double d;
+ int res = SWIG_AddCast(SWIG_AsVal_double (obj,&d));
+ if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, LONG_MIN, LONG_MAX)) {
+ if (val) *val = (long)(d);
+ return res;
+ }
+ }
+ }
+#endif
+ return SWIG_TypeError;
+}
+
+
+SWIGINTERNINLINE int
+SWIG_AsVal_ptrdiff_t (PyObject * obj, ptrdiff_t *val)
+{
+ long v;
+ int res = SWIG_AsVal_long (obj, val ? &v : 0);
+ if (SWIG_IsOK(res) && val) *val = static_cast< ptrdiff_t >(v);
+ return res;
+}
+
+
+#include
+
+
+#include
+
+
+#include
+
+
+namespace swig {
+ template
+ struct noconst_traits {
+ typedef Type noconst_type;
+ };
+
+ template
+ struct noconst_traits {
+ typedef Type noconst_type;
+ };
+
+ /*
+ type categories
+ */
+ struct pointer_category { };
+ struct value_category { };
+
+ /*
+ General traits that provides type_name and type_info
+ */
+ template struct traits { };
+
+ template
+ inline const char* type_name() {
+ return traits::noconst_type >::type_name();
+ }
+
+ template
+ struct traits_info {
+ static swig_type_info *type_query(std::string name) {
+ name += " *";
+ return SWIG_TypeQuery(name.c_str());
+ }
+ static swig_type_info *type_info() {
+ static swig_type_info *info = type_query(type_name());
+ return info;
+ }
+ };
+
+ template
+ inline swig_type_info *type_info() {
+ return traits_info::type_info();
+ }
+
+ /*
+ Partial specialization for pointers
+ */
+ template struct traits {
+ typedef pointer_category category;
+ static std::string make_ptr_name(const char* name) {
+ std::string ptrname = name;
+ ptrname += " *";
+ return ptrname;
+ }
+ static const char* type_name() {
+ static std::string name = make_ptr_name(swig::type_name());
+ return name.c_str();
+ }
+ };
+
+ template
+ struct traits_as { };
+
+ template
+ struct traits_check { };
+
+}
+
+
+namespace swig {
+ /*
+ Traits that provides the from method
+ */
+ template struct traits_from_ptr {
+ static PyObject *from(Type *val, int owner = 0) {
+ return SWIG_InternalNewPointerObj(val, type_info(), owner);
+ }
+ };
+
+ template struct traits_from {
+ static PyObject *from(const Type& val) {
+ return traits_from_ptr::from(new Type(val), 1);
+ }
+ };
+
+ template struct traits_from {
+ static PyObject *from(Type* val) {
+ return traits_from_ptr::from(val, 0);
+ }
+ };
+
+ template struct traits_from {
+ static PyObject *from(const Type* val) {
+ return traits_from_ptr::from(const_cast(val), 0);
+ }
+ };
+
+
+ template
+ inline PyObject *from(const Type& val) {
+ return traits_from::from(val);
+ }
+
+ template
+ inline PyObject *from_ptr(Type* val, int owner) {
+ return traits_from_ptr::from(val, owner);
+ }
+
+ /*
+ Traits that provides the asval/as/check method
+ */
+ template
+ struct traits_asptr {
+ static int asptr(PyObject *obj, Type **val) {
+ Type *p;
+ int res = SWIG_ConvertPtr(obj, (void**)&p, type_info(), 0);
+ if (SWIG_IsOK(res)) {
+ if (val) *val = p;
+ }
+ return res;
+ }
+ };
+
+ template
+ inline int asptr(PyObject *obj, Type **vptr) {
+ return traits_asptr::asptr(obj, vptr);
+ }
+
+ template
+ struct traits_asval {
+ static int asval(PyObject *obj, Type *val) {
+ if (val) {
+ Type *p = 0;
+ int res = traits_asptr::asptr(obj, &p);
+ if (!SWIG_IsOK(res)) return res;
+ if (p) {
+ typedef typename noconst_traits::noconst_type noconst_type;
+ *(const_cast(val)) = *p;
+ if (SWIG_IsNewObj(res)){
+ delete p;
+ res = SWIG_DelNewMask(res);
+ }
+ return res;
+ } else {
+ return SWIG_ERROR;
+ }
+ } else {
+ return traits_asptr::asptr(obj, (Type **)(0));
+ }
+ }
+ };
+
+ template struct traits_asval {
+ static int asval(PyObject *obj, Type **val) {
+ if (val) {
+ typedef typename noconst_traits::noconst_type noconst_type;
+ noconst_type *p = 0;
+ int res = traits_asptr::asptr(obj, &p);
+ if (SWIG_IsOK(res)) {
+ *(const_cast(val)) = p;
+ }
+ return res;
+ } else {
+ return traits_asptr::asptr(obj, (Type **)(0));
+ }
+ }
+ };
+
+ template
+ inline int asval(PyObject *obj, Type *val) {
+ return traits_asval::asval(obj, val);
+ }
+
+ template
+ struct traits_as {
+ static Type as(PyObject *obj, bool throw_error) {
+ Type v;
+ int res = asval(obj, &v);
+ if (!obj || !SWIG_IsOK(res)) {
+ if (!PyErr_Occurred()) {
+ ::SWIG_Error(SWIG_TypeError, swig::type_name());
+ }
+ if (throw_error) throw std::invalid_argument("bad type");
+ }
+ return v;
+ }
+ };
+
+ template
+ struct traits_as {
+ static Type as(PyObject *obj, bool throw_error) {
+ Type *v = 0;
+ int res = (obj ? traits_asptr::asptr(obj, &v) : SWIG_ERROR);
+ if (SWIG_IsOK(res) && v) {
+ if (SWIG_IsNewObj(res)) {
+ Type r(*v);
+ delete v;
+ return r;
+ } else {
+ return *v;
+ }
+ } else {
+ // Uninitialized return value, no Type() constructor required.
+ static Type *v_def = (Type*) malloc(sizeof(Type));
+ if (!PyErr_Occurred()) {
+ SWIG_Error(SWIG_TypeError, swig::type_name());
+ }
+ if (throw_error) throw std::invalid_argument("bad type");
+ memset(v_def,0,sizeof(Type));
+ return *v_def;
+ }
+ }
+ };
+
+ template
+ struct traits_as {
+ static Type* as(PyObject *obj, bool throw_error) {
+ Type *v = 0;
+ int res = (obj ? traits_asptr::asptr(obj, &v) : SWIG_ERROR);
+ if (SWIG_IsOK(res)) {
+ return v;
+ } else {
+ if (!PyErr_Occurred()) {
+ SWIG_Error(SWIG_TypeError, swig::type_name());
+ }
+ if (throw_error) throw std::invalid_argument("bad type");
+ return 0;
+ }
+ }
+ };
+
+ template
+ inline Type as(PyObject *obj, bool te = false) {
+ return traits_as::category>::as(obj, te);
+ }
+
+ template
+ struct traits_check {
+ static bool check(PyObject *obj) {
+ int res = obj ? asval(obj, (Type *)(0)) : SWIG_ERROR;
+ return SWIG_IsOK(res) ? true : false;
+ }
+ };
+
+ template
+ struct traits_check {
+ static bool check(PyObject *obj) {
+ int res = obj ? asptr(obj, (Type **)(0)) : SWIG_ERROR;
+ return SWIG_IsOK(res) ? true : false;
+ }
+ };
+
+ template
+ inline bool check(PyObject *obj) {
+ return traits_check::category>::check(obj);
+ }
+}
+
+
+#include
+
+namespace std {
+ template <>
+ struct less : public binary_function
+ {
+ bool
+ operator()(PyObject * v, PyObject *w) const
+ {
+ bool res;
+ SWIG_PYTHON_THREAD_BEGIN_BLOCK;
+ res = PyObject_RichCompareBool(v, w, Py_LT) ? true : false;
+ /* This may fall into a case of inconsistent
+ eg. ObjA > ObjX > ObjB
+ but ObjA < ObjB
+ */
+ if( PyErr_Occurred() && PyErr_ExceptionMatches(PyExc_TypeError) )
+ {
+ /* Objects can't be compared, this mostly occurred in Python 3.0 */
+ /* Compare their ptr directly for a workaround */
+ res = (v < w);
+ PyErr_Clear();
+ }
+ SWIG_PYTHON_THREAD_END_BLOCK;
+ return res;
+ }
+ };
+
+ template <>
+ struct less : public binary_function
+ {
+ bool
+ operator()(const swig::SwigPtr_PyObject& v, const swig::SwigPtr_PyObject& w) const
+ {
+ return std::less()(v, w);
+ }
+ };
+
+ template <>
+ struct less : public binary_function
+ {
+ bool
+ operator()(const swig::SwigVar_PyObject& v, const swig::SwigVar_PyObject& w) const
+ {
+ return std::less()(v, w);
+ }
+ };
+
+}
+
+namespace swig {
+ template <> struct traits {
+ typedef value_category category;
+ static const char* type_name() { return "PyObject *"; }
+ };
+
+ template <> struct traits_asval {
+ typedef PyObject * value_type;
+ static int asval(PyObject *obj, value_type *val) {
+ if (val) *val = obj;
+ return SWIG_OK;
+ }
+ };
+
+ template <>
+ struct traits_check {
+ static bool check(PyObject *) {
+ return true;
+ }
+ };
+
+ template <> struct traits_from {
+ typedef PyObject * value_type;
+ static PyObject *from(const value_type& val) {
+ Py_XINCREF(val);
+ return val;
+ }
+ };
+
+}
+
+namespace swig {
+ inline size_t
+ check_index(ptrdiff_t i, size_t size, bool insert = false) {
+ if ( i < 0 ) {
+ if ((size_t) (-i) <= size)
+ return (size_t) (i + size);
+ } else if ( (size_t) i < size ) {
+ return (size_t) i;
+ } else if (insert && ((size_t) i == size)) {
+ return size;
+ }
+
+ throw std::out_of_range("index out of range");
+ }
+
+ inline size_t
+ slice_index(ptrdiff_t i, size_t size) {
+ if ( i < 0 ) {
+ if ((size_t) (-i) <= size) {
+ return (size_t) (i + size);
+ } else {
+ throw std::out_of_range("index out of range");
+ }
+ } else {
+ return ( (size_t) i < size ) ? ((size_t) i) : size;
+ }
+ }
+
+ template
+ inline typename Sequence::iterator
+ getpos(Sequence* self, Difference i) {
+ typename Sequence::iterator pos = self->begin();
+ std::advance(pos, check_index(i,self->size()));
+ return pos;
+ }
+
+ template
+ inline typename Sequence::const_iterator
+ cgetpos(const Sequence* self, Difference i) {
+ typename Sequence::const_iterator pos = self->begin();
+ std::advance(pos, check_index(i,self->size()));
+ return pos;
+ }
+
+ template
+ inline Sequence*
+ getslice(const Sequence* self, Difference i, Difference j) {
+ typename Sequence::size_type size = self->size();
+ typename Sequence::size_type ii = swig::check_index(i, size);
+ typename Sequence::size_type jj = swig::slice_index(j, size);
+
+ if (jj > ii) {
+ typename Sequence::const_iterator vb = self->begin();
+ typename Sequence::const_iterator ve = self->begin();
+ std::advance(vb,ii);
+ std::advance(ve,jj);
+ return new Sequence(vb, ve);
+ } else {
+ return new Sequence();
+ }
+ }
+
+ template
+ inline void
+ setslice(Sequence* self, Difference i, Difference j, const InputSeq& v = InputSeq()) {
+ typename Sequence::size_type size = self->size();
+ typename Sequence::size_type ii = swig::check_index(i, size, true);
+ typename Sequence::size_type jj = swig::slice_index(j, size);
+ if (jj < ii) jj = ii;
+ size_t ssize = jj - ii;
+ if (ssize <= v.size()) {
+ typename Sequence::iterator sb = self->begin();
+ typename InputSeq::const_iterator vmid = v.begin();
+ std::advance(sb,ii);
+ std::advance(vmid, jj - ii);
+ self->insert(std::copy(v.begin(), vmid, sb), vmid, v.end());
+ } else {
+ typename Sequence::iterator sb = self->begin();
+ typename Sequence::iterator se = self->begin();
+ std::advance(sb,ii);
+ std::advance(se,jj);
+ self->erase(sb,se);
+ self->insert(sb, v.begin(), v.end());
+ }
+ }
+
+ template
+ inline void
+ delslice(Sequence* self, Difference i, Difference j) {
+ typename Sequence::size_type size = self->size();
+ typename Sequence::size_type ii = swig::check_index(i, size, true);
+ typename Sequence::size_type jj = swig::slice_index(j, size);
+ if (jj > ii) {
+ typename Sequence::iterator sb = self->begin();
+ typename Sequence::iterator se = self->begin();
+ std::advance(sb,ii);
+ std::advance(se,jj);
+ self->erase(sb,se);
+ }
+ }
+}
+
+
+#if defined(__SUNPRO_CC) && defined(_RWSTD_VER)
+# if !defined(SWIG_NO_STD_NOITERATOR_TRAITS_STL)
+# define SWIG_STD_NOITERATOR_TRAITS_STL
+# endif
+#endif
+
+#if !defined(SWIG_STD_NOITERATOR_TRAITS_STL)
+#include
+#else
+namespace std {
+ template
+ struct iterator_traits {
+ typedef ptrdiff_t difference_type;
+ typedef typename Iterator::value_type value_type;
+ };
+
+ template
+ struct iterator_traits<__reverse_bi_iterator > {
+ typedef Distance difference_type;
+ typedef T value_type;
+ };
+
+ template
+ struct iterator_traits {
+ typedef T value_type;
+ typedef ptrdiff_t difference_type;
+ };
+
+ template
+ inline typename iterator_traits<_InputIterator>::difference_type
+ distance(_InputIterator __first, _InputIterator __last)
+ {
+ typename iterator_traits<_InputIterator>::difference_type __n = 0;
+ while (__first != __last) {
+ ++__first; ++__n;
+ }
+ return __n;
+ }
+}
+#endif
+
+
+namespace swig {
+ template
+ class SwigPyIterator_T : public SwigPyIterator
+ {
+ public:
+ typedef OutIterator out_iterator;
+ typedef typename std::iterator_traits::value_type value_type;
+ typedef SwigPyIterator_T self_type;
+
+ SwigPyIterator_T(out_iterator curr, PyObject *seq)
+ : SwigPyIterator(seq), current(curr)
+ {
+ }
+
+ const out_iterator& get_current() const
+ {
+ return current;
+ }
+
+
+ bool equal (const SwigPyIterator &iter) const
+ {
+ const self_type *iters = dynamic_cast(&iter);
+ if (iters) {
+ return (current == iters->get_current());
+ } else {
+ throw std::invalid_argument("bad iterator type");
+ }
+ }
+
+ ptrdiff_t distance(const SwigPyIterator &iter) const
+ {
+ const self_type *iters = dynamic_cast(&iter);
+ if (iters) {
+ return std::distance(current, iters->get_current());
+ } else {
+ throw std::invalid_argument("bad iterator type");
+ }
+ }
+
+ protected:
+ out_iterator current;
+ };
+
+ template
+ struct from_oper
+ {
+ typedef const ValueType& argument_type;
+ typedef PyObject *result_type;
+ result_type operator()(argument_type v) const
+ {
+ return swig::from(v);
+ }
+ };
+
+ template::value_type,
+ typename FromOper = from_oper >
+ class SwigPyIteratorOpen_T : public SwigPyIterator_T
+ {
+ public:
+ FromOper from;
+ typedef OutIterator out_iterator;
+ typedef ValueType value_type;
+ typedef SwigPyIterator_T base;
+ typedef SwigPyIteratorOpen_T self_type;
+
+ SwigPyIteratorOpen_T(out_iterator curr, PyObject *seq)
+ : SwigPyIterator_T(curr, seq)
+ {
+ }
+
+ PyObject *value() const {
+ return from(static_cast(*(base::current)));
+ }
+
+ SwigPyIterator *copy() const
+ {
+ return new self_type(*this);
+ }
+
+ SwigPyIterator *incr(size_t n = 1)
+ {
+ while (n--) {
+ ++base::current;
+ }
+ return this;
+ }
+
+ SwigPyIterator *decr(size_t n = 1)
+ {
+ while (n--) {
+ --base::current;
+ }
+ return this;
+ }
+ };
+
+ template::value_type,
+ typename FromOper = from_oper >
+ class SwigPyIteratorClosed_T : public SwigPyIterator_T
+ {
+ public:
+ FromOper from;
+ typedef OutIterator out_iterator;
+ typedef ValueType value_type;
+ typedef SwigPyIterator_T base;
+ typedef SwigPyIteratorClosed_T self_type;
+
+ SwigPyIteratorClosed_T(out_iterator curr, out_iterator first, out_iterator last, PyObject *seq)
+ : SwigPyIterator_T(curr, seq), begin(first), end(last)
+ {
+ }
+
+ PyObject *value() const {
+ if (base::current == end) {
+ throw stop_iteration();
+ } else {
+ return from(static_cast(*(base::current)));
+ }
+ }
+
+ SwigPyIterator *copy() const
+ {
+ return new self_type(*this);
+ }
+
+ SwigPyIterator *incr(size_t n = 1)
+ {
+ while (n--) {
+ if (base::current == end) {
+ throw stop_iteration();
+ } else {
+ ++base::current;
+ }
+ }
+ return this;
+ }
+
+ SwigPyIterator *decr(size_t n = 1)
+ {
+ while (n--) {
+ if (base::current == begin) {
+ throw stop_iteration();
+ } else {
+ --base::current;
+ }
+ }
+ return this;
+ }
+
+ private:
+ out_iterator begin;
+ out_iterator end;
+ };
+
+ template
+ inline SwigPyIterator*
+ make_output_iterator(const OutIter& current, const OutIter& begin,const OutIter& end, PyObject *seq = 0)
+ {
+ return new SwigPyIteratorClosed_T(current, begin, end, seq);
+ }
+
+ template
+ inline SwigPyIterator*
+ make_output_iterator(const OutIter& current, PyObject *seq = 0)
+ {
+ return new SwigPyIteratorOpen_T(current, seq);
+ }
+
+}
+
+
+namespace swig
+{
+ template
+ struct SwigPySequence_Ref
+ {
+ SwigPySequence_Ref(PyObject* seq, int index)
+ : _seq(seq), _index(index)
+ {
+ }
+
+ operator T () const
+ {
+ swig::SwigVar_PyObject item = PySequence_GetItem(_seq, _index);
+ try {
+ return swig::as(item, true);
+ } catch (std::exception& e) {
+ char msg[1024];
+ sprintf(msg, "in sequence element %d ", _index);
+ if (!PyErr_Occurred()) {
+ ::SWIG_Error(SWIG_TypeError, swig::type_name());
+ }
+ SWIG_Python_AddErrorMsg(msg);
+ SWIG_Python_AddErrorMsg(e.what());
+ throw;
+ }
+ }
+
+ SwigPySequence_Ref& operator=(const T& v)
+ {
+ PySequence_SetItem(_seq, _index, swig::from(v));
+ return *this;
+ }
+
+ private:
+ PyObject* _seq;
+ int _index;
+ };
+
+ template
+ struct SwigPySequence_ArrowProxy
+ {
+ SwigPySequence_ArrowProxy(const T& x): m_value(x) {}
+ const T* operator->() const { return &m_value; }
+ operator const T*() const { return &m_value; }
+ T m_value;
+ };
+
+ template
+ struct SwigPySequence_InputIterator
+ {
+ typedef SwigPySequence_InputIterator self;
+
+ typedef std::random_access_iterator_tag iterator_category;
+ typedef Reference reference;
+ typedef T value_type;
+ typedef T* pointer;
+ typedef int difference_type;
+
+ SwigPySequence_InputIterator()
+ {
+ }
+
+ SwigPySequence_InputIterator(PyObject* seq, int index)
+ : _seq(seq), _index(index)
+ {
+ }
+
+ reference operator*() const
+ {
+ return reference(_seq, _index);
+ }
+
+ SwigPySequence_ArrowProxy
+ operator->() const {
+ return SwigPySequence_ArrowProxy(operator*());
+ }
+
+ bool operator==(const self& ri) const
+ {
+ return (_index == ri._index) && (_seq == ri._seq);
+ }
+
+ bool operator!=(const self& ri) const
+ {
+ return !(operator==(ri));
+ }
+
+ self& operator ++ ()
+ {
+ ++_index;
+ return *this;
+ }
+
+ self& operator -- ()
+ {
+ --_index;
+ return *this;
+ }
+
+ self& operator += (difference_type n)
+ {
+ _index += n;
+ return *this;
+ }
+
+ self operator +(difference_type n) const
+ {
+ return self(_seq, _index + n);
+ }
+
+ self& operator -= (difference_type n)
+ {
+ _index -= n;
+ return *this;
+ }
+
+ self operator -(difference_type n) const
+ {
+ return self(_seq, _index - n);
+ }
+
+ difference_type operator - (const self& ri) const
+ {
+ return _index - ri._index;
+ }
+
+ bool operator < (const self& ri) const
+ {
+ return _index < ri._index;
+ }
+
+ reference
+ operator[](difference_type n) const
+ {
+ return reference(_seq, _index + n);
+ }
+
+ private:
+ PyObject* _seq;
+ difference_type _index;
+ };
+
+ template
+ struct SwigPySequence_Cont
+ {
+ typedef SwigPySequence_Ref reference;
+ typedef const SwigPySequence_Ref const_reference;
+ typedef T value_type;
+ typedef T* pointer;
+ typedef int difference_type;
+ typedef int size_type;
+ typedef const pointer const_pointer;
+ typedef SwigPySequence_InputIterator iterator;
+ typedef SwigPySequence_InputIterator const_iterator;
+
+ SwigPySequence_Cont(PyObject* seq) : _seq(0)
+ {
+ if (!PySequence_Check(seq)) {
+ throw std::invalid_argument("a sequence is expected");
+ }
+ _seq = seq;
+ Py_INCREF(_seq);
+ }
+
+ ~SwigPySequence_Cont()
+ {
+ Py_XDECREF(_seq);
+ }
+
+ size_type size() const
+ {
+ return static_cast(PySequence_Size(_seq));
+ }
+
+ bool empty() const
+ {
+ return size() == 0;
+ }
+
+ iterator begin()
+ {
+ return iterator(_seq, 0);
+ }
+
+ const_iterator begin() const
+ {
+ return const_iterator(_seq, 0);
+ }
+
+ iterator end()
+ {
+ return iterator(_seq, size());
+ }
+
+ const_iterator end() const
+ {
+ return const_iterator(_seq, size());
+ }
+
+ reference operator[](difference_type n)
+ {
+ return reference(_seq, n);
+ }
+
+ const_reference operator[](difference_type n) const
+ {
+ return const_reference(_seq, n);
+ }
+
+ bool check(bool set_err = true) const
+ {
+ int s = size();
+ for (int i = 0; i < s; ++i) {
+ swig::SwigVar_PyObject item = PySequence_GetItem(_seq, i);
+ if (!swig::check(item)) {
+ if (set_err) {
+ char msg[1024];
+ sprintf(msg, "in sequence element %d", i);
+ SWIG_Error(SWIG_RuntimeError, msg);
+ }
+ return false;
+ }
+ }
+ return true;
+ }
+
+ private:
+ PyObject* _seq;
+ };
+
+}
+
+
+#include
+#if !defined(SWIG_NO_LLONG_MAX)
+# if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__)
+# define LLONG_MAX __LONG_LONG_MAX__
+# define LLONG_MIN (-LLONG_MAX - 1LL)
+# define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL)
+# endif
+#endif
+
+
+SWIGINTERN int
+SWIG_AsVal_int (PyObject * obj, int *val)
+{
+ long v;
+ int res = SWIG_AsVal_long (obj, &v);
+ if (SWIG_IsOK(res)) {
+ if ((v < INT_MIN || v > INT_MAX)) {
+ return SWIG_OverflowError;
+ } else {
+ if (val) *val = static_cast< int >(v);
+ }
+ }
+ return res;
+}
+
+
+SWIGINTERNINLINE PyObject *
+SWIG_From_int (int value)
+{
+ return SWIG_From_long (value);
+}
+
+
+namespace swig {
+ template <> struct traits {
+ typedef value_category category;
+ static const char* type_name() { return"int"; }
+ };
+ template <> struct traits_asval {
+ typedef int value_type;
+ static int asval(PyObject *obj, value_type *val) {
+ return SWIG_AsVal_int (obj, val);
+ }
+ };
+ template <> struct traits_from {
+ typedef int value_type;
+ static PyObject *from(const value_type& val) {
+ return SWIG_From_int (val);
+ }
+ };
+}
+
+
+namespace swig {
+ template
+ inline void
+ assign(const SwigPySeq& swigpyseq, Seq* seq) {
+ // seq->assign(swigpyseq.begin(), swigpyseq.end()); // not used as not always implemented
+ typedef typename SwigPySeq::value_type value_type;
+ typename SwigPySeq::const_iterator it = swigpyseq.begin();
+ for (;it != swigpyseq.end(); ++it) {
+ seq->insert(seq->end(),(value_type)(*it));
+ }
+ }
+
+ template
+ struct traits_asptr_stdseq {
+ typedef Seq sequence;
+ typedef T value_type;
+
+ static int asptr(PyObject *obj, sequence **seq) {
+ if (obj == Py_None || SWIG_Python_GetSwigThis(obj)) {
+ sequence *p;
+ if (::SWIG_ConvertPtr(obj,(void**)&p,
+ swig::type_info(),0) == SWIG_OK) {
+ if (seq) *seq = p;
+ return SWIG_OLDOBJ;
+ }
+ } else if (PySequence_Check(obj)) {
+ try {
+ SwigPySequence_Cont swigpyseq(obj);
+ if (seq) {
+ sequence *pseq = new sequence();
+ assign(swigpyseq, pseq);
+ *seq = pseq;
+ return SWIG_NEWOBJ;
+ } else {
+ return swigpyseq.check() ? SWIG_OK : SWIG_ERROR;
+ }
+ } catch (std::exception& e) {
+ if (seq) {
+ if (!PyErr_Occurred()) {
+ PyErr_SetString(PyExc_TypeError, e.what());
+ }
+ }
+ return SWIG_ERROR;
+ }
+ }
+ return SWIG_ERROR;
+ }
+ };
+
+ template
+ struct traits_from_stdseq {
+ typedef Seq sequence;
+ typedef T value_type;
+ typedef typename Seq::size_type size_type;
+ typedef typename sequence::const_iterator const_iterator;
+
+ static PyObject *from(const sequence& seq) {
+#ifdef SWIG_PYTHON_EXTRA_NATIVE_CONTAINERS
+ swig_type_info *desc = swig::type_info();
+ if (desc && desc->clientdata) {
+ return SWIG_NewPointerObj(new sequence(seq), desc, SWIG_POINTER_OWN);
+ }
+#endif
+ size_type size = seq.size();
+ if (size <= (size_type)INT_MAX) {
+ PyObject *obj = PyTuple_New((int)size);
+ int i = 0;
+ for (const_iterator it = seq.begin();
+ it != seq.end(); ++it, ++i) {
+ PyTuple_SetItem(obj,i,swig::from(*it));
+ }
+ return obj;
+ } else {
+ PyErr_SetString(PyExc_OverflowError,"sequence size not valid in python");
+ return NULL;
+ }
+ }
+ };
+}
+
+
+ namespace swig {
+ template
+ struct traits_asptr > {
+ static int asptr(PyObject *obj, std::vector **vec) {
+ return traits_asptr_stdseq >::asptr(obj, vec);
+ }
+ };
+
+ template
+ struct traits_from > {
+ static PyObject *from(const std::vector& vec) {
+ return traits_from_stdseq >::from(vec);
+ }
+ };
+ }
+
+
+ namespace swig {
+ template <> struct traits > > {
+ typedef pointer_category category;
+ static const char* type_name() {
+ return "std::vector<" "int" "," "std::allocator< int >" " >";
+ }
+ };
+ }
+
+SWIGINTERN swig::SwigPyIterator *std_vector_Sl_int_Sg__iterator(std::vector< int > *self,PyObject **PYTHON_SELF){
+ return swig::make_output_iterator(self->begin(), self->begin(), self->end(), *PYTHON_SELF);
+ }
+SWIGINTERN bool std_vector_Sl_int_Sg____nonzero__(std::vector< int > const *self){
+ return !(self->empty());
+ }
+SWIGINTERN bool std_vector_Sl_int_Sg____bool__(std::vector< int > const *self){
+ return !(self->empty());
+ }
+SWIGINTERN std::vector< int >::size_type std_vector_Sl_int_Sg____len__(std::vector< int > const *self){
+ return self->size();
+ }
+
+SWIGINTERNINLINE PyObject*
+SWIG_From_unsigned_SS_long (unsigned long value)
+{
+ return (value > LONG_MAX) ?
+ PyLong_FromUnsignedLong(value) : PyInt_FromLong(static_cast< long >(value));
+}
+
+
+SWIGINTERNINLINE PyObject *
+SWIG_From_unsigned_SS_int (unsigned int value)
+{
+ return SWIG_From_unsigned_SS_long (value);
+}
+
+SWIGINTERN std::vector< int >::value_type std_vector_Sl_int_Sg__pop(std::vector< int > *self){
+ if (self->size() == 0)
+ throw std::out_of_range("pop from empty container");
+ std::vector >::value_type x = self->back();
+ self->pop_back();
+ return x;
+ }
+SWIGINTERN std::vector< int,std::allocator< int > > *std_vector_Sl_int_Sg____getslice__(std::vector< int > *self,std::vector< int >::difference_type i,std::vector< int >::difference_type j){
+ return swig::getslice(self, i, j);
+ }
+SWIGINTERN void std_vector_Sl_int_Sg____setslice____SWIG_0(std::vector< int > *self,std::vector< int >::difference_type i,std::vector< int >::difference_type j,std::vector< int,std::allocator< int > > const &v=std::vector< int,std::allocator< int > >()){
+ swig::setslice(self, i, j, v);
+ }
+SWIGINTERN void std_vector_Sl_int_Sg____delslice__(std::vector< int > *self,std::vector< int >::difference_type i,std::vector< int >::difference_type j){
+ swig::delslice(self, i, j);
+ }
+SWIGINTERN void std_vector_Sl_int_Sg____delitem____SWIG_0(std::vector< int > *self,std::vector< int >::difference_type i){
+ self->erase(swig::getpos(self,i));
+ }
+SWIGINTERN std::vector< int,std::allocator< int > > *std_vector_Sl_int_Sg____getitem____SWIG_0(std::vector< int > *self,PySliceObject *slice){
+ Py_ssize_t i, j, step;
+ if( !PySlice_Check(slice) ) {
+ SWIG_Error(SWIG_TypeError, "Slice object expected.");
+ return NULL;
+ }
+ PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), self->size(), &i, &j, &step);
+ return swig::getslice(self, i, j);
+ }
+SWIGINTERN void std_vector_Sl_int_Sg____setitem____SWIG_0(std::vector< int > *self,PySliceObject *slice,std::vector< int,std::allocator< int > > const &v){
+ Py_ssize_t i, j, step;
+ if( !PySlice_Check(slice) ) {
+ SWIG_Error(SWIG_TypeError, "Slice object expected.");
+ return;
+ }
+ PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), self->size(), &i, &j, &step);
+ swig::setslice(self, i, j, v);
+ }
+SWIGINTERN void std_vector_Sl_int_Sg____setitem____SWIG_1(std::vector< int > *self,PySliceObject *slice){
+ Py_ssize_t i, j, step;
+ if( !PySlice_Check(slice) ) {
+ SWIG_Error(SWIG_TypeError, "Slice object expected.");
+ return;
+ }
+ PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), self->size(), &i, &j, &step);
+ swig::delslice(self, i,j);
+ }
+SWIGINTERN void std_vector_Sl_int_Sg____delitem____SWIG_1(std::vector< int > *self,PySliceObject *slice){
+ Py_ssize_t i, j, step;
+ if( !PySlice_Check(slice) ) {
+ SWIG_Error(SWIG_TypeError, "Slice object expected.");
+ return;
+ }
+ PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), self->size(), &i, &j, &step);
+ swig::delslice(self, i,j);
+ }
+SWIGINTERN std::vector< int >::value_type const &std_vector_Sl_int_Sg____getitem____SWIG_1(std::vector< int > const *self,std::vector< int >::difference_type i){
+ return *(swig::cgetpos(self, i));
+ }
+SWIGINTERN void std_vector_Sl_int_Sg____setitem____SWIG_2(std::vector< int > *self,std::vector< int >::difference_type i,std::vector< int >::value_type const &x){
+ *(swig::getpos(self,i)) = x;
+ }
+SWIGINTERN void std_vector_Sl_int_Sg__append(std::vector< int > *self,std::vector< int >::value_type const &x){
+ self->push_back(x);
+ }
+
+SWIGINTERN int
+SWIG_AsVal_unsigned_SS_int (PyObject * obj, unsigned int *val)
+{
+ unsigned long v;
+ int res = SWIG_AsVal_unsigned_SS_long (obj, &v);
+ if (SWIG_IsOK(res)) {
+ if ((v > UINT_MAX)) {
+ return SWIG_OverflowError;
+ } else {
+ if (val) *val = static_cast< unsigned int >(v);
+ }
+ }
+ return res;
+}
+
+
+SWIGINTERN int
+SWIG_AsVal_float (PyObject * obj, float *val)
+{
+ double v;
+ int res = SWIG_AsVal_double (obj, &v);
+ if (SWIG_IsOK(res)) {
+ if ((v < -FLT_MAX || v > FLT_MAX)) {
+ return SWIG_OverflowError;
+ } else {
+ if (val) *val = static_cast< float >(v);
+ }
+ }
+ return res;
+}
+
+
+ #define SWIG_From_double PyFloat_FromDouble
+
+
+SWIGINTERNINLINE PyObject *
+SWIG_From_float (float value)
+{
+ return SWIG_From_double (value);
+}
+
+
+namespace swig {
+ template <> struct traits {
+ typedef value_category category;
+ static const char* type_name() { return"float"; }
+ };
+ template <> struct traits_asval {
+ typedef float value_type;
+ static int asval(PyObject *obj, value_type *val) {
+ return SWIG_AsVal_float (obj, val);
+ }
+ };
+ template <> struct traits_from {
+ typedef float value_type;
+ static PyObject *from(const value_type& val) {
+ return SWIG_From_float (val);
+ }
+ };
+}
+
+
+ namespace swig {
+ template <> struct traits > > {
+ typedef pointer_category category;
+ static const char* type_name() {
+ return "std::vector<" "float" "," "std::allocator< float >" " >";
+ }
+ };
+ }
+
+SWIGINTERN swig::SwigPyIterator *std_vector_Sl_float_Sg__iterator(std::vector< float > *self,PyObject **PYTHON_SELF){
+ return swig::make_output_iterator(self->begin(), self->begin(), self->end(), *PYTHON_SELF);
+ }
+SWIGINTERN bool std_vector_Sl_float_Sg____nonzero__(std::vector< float > const *self){
+ return !(self->empty());
+ }
+SWIGINTERN bool std_vector_Sl_float_Sg____bool__(std::vector< float > const *self){
+ return !(self->empty());
+ }
+SWIGINTERN std::vector< float >::size_type std_vector_Sl_float_Sg____len__(std::vector< float > const *self){
+ return self->size();
+ }
+SWIGINTERN std::vector< float >::value_type std_vector_Sl_float_Sg__pop(std::vector< float > *self){
+ if (self->size() == 0)
+ throw std::out_of_range("pop from empty container");
+ std::vector >::value_type x = self->back();
+ self->pop_back();
+ return x;
+ }
+SWIGINTERN std::vector< float,std::allocator< float > > *std_vector_Sl_float_Sg____getslice__(std::vector< float > *self,std::vector< float >::difference_type i,std::vector< float >::difference_type j){
+ return swig::getslice(self, i, j);
+ }
+SWIGINTERN void std_vector_Sl_float_Sg____setslice____SWIG_0(std::vector< float > *self,std::vector< float >::difference_type i,std::vector< float >::difference_type j,std::vector< float,std::allocator< float > > const &v=std::vector< float,std::allocator< float > >()){
+ swig::setslice(self, i, j, v);
+ }
+SWIGINTERN void std_vector_Sl_float_Sg____delslice__(std::vector< float > *self,std::vector< float >::difference_type i,std::vector< float >::difference_type j){
+ swig::delslice(self, i, j);
+ }
+SWIGINTERN void std_vector_Sl_float_Sg____delitem____SWIG_0(std::vector< float > *self,std::vector< float >::difference_type i){
+ self->erase(swig::getpos(self,i));
+ }
+SWIGINTERN std::vector< float,std::allocator< float > > *std_vector_Sl_float_Sg____getitem____SWIG_0(std::vector< float > *self,PySliceObject *slice){
+ Py_ssize_t i, j, step;
+ if( !PySlice_Check(slice) ) {
+ SWIG_Error(SWIG_TypeError, "Slice object expected.");
+ return NULL;
+ }
+ PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), self->size(), &i, &j, &step);
+ return swig::getslice(self, i, j);
+ }
+SWIGINTERN void std_vector_Sl_float_Sg____setitem____SWIG_0(std::vector< float > *self,PySliceObject *slice,std::vector< float,std::allocator< float > > const &v){
+ Py_ssize_t i, j, step;
+ if( !PySlice_Check(slice) ) {
+ SWIG_Error(SWIG_TypeError, "Slice object expected.");
+ return;
+ }
+ PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), self->size(), &i, &j, &step);
+ swig::setslice(self, i, j, v);
+ }
+SWIGINTERN void std_vector_Sl_float_Sg____setitem____SWIG_1(std::vector< float > *self,PySliceObject *slice){
+ Py_ssize_t i, j, step;
+ if( !PySlice_Check(slice) ) {
+ SWIG_Error(SWIG_TypeError, "Slice object expected.");
+ return;
+ }
+ PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), self->size(), &i, &j, &step);
+ swig::delslice(self, i,j);
+ }
+SWIGINTERN void std_vector_Sl_float_Sg____delitem____SWIG_1(std::vector< float > *self,PySliceObject *slice){
+ Py_ssize_t i, j, step;
+ if( !PySlice_Check(slice) ) {
+ SWIG_Error(SWIG_TypeError, "Slice object expected.");
+ return;
+ }
+ PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), self->size(), &i, &j, &step);
+ swig::delslice(self, i,j);
+ }
+SWIGINTERN std::vector< float >::value_type const &std_vector_Sl_float_Sg____getitem____SWIG_1(std::vector< float > const *self,std::vector< float >::difference_type i){
+ return *(swig::cgetpos(self, i));
+ }
+SWIGINTERN void std_vector_Sl_float_Sg____setitem____SWIG_2(std::vector< float > *self,std::vector< float >::difference_type i,std::vector< float >::value_type const &x){
+ *(swig::getpos(self,i)) = x;
+ }
+SWIGINTERN void std_vector_Sl_float_Sg__append(std::vector< float > *self,std::vector< float >::value_type const &x){
+ self->push_back(x);
+ }
+
+ namespace swig {
+ template <> struct traits {
+ typedef pointer_category category;
+ static const char* type_name() { return"BinaryData"; }
+ };
+ }
+
+
+ namespace swig {
+ template <> struct traits > > {
+ typedef pointer_category category;
+ static const char* type_name() {
+ return "std::vector<" "BinaryData" "," "std::allocator< BinaryData >" " >";
+ }
+ };
+ }
+
+SWIGINTERN swig::SwigPyIterator *std_vector_Sl_BinaryData_Sg__iterator(std::vector< BinaryData > *self,PyObject **PYTHON_SELF){
+ return swig::make_output_iterator(self->begin(), self->begin(), self->end(), *PYTHON_SELF);
+ }
+SWIGINTERN bool std_vector_Sl_BinaryData_Sg____nonzero__(std::vector< BinaryData > const *self){
+ return !(self->empty());
+ }
+SWIGINTERN bool std_vector_Sl_BinaryData_Sg____bool__(std::vector< BinaryData > const *self){
+ return !(self->empty());
+ }
+SWIGINTERN std::vector< BinaryData >::size_type std_vector_Sl_BinaryData_Sg____len__(std::vector< BinaryData > const *self){
+ return self->size();
+ }
+SWIGINTERN std::vector< BinaryData >::value_type std_vector_Sl_BinaryData_Sg__pop(std::vector< BinaryData > *self){
+ if (self->size() == 0)
+ throw std::out_of_range("pop from empty container");
+ std::vector >::value_type x = self->back();
+ self->pop_back();
+ return x;
+ }
+SWIGINTERN std::vector< BinaryData,std::allocator< BinaryData > > *std_vector_Sl_BinaryData_Sg____getslice__(std::vector< BinaryData > *self,std::vector< BinaryData >::difference_type i,std::vector< BinaryData >::difference_type j){
+ return swig::getslice(self, i, j);
+ }
+SWIGINTERN void std_vector_Sl_BinaryData_Sg____setslice____SWIG_0(std::vector< BinaryData > *self,std::vector< BinaryData >::difference_type i,std::vector< BinaryData >::difference_type j,std::vector< BinaryData,std::allocator< BinaryData > > const &v=std::vector< BinaryData,std::allocator< BinaryData > >()){
+ swig::setslice(self, i, j, v);
+ }
+SWIGINTERN void std_vector_Sl_BinaryData_Sg____delslice__(std::vector< BinaryData > *self,std::vector< BinaryData >::difference_type i,std::vector< BinaryData >::difference_type j){
+ swig::delslice(self, i, j);
+ }
+SWIGINTERN void std_vector_Sl_BinaryData_Sg____delitem____SWIG_0(std::vector< BinaryData > *self,std::vector< BinaryData >::difference_type i){
+ self->erase(swig::getpos(self,i));
+ }
+SWIGINTERN std::vector< BinaryData,std::allocator< BinaryData > > *std_vector_Sl_BinaryData_Sg____getitem____SWIG_0(std::vector< BinaryData > *self,PySliceObject *slice){
+ Py_ssize_t i, j, step;
+ if( !PySlice_Check(slice) ) {
+ SWIG_Error(SWIG_TypeError, "Slice object expected.");
+ return NULL;
+ }
+ PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), self->size(), &i, &j, &step);
+ return swig::getslice(self, i, j);
+ }
+SWIGINTERN void std_vector_Sl_BinaryData_Sg____setitem____SWIG_0(std::vector< BinaryData > *self,PySliceObject *slice,std::vector< BinaryData,std::allocator< BinaryData > > const &v){
+ Py_ssize_t i, j, step;
+ if( !PySlice_Check(slice) ) {
+ SWIG_Error(SWIG_TypeError, "Slice object expected.");
+ return;
+ }
+ PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), self->size(), &i, &j, &step);
+ swig::setslice(self, i, j, v);
+ }
+SWIGINTERN void std_vector_Sl_BinaryData_Sg____setitem____SWIG_1(std::vector< BinaryData > *self,PySliceObject *slice){
+ Py_ssize_t i, j, step;
+ if( !PySlice_Check(slice) ) {
+ SWIG_Error(SWIG_TypeError, "Slice object expected.");
+ return;
+ }
+ PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), self->size(), &i, &j, &step);
+ swig::delslice(self, i,j);
+ }
+SWIGINTERN void std_vector_Sl_BinaryData_Sg____delitem____SWIG_1(std::vector< BinaryData > *self,PySliceObject *slice){
+ Py_ssize_t i, j, step;
+ if( !PySlice_Check(slice) ) {
+ SWIG_Error(SWIG_TypeError, "Slice object expected.");
+ return;
+ }
+ PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), self->size(), &i, &j, &step);
+ swig::delslice(self, i,j);
+ }
+SWIGINTERN std::vector< BinaryData >::value_type const &std_vector_Sl_BinaryData_Sg____getitem____SWIG_1(std::vector< BinaryData > const *self,std::vector< BinaryData >::difference_type i){
+ return *(swig::cgetpos(self, i));
+ }
+SWIGINTERN void std_vector_Sl_BinaryData_Sg____setitem____SWIG_2(std::vector< BinaryData > *self,std::vector< BinaryData >::difference_type i,std::vector< BinaryData >::value_type const &x){
+ *(swig::getpos(self,i)) = x;
+ }
+SWIGINTERN void std_vector_Sl_BinaryData_Sg__append(std::vector< BinaryData > *self,std::vector< BinaryData >::value_type const &x){
+ self->push_back(x);
+ }
+
+ namespace swig {
+ template <> struct traits {
+ typedef pointer_category category;
+ static const char* type_name() { return"LedgerEntry"; }
+ };
+ }
+
+
+ namespace swig {
+ template <> struct traits > > {
+ typedef pointer_category category;
+ static const char* type_name() {
+ return "std::vector<" "LedgerEntry" "," "std::allocator< LedgerEntry >" " >";
+ }
+ };
+ }
+
+SWIGINTERN swig::SwigPyIterator *std_vector_Sl_LedgerEntry_Sg__iterator(std::vector< LedgerEntry > *self,PyObject **PYTHON_SELF){
+ return swig::make_output_iterator(self->begin(), self->begin(), self->end(), *PYTHON_SELF);
+ }
+SWIGINTERN bool std_vector_Sl_LedgerEntry_Sg____nonzero__(std::vector< LedgerEntry > const *self){
+ return !(self->empty());
+ }
+SWIGINTERN bool std_vector_Sl_LedgerEntry_Sg____bool__(std::vector< LedgerEntry > const *self){
+ return !(self->empty());
+ }
+SWIGINTERN std::vector< LedgerEntry >::size_type std_vector_Sl_LedgerEntry_Sg____len__(std::vector< LedgerEntry > const *self){
+ return self->size();
+ }
+SWIGINTERN std::vector< LedgerEntry >::value_type std_vector_Sl_LedgerEntry_Sg__pop(std::vector< LedgerEntry > *self){
+ if (self->size() == 0)
+ throw std::out_of_range("pop from empty container");
+ std::vector >::value_type x = self->back();
+ self->pop_back();
+ return x;
+ }
+SWIGINTERN std::vector< LedgerEntry,std::allocator< LedgerEntry > > *std_vector_Sl_LedgerEntry_Sg____getslice__(std::vector< LedgerEntry > *self,std::vector< LedgerEntry >::difference_type i,std::vector< LedgerEntry >::difference_type j){
+ return swig::getslice(self, i, j);
+ }
+SWIGINTERN void std_vector_Sl_LedgerEntry_Sg____setslice____SWIG_0(std::vector< LedgerEntry > *self,std::vector< LedgerEntry >::difference_type i,std::vector< LedgerEntry >::difference_type j,std::vector< LedgerEntry,std::allocator< LedgerEntry > > const &v=std::vector< LedgerEntry,std::allocator< LedgerEntry > >()){
+ swig::setslice(self, i, j, v);
+ }
+SWIGINTERN void std_vector_Sl_LedgerEntry_Sg____delslice__(std::vector< LedgerEntry > *self,std::vector< LedgerEntry >::difference_type i,std::vector< LedgerEntry >::difference_type j){
+ swig::delslice(self, i, j);
+ }
+SWIGINTERN void std_vector_Sl_LedgerEntry_Sg____delitem____SWIG_0(std::vector< LedgerEntry > *self,std::vector< LedgerEntry >::difference_type i){
+ self->erase(swig::getpos(self,i));
+ }
+SWIGINTERN std::vector< LedgerEntry,std::allocator< LedgerEntry > > *std_vector_Sl_LedgerEntry_Sg____getitem____SWIG_0(std::vector< LedgerEntry > *self,PySliceObject *slice){
+ Py_ssize_t i, j, step;
+ if( !PySlice_Check(slice) ) {
+ SWIG_Error(SWIG_TypeError, "Slice object expected.");
+ return NULL;
+ }
+ PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), self->size(), &i, &j, &step);
+ return swig::getslice(self, i, j);
+ }
+SWIGINTERN void std_vector_Sl_LedgerEntry_Sg____setitem____SWIG_0(std::vector< LedgerEntry > *self,PySliceObject *slice,std::vector< LedgerEntry,std::allocator< LedgerEntry > > const &v){
+ Py_ssize_t i, j, step;
+ if( !PySlice_Check(slice) ) {
+ SWIG_Error(SWIG_TypeError, "Slice object expected.");
+ return;
+ }
+ PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), self->size(), &i, &j, &step);
+ swig::setslice(self, i, j, v);
+ }
+SWIGINTERN void std_vector_Sl_LedgerEntry_Sg____setitem____SWIG_1(std::vector< LedgerEntry > *self,PySliceObject *slice){
+ Py_ssize_t i, j, step;
+ if( !PySlice_Check(slice) ) {
+ SWIG_Error(SWIG_TypeError, "Slice object expected.");
+ return;
+ }
+ PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), self->size(), &i, &j, &step);
+ swig::delslice(self, i,j);
+ }
+SWIGINTERN void std_vector_Sl_LedgerEntry_Sg____delitem____SWIG_1(std::vector< LedgerEntry > *self,PySliceObject *slice){
+ Py_ssize_t i, j, step;
+ if( !PySlice_Check(slice) ) {
+ SWIG_Error(SWIG_TypeError, "Slice object expected.");
+ return;
+ }
+ PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), self->size(), &i, &j, &step);
+ swig::delslice(self, i,j);
+ }
+SWIGINTERN std::vector< LedgerEntry >::value_type const &std_vector_Sl_LedgerEntry_Sg____getitem____SWIG_1(std::vector< LedgerEntry > const *self,std::vector< LedgerEntry >::difference_type i){
+ return *(swig::cgetpos(self, i));
+ }
+SWIGINTERN void std_vector_Sl_LedgerEntry_Sg____setitem____SWIG_2(std::vector< LedgerEntry > *self,std::vector< LedgerEntry >::difference_type i,std::vector< LedgerEntry >::value_type const &x){
+ *(swig::getpos(self,i)) = x;
+ }
+SWIGINTERN void std_vector_Sl_LedgerEntry_Sg__append(std::vector< LedgerEntry > *self,std::vector< LedgerEntry >::value_type const &x){
+ self->push_back(x);
+ }
+
+ namespace swig {
+ template <> struct traits {
+ typedef pointer_category category;
+ static const char* type_name() { return"TxRef"; }
+ };
+ }
+
+
+ namespace swig {
+ template <> struct traits > > {
+ typedef value_category category;
+ static const char* type_name() {
+ return "std::vector<" "TxRef" " *," "std::allocator< TxRef * >" " >";
+ }
+ };
+ }
+
+SWIGINTERN swig::SwigPyIterator *std_vector_Sl_TxRef_Sm__Sg__iterator(std::vector< TxRef * > *self,PyObject **PYTHON_SELF){
+ return swig::make_output_iterator(self->begin(), self->begin(), self->end(), *PYTHON_SELF);
+ }
+SWIGINTERN bool std_vector_Sl_TxRef_Sm__Sg____nonzero__(std::vector< TxRef * > const *self){
+ return !(self->empty());
+ }
+SWIGINTERN bool std_vector_Sl_TxRef_Sm__Sg____bool__(std::vector< TxRef * > const *self){
+ return !(self->empty());
+ }
+SWIGINTERN std::vector< TxRef * >::size_type std_vector_Sl_TxRef_Sm__Sg____len__(std::vector< TxRef * > const *self){
+ return self->size();
+ }
+SWIGINTERN std::vector< TxRef * >::value_type std_vector_Sl_TxRef_Sm__Sg__pop(std::vector< TxRef * > *self){
+ if (self->size() == 0)
+ throw std::out_of_range("pop from empty container");
+ std::vector >::value_type x = self->back();
+ self->pop_back();
+ return x;
+ }
+SWIGINTERN std::vector< TxRef *,std::allocator< TxRef * > > *std_vector_Sl_TxRef_Sm__Sg____getslice__(std::vector< TxRef * > *self,std::vector< TxRef * >::difference_type i,std::vector< TxRef * >::difference_type j){
+ return swig::getslice(self, i, j);
+ }
+SWIGINTERN void std_vector_Sl_TxRef_Sm__Sg____setslice____SWIG_0(std::vector< TxRef * > *self,std::vector< TxRef * >::difference_type i,std::vector< TxRef * >::difference_type j,std::vector< TxRef *,std::allocator< TxRef * > > const &v=std::vector< TxRef *,std::allocator< TxRef * > >()){
+ swig::setslice(self, i, j, v);
+ }
+SWIGINTERN void std_vector_Sl_TxRef_Sm__Sg____delslice__(std::vector< TxRef * > *self,std::vector< TxRef * >::difference_type i,std::vector< TxRef * >::difference_type j){
+ swig::delslice(self, i, j);
+ }
+SWIGINTERN void std_vector_Sl_TxRef_Sm__Sg____delitem____SWIG_0(std::vector< TxRef * > *self,std::vector< TxRef * >::difference_type i){
+ self->erase(swig::getpos(self,i));
+ }
+SWIGINTERN std::vector< TxRef *,std::allocator< TxRef * > > *std_vector_Sl_TxRef_Sm__Sg____getitem____SWIG_0(std::vector< TxRef * > *self,PySliceObject *slice){
+ Py_ssize_t i, j, step;
+ if( !PySlice_Check(slice) ) {
+ SWIG_Error(SWIG_TypeError, "Slice object expected.");
+ return NULL;
+ }
+ PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), self->size(), &i, &j, &step);
+ return swig::getslice(self, i, j);
+ }
+SWIGINTERN void std_vector_Sl_TxRef_Sm__Sg____setitem____SWIG_0(std::vector< TxRef * > *self,PySliceObject *slice,std::vector< TxRef *,std::allocator< TxRef * > > const &v){
+ Py_ssize_t i, j, step;
+ if( !PySlice_Check(slice) ) {
+ SWIG_Error(SWIG_TypeError, "Slice object expected.");
+ return;
+ }
+ PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), self->size(), &i, &j, &step);
+ swig::setslice(self, i, j, v);
+ }
+SWIGINTERN void std_vector_Sl_TxRef_Sm__Sg____setitem____SWIG_1(std::vector< TxRef * > *self,PySliceObject *slice){
+ Py_ssize_t i, j, step;
+ if( !PySlice_Check(slice) ) {
+ SWIG_Error(SWIG_TypeError, "Slice object expected.");
+ return;
+ }
+ PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), self->size(), &i, &j, &step);
+ swig::delslice(self, i,j);
+ }
+SWIGINTERN void std_vector_Sl_TxRef_Sm__Sg____delitem____SWIG_1(std::vector< TxRef * > *self,PySliceObject *slice){
+ Py_ssize_t i, j, step;
+ if( !PySlice_Check(slice) ) {
+ SWIG_Error(SWIG_TypeError, "Slice object expected.");
+ return;
+ }
+ PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), self->size(), &i, &j, &step);
+ swig::delslice(self, i,j);
+ }
+SWIGINTERN std::vector< TxRef * >::value_type std_vector_Sl_TxRef_Sm__Sg____getitem____SWIG_1(std::vector< TxRef * > *self,std::vector< TxRef * >::difference_type i){
+ return *(swig::cgetpos(self, i));
+ }
+SWIGINTERN void std_vector_Sl_TxRef_Sm__Sg____setitem____SWIG_2(std::vector< TxRef * > *self,std::vector< TxRef * >::difference_type i,std::vector< TxRef * >::value_type x){
+ *(swig::getpos(self,i)) = x;
+ }
+SWIGINTERN void std_vector_Sl_TxRef_Sm__Sg__append(std::vector< TxRef * > *self,std::vector< TxRef * >::value_type x){
+ self->push_back(x);
+ }
+
+ namespace swig {
+ template <> struct traits {
+ typedef pointer_category category;
+ static const char* type_name() { return"BlockHeaderRef"; }
+ };
+ }
+
+
+ namespace swig {
+ template <> struct traits > > {
+ typedef value_category category;
+ static const char* type_name() {
+ return "std::vector<" "BlockHeaderRef" " *," "std::allocator< BlockHeaderRef * >" " >";
+ }
+ };
+ }
+
+SWIGINTERN swig::SwigPyIterator *std_vector_Sl_BlockHeaderRef_Sm__Sg__iterator(std::vector< BlockHeaderRef * > *self,PyObject **PYTHON_SELF){
+ return swig::make_output_iterator(self->begin(), self->begin(), self->end(), *PYTHON_SELF);
+ }
+SWIGINTERN bool std_vector_Sl_BlockHeaderRef_Sm__Sg____nonzero__(std::vector< BlockHeaderRef * > const *self){
+ return !(self->empty());
+ }
+SWIGINTERN bool std_vector_Sl_BlockHeaderRef_Sm__Sg____bool__(std::vector< BlockHeaderRef * > const *self){
+ return !(self->empty());
+ }
+SWIGINTERN std::vector< BlockHeaderRef * >::size_type std_vector_Sl_BlockHeaderRef_Sm__Sg____len__(std::vector< BlockHeaderRef * > const *self){
+ return self->size();
+ }
+SWIGINTERN std::vector< BlockHeaderRef * >::value_type std_vector_Sl_BlockHeaderRef_Sm__Sg__pop(std::vector< BlockHeaderRef * > *self){
+ if (self->size() == 0)
+ throw std::out_of_range("pop from empty container");
+ std::vector >::value_type x = self->back();
+ self->pop_back();
+ return x;
+ }
+SWIGINTERN std::vector< BlockHeaderRef *,std::allocator< BlockHeaderRef * > > *std_vector_Sl_BlockHeaderRef_Sm__Sg____getslice__(std::vector< BlockHeaderRef * > *self,std::vector< BlockHeaderRef * >::difference_type i,std::vector< BlockHeaderRef * >::difference_type j){
+ return swig::getslice(self, i, j);
+ }
+SWIGINTERN void std_vector_Sl_BlockHeaderRef_Sm__Sg____setslice____SWIG_0(std::vector< BlockHeaderRef * > *self,std::vector< BlockHeaderRef * >::difference_type i,std::vector< BlockHeaderRef * >::difference_type j,std::vector< BlockHeaderRef *,std::allocator< BlockHeaderRef * > > const &v=std::vector< BlockHeaderRef *,std::allocator< BlockHeaderRef * > >()){
+ swig::setslice(self, i, j, v);
+ }
+SWIGINTERN void std_vector_Sl_BlockHeaderRef_Sm__Sg____delslice__(std::vector< BlockHeaderRef * > *self,std::vector< BlockHeaderRef * >::difference_type i,std::vector< BlockHeaderRef * >::difference_type j){
+ swig::delslice(self, i, j);
+ }
+SWIGINTERN void std_vector_Sl_BlockHeaderRef_Sm__Sg____delitem____SWIG_0(std::vector< BlockHeaderRef * > *self,std::vector< BlockHeaderRef * >::difference_type i){
+ self->erase(swig::getpos(self,i));
+ }
+SWIGINTERN std::vector< BlockHeaderRef *,std::allocator< BlockHeaderRef * > > *std_vector_Sl_BlockHeaderRef_Sm__Sg____getitem____SWIG_0(std::vector< BlockHeaderRef * > *self,PySliceObject *slice){
+ Py_ssize_t i, j, step;
+ if( !PySlice_Check(slice) ) {
+ SWIG_Error(SWIG_TypeError, "Slice object expected.");
+ return NULL;
+ }
+ PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), self->size(), &i, &j, &step);
+ return swig::getslice(self, i, j);
+ }
+SWIGINTERN void std_vector_Sl_BlockHeaderRef_Sm__Sg____setitem____SWIG_0(std::vector< BlockHeaderRef * > *self,PySliceObject *slice,std::vector< BlockHeaderRef *,std::allocator< BlockHeaderRef * > > const &v){
+ Py_ssize_t i, j, step;
+ if( !PySlice_Check(slice) ) {
+ SWIG_Error(SWIG_TypeError, "Slice object expected.");
+ return;
+ }
+ PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), self->size(), &i, &j, &step);
+ swig::setslice(self, i, j, v);
+ }
+SWIGINTERN void std_vector_Sl_BlockHeaderRef_Sm__Sg____setitem____SWIG_1(std::vector< BlockHeaderRef * > *self,PySliceObject *slice){
+ Py_ssize_t i, j, step;
+ if( !PySlice_Check(slice) ) {
+ SWIG_Error(SWIG_TypeError, "Slice object expected.");
+ return;
+ }
+ PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), self->size(), &i, &j, &step);
+ swig::delslice(self, i,j);
+ }
+SWIGINTERN void std_vector_Sl_BlockHeaderRef_Sm__Sg____delitem____SWIG_1(std::vector< BlockHeaderRef * > *self,PySliceObject *slice){
+ Py_ssize_t i, j, step;
+ if( !PySlice_Check(slice) ) {
+ SWIG_Error(SWIG_TypeError, "Slice object expected.");
+ return;
+ }
+ PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), self->size(), &i, &j, &step);
+ swig::delslice(self, i,j);
+ }
+SWIGINTERN std::vector< BlockHeaderRef * >::value_type std_vector_Sl_BlockHeaderRef_Sm__Sg____getitem____SWIG_1(std::vector< BlockHeaderRef * > *self,std::vector< BlockHeaderRef * >::difference_type i){
+ return *(swig::cgetpos(self, i));
+ }
+SWIGINTERN void std_vector_Sl_BlockHeaderRef_Sm__Sg____setitem____SWIG_2(std::vector< BlockHeaderRef * > *self,std::vector< BlockHeaderRef * >::difference_type i,std::vector< BlockHeaderRef * >::value_type x){
+ *(swig::getpos(self,i)) = x;
+ }
+SWIGINTERN void std_vector_Sl_BlockHeaderRef_Sm__Sg__append(std::vector< BlockHeaderRef * > *self,std::vector< BlockHeaderRef * >::value_type x){
+ self->push_back(x);
+ }
+
+ namespace swig {
+ template <> struct traits {
+ typedef pointer_category category;
+ static const char* type_name() { return"UnspentTxOut"; }
+ };
+ }
+
+
+ namespace swig {
+ template <> struct traits > > {
+ typedef pointer_category category;
+ static const char* type_name() {
+ return "std::vector<" "UnspentTxOut" "," "std::allocator< UnspentTxOut >" " >";
+ }
+ };
+ }
+
+SWIGINTERN swig::SwigPyIterator *std_vector_Sl_UnspentTxOut_Sg__iterator(std::vector< UnspentTxOut > *self,PyObject **PYTHON_SELF){
+ return swig::make_output_iterator(self->begin(), self->begin(), self->end(), *PYTHON_SELF);
+ }
+SWIGINTERN bool std_vector_Sl_UnspentTxOut_Sg____nonzero__(std::vector< UnspentTxOut > const *self){
+ return !(self->empty());
+ }
+SWIGINTERN bool std_vector_Sl_UnspentTxOut_Sg____bool__(std::vector< UnspentTxOut > const *self){
+ return !(self->empty());
+ }
+SWIGINTERN std::vector< UnspentTxOut >::size_type std_vector_Sl_UnspentTxOut_Sg____len__(std::vector< UnspentTxOut > const *self){
+ return self->size();
+ }
+SWIGINTERN std::vector< UnspentTxOut >::value_type std_vector_Sl_UnspentTxOut_Sg__pop(std::vector< UnspentTxOut > *self){
+ if (self->size() == 0)
+ throw std::out_of_range("pop from empty container");
+ std::vector >::value_type x = self->back();
+ self->pop_back();
+ return x;
+ }
+SWIGINTERN std::vector< UnspentTxOut,std::allocator< UnspentTxOut > > *std_vector_Sl_UnspentTxOut_Sg____getslice__(std::vector< UnspentTxOut > *self,std::vector< UnspentTxOut >::difference_type i,std::vector< UnspentTxOut >::difference_type j){
+ return swig::getslice(self, i, j);
+ }
+SWIGINTERN void std_vector_Sl_UnspentTxOut_Sg____setslice____SWIG_0(std::vector< UnspentTxOut > *self,std::vector< UnspentTxOut >::difference_type i,std::vector< UnspentTxOut >::difference_type j,std::vector< UnspentTxOut,std::allocator< UnspentTxOut > > const &v=std::vector< UnspentTxOut,std::allocator< UnspentTxOut > >()){
+ swig::setslice(self, i, j, v);
+ }
+SWIGINTERN void std_vector_Sl_UnspentTxOut_Sg____delslice__(std::vector< UnspentTxOut > *self,std::vector< UnspentTxOut >::difference_type i,std::vector< UnspentTxOut >::difference_type j){
+ swig::delslice(self, i, j);
+ }
+SWIGINTERN void std_vector_Sl_UnspentTxOut_Sg____delitem____SWIG_0(std::vector< UnspentTxOut > *self,std::vector< UnspentTxOut >::difference_type i){
+ self->erase(swig::getpos(self,i));
+ }
+SWIGINTERN std::vector< UnspentTxOut,std::allocator< UnspentTxOut > > *std_vector_Sl_UnspentTxOut_Sg____getitem____SWIG_0(std::vector< UnspentTxOut > *self,PySliceObject *slice){
+ Py_ssize_t i, j, step;
+ if( !PySlice_Check(slice) ) {
+ SWIG_Error(SWIG_TypeError, "Slice object expected.");
+ return NULL;
+ }
+ PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), self->size(), &i, &j, &step);
+ return swig::getslice(self, i, j);
+ }
+SWIGINTERN void std_vector_Sl_UnspentTxOut_Sg____setitem____SWIG_0(std::vector< UnspentTxOut > *self,PySliceObject *slice,std::vector< UnspentTxOut,std::allocator< UnspentTxOut > > const &v){
+ Py_ssize_t i, j, step;
+ if( !PySlice_Check(slice) ) {
+ SWIG_Error(SWIG_TypeError, "Slice object expected.");
+ return;
+ }
+ PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), self->size(), &i, &j, &step);
+ swig::setslice(self, i, j, v);
+ }
+SWIGINTERN void std_vector_Sl_UnspentTxOut_Sg____setitem____SWIG_1(std::vector< UnspentTxOut > *self,PySliceObject *slice){
+ Py_ssize_t i, j, step;
+ if( !PySlice_Check(slice) ) {
+ SWIG_Error(SWIG_TypeError, "Slice object expected.");
+ return;
+ }
+ PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), self->size(), &i, &j, &step);
+ swig::delslice(self, i,j);
+ }
+SWIGINTERN void std_vector_Sl_UnspentTxOut_Sg____delitem____SWIG_1(std::vector< UnspentTxOut > *self,PySliceObject *slice){
+ Py_ssize_t i, j, step;
+ if( !PySlice_Check(slice) ) {
+ SWIG_Error(SWIG_TypeError, "Slice object expected.");
+ return;
+ }
+ PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), self->size(), &i, &j, &step);
+ swig::delslice(self, i,j);
+ }
+SWIGINTERN std::vector< UnspentTxOut >::value_type const &std_vector_Sl_UnspentTxOut_Sg____getitem____SWIG_1(std::vector< UnspentTxOut > const *self,std::vector< UnspentTxOut >::difference_type i){
+ return *(swig::cgetpos(self, i));
+ }
+SWIGINTERN void std_vector_Sl_UnspentTxOut_Sg____setitem____SWIG_2(std::vector< UnspentTxOut > *self,std::vector< UnspentTxOut >::difference_type i,std::vector< UnspentTxOut >::value_type const &x){
+ *(swig::getpos(self,i)) = x;
+ }
+SWIGINTERN void std_vector_Sl_UnspentTxOut_Sg__append(std::vector< UnspentTxOut > *self,std::vector< UnspentTxOut >::value_type const &x){
+ self->push_back(x);
+ }
+
+SWIGINTERN swig_type_info*
+SWIG_pchar_descriptor(void)
+{
+ static int init = 0;
+ static swig_type_info* info = 0;
+ if (!init) {
+ info = SWIG_TypeQuery("_p_char");
+ init = 1;
+ }
+ return info;
+}
+
+
+SWIGINTERN int
+SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc)
+{
+#if PY_VERSION_HEX>=0x03000000
+ if (PyUnicode_Check(obj))
+#else
+ if (PyString_Check(obj))
+#endif
+ {
+ char *cstr; Py_ssize_t len;
+#if PY_VERSION_HEX>=0x03000000
+ if (!alloc && cptr) {
+ /* We can't allow converting without allocation, since the internal
+ representation of string in Python 3 is UCS-2/UCS-4 but we require
+ a UTF-8 representation.
+ TODO(bhy) More detailed explanation */
+ return SWIG_RuntimeError;
+ }
+ obj = PyUnicode_AsUTF8String(obj);
+ PyBytes_AsStringAndSize(obj, &cstr, &len);
+ if(alloc) *alloc = SWIG_NEWOBJ;
+#else
+ PyString_AsStringAndSize(obj, &cstr, &len);
+#endif
+ if (cptr) {
+ if (alloc) {
+ /*
+ In python the user should not be able to modify the inner
+ string representation. To warranty that, if you define
+ SWIG_PYTHON_SAFE_CSTRINGS, a new/copy of the python string
+ buffer is always returned.
+
+ The default behavior is just to return the pointer value,
+ so, be careful.
+ */
+#if defined(SWIG_PYTHON_SAFE_CSTRINGS)
+ if (*alloc != SWIG_OLDOBJ)
+#else
+ if (*alloc == SWIG_NEWOBJ)
+#endif
+ {
+ *cptr = reinterpret_cast< char* >(memcpy((new char[len + 1]), cstr, sizeof(char)*(len + 1)));
+ *alloc = SWIG_NEWOBJ;
+ }
+ else {
+ *cptr = cstr;
+ *alloc = SWIG_OLDOBJ;
+ }
+ } else {
+ #if PY_VERSION_HEX>=0x03000000
+ assert(0); /* Should never reach here in Python 3 */
+ #endif
+ *cptr = SWIG_Python_str_AsChar(obj);
+ }
+ }
+ if (psize) *psize = len + 1;
+#if PY_VERSION_HEX>=0x03000000
+ Py_XDECREF(obj);
+#endif
+ return SWIG_OK;
+ } else {
+ swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
+ if (pchar_descriptor) {
+ void* vptr = 0;
+ if (SWIG_ConvertPtr(obj, &vptr, pchar_descriptor, 0) == SWIG_OK) {
+ if (cptr) *cptr = (char *) vptr;
+ if (psize) *psize = vptr ? (strlen((char *)vptr) + 1) : 0;
+ if (alloc) *alloc = SWIG_OLDOBJ;
+ return SWIG_OK;
+ }
+ }
+ }
+ return SWIG_TypeError;
+}
+
+
+SWIGINTERN int
+SWIG_AsPtr_std_string (PyObject * obj, std::string **val)
+{
+ char* buf = 0 ; size_t size = 0; int alloc = SWIG_OLDOBJ;
+ if (SWIG_IsOK((SWIG_AsCharPtrAndSize(obj, &buf, &size, &alloc)))) {
+ if (buf) {
+ if (val) *val = new std::string(buf, size - 1);
+ if (alloc == SWIG_NEWOBJ) delete[] buf;
+ return SWIG_NEWOBJ;
+ } else {
+ if (val) *val = 0;
+ return SWIG_OLDOBJ;
+ }
+ } else {
+ static int init = 0;
+ static swig_type_info* descriptor = 0;
+ if (!init) {
+ descriptor = SWIG_TypeQuery("std::string" " *");
+ init = 1;
+ }
+ if (descriptor) {
+ std::string *vptr;
+ int res = SWIG_ConvertPtr(obj, (void**)&vptr, descriptor, 0);
+ if (SWIG_IsOK(res) && val) *val = vptr;
+ return res;
+ }
+ }
+ return SWIG_ERROR;
+}
+
+
+SWIGINTERN int
+SWIG_AsVal_unsigned_SS_long_SS_long (PyObject *obj, unsigned long long *val)
+{
+ int res = SWIG_TypeError;
+ if (PyLong_Check(obj)) {
+ unsigned long long v = PyLong_AsUnsignedLongLong(obj);
+ if (!PyErr_Occurred()) {
+ if (val) *val = v;
+ return SWIG_OK;
+ } else {
+ PyErr_Clear();
+ }
+ } else {
+ unsigned long v;
+ res = SWIG_AsVal_unsigned_SS_long (obj,&v);
+ if (SWIG_IsOK(res)) {
+ if (val) *val = v;
+ return res;
+ }
+ }
+#ifdef SWIG_PYTHON_CAST_MODE
+ {
+ const double mant_max = 1LL << DBL_MANT_DIG;
+ double d;
+ res = SWIG_AsVal_double (obj,&d);
+ if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, 0, mant_max)) {
+ if (val) *val = (unsigned long long)(d);
+ return SWIG_AddCast(res);
+ }
+ res = SWIG_TypeError;
+ }
+#endif
+ return res;
+}
+
+
+SWIGINTERN int
+SWIG_AsVal_bool (PyObject *obj, bool *val)
+{
+ int r = PyObject_IsTrue(obj);
+ if (r == -1)
+ return SWIG_ERROR;
+ if (val) *val = r ? true : false;
+ return SWIG_OK;
+}
+
+
+SWIGINTERNINLINE PyObject*
+SWIG_From_long_SS_long (long long value)
+{
+ return ((value < LONG_MIN) || (value > LONG_MAX)) ?
+ PyLong_FromLongLong(value) : PyInt_FromLong(static_cast< long >(value));
+}
+
+
+SWIGINTERNINLINE PyObject*
+SWIG_From_unsigned_SS_long_SS_long (unsigned long long value)
+{
+ return (value > LONG_MAX) ?
+ PyLong_FromUnsignedLongLong(value) : PyInt_FromLong(static_cast< long >(value));
+}
+
+
+SWIGINTERN int
+SWIG_AsVal_long_SS_long (PyObject *obj, long long *val)
+{
+ int res = SWIG_TypeError;
+ if (PyLong_Check(obj)) {
+ long long v = PyLong_AsLongLong(obj);
+ if (!PyErr_Occurred()) {
+ if (val) *val = v;
+ return SWIG_OK;
+ } else {
+ PyErr_Clear();
+ }
+ } else {
+ long v;
+ res = SWIG_AsVal_long (obj,&v);
+ if (SWIG_IsOK(res)) {
+ if (val) *val = v;
+ return res;
+ }
+ }
+#ifdef SWIG_PYTHON_CAST_MODE
+ {
+ const double mant_max = 1LL << DBL_MANT_DIG;
+ const double mant_min = -mant_max;
+ double d;
+ res = SWIG_AsVal_double (obj,&d);
+ if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, mant_min, mant_max)) {
+ if (val) *val = (long long)(d);
+ return SWIG_AddCast(res);
+ }
+ res = SWIG_TypeError;
+ }
+#endif
+ return res;
+}
+
+
+SWIGINTERNINLINE PyObject *
+SWIG_FromCharPtrAndSize(const char* carray, size_t size)
+{
+ if (carray) {
+ if (size > INT_MAX) {
+ swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
+ return pchar_descriptor ?
+ SWIG_InternalNewPointerObj(const_cast< char * >(carray), pchar_descriptor, 0) : SWIG_Py_Void();
+ } else {
+#if PY_VERSION_HEX >= 0x03000000
+ return PyUnicode_FromStringAndSize(carray, static_cast< int >(size));
+#else
+ return PyString_FromStringAndSize(carray, static_cast< int >(size));
+#endif
+ }
+ } else {
+ return SWIG_Py_Void();
+ }
+}
+
+
+SWIGINTERNINLINE PyObject *
+SWIG_From_std_string (const std::string& s)
+{
+ return SWIG_FromCharPtrAndSize(s.data(), s.size());
+}
+
+
+SWIGINTERNINLINE PyObject *
+SWIG_FromCharPtr(const char *cptr)
+{
+ return SWIG_FromCharPtrAndSize(cptr, (cptr ? strlen(cptr) : 0));
+}
+
+
+SWIGINTERNINLINE PyObject *
+SWIG_From_size_t (size_t value)
+{
+ return SWIG_From_unsigned_SS_long (static_cast< unsigned long >(value));
+}
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+SWIGINTERN PyObject *_wrap_delete_SwigPyIterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+ PyObject *resultobj = 0;
+ swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ PyObject * obj0 = 0 ;
+
+ if (!PyArg_ParseTuple(args,(char *)"O:delete_SwigPyIterator",&obj0)) SWIG_fail;
+ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_DISOWN | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_SwigPyIterator" "', argument " "1"" of type '" "swig::SwigPyIterator *""'");
+ }
+ arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1);
+ delete arg1;
+ resultobj = SWIG_Py_Void();
+ return resultobj;
+fail:
+ return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_SwigPyIterator_value(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+ PyObject *resultobj = 0;
+ swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ PyObject * obj0 = 0 ;
+ PyObject *result = 0 ;
+
+ if (!PyArg_ParseTuple(args,(char *)"O:SwigPyIterator_value",&obj0)) SWIG_fail;
+ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_value" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'");
+ }
+ arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1);
+ try {
+ result = (PyObject *)((swig::SwigPyIterator const *)arg1)->value();
+ }
+ catch(swig::stop_iteration &_e) {
+ {
+ (void)_e;
+ SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void());
+ SWIG_fail;
+ }
+ }
+
+ resultobj = result;
+ return resultobj;
+fail:
+ return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_SwigPyIterator_incr__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+ PyObject *resultobj = 0;
+ swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ;
+ size_t arg2 ;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ size_t val2 ;
+ int ecode2 = 0 ;
+ PyObject * obj0 = 0 ;
+ PyObject * obj1 = 0 ;
+ swig::SwigPyIterator *result = 0 ;
+
+ if (!PyArg_ParseTuple(args,(char *)"OO:SwigPyIterator_incr",&obj0,&obj1)) SWIG_fail;
+ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_incr" "', argument " "1"" of type '" "swig::SwigPyIterator *""'");
+ }
+ arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1);
+ ecode2 = SWIG_AsVal_size_t(obj1, &val2);
+ if (!SWIG_IsOK(ecode2)) {
+ SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SwigPyIterator_incr" "', argument " "2"" of type '" "size_t""'");
+ }
+ arg2 = static_cast< size_t >(val2);
+ try {
+ result = (swig::SwigPyIterator *)(arg1)->incr(arg2);
+ }
+ catch(swig::stop_iteration &_e) {
+ {
+ (void)_e;
+ SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void());
+ SWIG_fail;
+ }
+ }
+
+ resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 );
+ return resultobj;
+fail:
+ return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_SwigPyIterator_incr__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+ PyObject *resultobj = 0;
+ swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ PyObject * obj0 = 0 ;
+ swig::SwigPyIterator *result = 0 ;
+
+ if (!PyArg_ParseTuple(args,(char *)"O:SwigPyIterator_incr",&obj0)) SWIG_fail;
+ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_incr" "', argument " "1"" of type '" "swig::SwigPyIterator *""'");
+ }
+ arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1);
+ try {
+ result = (swig::SwigPyIterator *)(arg1)->incr();
+ }
+ catch(swig::stop_iteration &_e) {
+ {
+ (void)_e;
+ SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void());
+ SWIG_fail;
+ }
+ }
+
+ resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 );
+ return resultobj;
+fail:
+ return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_SwigPyIterator_incr(PyObject *self, PyObject *args) {
+ int argc;
+ PyObject *argv[3];
+ 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 == 1) {
+ int _v;
+ void *vptr = 0;
+ int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_swig__SwigPyIterator, 0);
+ _v = SWIG_CheckState(res);
+ if (_v) {
+ return _wrap_SwigPyIterator_incr__SWIG_1(self, args);
+ }
+ }
+ if (argc == 2) {
+ int _v;
+ void *vptr = 0;
+ int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_swig__SwigPyIterator, 0);
+ _v = SWIG_CheckState(res);
+ if (_v) {
+ {
+ int res = SWIG_AsVal_size_t(argv[1], NULL);
+ _v = SWIG_CheckState(res);
+ }
+ if (_v) {
+ return _wrap_SwigPyIterator_incr__SWIG_0(self, args);
+ }
+ }
+ }
+
+fail:
+ SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'SwigPyIterator_incr'.\n"
+ " Possible C/C++ prototypes are:\n"
+ " swig::SwigPyIterator::incr(size_t)\n"
+ " swig::SwigPyIterator::incr()\n");
+ return 0;
+}
+
+
+SWIGINTERN PyObject *_wrap_SwigPyIterator_decr__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+ PyObject *resultobj = 0;
+ swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ;
+ size_t arg2 ;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ size_t val2 ;
+ int ecode2 = 0 ;
+ PyObject * obj0 = 0 ;
+ PyObject * obj1 = 0 ;
+ swig::SwigPyIterator *result = 0 ;
+
+ if (!PyArg_ParseTuple(args,(char *)"OO:SwigPyIterator_decr",&obj0,&obj1)) SWIG_fail;
+ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_decr" "', argument " "1"" of type '" "swig::SwigPyIterator *""'");
+ }
+ arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1);
+ ecode2 = SWIG_AsVal_size_t(obj1, &val2);
+ if (!SWIG_IsOK(ecode2)) {
+ SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SwigPyIterator_decr" "', argument " "2"" of type '" "size_t""'");
+ }
+ arg2 = static_cast< size_t >(val2);
+ try {
+ result = (swig::SwigPyIterator *)(arg1)->decr(arg2);
+ }
+ catch(swig::stop_iteration &_e) {
+ {
+ (void)_e;
+ SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void());
+ SWIG_fail;
+ }
+ }
+
+ resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 );
+ return resultobj;
+fail:
+ return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_SwigPyIterator_decr__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+ PyObject *resultobj = 0;
+ swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ PyObject * obj0 = 0 ;
+ swig::SwigPyIterator *result = 0 ;
+
+ if (!PyArg_ParseTuple(args,(char *)"O:SwigPyIterator_decr",&obj0)) SWIG_fail;
+ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_decr" "', argument " "1"" of type '" "swig::SwigPyIterator *""'");
+ }
+ arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1);
+ try {
+ result = (swig::SwigPyIterator *)(arg1)->decr();
+ }
+ catch(swig::stop_iteration &_e) {
+ {
+ (void)_e;
+ SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void());
+ SWIG_fail;
+ }
+ }
+
+ resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 );
+ return resultobj;
+fail:
+ return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_SwigPyIterator_decr(PyObject *self, PyObject *args) {
+ int argc;
+ PyObject *argv[3];
+ 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 == 1) {
+ int _v;
+ void *vptr = 0;
+ int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_swig__SwigPyIterator, 0);
+ _v = SWIG_CheckState(res);
+ if (_v) {
+ return _wrap_SwigPyIterator_decr__SWIG_1(self, args);
+ }
+ }
+ if (argc == 2) {
+ int _v;
+ void *vptr = 0;
+ int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_swig__SwigPyIterator, 0);
+ _v = SWIG_CheckState(res);
+ if (_v) {
+ {
+ int res = SWIG_AsVal_size_t(argv[1], NULL);
+ _v = SWIG_CheckState(res);
+ }
+ if (_v) {
+ return _wrap_SwigPyIterator_decr__SWIG_0(self, args);
+ }
+ }
+ }
+
+fail:
+ SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'SwigPyIterator_decr'.\n"
+ " Possible C/C++ prototypes are:\n"
+ " swig::SwigPyIterator::decr(size_t)\n"
+ " swig::SwigPyIterator::decr()\n");
+ return 0;
+}
+
+
+SWIGINTERN PyObject *_wrap_SwigPyIterator_distance(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+ PyObject *resultobj = 0;
+ swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ;
+ swig::SwigPyIterator *arg2 = 0 ;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ void *argp2 = 0 ;
+ int res2 = 0 ;
+ PyObject * obj0 = 0 ;
+ PyObject * obj1 = 0 ;
+ ptrdiff_t result;
+
+ if (!PyArg_ParseTuple(args,(char *)"OO:SwigPyIterator_distance",&obj0,&obj1)) SWIG_fail;
+ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_distance" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'");
+ }
+ arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1);
+ res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_swig__SwigPyIterator, 0 | 0);
+ if (!SWIG_IsOK(res2)) {
+ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SwigPyIterator_distance" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'");
+ }
+ if (!argp2) {
+ SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SwigPyIterator_distance" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'");
+ }
+ arg2 = reinterpret_cast< swig::SwigPyIterator * >(argp2);
+ try {
+ result = ((swig::SwigPyIterator const *)arg1)->distance((swig::SwigPyIterator const &)*arg2);
+ }
+ catch(std::invalid_argument &_e) {
+ SWIG_Python_Raise(SWIG_NewPointerObj((new std::invalid_argument(static_cast< const std::invalid_argument& >(_e))),SWIGTYPE_p_std__invalid_argument,SWIG_POINTER_OWN), "std::invalid_argument", SWIGTYPE_p_std__invalid_argument); SWIG_fail;
+ }
+
+ resultobj = SWIG_From_ptrdiff_t(static_cast< ptrdiff_t >(result));
+ return resultobj;
+fail:
+ return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_SwigPyIterator_equal(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+ PyObject *resultobj = 0;
+ swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ;
+ swig::SwigPyIterator *arg2 = 0 ;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ void *argp2 = 0 ;
+ int res2 = 0 ;
+ PyObject * obj0 = 0 ;
+ PyObject * obj1 = 0 ;
+ bool result;
+
+ if (!PyArg_ParseTuple(args,(char *)"OO:SwigPyIterator_equal",&obj0,&obj1)) SWIG_fail;
+ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_equal" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'");
+ }
+ arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1);
+ res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_swig__SwigPyIterator, 0 | 0);
+ if (!SWIG_IsOK(res2)) {
+ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SwigPyIterator_equal" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'");
+ }
+ if (!argp2) {
+ SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SwigPyIterator_equal" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'");
+ }
+ arg2 = reinterpret_cast< swig::SwigPyIterator * >(argp2);
+ try {
+ result = (bool)((swig::SwigPyIterator const *)arg1)->equal((swig::SwigPyIterator const &)*arg2);
+ }
+ catch(std::invalid_argument &_e) {
+ SWIG_Python_Raise(SWIG_NewPointerObj((new std::invalid_argument(static_cast< const std::invalid_argument& >(_e))),SWIGTYPE_p_std__invalid_argument,SWIG_POINTER_OWN), "std::invalid_argument", SWIGTYPE_p_std__invalid_argument); SWIG_fail;
+ }
+
+ resultobj = SWIG_From_bool(static_cast< bool >(result));
+ return resultobj;
+fail:
+ return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_SwigPyIterator_copy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+ PyObject *resultobj = 0;
+ swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ PyObject * obj0 = 0 ;
+ swig::SwigPyIterator *result = 0 ;
+
+ if (!PyArg_ParseTuple(args,(char *)"O:SwigPyIterator_copy",&obj0)) SWIG_fail;
+ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_copy" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'");
+ }
+ arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1);
+ result = (swig::SwigPyIterator *)((swig::SwigPyIterator const *)arg1)->copy();
+ resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_OWN | 0 );
+ return resultobj;
+fail:
+ return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_SwigPyIterator_next(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+ PyObject *resultobj = 0;
+ swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ PyObject * obj0 = 0 ;
+ PyObject *result = 0 ;
+
+ if (!PyArg_ParseTuple(args,(char *)"O:SwigPyIterator_next",&obj0)) SWIG_fail;
+ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_next" "', argument " "1"" of type '" "swig::SwigPyIterator *""'");
+ }
+ arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1);
+ try {
+ result = (PyObject *)(arg1)->next();
+ }
+ catch(swig::stop_iteration &_e) {
+ {
+ (void)_e;
+ SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void());
+ SWIG_fail;
+ }
+ }
+
+ resultobj = result;
+ return resultobj;
+fail:
+ return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_SwigPyIterator___next__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+ PyObject *resultobj = 0;
+ swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ PyObject * obj0 = 0 ;
+ PyObject *result = 0 ;
+
+ if (!PyArg_ParseTuple(args,(char *)"O:SwigPyIterator___next__",&obj0)) SWIG_fail;
+ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator___next__" "', argument " "1"" of type '" "swig::SwigPyIterator *""'");
+ }
+ arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1);
+ try {
+ result = (PyObject *)(arg1)->__next__();
+ }
+ catch(swig::stop_iteration &_e) {
+ {
+ (void)_e;
+ SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void());
+ SWIG_fail;
+ }
+ }
+
+ resultobj = result;
+ return resultobj;
+fail:
+ return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_SwigPyIterator_previous(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+ PyObject *resultobj = 0;
+ swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ PyObject * obj0 = 0 ;
+ PyObject *result = 0 ;
+
+ if (!PyArg_ParseTuple(args,(char *)"O:SwigPyIterator_previous",&obj0)) SWIG_fail;
+ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_previous" "', argument " "1"" of type '" "swig::SwigPyIterator *""'");
+ }
+ arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1);
+ try {
+ result = (PyObject *)(arg1)->previous();
+ }
+ catch(swig::stop_iteration &_e) {
+ {
+ (void)_e;
+ SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void());
+ SWIG_fail;
+ }
+ }
+
+ resultobj = result;
+ return resultobj;
+fail:
+ return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_SwigPyIterator_advance(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+ PyObject *resultobj = 0;
+ swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ;
+ ptrdiff_t arg2 ;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ ptrdiff_t val2 ;
+ int ecode2 = 0 ;
+ PyObject * obj0 = 0 ;
+ PyObject * obj1 = 0 ;
+ swig::SwigPyIterator *result = 0 ;
+
+ if (!PyArg_ParseTuple(args,(char *)"OO:SwigPyIterator_advance",&obj0,&obj1)) SWIG_fail;
+ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_advance" "', argument " "1"" of type '" "swig::SwigPyIterator *""'");
+ }
+ arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1);
+ ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
+ if (!SWIG_IsOK(ecode2)) {
+ SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SwigPyIterator_advance" "', argument " "2"" of type '" "ptrdiff_t""'");
+ }
+ arg2 = static_cast< ptrdiff_t >(val2);
+ try {
+ result = (swig::SwigPyIterator *)(arg1)->advance(arg2);
+ }
+ catch(swig::stop_iteration &_e) {
+ {
+ (void)_e;
+ SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void());
+ SWIG_fail;
+ }
+ }
+
+ resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 );
+ return resultobj;
+fail:
+ return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_SwigPyIterator___eq__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+ PyObject *resultobj = 0;
+ swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ;
+ swig::SwigPyIterator *arg2 = 0 ;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ void *argp2 = 0 ;
+ int res2 = 0 ;
+ PyObject * obj0 = 0 ;
+ PyObject * obj1 = 0 ;
+ bool result;
+
+ if (!PyArg_ParseTuple(args,(char *)"OO:SwigPyIterator___eq__",&obj0,&obj1)) SWIG_fail;
+ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator___eq__" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'");
+ }
+ arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1);
+ res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_swig__SwigPyIterator, 0 | 0);
+ if (!SWIG_IsOK(res2)) {
+ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SwigPyIterator___eq__" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'");
+ }
+ if (!argp2) {
+ SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SwigPyIterator___eq__" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'");
+ }
+ arg2 = reinterpret_cast< swig::SwigPyIterator * >(argp2);
+ result = (bool)((swig::SwigPyIterator const *)arg1)->operator ==((swig::SwigPyIterator const &)*arg2);
+ resultobj = SWIG_From_bool(static_cast< bool >(result));
+ return resultobj;
+fail:
+ return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_SwigPyIterator___ne__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+ PyObject *resultobj = 0;
+ swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ;
+ swig::SwigPyIterator *arg2 = 0 ;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ void *argp2 = 0 ;
+ int res2 = 0 ;
+ PyObject * obj0 = 0 ;
+ PyObject * obj1 = 0 ;
+ bool result;
+
+ if (!PyArg_ParseTuple(args,(char *)"OO:SwigPyIterator___ne__",&obj0,&obj1)) SWIG_fail;
+ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator___ne__" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'");
+ }
+ arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1);
+ res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_swig__SwigPyIterator, 0 | 0);
+ if (!SWIG_IsOK(res2)) {
+ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SwigPyIterator___ne__" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'");
+ }
+ if (!argp2) {
+ SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SwigPyIterator___ne__" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'");
+ }
+ arg2 = reinterpret_cast< swig::SwigPyIterator * >(argp2);
+ result = (bool)((swig::SwigPyIterator const *)arg1)->operator !=((swig::SwigPyIterator const &)*arg2);
+ resultobj = SWIG_From_bool(static_cast< bool >(result));
+ return resultobj;
+fail:
+ return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_SwigPyIterator___iadd__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+ PyObject *resultobj = 0;
+ swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ;
+ ptrdiff_t arg2 ;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ ptrdiff_t val2 ;
+ int ecode2 = 0 ;
+ PyObject * obj0 = 0 ;
+ PyObject * obj1 = 0 ;
+ swig::SwigPyIterator *result = 0 ;
+
+ if (!PyArg_ParseTuple(args,(char *)"OO:SwigPyIterator___iadd__",&obj0,&obj1)) SWIG_fail;
+ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_DISOWN | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator___iadd__" "', argument " "1"" of type '" "swig::SwigPyIterator *""'");
+ }
+ arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1);
+ ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
+ if (!SWIG_IsOK(ecode2)) {
+ SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SwigPyIterator___iadd__" "', argument " "2"" of type '" "ptrdiff_t""'");
+ }
+ arg2 = static_cast< ptrdiff_t >(val2);
+ try {
+ result = (swig::SwigPyIterator *) &(arg1)->operator +=(arg2);
+ }
+ catch(swig::stop_iteration &_e) {
+ {
+ (void)_e;
+ SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void());
+ SWIG_fail;
+ }
+ }
+
+ resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_OWN | 0 );
+ return resultobj;
+fail:
+ return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_SwigPyIterator___isub__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+ PyObject *resultobj = 0;
+ swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ;
+ ptrdiff_t arg2 ;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ ptrdiff_t val2 ;
+ int ecode2 = 0 ;
+ PyObject * obj0 = 0 ;
+ PyObject * obj1 = 0 ;
+ swig::SwigPyIterator *result = 0 ;
+
+ if (!PyArg_ParseTuple(args,(char *)"OO:SwigPyIterator___isub__",&obj0,&obj1)) SWIG_fail;
+ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_DISOWN | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator___isub__" "', argument " "1"" of type '" "swig::SwigPyIterator *""'");
+ }
+ arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1);
+ ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
+ if (!SWIG_IsOK(ecode2)) {
+ SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SwigPyIterator___isub__" "', argument " "2"" of type '" "ptrdiff_t""'");
+ }
+ arg2 = static_cast< ptrdiff_t >(val2);
+ try {
+ result = (swig::SwigPyIterator *) &(arg1)->operator -=(arg2);
+ }
+ catch(swig::stop_iteration &_e) {
+ {
+ (void)_e;
+ SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void());
+ SWIG_fail;
+ }
+ }
+
+ resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_OWN | 0 );
+ return resultobj;
+fail:
+ return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_SwigPyIterator___add__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+ PyObject *resultobj = 0;
+ swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ;
+ ptrdiff_t arg2 ;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ ptrdiff_t val2 ;
+ int ecode2 = 0 ;
+ PyObject * obj0 = 0 ;
+ PyObject * obj1 = 0 ;
+ swig::SwigPyIterator *result = 0 ;
+
+ if (!PyArg_ParseTuple(args,(char *)"OO:SwigPyIterator___add__",&obj0,&obj1)) SWIG_fail;
+ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator___add__" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'");
+ }
+ arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1);
+ ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
+ if (!SWIG_IsOK(ecode2)) {
+ SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SwigPyIterator___add__" "', argument " "2"" of type '" "ptrdiff_t""'");
+ }
+ arg2 = static_cast< ptrdiff_t >(val2);
+ try {
+ result = (swig::SwigPyIterator *)((swig::SwigPyIterator const *)arg1)->operator +(arg2);
+ }
+ catch(swig::stop_iteration &_e) {
+ {
+ (void)_e;
+ SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void());
+ SWIG_fail;
+ }
+ }
+
+ resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_OWN | 0 );
+ return resultobj;
+fail:
+ return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_SwigPyIterator___sub____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+ PyObject *resultobj = 0;
+ swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ;
+ ptrdiff_t arg2 ;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ ptrdiff_t val2 ;
+ int ecode2 = 0 ;
+ PyObject * obj0 = 0 ;
+ PyObject * obj1 = 0 ;
+ swig::SwigPyIterator *result = 0 ;
+
+ if (!PyArg_ParseTuple(args,(char *)"OO:SwigPyIterator___sub__",&obj0,&obj1)) SWIG_fail;
+ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator___sub__" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'");
+ }
+ arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1);
+ ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
+ if (!SWIG_IsOK(ecode2)) {
+ SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SwigPyIterator___sub__" "', argument " "2"" of type '" "ptrdiff_t""'");
+ }
+ arg2 = static_cast< ptrdiff_t >(val2);
+ try {
+ result = (swig::SwigPyIterator *)((swig::SwigPyIterator const *)arg1)->operator -(arg2);
+ }
+ catch(swig::stop_iteration &_e) {
+ {
+ (void)_e;
+ SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void());
+ SWIG_fail;
+ }
+ }
+
+ resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_OWN | 0 );
+ return resultobj;
+fail:
+ return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_SwigPyIterator___sub____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+ PyObject *resultobj = 0;
+ swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ;
+ swig::SwigPyIterator *arg2 = 0 ;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ void *argp2 = 0 ;
+ int res2 = 0 ;
+ PyObject * obj0 = 0 ;
+ PyObject * obj1 = 0 ;
+ ptrdiff_t result;
+
+ if (!PyArg_ParseTuple(args,(char *)"OO:SwigPyIterator___sub__",&obj0,&obj1)) SWIG_fail;
+ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator___sub__" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'");
+ }
+ arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1);
+ res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_swig__SwigPyIterator, 0 | 0);
+ if (!SWIG_IsOK(res2)) {
+ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SwigPyIterator___sub__" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'");
+ }
+ if (!argp2) {
+ SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SwigPyIterator___sub__" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'");
+ }
+ arg2 = reinterpret_cast< swig::SwigPyIterator * >(argp2);
+ result = ((swig::SwigPyIterator const *)arg1)->operator -((swig::SwigPyIterator const &)*arg2);
+ resultobj = SWIG_From_ptrdiff_t(static_cast< ptrdiff_t >(result));
+ return resultobj;
+fail:
+ return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_SwigPyIterator___sub__(PyObject *self, PyObject *args) {
+ int argc;
+ PyObject *argv[3];
+ 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_swig__SwigPyIterator, 0);
+ _v = SWIG_CheckState(res);
+ if (_v) {
+ int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_swig__SwigPyIterator, 0);
+ _v = SWIG_CheckState(res);
+ if (_v) {
+ return _wrap_SwigPyIterator___sub____SWIG_1(self, args);
+ }
+ }
+ }
+ if (argc == 2) {
+ int _v;
+ void *vptr = 0;
+ int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_swig__SwigPyIterator, 0);
+ _v = SWIG_CheckState(res);
+ if (_v) {
+ {
+ int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL);
+ _v = SWIG_CheckState(res);
+ }
+ if (_v) {
+ return _wrap_SwigPyIterator___sub____SWIG_0(self, args);
+ }
+ }
+ }
+
+fail:
+ Py_INCREF(Py_NotImplemented);
+ return Py_NotImplemented;
+}
+
+
+SWIGINTERN PyObject *SwigPyIterator_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+ PyObject *obj;
+ if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
+ SWIG_TypeNewClientData(SWIGTYPE_p_swig__SwigPyIterator, SWIG_NewClientData(obj));
+ return SWIG_Py_Void();
+}
+
+SWIGINTERN PyObject *_wrap_vector_int_iterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+ PyObject *resultobj = 0;
+ std::vector< int > *arg1 = (std::vector< int > *) 0 ;
+ PyObject **arg2 = (PyObject **) 0 ;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ PyObject * obj0 = 0 ;
+ swig::SwigPyIterator *result = 0 ;
+
+ arg2 = &obj0;
+ if (!PyArg_ParseTuple(args,(char *)"O:vector_int_iterator",&obj0)) SWIG_fail;
+ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_int_iterator" "', argument " "1"" of type '" "std::vector< int > *""'");
+ }
+ arg1 = reinterpret_cast< std::vector< int > * >(argp1);
+ result = (swig::SwigPyIterator *)std_vector_Sl_int_Sg__iterator(arg1,arg2);
+ resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_OWN | 0 );
+ return resultobj;
+fail:
+ return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_vector_int___nonzero__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+ PyObject *resultobj = 0;
+ std::vector< int > *arg1 = (std::vector< int > *) 0 ;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ PyObject * obj0 = 0 ;
+ bool result;
+
+ if (!PyArg_ParseTuple(args,(char *)"O:vector_int___nonzero__",&obj0)) SWIG_fail;
+ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_int___nonzero__" "', argument " "1"" of type '" "std::vector< int > const *""'");
+ }
+ arg1 = reinterpret_cast< std::vector< int > * >(argp1);
+ result = (bool)std_vector_Sl_int_Sg____nonzero__((std::vector< int > const *)arg1);
+ resultobj = SWIG_From_bool(static_cast< bool >(result));
+ return resultobj;
+fail:
+ return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_vector_int___bool__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+ PyObject *resultobj = 0;
+ std::vector< int > *arg1 = (std::vector< int > *) 0 ;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ PyObject * obj0 = 0 ;
+ bool result;
+
+ if (!PyArg_ParseTuple(args,(char *)"O:vector_int___bool__",&obj0)) SWIG_fail;
+ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_int___bool__" "', argument " "1"" of type '" "std::vector< int > const *""'");
+ }
+ arg1 = reinterpret_cast< std::vector< int > * >(argp1);
+ result = (bool)std_vector_Sl_int_Sg____bool__((std::vector< int > const *)arg1);
+ resultobj = SWIG_From_bool(static_cast< bool >(result));
+ return resultobj;
+fail:
+ return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_vector_int___len__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+ PyObject *resultobj = 0;
+ std::vector< int > *arg1 = (std::vector< int > *) 0 ;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ PyObject * obj0 = 0 ;
+ std::vector< int >::size_type result;
+
+ if (!PyArg_ParseTuple(args,(char *)"O:vector_int___len__",&obj0)) SWIG_fail;
+ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_int___len__" "', argument " "1"" of type '" "std::vector< int > const *""'");
+ }
+ arg1 = reinterpret_cast< std::vector< int > * >(argp1);
+ result = (std::vector< int >::size_type)std_vector_Sl_int_Sg____len__((std::vector< int > const *)arg1);
+ resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
+ return resultobj;
+fail:
+ return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_vector_int_pop(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+ PyObject *resultobj = 0;
+ std::vector< int > *arg1 = (std::vector< int > *) 0 ;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ PyObject * obj0 = 0 ;
+ std::vector< int >::value_type result;
+
+ if (!PyArg_ParseTuple(args,(char *)"O:vector_int_pop",&obj0)) SWIG_fail;
+ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_int_pop" "', argument " "1"" of type '" "std::vector< int > *""'");
+ }
+ arg1 = reinterpret_cast< std::vector< int > * >(argp1);
+ try {
+ result = (std::vector< int >::value_type)std_vector_Sl_int_Sg__pop(arg1);
+ }
+ catch(std::out_of_range &_e) {
+ SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
+ }
+
+ resultobj = SWIG_From_int(static_cast< int >(result));
+ return resultobj;
+fail:
+ return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_vector_int___getslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+ PyObject *resultobj = 0;
+ std::vector< int > *arg1 = (std::vector< int > *) 0 ;
+ std::vector< int >::difference_type arg2 ;
+ std::vector< int >::difference_type arg3 ;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ ptrdiff_t val2 ;
+ int ecode2 = 0 ;
+ ptrdiff_t val3 ;
+ int ecode3 = 0 ;
+ PyObject * obj0 = 0 ;
+ PyObject * obj1 = 0 ;
+ PyObject * obj2 = 0 ;
+ std::vector< int,std::allocator< int > > *result = 0 ;
+
+ if (!PyArg_ParseTuple(args,(char *)"OOO:vector_int___getslice__",&obj0,&obj1,&obj2)) SWIG_fail;
+ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_int___getslice__" "', argument " "1"" of type '" "std::vector< int > *""'");
+ }
+ arg1 = reinterpret_cast< std::vector< int > * >(argp1);
+ ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
+ if (!SWIG_IsOK(ecode2)) {
+ SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vector_int___getslice__" "', argument " "2"" of type '" "std::vector< int >::difference_type""'");
+ }
+ arg2 = static_cast< std::vector< int >::difference_type >(val2);
+ ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3);
+ if (!SWIG_IsOK(ecode3)) {
+ SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "vector_int___getslice__" "', argument " "3"" of type '" "std::vector< int >::difference_type""'");
+ }
+ arg3 = static_cast< std::vector< int >::difference_type >(val3);
+ try {
+ result = (std::vector< int,std::allocator< int > > *)std_vector_Sl_int_Sg____getslice__(arg1,arg2,arg3);
+ }
+ catch(std::out_of_range &_e) {
+ SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
+ }
+
+ resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, SWIG_POINTER_OWN | 0 );
+ return resultobj;
+fail:
+ return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_vector_int___setslice____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+ PyObject *resultobj = 0;
+ std::vector< int > *arg1 = (std::vector< int > *) 0 ;
+ std::vector< int >::difference_type arg2 ;
+ std::vector< int >::difference_type arg3 ;
+ std::vector< int,std::allocator< int > > *arg4 = 0 ;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ ptrdiff_t val2 ;
+ int ecode2 = 0 ;
+ ptrdiff_t val3 ;
+ int ecode3 = 0 ;
+ int res4 = SWIG_OLDOBJ ;
+ PyObject * obj0 = 0 ;
+ PyObject * obj1 = 0 ;
+ PyObject * obj2 = 0 ;
+ PyObject * obj3 = 0 ;
+
+ if (!PyArg_ParseTuple(args,(char *)"OOOO:vector_int___setslice__",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
+ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_int___setslice__" "', argument " "1"" of type '" "std::vector< int > *""'");
+ }
+ arg1 = reinterpret_cast< std::vector< int > * >(argp1);
+ ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
+ if (!SWIG_IsOK(ecode2)) {
+ SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vector_int___setslice__" "', argument " "2"" of type '" "std::vector< int >::difference_type""'");
+ }
+ arg2 = static_cast< std::vector< int >::difference_type >(val2);
+ ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3);
+ if (!SWIG_IsOK(ecode3)) {
+ SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "vector_int___setslice__" "', argument " "3"" of type '" "std::vector< int >::difference_type""'");
+ }
+ arg3 = static_cast< std::vector< int >::difference_type >(val3);
+ {
+ std::vector > *ptr = (std::vector > *)0;
+ res4 = swig::asptr(obj3, &ptr);
+ if (!SWIG_IsOK(res4)) {
+ SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "vector_int___setslice__" "', argument " "4"" of type '" "std::vector< int,std::allocator< int > > const &""'");
+ }
+ if (!ptr) {
+ SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "vector_int___setslice__" "', argument " "4"" of type '" "std::vector< int,std::allocator< int > > const &""'");
+ }
+ arg4 = ptr;
+ }
+ try {
+ std_vector_Sl_int_Sg____setslice____SWIG_0(arg1,arg2,arg3,(std::vector< int,std::allocator< int > > const &)*arg4);
+ }
+ catch(std::out_of_range &_e) {
+ SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
+ }
+ catch(std::invalid_argument &_e) {
+ SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
+ }
+
+ resultobj = SWIG_Py_Void();
+ if (SWIG_IsNewObj(res4)) delete arg4;
+ return resultobj;
+fail:
+ if (SWIG_IsNewObj(res4)) delete arg4;
+ return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_vector_int___setslice____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+ PyObject *resultobj = 0;
+ std::vector< int > *arg1 = (std::vector< int > *) 0 ;
+ std::vector< int >::difference_type arg2 ;
+ std::vector< int >::difference_type arg3 ;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ ptrdiff_t val2 ;
+ int ecode2 = 0 ;
+ ptrdiff_t val3 ;
+ int ecode3 = 0 ;
+ PyObject * obj0 = 0 ;
+ PyObject * obj1 = 0 ;
+ PyObject * obj2 = 0 ;
+
+ if (!PyArg_ParseTuple(args,(char *)"OOO:vector_int___setslice__",&obj0,&obj1,&obj2)) SWIG_fail;
+ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_int___setslice__" "', argument " "1"" of type '" "std::vector< int > *""'");
+ }
+ arg1 = reinterpret_cast< std::vector< int > * >(argp1);
+ ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
+ if (!SWIG_IsOK(ecode2)) {
+ SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vector_int___setslice__" "', argument " "2"" of type '" "std::vector< int >::difference_type""'");
+ }
+ arg2 = static_cast< std::vector< int >::difference_type >(val2);
+ ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3);
+ if (!SWIG_IsOK(ecode3)) {
+ SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "vector_int___setslice__" "', argument " "3"" of type '" "std::vector< int >::difference_type""'");
+ }
+ arg3 = static_cast< std::vector< int >::difference_type >(val3);
+ try {
+ std_vector_Sl_int_Sg____setslice____SWIG_0(arg1,arg2,arg3);
+ }
+ catch(std::out_of_range &_e) {
+ SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
+ }
+ catch(std::invalid_argument &_e) {
+ SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
+ }
+
+ resultobj = SWIG_Py_Void();
+ return resultobj;
+fail:
+ return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_vector_int___setslice__(PyObject *self, PyObject *args) {
+ int argc;
+ PyObject *argv[5];
+ int ii;
+
+ if (!PyTuple_Check(args)) SWIG_fail;
+ argc = args ? (int)PyObject_Length(args) : 0;
+ for (ii = 0; (ii < 4) && (ii < argc); ii++) {
+ argv[ii] = PyTuple_GET_ITEM(args,ii);
+ }
+ if (argc == 3) {
+ int _v;
+ int res = swig::asptr(argv[0], (std::vector >**)(0));
+ _v = SWIG_CheckState(res);
+ if (_v) {
+ {
+ int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL);
+ _v = SWIG_CheckState(res);
+ }
+ if (_v) {
+ {
+ int res = SWIG_AsVal_ptrdiff_t(argv[2], NULL);
+ _v = SWIG_CheckState(res);
+ }
+ if (_v) {
+ return _wrap_vector_int___setslice____SWIG_1(self, args);
+ }
+ }
+ }
+ }
+ if (argc == 4) {
+ int _v;
+ int res = swig::asptr(argv[0], (std::vector >**)(0));
+ _v = SWIG_CheckState(res);
+ if (_v) {
+ {
+ int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL);
+ _v = SWIG_CheckState(res);
+ }
+ if (_v) {
+ {
+ int res = SWIG_AsVal_ptrdiff_t(argv[2], NULL);
+ _v = SWIG_CheckState(res);
+ }
+ if (_v) {
+ int res = swig::asptr(argv[3], (std::vector >**)(0));
+ _v = SWIG_CheckState(res);
+ if (_v) {
+ return _wrap_vector_int___setslice____SWIG_0(self, args);
+ }
+ }
+ }
+ }
+ }
+
+fail:
+ SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'vector_int___setslice__'.\n"
+ " Possible C/C++ prototypes are:\n"
+ " std::vector< int >::__setslice__(std::vector< int >::difference_type,std::vector< int >::difference_type,std::vector< int,std::allocator< int > > const &)\n"
+ " std::vector< int >::__setslice__(std::vector< int >::difference_type,std::vector< int >::difference_type)\n");
+ return 0;
+}
+
+
+SWIGINTERN PyObject *_wrap_vector_int___delslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+ PyObject *resultobj = 0;
+ std::vector< int > *arg1 = (std::vector< int > *) 0 ;
+ std::vector< int >::difference_type arg2 ;
+ std::vector< int >::difference_type arg3 ;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ ptrdiff_t val2 ;
+ int ecode2 = 0 ;
+ ptrdiff_t val3 ;
+ int ecode3 = 0 ;
+ PyObject * obj0 = 0 ;
+ PyObject * obj1 = 0 ;
+ PyObject * obj2 = 0 ;
+
+ if (!PyArg_ParseTuple(args,(char *)"OOO:vector_int___delslice__",&obj0,&obj1,&obj2)) SWIG_fail;
+ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_int___delslice__" "', argument " "1"" of type '" "std::vector< int > *""'");
+ }
+ arg1 = reinterpret_cast< std::vector< int > * >(argp1);
+ ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
+ if (!SWIG_IsOK(ecode2)) {
+ SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vector_int___delslice__" "', argument " "2"" of type '" "std::vector< int >::difference_type""'");
+ }
+ arg2 = static_cast< std::vector< int >::difference_type >(val2);
+ ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3);
+ if (!SWIG_IsOK(ecode3)) {
+ SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "vector_int___delslice__" "', argument " "3"" of type '" "std::vector< int >::difference_type""'");
+ }
+ arg3 = static_cast< std::vector< int >::difference_type >(val3);
+ try {
+ std_vector_Sl_int_Sg____delslice__(arg1,arg2,arg3);
+ }
+ catch(std::out_of_range &_e) {
+ SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
+ }
+
+ resultobj = SWIG_Py_Void();
+ return resultobj;
+fail:
+ return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_vector_int___delitem____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+ PyObject *resultobj = 0;
+ std::vector< int > *arg1 = (std::vector< int > *) 0 ;
+ std::vector< int >::difference_type arg2 ;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ ptrdiff_t val2 ;
+ int ecode2 = 0 ;
+ PyObject * obj0 = 0 ;
+ PyObject * obj1 = 0 ;
+
+ if (!PyArg_ParseTuple(args,(char *)"OO:vector_int___delitem__",&obj0,&obj1)) SWIG_fail;
+ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_int___delitem__" "', argument " "1"" of type '" "std::vector< int > *""'");
+ }
+ arg1 = reinterpret_cast< std::vector< int > * >(argp1);
+ ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
+ if (!SWIG_IsOK(ecode2)) {
+ SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vector_int___delitem__" "', argument " "2"" of type '" "std::vector< int >::difference_type""'");
+ }
+ arg2 = static_cast< std::vector< int >::difference_type >(val2);
+ try {
+ std_vector_Sl_int_Sg____delitem____SWIG_0(arg1,arg2);
+ }
+ catch(std::out_of_range &_e) {
+ SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
+ }
+
+ resultobj = SWIG_Py_Void();
+ return resultobj;
+fail:
+ return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_vector_int___getitem____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+ PyObject *resultobj = 0;
+ std::vector< int > *arg1 = (std::vector< int > *) 0 ;
+ PySliceObject *arg2 = (PySliceObject *) 0 ;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ PyObject * obj0 = 0 ;
+ PyObject * obj1 = 0 ;
+ std::vector< int,std::allocator< int > > *result = 0 ;
+
+ if (!PyArg_ParseTuple(args,(char *)"OO:vector_int___getitem__",&obj0,&obj1)) SWIG_fail;
+ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_int___getitem__" "', argument " "1"" of type '" "std::vector< int > *""'");
+ }
+ arg1 = reinterpret_cast< std::vector< int > * >(argp1);
+ {
+ if (!PySlice_Check(obj1)) {
+ SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_int___getitem__" "', argument " "2"" of type '" "PySliceObject *""'");
+ }
+ arg2 = (PySliceObject *) obj1;
+ }
+ try {
+ result = (std::vector< int,std::allocator< int > > *)std_vector_Sl_int_Sg____getitem____SWIG_0(arg1,arg2);
+ }
+ catch(std::out_of_range &_e) {
+ SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
+ }
+
+ resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 );
+ return resultobj;
+fail:
+ return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_vector_int___setitem____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+ PyObject *resultobj = 0;
+ std::vector< int > *arg1 = (std::vector< int > *) 0 ;
+ PySliceObject *arg2 = (PySliceObject *) 0 ;
+ std::vector< int,std::allocator< int > > *arg3 = 0 ;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ int res3 = SWIG_OLDOBJ ;
+ PyObject * obj0 = 0 ;
+ PyObject * obj1 = 0 ;
+ PyObject * obj2 = 0 ;
+
+ if (!PyArg_ParseTuple(args,(char *)"OOO:vector_int___setitem__",&obj0,&obj1,&obj2)) SWIG_fail;
+ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_int___setitem__" "', argument " "1"" of type '" "std::vector< int > *""'");
+ }
+ arg1 = reinterpret_cast< std::vector< int > * >(argp1);
+ {
+ if (!PySlice_Check(obj1)) {
+ SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_int___setitem__" "', argument " "2"" of type '" "PySliceObject *""'");
+ }
+ arg2 = (PySliceObject *) obj1;
+ }
+ {
+ std::vector > *ptr = (std::vector > *)0;
+ res3 = swig::asptr(obj2, &ptr);
+ if (!SWIG_IsOK(res3)) {
+ SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "vector_int___setitem__" "', argument " "3"" of type '" "std::vector< int,std::allocator< int > > const &""'");
+ }
+ if (!ptr) {
+ SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "vector_int___setitem__" "', argument " "3"" of type '" "std::vector< int,std::allocator< int > > const &""'");
+ }
+ arg3 = ptr;
+ }
+ try {
+ std_vector_Sl_int_Sg____setitem____SWIG_0(arg1,arg2,(std::vector< int,std::allocator< int > > const &)*arg3);
+ }
+ catch(std::out_of_range &_e) {
+ SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
+ }
+ catch(std::invalid_argument &_e) {
+ SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
+ }
+
+ resultobj = SWIG_Py_Void();
+ if (SWIG_IsNewObj(res3)) delete arg3;
+ return resultobj;
+fail:
+ if (SWIG_IsNewObj(res3)) delete arg3;
+ return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_vector_int___setitem____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+ PyObject *resultobj = 0;
+ std::vector< int > *arg1 = (std::vector< int > *) 0 ;
+ PySliceObject *arg2 = (PySliceObject *) 0 ;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ PyObject * obj0 = 0 ;
+ PyObject * obj1 = 0 ;
+
+ if (!PyArg_ParseTuple(args,(char *)"OO:vector_int___setitem__",&obj0,&obj1)) SWIG_fail;
+ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_int___setitem__" "', argument " "1"" of type '" "std::vector< int > *""'");
+ }
+ arg1 = reinterpret_cast< std::vector< int > * >(argp1);
+ {
+ if (!PySlice_Check(obj1)) {
+ SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_int___setitem__" "', argument " "2"" of type '" "PySliceObject *""'");
+ }
+ arg2 = (PySliceObject *) obj1;
+ }
+ try {
+ std_vector_Sl_int_Sg____setitem____SWIG_1(arg1,arg2);
+ }
+ catch(std::out_of_range &_e) {
+ SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
+ }
+
+ resultobj = SWIG_Py_Void();
+ return resultobj;
+fail:
+ return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_vector_int___delitem____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+ PyObject *resultobj = 0;
+ std::vector< int > *arg1 = (std::vector< int > *) 0 ;
+ PySliceObject *arg2 = (PySliceObject *) 0 ;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ PyObject * obj0 = 0 ;
+ PyObject * obj1 = 0 ;
+
+ if (!PyArg_ParseTuple(args,(char *)"OO:vector_int___delitem__",&obj0,&obj1)) SWIG_fail;
+ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_int___delitem__" "', argument " "1"" of type '" "std::vector< int > *""'");
+ }
+ arg1 = reinterpret_cast< std::vector< int > * >(argp1);
+ {
+ if (!PySlice_Check(obj1)) {
+ SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_int___delitem__" "', argument " "2"" of type '" "PySliceObject *""'");
+ }
+ arg2 = (PySliceObject *) obj1;
+ }
+ try {
+ std_vector_Sl_int_Sg____delitem____SWIG_1(arg1,arg2);
+ }
+ catch(std::out_of_range &_e) {
+ SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
+ }
+
+ resultobj = SWIG_Py_Void();
+ return resultobj;
+fail:
+ return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_vector_int___delitem__(PyObject *self, PyObject *args) {
+ int argc;
+ PyObject *argv[3];
+ 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;
+ int res = swig::asptr(argv[0], (std::vector >**)(0));
+ _v = SWIG_CheckState(res);
+ if (_v) {
+ {
+ _v = PySlice_Check(argv[1]);
+ }
+ if (_v) {
+ return _wrap_vector_int___delitem____SWIG_1(self, args);
+ }
+ }
+ }
+ if (argc == 2) {
+ int _v;
+ int res = swig::asptr(argv[0], (std::vector >**)(0));
+ _v = SWIG_CheckState(res);
+ if (_v) {
+ {
+ int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL);
+ _v = SWIG_CheckState(res);
+ }
+ if (_v) {
+ return _wrap_vector_int___delitem____SWIG_0(self, args);
+ }
+ }
+ }
+
+fail:
+ SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'vector_int___delitem__'.\n"
+ " Possible C/C++ prototypes are:\n"
+ " std::vector< int >::__delitem__(std::vector< int >::difference_type)\n"
+ " std::vector< int >::__delitem__(PySliceObject *)\n");
+ return 0;
+}
+
+
+SWIGINTERN PyObject *_wrap_vector_int___getitem____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+ PyObject *resultobj = 0;
+ std::vector< int > *arg1 = (std::vector< int > *) 0 ;
+ std::vector< int >::difference_type arg2 ;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ ptrdiff_t val2 ;
+ int ecode2 = 0 ;
+ PyObject * obj0 = 0 ;
+ PyObject * obj1 = 0 ;
+ std::vector< int >::value_type *result = 0 ;
+
+ if (!PyArg_ParseTuple(args,(char *)"OO:vector_int___getitem__",&obj0,&obj1)) SWIG_fail;
+ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_int___getitem__" "', argument " "1"" of type '" "std::vector< int > const *""'");
+ }
+ arg1 = reinterpret_cast< std::vector< int > * >(argp1);
+ ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
+ if (!SWIG_IsOK(ecode2)) {
+ SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vector_int___getitem__" "', argument " "2"" of type '" "std::vector< int >::difference_type""'");
+ }
+ arg2 = static_cast< std::vector< int >::difference_type >(val2);
+ try {
+ result = (std::vector< int >::value_type *) &std_vector_Sl_int_Sg____getitem____SWIG_1((std::vector< int > const *)arg1,arg2);
+ }
+ catch(std::out_of_range &_e) {
+ SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
+ }
+
+ resultobj = SWIG_From_int(static_cast< int >(*result));
+ return resultobj;
+fail:
+ return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_vector_int___getitem__(PyObject *self, PyObject *args) {
+ int argc;
+ PyObject *argv[3];
+ 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;
+ int res = swig::asptr(argv[0], (std::vector >**)(0));
+ _v = SWIG_CheckState(res);
+ if (_v) {
+ {
+ _v = PySlice_Check(argv[1]);
+ }
+ if (_v) {
+ return _wrap_vector_int___getitem____SWIG_0(self, args);
+ }
+ }
+ }
+ if (argc == 2) {
+ int _v;
+ int res = swig::asptr(argv[0], (std::vector >**)(0));
+ _v = SWIG_CheckState(res);
+ if (_v) {
+ {
+ int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL);
+ _v = SWIG_CheckState(res);
+ }
+ if (_v) {
+ return _wrap_vector_int___getitem____SWIG_1(self, args);
+ }
+ }
+ }
+
+fail:
+ SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'vector_int___getitem__'.\n"
+ " Possible C/C++ prototypes are:\n"
+ " std::vector< int >::__getitem__(PySliceObject *)\n"
+ " std::vector< int >::__getitem__(std::vector< int >::difference_type) const\n");
+ return 0;
+}
+
+
+SWIGINTERN PyObject *_wrap_vector_int___setitem____SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+ PyObject *resultobj = 0;
+ std::vector< int > *arg1 = (std::vector< int > *) 0 ;
+ std::vector< int >::difference_type arg2 ;
+ std::vector< int >::value_type *arg3 = 0 ;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ ptrdiff_t val2 ;
+ int ecode2 = 0 ;
+ std::vector< int >::value_type temp3 ;
+ int val3 ;
+ int ecode3 = 0 ;
+ PyObject * obj0 = 0 ;
+ PyObject * obj1 = 0 ;
+ PyObject * obj2 = 0 ;
+
+ if (!PyArg_ParseTuple(args,(char *)"OOO:vector_int___setitem__",&obj0,&obj1,&obj2)) SWIG_fail;
+ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_int___setitem__" "', argument " "1"" of type '" "std::vector< int > *""'");
+ }
+ arg1 = reinterpret_cast< std::vector< int > * >(argp1);
+ ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
+ if (!SWIG_IsOK(ecode2)) {
+ SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vector_int___setitem__" "', argument " "2"" of type '" "std::vector< int >::difference_type""'");
+ }
+ arg2 = static_cast< std::vector< int >::difference_type >(val2);
+ ecode3 = SWIG_AsVal_int(obj2, &val3);
+ if (!SWIG_IsOK(ecode3)) {
+ SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "vector_int___setitem__" "', argument " "3"" of type '" "std::vector< int >::value_type""'");
+ }
+ temp3 = static_cast< std::vector< int >::value_type >(val3);
+ arg3 = &temp3;
+ try {
+ std_vector_Sl_int_Sg____setitem____SWIG_2(arg1,arg2,(int const &)*arg3);
+ }
+ catch(std::out_of_range &_e) {
+ SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
+ }
+
+ resultobj = SWIG_Py_Void();
+ return resultobj;
+fail:
+ return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_vector_int___setitem__(PyObject *self, PyObject *args) {
+ int argc;
+ PyObject *argv[4];
+ int ii;
+
+ if (!PyTuple_Check(args)) SWIG_fail;
+ argc = args ? (int)PyObject_Length(args) : 0;
+ for (ii = 0; (ii < 3) && (ii < argc); ii++) {
+ argv[ii] = PyTuple_GET_ITEM(args,ii);
+ }
+ if (argc == 2) {
+ int _v;
+ int res = swig::asptr(argv[0], (std::vector >**)(0));
+ _v = SWIG_CheckState(res);
+ if (_v) {
+ {
+ _v = PySlice_Check(argv[1]);
+ }
+ if (_v) {
+ return _wrap_vector_int___setitem____SWIG_1(self, args);
+ }
+ }
+ }
+ if (argc == 3) {
+ int _v;
+ int res = swig::asptr(argv[0], (std::vector >**)(0));
+ _v = SWIG_CheckState(res);
+ if (_v) {
+ {
+ _v = PySlice_Check(argv[1]);
+ }
+ if (_v) {
+ int res = swig::asptr(argv[2], (std::vector >**)(0));
+ _v = SWIG_CheckState(res);
+ if (_v) {
+ return _wrap_vector_int___setitem____SWIG_0(self, args);
+ }
+ }
+ }
+ }
+ if (argc == 3) {
+ int _v;
+ int res = swig::asptr(argv[0], (std::vector >**)(0));
+ _v = SWIG_CheckState(res);
+ if (_v) {
+ {
+ int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL);
+ _v = SWIG_CheckState(res);
+ }
+ if (_v) {
+ {
+ int res = SWIG_AsVal_int(argv[2], NULL);
+ _v = SWIG_CheckState(res);
+ }
+ if (_v) {
+ return _wrap_vector_int___setitem____SWIG_2(self, args);
+ }
+ }
+ }
+ }
+
+fail:
+ SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'vector_int___setitem__'.\n"
+ " Possible C/C++ prototypes are:\n"
+ " std::vector< int >::__setitem__(PySliceObject *,std::vector< int,std::allocator< int > > const &)\n"
+ " std::vector< int >::__setitem__(PySliceObject *)\n"
+ " std::vector< int >::__setitem__(std::vector< int >::difference_type,std::vector< int >::value_type const &)\n");
+ return 0;
+}
+
+
+SWIGINTERN PyObject *_wrap_vector_int_append(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+ PyObject *resultobj = 0;
+ std::vector< int > *arg1 = (std::vector< int > *) 0 ;
+ std::vector< int >::value_type *arg2 = 0 ;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ std::vector< int >::value_type temp2 ;
+ int val2 ;
+ int ecode2 = 0 ;
+ PyObject * obj0 = 0 ;
+ PyObject * obj1 = 0 ;
+
+ if (!PyArg_ParseTuple(args,(char *)"OO:vector_int_append",&obj0,&obj1)) SWIG_fail;
+ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_int_append" "', argument " "1"" of type '" "std::vector< int > *""'");
+ }
+ arg1 = reinterpret_cast< std::vector< int > * >(argp1);
+ ecode2 = SWIG_AsVal_int(obj1, &val2);
+ if (!SWIG_IsOK(ecode2)) {
+ SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vector_int_append" "', argument " "2"" of type '" "std::vector< int >::value_type""'");
+ }
+ temp2 = static_cast< std::vector< int >::value_type >(val2);
+ arg2 = &temp2;
+ std_vector_Sl_int_Sg__append(arg1,(int const &)*arg2);
+ resultobj = SWIG_Py_Void();
+ return resultobj;
+fail:
+ return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_new_vector_int__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+ PyObject *resultobj = 0;
+ std::vector< int > *result = 0 ;
+
+ if (!PyArg_ParseTuple(args,(char *)":new_vector_int")) SWIG_fail;
+ result = (std::vector< int > *)new std::vector< int >();
+ resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, SWIG_POINTER_NEW | 0 );
+ return resultobj;
+fail:
+ return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_new_vector_int__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+ PyObject *resultobj = 0;
+ std::vector< int > *arg1 = 0 ;
+ int res1 = SWIG_OLDOBJ ;
+ PyObject * obj0 = 0 ;
+ std::vector< int > *result = 0 ;
+
+ if (!PyArg_ParseTuple(args,(char *)"O:new_vector_int",&obj0)) SWIG_fail;
+ {
+ std::vector > *ptr = (std::vector > *)0;
+ res1 = swig::asptr(obj0, &ptr);
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_vector_int" "', argument " "1"" of type '" "std::vector< int > const &""'");
+ }
+ if (!ptr) {
+ SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_vector_int" "', argument " "1"" of type '" "std::vector< int > const &""'");
+ }
+ arg1 = ptr;
+ }
+ result = (std::vector< int > *)new std::vector< int >((std::vector< int > const &)*arg1);
+ resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, SWIG_POINTER_NEW | 0 );
+ if (SWIG_IsNewObj(res1)) delete arg1;
+ return resultobj;
+fail:
+ if (SWIG_IsNewObj(res1)) delete arg1;
+ return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_vector_int_empty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+ PyObject *resultobj = 0;
+ std::vector< int > *arg1 = (std::vector< int > *) 0 ;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ PyObject * obj0 = 0 ;
+ bool result;
+
+ if (!PyArg_ParseTuple(args,(char *)"O:vector_int_empty",&obj0)) SWIG_fail;
+ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_int_empty" "', argument " "1"" of type '" "std::vector< int > const *""'");
+ }
+ arg1 = reinterpret_cast< std::vector< int > * >(argp1);
+ result = (bool)((std::vector< int > const *)arg1)->empty();
+ resultobj = SWIG_From_bool(static_cast< bool >(result));
+ return resultobj;
+fail:
+ return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_vector_int_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+ PyObject *resultobj = 0;
+ std::vector< int > *arg1 = (std::vector< int > *) 0 ;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ PyObject * obj0 = 0 ;
+ std::vector< int >::size_type result;
+
+ if (!PyArg_ParseTuple(args,(char *)"O:vector_int_size",&obj0)) SWIG_fail;
+ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_int_size" "', argument " "1"" of type '" "std::vector< int > const *""'");
+ }
+ arg1 = reinterpret_cast< std::vector< int > * >(argp1);
+ result = (std::vector< int >::size_type)((std::vector< int > const *)arg1)->size();
+ resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
+ return resultobj;
+fail:
+ return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_vector_int_clear(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+ PyObject *resultobj = 0;
+ std::vector< int > *arg1 = (std::vector< int > *) 0 ;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ PyObject * obj0 = 0 ;
+
+ if (!PyArg_ParseTuple(args,(char *)"O:vector_int_clear",&obj0)) SWIG_fail;
+ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_int_clear" "', argument " "1"" of type '" "std::vector< int > *""'");
+ }
+ arg1 = reinterpret_cast< std::vector< int > * >(argp1);
+ (arg1)->clear();
+ resultobj = SWIG_Py_Void();
+ return resultobj;
+fail:
+ return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_vector_int_swap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+ PyObject *resultobj = 0;
+ std::vector< int > *arg1 = (std::vector< int > *) 0 ;
+ std::vector< int > *arg2 = 0 ;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ void *argp2 = 0 ;
+ int res2 = 0 ;
+ PyObject * obj0 = 0 ;
+ PyObject * obj1 = 0 ;
+
+ if (!PyArg_ParseTuple(args,(char *)"OO:vector_int_swap",&obj0,&obj1)) SWIG_fail;
+ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_int_swap" "', argument " "1"" of type '" "std::vector< int > *""'");
+ }
+ arg1 = reinterpret_cast< std::vector< int > * >(argp1);
+ res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 );
+ if (!SWIG_IsOK(res2)) {
+ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "vector_int_swap" "', argument " "2"" of type '" "std::vector< int > &""'");
+ }
+ if (!argp2) {
+ SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "vector_int_swap" "', argument " "2"" of type '" "std::vector< int > &""'");
+ }
+ arg2 = reinterpret_cast< std::vector< int > * >(argp2);
+ (arg1)->swap(*arg2);
+ resultobj = SWIG_Py_Void();
+ return resultobj;
+fail:
+ return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_vector_int_get_allocator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+ PyObject *resultobj = 0;
+ std::vector< int > *arg1 = (std::vector< int > *) 0 ;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ PyObject * obj0 = 0 ;
+ SwigValueWrapper< std::allocator< int > > result;
+
+ if (!PyArg_ParseTuple(args,(char *)"O:vector_int_get_allocator",&obj0)) SWIG_fail;
+ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_int_get_allocator" "', argument " "1"" of type '" "std::vector< int > const *""'");
+ }
+ arg1 = reinterpret_cast< std::vector< int > * >(argp1);
+ result = ((std::vector< int > const *)arg1)->get_allocator();
+ resultobj = SWIG_NewPointerObj((new std::vector< int >::allocator_type(static_cast< const std::vector< int >::allocator_type& >(result))), SWIGTYPE_p_std__allocatorT_int_t, SWIG_POINTER_OWN | 0 );
+ return resultobj;
+fail:
+ return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_vector_int_begin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+ PyObject *resultobj = 0;
+ std::vector< int > *arg1 = (std::vector< int > *) 0 ;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ PyObject * obj0 = 0 ;
+ std::vector< int >::iterator result;
+
+ if (!PyArg_ParseTuple(args,(char *)"O:vector_int_begin",&obj0)) SWIG_fail;
+ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_int_begin" "', argument " "1"" of type '" "std::vector< int > *""'");
+ }
+ arg1 = reinterpret_cast< std::vector< int > * >(argp1);
+ result = (arg1)->begin();
+ resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< int >::iterator & >(result)),
+ swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN);
+ return resultobj;
+fail:
+ return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_vector_int_end(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+ PyObject *resultobj = 0;
+ std::vector< int > *arg1 = (std::vector< int > *) 0 ;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ PyObject * obj0 = 0 ;
+ std::vector< int >::iterator result;
+
+ if (!PyArg_ParseTuple(args,(char *)"O:vector_int_end",&obj0)) SWIG_fail;
+ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_int_end" "', argument " "1"" of type '" "std::vector< int > *""'");
+ }
+ arg1 = reinterpret_cast< std::vector< int > * >(argp1);
+ result = (arg1)->end();
+ resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< int >::iterator & >(result)),
+ swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN);
+ return resultobj;
+fail:
+ return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_vector_int_rbegin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+ PyObject *resultobj = 0;
+ std::vector< int > *arg1 = (std::vector< int > *) 0 ;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ PyObject * obj0 = 0 ;
+ std::vector< int >::reverse_iterator result;
+
+ if (!PyArg_ParseTuple(args,(char *)"O:vector_int_rbegin",&obj0)) SWIG_fail;
+ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_int_rbegin" "', argument " "1"" of type '" "std::vector< int > *""'");
+ }
+ arg1 = reinterpret_cast< std::vector< int > * >(argp1);
+ result = (arg1)->rbegin();
+ resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< int >::reverse_iterator & >(result)),
+ swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN);
+ return resultobj;
+fail:
+ return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_vector_int_rend(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+ PyObject *resultobj = 0;
+ std::vector< int > *arg1 = (std::vector< int > *) 0 ;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ PyObject * obj0 = 0 ;
+ std::vector< int >::reverse_iterator result;
+
+ if (!PyArg_ParseTuple(args,(char *)"O:vector_int_rend",&obj0)) SWIG_fail;
+ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_int_rend" "', argument " "1"" of type '" "std::vector< int > *""'");
+ }
+ arg1 = reinterpret_cast< std::vector< int > * >(argp1);
+ result = (arg1)->rend();
+ resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< int >::reverse_iterator & >(result)),
+ swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN);
+ return resultobj;
+fail:
+ return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_new_vector_int__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+ PyObject *resultobj = 0;
+ std::vector< int >::size_type arg1 ;
+ unsigned int val1 ;
+ int ecode1 = 0 ;
+ PyObject * obj0 = 0 ;
+ std::vector< int > *result = 0 ;
+
+ if (!PyArg_ParseTuple(args,(char *)"O:new_vector_int",&obj0)) SWIG_fail;
+ ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+ if (!SWIG_IsOK(ecode1)) {
+ SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_vector_int" "', argument " "1"" of type '" "std::vector< int >::size_type""'");
+ }
+ arg1 = static_cast< std::vector< int >::size_type >(val1);
+ result = (std::vector< int > *)new std::vector< int >(arg1);
+ resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, SWIG_POINTER_NEW | 0 );
+ return resultobj;
+fail:
+ return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_vector_int_pop_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+ PyObject *resultobj = 0;
+ std::vector< int > *arg1 = (std::vector< int > *) 0 ;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ PyObject * obj0 = 0 ;
+
+ if (!PyArg_ParseTuple(args,(char *)"O:vector_int_pop_back",&obj0)) SWIG_fail;
+ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_int_pop_back" "', argument " "1"" of type '" "std::vector< int > *""'");
+ }
+ arg1 = reinterpret_cast< std::vector< int > * >(argp1);
+ (arg1)->pop_back();
+ resultobj = SWIG_Py_Void();
+ return resultobj;
+fail:
+ return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_vector_int_resize__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+ PyObject *resultobj = 0;
+ std::vector< int > *arg1 = (std::vector< int > *) 0 ;
+ std::vector< int >::size_type arg2 ;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ unsigned int val2 ;
+ int ecode2 = 0 ;
+ PyObject * obj0 = 0 ;
+ PyObject * obj1 = 0 ;
+
+ if (!PyArg_ParseTuple(args,(char *)"OO:vector_int_resize",&obj0,&obj1)) SWIG_fail;
+ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_int_resize" "', argument " "1"" of type '" "std::vector< int > *""'");
+ }
+ arg1 = reinterpret_cast< std::vector< int > * >(argp1);
+ ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2);
+ if (!SWIG_IsOK(ecode2)) {
+ SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vector_int_resize" "', argument " "2"" of type '" "std::vector< int >::size_type""'");
+ }
+ arg2 = static_cast< std::vector< int >::size_type >(val2);
+ (arg1)->resize(arg2);
+ resultobj = SWIG_Py_Void();
+ return resultobj;
+fail:
+ return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_vector_int_erase__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+ PyObject *resultobj = 0;
+ std::vector< int > *arg1 = (std::vector< int > *) 0 ;
+ std::vector< int >::iterator arg2 ;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ swig::SwigPyIterator *iter2 = 0 ;
+ int res2 ;
+ PyObject * obj0 = 0 ;
+ PyObject * obj1 = 0 ;
+ std::vector< int >::iterator result;
+
+ if (!PyArg_ParseTuple(args,(char *)"OO:vector_int_erase",&obj0,&obj1)) SWIG_fail;
+ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_int_erase" "', argument " "1"" of type '" "std::vector< int > *""'");
+ }
+ arg1 = reinterpret_cast< std::vector< int > * >(argp1);
+ res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0);
+ if (!SWIG_IsOK(res2) || !iter2) {
+ SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_int_erase" "', argument " "2"" of type '" "std::vector< int >::iterator""'");
+ } else {
+ swig::SwigPyIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2);
+ if (iter_t) {
+ arg2 = iter_t->get_current();
+ } else {
+ SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_int_erase" "', argument " "2"" of type '" "std::vector< int >::iterator""'");
+ }
+ }
+ result = (arg1)->erase(arg2);
+ resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< int >::iterator & >(result)),
+ swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN);
+ return resultobj;
+fail:
+ return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_vector_int_erase__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+ PyObject *resultobj = 0;
+ std::vector< int > *arg1 = (std::vector< int > *) 0 ;
+ std::vector< int >::iterator arg2 ;
+ std::vector< int >::iterator arg3 ;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ swig::SwigPyIterator *iter2 = 0 ;
+ int res2 ;
+ swig::SwigPyIterator *iter3 = 0 ;
+ int res3 ;
+ PyObject * obj0 = 0 ;
+ PyObject * obj1 = 0 ;
+ PyObject * obj2 = 0 ;
+ std::vector< int >::iterator result;
+
+ if (!PyArg_ParseTuple(args,(char *)"OOO:vector_int_erase",&obj0,&obj1,&obj2)) SWIG_fail;
+ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_int_erase" "', argument " "1"" of type '" "std::vector< int > *""'");
+ }
+ arg1 = reinterpret_cast< std::vector< int > * >(argp1);
+ res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0);
+ if (!SWIG_IsOK(res2) || !iter2) {
+ SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_int_erase" "', argument " "2"" of type '" "std::vector< int >::iterator""'");
+ } else {
+ swig::SwigPyIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2);
+ if (iter_t) {
+ arg2 = iter_t->get_current();
+ } else {
+ SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_int_erase" "', argument " "2"" of type '" "std::vector< int >::iterator""'");
+ }
+ }
+ res3 = SWIG_ConvertPtr(obj2, SWIG_as_voidptrptr(&iter3), swig::SwigPyIterator::descriptor(), 0);
+ if (!SWIG_IsOK(res3) || !iter3) {
+ SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_int_erase" "', argument " "3"" of type '" "std::vector< int >::iterator""'");
+ } else {
+ swig::SwigPyIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter3);
+ if (iter_t) {
+ arg3 = iter_t->get_current();
+ } else {
+ SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_int_erase" "', argument " "3"" of type '" "std::vector< int >::iterator""'");
+ }
+ }
+ result = (arg1)->erase(arg2,arg3);
+ resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< int >::iterator & >(result)),
+ swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN);
+ return resultobj;
+fail:
+ return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_vector_int_erase(PyObject *self, PyObject *args) {
+ int argc;
+ PyObject *argv[4];
+ int ii;
+
+ if (!PyTuple_Check(args)) SWIG_fail;
+ argc = args ? (int)PyObject_Length(args) : 0;
+ for (ii = 0; (ii < 3) && (ii < argc); ii++) {
+ argv[ii] = PyTuple_GET_ITEM(args,ii);
+ }
+ if (argc == 2) {
+ int _v;
+ int res = swig::asptr(argv[0], (std::vector >**)(0));
+ _v = SWIG_CheckState(res);
+ if (_v) {
+ swig::SwigPyIterator *iter = 0;
+ int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0);
+ _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0));
+ if (_v) {
+ return _wrap_vector_int_erase__SWIG_0(self, args);
+ }
+ }
+ }
+ if (argc == 3) {
+ int _v;
+ int res = swig::asptr(argv[0], (std::vector >**)(0));
+ _v = SWIG_CheckState(res);
+ if (_v) {
+ swig::SwigPyIterator *iter = 0;
+ int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0);
+ _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0));
+ if (_v) {
+ swig::SwigPyIterator *iter = 0;
+ int res = SWIG_ConvertPtr(argv[2], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0);
+ _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0));
+ if (_v) {
+ return _wrap_vector_int_erase__SWIG_1(self, args);
+ }
+ }
+ }
+ }
+
+fail:
+ SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'vector_int_erase'.\n"
+ " Possible C/C++ prototypes are:\n"
+ " std::vector< int >::erase(std::vector< int >::iterator)\n"
+ " std::vector< int >::erase(std::vector< int >::iterator,std::vector< int >::iterator)\n");
+ return 0;
+}
+
+
+SWIGINTERN PyObject *_wrap_new_vector_int__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+ PyObject *resultobj = 0;
+ std::vector< int >::size_type arg1 ;
+ std::vector< int >::value_type *arg2 = 0 ;
+ unsigned int val1 ;
+ int ecode1 = 0 ;
+ std::vector< int >::value_type temp2 ;
+ int val2 ;
+ int ecode2 = 0 ;
+ PyObject * obj0 = 0 ;
+ PyObject * obj1 = 0 ;
+ std::vector< int > *result = 0 ;
+
+ if (!PyArg_ParseTuple(args,(char *)"OO:new_vector_int",&obj0,&obj1)) SWIG_fail;
+ ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+ if (!SWIG_IsOK(ecode1)) {
+ SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_vector_int" "', argument " "1"" of type '" "std::vector< int >::size_type""'");
+ }
+ arg1 = static_cast< std::vector< int >::size_type >(val1);
+ ecode2 = SWIG_AsVal_int(obj1, &val2);
+ if (!SWIG_IsOK(ecode2)) {
+ SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_vector_int" "', argument " "2"" of type '" "std::vector< int >::value_type""'");
+ }
+ temp2 = static_cast< std::vector< int >::value_type >(val2);
+ arg2 = &temp2;
+ result = (std::vector< int > *)new std::vector< int >(arg1,(std::vector< int >::value_type const &)*arg2);
+ resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, SWIG_POINTER_NEW | 0 );
+ return resultobj;
+fail:
+ return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_new_vector_int(PyObject *self, PyObject *args) {
+ int argc;
+ PyObject *argv[3];
+ 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 == 0) {
+ return _wrap_new_vector_int__SWIG_0(self, args);
+ }
+ if (argc == 1) {
+ int _v;
+ {
+ int res = SWIG_AsVal_unsigned_SS_int(argv[0], NULL);
+ _v = SWIG_CheckState(res);
+ }
+ if (_v) {
+ return _wrap_new_vector_int__SWIG_2(self, args);
+ }
+ }
+ if (argc == 1) {
+ int _v;
+ int res = swig::asptr(argv[0], (std::vector >**)(0));
+ _v = SWIG_CheckState(res);
+ if (_v) {
+ return _wrap_new_vector_int__SWIG_1(self, args);
+ }
+ }
+ if (argc == 2) {
+ int _v;
+ {
+ int res = SWIG_AsVal_unsigned_SS_int(argv[0], NULL);
+ _v = SWIG_CheckState(res);
+ }
+ if (_v) {
+ {
+ int res = SWIG_AsVal_int(argv[1], NULL);
+ _v = SWIG_CheckState(res);
+ }
+ if (_v) {
+ return _wrap_new_vector_int__SWIG_3(self, args);
+ }
+ }
+ }
+
+fail:
+ SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_vector_int'.\n"
+ " Possible C/C++ prototypes are:\n"
+ " std::vector< int >::vector()\n"
+ " std::vector< int >::vector(std::vector< int > const &)\n"
+ " std::vector< int >::vector(std::vector< int >::size_type)\n"
+ " std::vector< int >::vector(std::vector< int >::size_type,std::vector< int >::value_type const &)\n");
+ return 0;
+}
+
+
+SWIGINTERN PyObject *_wrap_vector_int_push_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+ PyObject *resultobj = 0;
+ std::vector< int > *arg1 = (std::vector< int > *) 0 ;
+ std::vector< int >::value_type *arg2 = 0 ;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ std::vector< int >::value_type temp2 ;
+ int val2 ;
+ int ecode2 = 0 ;
+ PyObject * obj0 = 0 ;
+ PyObject * obj1 = 0 ;
+
+ if (!PyArg_ParseTuple(args,(char *)"OO:vector_int_push_back",&obj0,&obj1)) SWIG_fail;
+ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_int_push_back" "', argument " "1"" of type '" "std::vector< int > *""'");
+ }
+ arg1 = reinterpret_cast< std::vector< int > * >(argp1);
+ ecode2 = SWIG_AsVal_int(obj1, &val2);
+ if (!SWIG_IsOK(ecode2)) {
+ SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vector_int_push_back" "', argument " "2"" of type '" "std::vector< int >::value_type""'");
+ }
+ temp2 = static_cast< std::vector< int >::value_type >(val2);
+ arg2 = &temp2;
+ (arg1)->push_back((std::vector< int >::value_type const &)*arg2);
+ resultobj = SWIG_Py_Void();
+ return resultobj;
+fail:
+ return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_vector_int_front(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+ PyObject *resultobj = 0;
+ std::vector< int > *arg1 = (std::vector< int > *) 0 ;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ PyObject * obj0 = 0 ;
+ std::vector< int >::value_type *result = 0 ;
+
+ if (!PyArg_ParseTuple(args,(char *)"O:vector_int_front",&obj0)) SWIG_fail;
+ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_int_front" "', argument " "1"" of type '" "std::vector< int > const *""'");
+ }
+ arg1 = reinterpret_cast< std::vector< int > * >(argp1);
+ result = (std::vector< int >::value_type *) &((std::vector< int > const *)arg1)->front();
+ resultobj = SWIG_From_int(static_cast< int >(*result));
+ return resultobj;
+fail:
+ return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_vector_int_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+ PyObject *resultobj = 0;
+ std::vector< int > *arg1 = (std::vector< int > *) 0 ;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ PyObject * obj0 = 0 ;
+ std::vector< int >::value_type *result = 0 ;
+
+ if (!PyArg_ParseTuple(args,(char *)"O:vector_int_back",&obj0)) SWIG_fail;
+ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_int_back" "', argument " "1"" of type '" "std::vector< int > const *""'");
+ }
+ arg1 = reinterpret_cast< std::vector< int > * >(argp1);
+ result = (std::vector< int >::value_type *) &((std::vector< int > const *)arg1)->back();
+ resultobj = SWIG_From_int(static_cast< int >(*result));
+ return resultobj;
+fail:
+ return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_vector_int_assign(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+ PyObject *resultobj = 0;
+ std::vector< int > *arg1 = (std::vector< int > *) 0 ;
+ std::vector< int >::size_type arg2 ;
+ std::vector< int >::value_type *arg3 = 0 ;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ unsigned int val2 ;
+ int ecode2 = 0 ;
+ std::vector< int >::value_type temp3 ;
+ int val3 ;
+ int ecode3 = 0 ;
+ PyObject * obj0 = 0 ;
+ PyObject * obj1 = 0 ;
+ PyObject * obj2 = 0 ;
+
+ if (!PyArg_ParseTuple(args,(char *)"OOO:vector_int_assign",&obj0,&obj1,&obj2)) SWIG_fail;
+ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_int_assign" "', argument " "1"" of type '" "std::vector< int > *""'");
+ }
+ arg1 = reinterpret_cast< std::vector< int > * >(argp1);
+ ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2);
+ if (!SWIG_IsOK(ecode2)) {
+ SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vector_int_assign" "', argument " "2"" of type '" "std::vector< int >::size_type""'");
+ }
+ arg2 = static_cast< std::vector< int >::size_type >(val2);
+ ecode3 = SWIG_AsVal_int(obj2, &val3);
+ if (!SWIG_IsOK(ecode3)) {
+ SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "vector_int_assign" "', argument " "3"" of type '" "std::vector< int >::value_type""'");
+ }
+ temp3 = static_cast< std::vector< int >::value_type >(val3);
+ arg3 = &temp3;
+ (arg1)->assign(arg2,(std::vector< int >::value_type const &)*arg3);
+ resultobj = SWIG_Py_Void();
+ return resultobj;
+fail:
+ return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_vector_int_resize__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+ PyObject *resultobj = 0;
+ std::vector< int > *arg1 = (std::vector< int > *) 0 ;
+ std::vector< int >::size_type arg2 ;
+ std::vector< int >::value_type *arg3 = 0 ;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ unsigned int val2 ;
+ int ecode2 = 0 ;
+ std::vector< int >::value_type temp3 ;
+ int val3 ;
+ int ecode3 = 0 ;
+ PyObject * obj0 = 0 ;
+ PyObject * obj1 = 0 ;
+ PyObject * obj2 = 0 ;
+
+ if (!PyArg_ParseTuple(args,(char *)"OOO:vector_int_resize",&obj0,&obj1,&obj2)) SWIG_fail;
+ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_int_resize" "', argument " "1"" of type '" "std::vector< int > *""'");
+ }
+ arg1 = reinterpret_cast< std::vector< int > * >(argp1);
+ ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2);
+ if (!SWIG_IsOK(ecode2)) {
+ SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vector_int_resize" "', argument " "2"" of type '" "std::vector< int >::size_type""'");
+ }
+ arg2 = static_cast< std::vector< int >::size_type >(val2);
+ ecode3 = SWIG_AsVal_int(obj2, &val3);
+ if (!SWIG_IsOK(ecode3)) {
+ SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "vector_int_resize" "', argument " "3"" of type '" "std::vector< int >::value_type""'");
+ }
+ temp3 = static_cast< std::vector< int >::value_type >(val3);
+ arg3 = &temp3;
+ (arg1)->resize(arg2,(std::vector< int >::value_type const &)*arg3);
+ resultobj = SWIG_Py_Void();
+ return resultobj;
+fail:
+ return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_vector_int_resize(PyObject *self, PyObject *args) {
+ int argc;
+ PyObject *argv[4];
+ int ii;
+
+ if (!PyTuple_Check(args)) SWIG_fail;
+ argc = args ? (int)PyObject_Length(args) : 0;
+ for (ii = 0; (ii < 3) && (ii < argc); ii++) {
+ argv[ii] = PyTuple_GET_ITEM(args,ii);
+ }
+ if (argc == 2) {
+ int _v;
+ int res = swig::asptr(argv[0], (std::vector >**)(0));
+ _v = SWIG_CheckState(res);
+ if (_v) {
+ {
+ int res = SWIG_AsVal_unsigned_SS_int(argv[1], NULL);
+ _v = SWIG_CheckState(res);
+ }
+ if (_v) {
+ return _wrap_vector_int_resize__SWIG_0(self, args);
+ }
+ }
+ }
+ if (argc == 3) {
+ int _v;
+ int res = swig::asptr(argv[0], (std::vector >**)(0));
+ _v = SWIG_CheckState(res);
+ if (_v) {
+ {
+ int res = SWIG_AsVal_unsigned_SS_int(argv[1], NULL);
+ _v = SWIG_CheckState(res);
+ }
+ if (_v) {
+ {
+ int res = SWIG_AsVal_int(argv[2], NULL);
+ _v = SWIG_CheckState(res);
+ }
+ if (_v) {
+ return _wrap_vector_int_resize__SWIG_1(self, args);
+ }
+ }
+ }
+ }
+
+fail:
+ SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'vector_int_resize'.\n"
+ " Possible C/C++ prototypes are:\n"
+ " std::vector< int >::resize(std::vector< int >::size_type)\n"
+ " std::vector< int >::resize(std::vector< int >::size_type,std::vector< int >::value_type const &)\n");
+ return 0;
+}
+
+
+SWIGINTERN PyObject *_wrap_vector_int_insert__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+ PyObject *resultobj = 0;
+ std::vector< int > *arg1 = (std::vector< int > *) 0 ;
+ std::vector< int >::iterator arg2 ;
+ std::vector< int >::value_type *arg3 = 0 ;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ swig::SwigPyIterator *iter2 = 0 ;
+ int res2 ;
+ std::vector< int >::value_type temp3 ;
+ int val3 ;
+ int ecode3 = 0 ;
+ PyObject * obj0 = 0 ;
+ PyObject * obj1 = 0 ;
+ PyObject * obj2 = 0 ;
+ std::vector< int >::iterator result;
+
+ if (!PyArg_ParseTuple(args,(char *)"OOO:vector_int_insert",&obj0,&obj1,&obj2)) SWIG_fail;
+ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_int_insert" "', argument " "1"" of type '" "std::vector< int > *""'");
+ }
+ arg1 = reinterpret_cast< std::vector< int > * >(argp1);
+ res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0);
+ if (!SWIG_IsOK(res2) || !iter2) {
+ SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_int_insert" "', argument " "2"" of type '" "std::vector< int >::iterator""'");
+ } else {
+ swig::SwigPyIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2);
+ if (iter_t) {
+ arg2 = iter_t->get_current();
+ } else {
+ SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_int_insert" "', argument " "2"" of type '" "std::vector< int >::iterator""'");
+ }
+ }
+ ecode3 = SWIG_AsVal_int(obj2, &val3);
+ if (!SWIG_IsOK(ecode3)) {
+ SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "vector_int_insert" "', argument " "3"" of type '" "std::vector< int >::value_type""'");
+ }
+ temp3 = static_cast< std::vector< int >::value_type >(val3);
+ arg3 = &temp3;
+ result = (arg1)->insert(arg2,(std::vector< int >::value_type const &)*arg3);
+ resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< int >::iterator & >(result)),
+ swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN);
+ return resultobj;
+fail:
+ return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_vector_int_insert__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+ PyObject *resultobj = 0;
+ std::vector< int > *arg1 = (std::vector< int > *) 0 ;
+ std::vector< int >::iterator arg2 ;
+ std::vector< int >::size_type arg3 ;
+ std::vector< int >::value_type *arg4 = 0 ;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ swig::SwigPyIterator *iter2 = 0 ;
+ int res2 ;
+ unsigned int val3 ;
+ int ecode3 = 0 ;
+ std::vector< int >::value_type temp4 ;
+ int val4 ;
+ int ecode4 = 0 ;
+ PyObject * obj0 = 0 ;
+ PyObject * obj1 = 0 ;
+ PyObject * obj2 = 0 ;
+ PyObject * obj3 = 0 ;
+
+ if (!PyArg_ParseTuple(args,(char *)"OOOO:vector_int_insert",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
+ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_int_insert" "', argument " "1"" of type '" "std::vector< int > *""'");
+ }
+ arg1 = reinterpret_cast< std::vector< int > * >(argp1);
+ res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0);
+ if (!SWIG_IsOK(res2) || !iter2) {
+ SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_int_insert" "', argument " "2"" of type '" "std::vector< int >::iterator""'");
+ } else {
+ swig::SwigPyIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2);
+ if (iter_t) {
+ arg2 = iter_t->get_current();
+ } else {
+ SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_int_insert" "', argument " "2"" of type '" "std::vector< int >::iterator""'");
+ }
+ }
+ ecode3 = SWIG_AsVal_unsigned_SS_int(obj2, &val3);
+ if (!SWIG_IsOK(ecode3)) {
+ SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "vector_int_insert" "', argument " "3"" of type '" "std::vector< int >::size_type""'");
+ }
+ arg3 = static_cast< std::vector< int >::size_type >(val3);
+ ecode4 = SWIG_AsVal_int(obj3, &val4);
+ if (!SWIG_IsOK(ecode4)) {
+ SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "vector_int_insert" "', argument " "4"" of type '" "std::vector< int >::value_type""'");
+ }
+ temp4 = static_cast< std::vector< int >::value_type >(val4);
+ arg4 = &temp4;
+ (arg1)->insert(arg2,arg3,(std::vector< int >::value_type const &)*arg4);
+ resultobj = SWIG_Py_Void();
+ return resultobj;
+fail:
+ return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_vector_int_insert(PyObject *self, PyObject *args) {
+ int argc;
+ PyObject *argv[5];
+ int ii;
+
+ if (!PyTuple_Check(args)) SWIG_fail;
+ argc = args ? (int)PyObject_Length(args) : 0;
+ for (ii = 0; (ii < 4) && (ii < argc); ii++) {
+ argv[ii] = PyTuple_GET_ITEM(args,ii);
+ }
+ if (argc == 3) {
+ int _v;
+ int res = swig::asptr(argv[0], (std::vector >**)(0));
+ _v = SWIG_CheckState(res);
+ if (_v) {
+ swig::SwigPyIterator *iter = 0;
+ int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0);
+ _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0));
+ if (_v) {
+ {
+ int res = SWIG_AsVal_int(argv[2], NULL);
+ _v = SWIG_CheckState(res);
+ }
+ if (_v) {
+ return _wrap_vector_int_insert__SWIG_0(self, args);
+ }
+ }
+ }
+ }
+ if (argc == 4) {
+ int _v;
+ int res = swig::asptr(argv[0], (std::vector >**)(0));
+ _v = SWIG_CheckState(res);
+ if (_v) {
+ swig::SwigPyIterator *iter = 0;
+ int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0);
+ _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0));
+ if (_v) {
+ {
+ int res = SWIG_AsVal_unsigned_SS_int(argv[2], NULL);
+ _v = SWIG_CheckState(res);
+ }
+ if (_v) {
+ {
+ int res = SWIG_AsVal_int(argv[3], NULL);
+ _v = SWIG_CheckState(res);
+ }
+ if (_v) {
+ return _wrap_vector_int_insert__SWIG_1(self, args);
+ }
+ }
+ }
+ }
+ }
+
+fail:
+ SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'vector_int_insert'.\n"
+ " Possible C/C++ prototypes are:\n"
+ " std::vector< int >::insert(std::vector< int >::iterator,std::vector< int >::value_type const &)\n"
+ " std::vector< int >::insert(std::vector< int >::iterator,std::vector< int >::size_type,std::vector< int >::value_type const &)\n");
+ return 0;
+}
+
+
+SWIGINTERN PyObject *_wrap_vector_int_reserve(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+ PyObject *resultobj = 0;
+ std::vector< int > *arg1 = (std::vector< int > *) 0 ;
+ std::vector< int >::size_type arg2 ;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ unsigned int val2 ;
+ int ecode2 = 0 ;
+ PyObject * obj0 = 0 ;
+ PyObject * obj1 = 0 ;
+
+ if (!PyArg_ParseTuple(args,(char *)"OO:vector_int_reserve",&obj0,&obj1)) SWIG_fail;
+ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_int_reserve" "', argument " "1"" of type '" "std::vector< int > *""'");
+ }
+ arg1 = reinterpret_cast< std::vector< int > * >(argp1);
+ ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2);
+ if (!SWIG_IsOK(ecode2)) {
+ SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vector_int_reserve" "', argument " "2"" of type '" "std::vector< int >::size_type""'");
+ }
+ arg2 = static_cast< std::vector< int >::size_type >(val2);
+ (arg1)->reserve(arg2);
+ resultobj = SWIG_Py_Void();
+ return resultobj;
+fail:
+ return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_vector_int_capacity(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+ PyObject *resultobj = 0;
+ std::vector< int > *arg1 = (std::vector< int > *) 0 ;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ PyObject * obj0 = 0 ;
+ std::vector< int >::size_type result;
+
+ if (!PyArg_ParseTuple(args,(char *)"O:vector_int_capacity",&obj0)) SWIG_fail;
+ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_int_capacity" "', argument " "1"" of type '" "std::vector< int > const *""'");
+ }
+ arg1 = reinterpret_cast< std::vector< int > * >(argp1);
+ result = (std::vector< int >::size_type)((std::vector< int > const *)arg1)->capacity();
+ resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
+ return resultobj;
+fail:
+ return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_delete_vector_int(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+ PyObject *resultobj = 0;
+ std::vector< int > *arg1 = (std::vector< int > *) 0 ;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ PyObject * obj0 = 0 ;
+
+ if (!PyArg_ParseTuple(args,(char *)"O:delete_vector_int",&obj0)) SWIG_fail;
+ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, SWIG_POINTER_DISOWN | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_vector_int" "', argument " "1"" of type '" "std::vector< int > *""'");
+ }
+ arg1 = reinterpret_cast< std::vector< int > * >(argp1);
+ delete arg1;
+ resultobj = SWIG_Py_Void();
+ return resultobj;
+fail:
+ return NULL;
+}
+
+
+SWIGINTERN PyObject *vector_int_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+ PyObject *obj;
+ if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
+ SWIG_TypeNewClientData(SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, SWIG_NewClientData(obj));
+ return SWIG_Py_Void();
+}
+
+SWIGINTERN PyObject *_wrap_vector_float_iterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+ PyObject *resultobj = 0;
+ std::vector< float > *arg1 = (std::vector< float > *) 0 ;
+ PyObject **arg2 = (PyObject **) 0 ;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ PyObject * obj0 = 0 ;
+ swig::SwigPyIterator *result = 0 ;
+
+ arg2 = &obj0;
+ if (!PyArg_ParseTuple(args,(char *)"O:vector_float_iterator",&obj0)) SWIG_fail;
+ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_float_std__allocatorT_float_t_t, 0 | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_float_iterator" "', argument " "1"" of type '" "std::vector< float > *""'");
+ }
+ arg1 = reinterpret_cast< std::vector< float > * >(argp1);
+ result = (swig::SwigPyIterator *)std_vector_Sl_float_Sg__iterator(arg1,arg2);
+ resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_OWN | 0 );
+ return resultobj;
+fail:
+ return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_vector_float___nonzero__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+ PyObject *resultobj = 0;
+ std::vector< float > *arg1 = (std::vector< float > *) 0 ;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ PyObject * obj0 = 0 ;
+ bool result;
+
+ if (!PyArg_ParseTuple(args,(char *)"O:vector_float___nonzero__",&obj0)) SWIG_fail;
+ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_float_std__allocatorT_float_t_t, 0 | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_float___nonzero__" "', argument " "1"" of type '" "std::vector< float > const *""'");
+ }
+ arg1 = reinterpret_cast< std::vector< float > * >(argp1);
+ result = (bool)std_vector_Sl_float_Sg____nonzero__((std::vector< float > const *)arg1);
+ resultobj = SWIG_From_bool(static_cast< bool >(result));
+ return resultobj;
+fail:
+ return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_vector_float___bool__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+ PyObject *resultobj = 0;
+ std::vector< float > *arg1 = (std::vector< float > *) 0 ;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ PyObject * obj0 = 0 ;
+ bool result;
+
+ if (!PyArg_ParseTuple(args,(char *)"O:vector_float___bool__",&obj0)) SWIG_fail;
+ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_float_std__allocatorT_float_t_t, 0 | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_float___bool__" "', argument " "1"" of type '" "std::vector< float > const *""'");
+ }
+ arg1 = reinterpret_cast< std::vector< float > * >(argp1);
+ result = (bool)std_vector_Sl_float_Sg____bool__((std::vector< float > const *)arg1);
+ resultobj = SWIG_From_bool(static_cast< bool >(result));
+ return resultobj;
+fail:
+ return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_vector_float___len__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+ PyObject *resultobj = 0;
+ std::vector< float > *arg1 = (std::vector< float > *) 0 ;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ PyObject * obj0 = 0 ;
+ std::vector< float >::size_type result;
+
+ if (!PyArg_ParseTuple(args,(char *)"O:vector_float___len__",&obj0)) SWIG_fail;
+ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_float_std__allocatorT_float_t_t, 0 | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_float___len__" "', argument " "1"" of type '" "std::vector< float > const *""'");
+ }
+ arg1 = reinterpret_cast< std::vector< float > * >(argp1);
+ result = (std::vector< float >::size_type)std_vector_Sl_float_Sg____len__((std::vector< float > const *)arg1);
+ resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
+ return resultobj;
+fail:
+ return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_vector_float_pop(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+ PyObject *resultobj = 0;
+ std::vector< float > *arg1 = (std::vector< float > *) 0 ;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ PyObject * obj0 = 0 ;
+ std::vector< float >::value_type result;
+
+ if (!PyArg_ParseTuple(args,(char *)"O:vector_float_pop",&obj0)) SWIG_fail;
+ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_float_std__allocatorT_float_t_t, 0 | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_float_pop" "', argument " "1"" of type '" "std::vector< float > *""'");
+ }
+ arg1 = reinterpret_cast< std::vector< float > * >(argp1);
+ try {
+ result = (std::vector< float >::value_type)std_vector_Sl_float_Sg__pop(arg1);
+ }
+ catch(std::out_of_range &_e) {
+ SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
+ }
+
+ resultobj = SWIG_From_float(static_cast< float >(result));
+ return resultobj;
+fail:
+ return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_vector_float___getslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+ PyObject *resultobj = 0;
+ std::vector< float > *arg1 = (std::vector< float > *) 0 ;
+ std::vector< float >::difference_type arg2 ;
+ std::vector< float >::difference_type arg3 ;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ ptrdiff_t val2 ;
+ int ecode2 = 0 ;
+ ptrdiff_t val3 ;
+ int ecode3 = 0 ;
+ PyObject * obj0 = 0 ;
+ PyObject * obj1 = 0 ;
+ PyObject * obj2 = 0 ;
+ std::vector< float,std::allocator< float > > *result = 0 ;
+
+ if (!PyArg_ParseTuple(args,(char *)"OOO:vector_float___getslice__",&obj0,&obj1,&obj2)) SWIG_fail;
+ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_float_std__allocatorT_float_t_t, 0 | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_float___getslice__" "', argument " "1"" of type '" "std::vector< float > *""'");
+ }
+ arg1 = reinterpret_cast< std::vector< float > * >(argp1);
+ ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
+ if (!SWIG_IsOK(ecode2)) {
+ SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vector_float___getslice__" "', argument " "2"" of type '" "std::vector< float >::difference_type""'");
+ }
+ arg2 = static_cast< std::vector< float >::difference_type >(val2);
+ ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3);
+ if (!SWIG_IsOK(ecode3)) {
+ SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "vector_float___getslice__" "', argument " "3"" of type '" "std::vector< float >::difference_type""'");
+ }
+ arg3 = static_cast< std::vector< float >::difference_type >(val3);
+ try {
+ result = (std::vector< float,std::allocator< float > > *)std_vector_Sl_float_Sg____getslice__(arg1,arg2,arg3);
+ }
+ catch(std::out_of_range &_e) {
+ SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
+ }
+
+ resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_float_std__allocatorT_float_t_t, SWIG_POINTER_OWN | 0 );
+ return resultobj;
+fail:
+ return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_vector_float___setslice____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+ PyObject *resultobj = 0;
+ std::vector< float > *arg1 = (std::vector< float > *) 0 ;
+ std::vector< float >::difference_type arg2 ;
+ std::vector< float >::difference_type arg3 ;
+ std::vector< float,std::allocator< float > > *arg4 = 0 ;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ ptrdiff_t val2 ;
+ int ecode2 = 0 ;
+ ptrdiff_t val3 ;
+ int ecode3 = 0 ;
+ int res4 = SWIG_OLDOBJ ;
+ PyObject * obj0 = 0 ;
+ PyObject * obj1 = 0 ;
+ PyObject * obj2 = 0 ;
+ PyObject * obj3 = 0 ;
+
+ if (!PyArg_ParseTuple(args,(char *)"OOOO:vector_float___setslice__",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
+ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_float_std__allocatorT_float_t_t, 0 | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_float___setslice__" "', argument " "1"" of type '" "std::vector< float > *""'");
+ }
+ arg1 = reinterpret_cast< std::vector< float > * >(argp1);
+ ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
+ if (!SWIG_IsOK(ecode2)) {
+ SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vector_float___setslice__" "', argument " "2"" of type '" "std::vector< float >::difference_type""'");
+ }
+ arg2 = static_cast< std::vector< float >::difference_type >(val2);
+ ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3);
+ if (!SWIG_IsOK(ecode3)) {
+ SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "vector_float___setslice__" "', argument " "3"" of type '" "std::vector< float >::difference_type""'");
+ }
+ arg3 = static_cast< std::vector< float >::difference_type >(val3);
+ {
+ std::vector > *ptr = (std::vector > *)0;
+ res4 = swig::asptr(obj3, &ptr);
+ if (!SWIG_IsOK(res4)) {
+ SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "vector_float___setslice__" "', argument " "4"" of type '" "std::vector< float,std::allocator< float > > const &""'");
+ }
+ if (!ptr) {
+ SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "vector_float___setslice__" "', argument " "4"" of type '" "std::vector< float,std::allocator< float > > const &""'");
+ }
+ arg4 = ptr;
+ }
+ try {
+ std_vector_Sl_float_Sg____setslice____SWIG_0(arg1,arg2,arg3,(std::vector< float,std::allocator< float > > const &)*arg4);
+ }
+ catch(std::out_of_range &_e) {
+ SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
+ }
+ catch(std::invalid_argument &_e) {
+ SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
+ }
+
+ resultobj = SWIG_Py_Void();
+ if (SWIG_IsNewObj(res4)) delete arg4;
+ return resultobj;
+fail:
+ if (SWIG_IsNewObj(res4)) delete arg4;
+ return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_vector_float___setslice____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+ PyObject *resultobj = 0;
+ std::vector< float > *arg1 = (std::vector< float > *) 0 ;
+ std::vector< float >::difference_type arg2 ;
+ std::vector< float >::difference_type arg3 ;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ ptrdiff_t val2 ;
+ int ecode2 = 0 ;
+ ptrdiff_t val3 ;
+ int ecode3 = 0 ;
+ PyObject * obj0 = 0 ;
+ PyObject * obj1 = 0 ;
+ PyObject * obj2 = 0 ;
+
+ if (!PyArg_ParseTuple(args,(char *)"OOO:vector_float___setslice__",&obj0,&obj1,&obj2)) SWIG_fail;
+ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_float_std__allocatorT_float_t_t, 0 | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_float___setslice__" "', argument " "1"" of type '" "std::vector< float > *""'");
+ }
+ arg1 = reinterpret_cast< std::vector< float > * >(argp1);
+ ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
+ if (!SWIG_IsOK(ecode2)) {
+ SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vector_float___setslice__" "', argument " "2"" of type '" "std::vector< float >::difference_type""'");
+ }
+ arg2 = static_cast< std::vector< float >::difference_type >(val2);
+ ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3);
+ if (!SWIG_IsOK(ecode3)) {
+ SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "vector_float___setslice__" "', argument " "3"" of type '" "std::vector< float >::difference_type""'");
+ }
+ arg3 = static_cast< std::vector< float >::difference_type >(val3);
+ try {
+ std_vector_Sl_float_Sg____setslice____SWIG_0(arg1,arg2,arg3);
+ }
+ catch(std::out_of_range &_e) {
+ SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
+ }
+ catch(std::invalid_argument &_e) {
+ SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
+ }
+
+ resultobj = SWIG_Py_Void();
+ return resultobj;
+fail:
+ return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_vector_float___setslice__(PyObject *self, PyObject *args) {
+ int argc;
+ PyObject *argv[5];
+ int ii;
+
+ if (!PyTuple_Check(args)) SWIG_fail;
+ argc = args ? (int)PyObject_Length(args) : 0;
+ for (ii = 0; (ii < 4) && (ii < argc); ii++) {
+ argv[ii] = PyTuple_GET_ITEM(args,ii);
+ }
+ if (argc == 3) {
+ int _v;
+ int res = swig::asptr(argv[0], (std::vector >**)(0));
+ _v = SWIG_CheckState(res);
+ if (_v) {
+ {
+ int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL);
+ _v = SWIG_CheckState(res);
+ }
+ if (_v) {
+ {
+ int res = SWIG_AsVal_ptrdiff_t(argv[2], NULL);
+ _v = SWIG_CheckState(res);
+ }
+ if (_v) {
+ return _wrap_vector_float___setslice____SWIG_1(self, args);
+ }
+ }
+ }
+ }
+ if (argc == 4) {
+ int _v;
+ int res = swig::asptr(argv[0], (std::vector >**)(0));
+ _v = SWIG_CheckState(res);
+ if (_v) {
+ {
+ int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL);
+ _v = SWIG_CheckState(res);
+ }
+ if (_v) {
+ {
+ int res = SWIG_AsVal_ptrdiff_t(argv[2], NULL);
+ _v = SWIG_CheckState(res);
+ }
+ if (_v) {
+ int res = swig::asptr(argv[3], (std::vector >**)(0));
+ _v = SWIG_CheckState(res);
+ if (_v) {
+ return _wrap_vector_float___setslice____SWIG_0(self, args);
+ }
+ }
+ }
+ }
+ }
+
+fail:
+ SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'vector_float___setslice__'.\n"
+ " Possible C/C++ prototypes are:\n"
+ " std::vector< float >::__setslice__(std::vector< float >::difference_type,std::vector< float >::difference_type,std::vector< float,std::allocator< float > > const &)\n"
+ " std::vector< float >::__setslice__(std::vector< float >::difference_type,std::vector< float >::difference_type)\n");
+ return 0;
+}
+
+
+SWIGINTERN PyObject *_wrap_vector_float___delslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+ PyObject *resultobj = 0;
+ std::vector< float > *arg1 = (std::vector< float > *) 0 ;
+ std::vector< float >::difference_type arg2 ;
+ std::vector< float >::difference_type arg3 ;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ ptrdiff_t val2 ;
+ int ecode2 = 0 ;
+ ptrdiff_t val3 ;
+ int ecode3 = 0 ;
+ PyObject * obj0 = 0 ;
+ PyObject * obj1 = 0 ;
+ PyObject * obj2 = 0 ;
+
+ if (!PyArg_ParseTuple(args,(char *)"OOO:vector_float___delslice__",&obj0,&obj1,&obj2)) SWIG_fail;
+ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_float_std__allocatorT_float_t_t, 0 | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_float___delslice__" "', argument " "1"" of type '" "std::vector< float > *""'");
+ }
+ arg1 = reinterpret_cast< std::vector< float > * >(argp1);
+ ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
+ if (!SWIG_IsOK(ecode2)) {
+ SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vector_float___delslice__" "', argument " "2"" of type '" "std::vector< float >::difference_type""'");
+ }
+ arg2 = static_cast< std::vector< float >::difference_type >(val2);
+ ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3);
+ if (!SWIG_IsOK(ecode3)) {
+ SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "vector_float___delslice__" "', argument " "3"" of type '" "std::vector< float >::difference_type""'");
+ }
+ arg3 = static_cast< std::vector< float >::difference_type >(val3);
+ try {
+ std_vector_Sl_float_Sg____delslice__(arg1,arg2,arg3);
+ }
+ catch(std::out_of_range &_e) {
+ SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
+ }
+
+ resultobj = SWIG_Py_Void();
+ return resultobj;
+fail:
+ return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_vector_float___delitem____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+ PyObject *resultobj = 0;
+ std::vector< float > *arg1 = (std::vector< float > *) 0 ;
+ std::vector< float >::difference_type arg2 ;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ ptrdiff_t val2 ;
+ int ecode2 = 0 ;
+ PyObject * obj0 = 0 ;
+ PyObject * obj1 = 0 ;
+
+ if (!PyArg_ParseTuple(args,(char *)"OO:vector_float___delitem__",&obj0,&obj1)) SWIG_fail;
+ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_float_std__allocatorT_float_t_t, 0 | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_float___delitem__" "', argument " "1"" of type '" "std::vector< float > *""'");
+ }
+ arg1 = reinterpret_cast< std::vector< float > * >(argp1);
+ ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
+ if (!SWIG_IsOK(ecode2)) {
+ SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vector_float___delitem__" "', argument " "2"" of type '" "std::vector< float >::difference_type""'");
+ }
+ arg2 = static_cast< std::vector< float >::difference_type >(val2);
+ try {
+ std_vector_Sl_float_Sg____delitem____SWIG_0(arg1,arg2);
+ }
+ catch(std::out_of_range &_e) {
+ SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
+ }
+
+ resultobj = SWIG_Py_Void();
+ return resultobj;
+fail:
+ return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_vector_float___getitem____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+ PyObject *resultobj = 0;
+ std::vector< float > *arg1 = (std::vector< float > *) 0 ;
+ PySliceObject *arg2 = (PySliceObject *) 0 ;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ PyObject * obj0 = 0 ;
+ PyObject * obj1 = 0 ;
+ std::vector< float,std::allocator< float > > *result = 0 ;
+
+ if (!PyArg_ParseTuple(args,(char *)"OO:vector_float___getitem__",&obj0,&obj1)) SWIG_fail;
+ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_float_std__allocatorT_float_t_t, 0 | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_float___getitem__" "', argument " "1"" of type '" "std::vector< float > *""'");
+ }
+ arg1 = reinterpret_cast< std::vector< float > * >(argp1);
+ {
+ if (!PySlice_Check(obj1)) {
+ SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_float___getitem__" "', argument " "2"" of type '" "PySliceObject *""'");
+ }
+ arg2 = (PySliceObject *) obj1;
+ }
+ try {
+ result = (std::vector< float,std::allocator< float > > *)std_vector_Sl_float_Sg____getitem____SWIG_0(arg1,arg2);
+ }
+ catch(std::out_of_range &_e) {
+ SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
+ }
+
+ resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_float_std__allocatorT_float_t_t, 0 | 0 );
+ return resultobj;
+fail:
+ return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_vector_float___setitem____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+ PyObject *resultobj = 0;
+ std::vector< float > *arg1 = (std::vector< float > *) 0 ;
+ PySliceObject *arg2 = (PySliceObject *) 0 ;
+ std::vector< float,std::allocator< float > > *arg3 = 0 ;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ int res3 = SWIG_OLDOBJ ;
+ PyObject * obj0 = 0 ;
+ PyObject * obj1 = 0 ;
+ PyObject * obj2 = 0 ;
+
+ if (!PyArg_ParseTuple(args,(char *)"OOO:vector_float___setitem__",&obj0,&obj1,&obj2)) SWIG_fail;
+ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_float_std__allocatorT_float_t_t, 0 | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_float___setitem__" "', argument " "1"" of type '" "std::vector< float > *""'");
+ }
+ arg1 = reinterpret_cast< std::vector< float > * >(argp1);
+ {
+ if (!PySlice_Check(obj1)) {
+ SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_float___setitem__" "', argument " "2"" of type '" "PySliceObject *""'");
+ }
+ arg2 = (PySliceObject *) obj1;
+ }
+ {
+ std::vector > *ptr = (std::vector