From fae964b7f881d6f4b6b16583cdc0f28464007e20 Mon Sep 17 00:00:00 2001 From: reynoldsnlp Date: Thu, 29 Jun 2023 10:08:19 -0600 Subject: [PATCH 1/3] setup.cfg->pyproject.toml; rm hfst-old-pypi; update README --- .github/workflows/build.yml | 2 +- README.md | 146 + README.rst | 181 - VERSION | 1 - pyproject.toml | 71 +- scripts/bump_version.py | 17 +- scripts/linux_before_all.sh | 15 +- scripts/pre-commit | 11 +- setup.cfg | 23 - src/hfst-old-pypi/__init__.py | 1346 - src/hfst-old-pypi/docstrings.i | 3501 - src/hfst-old-pypi/exceptions/__init__.py | 66 - src/hfst-old-pypi/hfst_extensions.cpp | 38 - src/hfst-old-pypi/hfst_file_extensions.cpp | 44 - src/hfst-old-pypi/hfst_lexc_extensions.cpp | 57 - src/hfst-old-pypi/hfst_lookup_extensions.cpp | 91 - src/hfst-old-pypi/hfst_pmatch_extensions.cpp | 93 - .../hfst_pmatch_tokenize_extensions.cpp | 67 - src/hfst-old-pypi/hfst_prolog_extensions.cpp | 28 - src/hfst-old-pypi/hfst_regex_extensions.cpp | 34 - src/hfst-old-pypi/hfst_rules_extensions.cpp | 174 - src/hfst-old-pypi/hfst_sfst_extensions.cpp | 56 - src/hfst-old-pypi/hfst_xfst_extensions.cpp | 68 - src/hfst-old-pypi/lib/README.md | 1 - src/hfst-old-pypi/libhfst.i | 1875 - src/hfst-old-pypi/libhfst.py | 5128 -- src/hfst-old-pypi/libhfst_wrap.cpp | 55146 ---------------- src/hfst-old-pypi/setup.py | 247 - src/hfst-old-pypi/sfst_rules/__init__.py | 28 - src/hfst-old-pypi/version.py | 1 - src/hfst-old-pypi/xerox_rules/__init__.py | 44 - src/hfst/README | 117 - src/hfst/version.py | 2 +- 33 files changed, 233 insertions(+), 68486 deletions(-) create mode 100644 README.md delete mode 100644 README.rst delete mode 100644 VERSION delete mode 100644 setup.cfg delete mode 100644 src/hfst-old-pypi/__init__.py delete mode 100644 src/hfst-old-pypi/docstrings.i delete mode 100644 src/hfst-old-pypi/exceptions/__init__.py delete mode 100644 src/hfst-old-pypi/hfst_extensions.cpp delete mode 100644 src/hfst-old-pypi/hfst_file_extensions.cpp delete mode 100644 src/hfst-old-pypi/hfst_lexc_extensions.cpp delete mode 100644 src/hfst-old-pypi/hfst_lookup_extensions.cpp delete mode 100644 src/hfst-old-pypi/hfst_pmatch_extensions.cpp delete mode 100644 src/hfst-old-pypi/hfst_pmatch_tokenize_extensions.cpp delete mode 100644 src/hfst-old-pypi/hfst_prolog_extensions.cpp delete mode 100644 src/hfst-old-pypi/hfst_regex_extensions.cpp delete mode 100644 src/hfst-old-pypi/hfst_rules_extensions.cpp delete mode 100644 src/hfst-old-pypi/hfst_sfst_extensions.cpp delete mode 100644 src/hfst-old-pypi/hfst_xfst_extensions.cpp delete mode 100644 src/hfst-old-pypi/lib/README.md delete mode 100644 src/hfst-old-pypi/libhfst.i delete mode 100644 src/hfst-old-pypi/libhfst.py delete mode 100644 src/hfst-old-pypi/libhfst_wrap.cpp delete mode 100644 src/hfst-old-pypi/setup.py delete mode 100644 src/hfst-old-pypi/sfst_rules/__init__.py delete mode 100644 src/hfst-old-pypi/version.py delete mode 100644 src/hfst-old-pypi/xerox_rules/__init__.py delete mode 100644 src/hfst/README diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 57d34bb..8febe05 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,4 +1,4 @@ -name: Build +name: Test, Build, and Publish on: pull_request: diff --git a/README.md b/README.md new file mode 100644 index 0000000..60dc0cc --- /dev/null +++ b/README.md @@ -0,0 +1,146 @@ +# HFST for python + +| | | +| --- | --- | +| CI/CD | [![CI - Test, Build, and Publish](https://github.com/reynoldsnlp/hfst-python/actions/workflows/build.yml/badge.svg)](https://github.com/reynoldsnlp/hfst-python/actions/workflows/build.yml) | +| Package | [![PyPI - Version](https://img.shields.io/pypi/v/hfst.svg?logo=pypi&label=PyPI&logoColor=gold)](https://pypi.org/project/hfst/) [![PyPI - Downloads](https://img.shields.io/pypi/dm/hfst.svg?color=blue&label=Downloads&logo=pypi&logoColor=gold)](https://pypi.org/project/hfst/) [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/hfst.svg?logo=python&label=Python&logoColor=gold)](https://pypi.org/project/hfst/) | +| Meta | ![Static Badge](https://img.shields.io/badge/build-cibuildwheel-blue?logo=python&link=https%3A%2F%2Fcibuildwheel.readthedocs.io%2Fen%2Fstable%2F) [![linting - Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/charliermarsh/ruff/main/assets/badge/v0.json)](https://github.com/charliermarsh/ruff) [![code style - Black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black) [![types - Mypy](https://img.shields.io/badge/types-Mypy-blue.svg)](https://github.com/python/mypy) ![PyPI - License](https://img.shields.io/pypi/l/hfst) | + + + +## Package description + + +Package `hfst` contains python bindings for the [Helsinki Finite-State +Technology (HFST)](https://hfst.github.io) C++ library. HFST toolkit is +intended for processing natural language morphologies. The toolkit is +demonstrated by wide-coverage implementations of a number of languages of +varying morphological complexity. + +## Installation + +For most users, simply run... + +```console +$ python3 -m pip install hfst +``` + +On some OSes, you can install `hfst` python bindings by [running +`install_nightly.sh`](https://wiki.apertium.org/wiki/Installation#Install_Apertium_Core_by_packaging.2Fvirtual_environment). + + +We compile wheels using +[cibuildwheel](https://cibuildwheel.readthedocs.io/en/stable/) which enables us +to publish wheels for CPython and PyPy on a large variety of OS/architecture +combinations. If wheels for your platform are not available, open an issue! +(Windows support coming soon!) + +## Usage + +C++ side functions and classes are wrapped with SWIG under module 'libhfst'. It +is possible to use this module directly, but there is a package named 'hfst' +which encapsulates the libhfst module in a more user-friendly manner. The +structure of the package is + +* hfst + * hfst.exceptions + * hfst.sfst\_rules + * hfst.xerox\_rules + +The module hfst.exceptions contains HfstException and its subclasses. The +modules hfst.sfst\_rules and hfst.xerox\_rules contain functions that create +transducers implementing replace and two-level rules. All other functions and +classes are in module hfst. + +For documentation and examples, see https://hfst.github.io/python/index.html. + +## Requirements + +Compiling hfst from source requires at least C++ compiler (tested with gcc 5.4.0), +readline and getline libraries and setuptools package for python +(tested with version 28.8.0). Swig is no longer needed as pre-generated files are +included in source distribution. + +## Compiling from scratch + +This repository has a submodule with the underlying C++ code. The first time +you clone this repository, run `$ git submodule init` to initialize the +submodule. Thereafter, every time that you want to pull in the latest changes +from the C++ hfst repository, run `$ git submodule update --remote` or `$ git +pull --recurse-submodules`. See the [manylinux build +script](scripts/linux_before_all.sh) for an example of how to compile the +underlying C++ library. + +Once the library is available, the package can be installed by running... + +``` +python3 -m pip install . +``` + +...in the root directory of the repository. + +## Running tests + +Tests are contained in the `test/` directory. To run tests, you must first +install `pytest` using `python3 -m pip install pytest`. Then, in the +root directory of this repository, run `python3 -m pytest`. + +## Documentation + +See wiki-based [package documentation](https://github.com/hfst/python/wiki) on +our Github pages. In python, you can also use `dir` and `help` commands, e.g.: + +``dir(hfst)`` + +``help(hfst.HfstTransducer)`` + +## License + +HFST is licensed under Gnu GPL version 3.0. + +## Troubleshooting + +#### *Pip starts to compile from source although there is a wheel available* + +Try upgrading pip with + +``` +python3 -m pip install --upgrade pip +``` + +Another reason for this can be that the source package on PyPI is newer (i.e. +has a higher version number) than the corresponding wheel for the given +environment. Report this via our [issue +tracker](https://github.com/reynoldsnlp/hfst-python/issues/) so a fresh wheel +can be created. + +#### *Error message "command ... failed with error code ..."* + +Try rerunning pip in verbose mode with + +``` +python3 -m pip install --verbose [--upgrade] hfst +``` + +to get more information. + +#### TypeError: catching classes that do not inherit from BaseException is not allowed + +Some version combinations of SWIG and Python make HFST exception classes +subclasses of Python's `object` instead of Exception. Then you will get the +error above. If this is the case, run... + +``` +sed -i 's/class HfstException(_object):/class HfstException(Exception):/' libhfst.py +``` + +...after build/installation to be able to use HfstException and its subclasses in +Python. + +## Links + +[HFST project main page](https://hfst.github.io): more information about the +project + +[Github issue tracker](https://github.com/hfst/hfst/issues/): for comments, +feature requests and bug reports diff --git a/README.rst b/README.rst deleted file mode 100644 index 299a4d7..0000000 --- a/README.rst +++ /dev/null @@ -1,181 +0,0 @@ - -******************* -Package description -******************* - -> NOTE: This document is out of date (inherited directly from -> https://github.com/hfst/hfst). The purpose of this repository is to separate -> the python code from the underlying C++ code, and to automate building -> wheels. This document will be updated as soon as the Github Actions pipelines -> are finalized with successful wheel builds. - -Package ``hfst`` contains python bindings for `HFST `_ -(Helsinki Finite-State Technology) C++ library. HFST toolkit is intended for -processing natural language morphologies. The toolkit is demonstrated by -wide-coverage implementations of a number of languages of varying -morphological complexity. - -Requirements -############ - -We offer binary wheels on PyPI for Linux, Mac OS X and Windows. - -Wheels for Linux are compiled with a 64-bit docker image (quay.io/pypa/manylinux1_x86_64) -for python versions 2.7, 3.4, 3.5, 3.6 and 3.7. -It is also possible to install hfst to Linux using Debian binary packages (see below). - -Wheels for Mac are compiled as universal binaries for python versions 2.7, 3.5, 3.6 and 3.7. -OS X must be 10.7 or higher. - -Wheels for Windows are 32-bit and also require a 32-bit python to work correctly. -They are available for python versions 3.5 and 3.6; earlier versions would need -an older compiler that does not support C++11 features. -Wheels for version 3.7. may be added to future releases. - -Compiling hfst from source requires at least C++ compiler (tested with gcc 5.4.0), -readline and getline libraries and setuptools package for python -(tested with version 28.8.0). Swig is no longer needed as pre-generated files are -included in source distribution. - -Support for python version 2 is experimental and may be left out at some point. -We recommend python version 3 as it works better with unicode. - -Installation via PyPI -##################### - -We recommend using ``pip`` tool for installation. -Before installation, see that dependencies given under heading 'Requirements' are met. - -For python version 3, the ``pip`` tool is usually named ``pip3``, plain ``pip`` being used -for python version 2. Basic installation is done with: - -``pip3 install [--upgrade] hfst`` - -``pip install [--upgrade] hfst`` - -Starting from python 3.4.0 and 2.7.9, pip is included by default -and can be called via python with option ``-m pip``: - -``python3 -m pip install [--upgrade] hfst`` - -``python -m pip install [--upgrade] hfst`` - -The commands above are run in a shell/terminal/command prompt, but they can -also be run on python command line or via a graphical user interface -(e.g. IDLE) with ``pip.main`` that takes arguments in a list: - -| ``import pip`` -| ``pip.main(['install','--upgrade','hfst'])`` - -The option ``--upgrade`` makes sure that the newest version of hfst will be installed -replacing any earlier versions installed. The option ``--verbose`` -will show what happens during the installation process. This can be useful when compiling from source. - -Installation for Linux using Debian packages -############################################ - -Fetch newest Debian release (named ``python3-libhfst`` for python version 3 and ``python-libhfst`` for python version 2) -from `Apertium `_ and install it with - -``dpkg --install python[3]-libhfst_***.deb`` - -When choosing the right package, the command ``lsb_release -a`` might be helpful. -It will e.g. print something like - -| ``No LSB modules are available.`` -| ``Distributor ID: Ubuntu`` -| ``Description: Ubuntu 16.04.2 LTS`` -| ``Release: 16.04`` -| ``Codename: xenial`` - -In the example case, the line Codename shows that the right package is of form ``*~xenial1_*.deb``. - -The command ``file /usr/bin/file`` is one way to check whether your system is 64-bit or 32-bit. It will print something like: - -``/usr/bin/file: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked ...`` - -In the case above, a package ending in ``amd64.deb`` is the right choice. - -Compiling from scratch -###################### - -This repository has a submodule with the underlying C++ code. The first time -you clone this repository, run ``$ git submodule init`` to initialize the -submodule. Thereafter, every time that you want to pull in the latest changes -from the C++ hfst repository, run ``$ git submodule update --remote`` or -``$ git pull --recurse-submodules``. TODO - -Documentation -############# - -See wiki-based `package documentation `_ -on our Github pages. In python, you can also use ``dir`` and ``help`` -commands, e.g.: - -``dir(hfst)`` - -``help(hfst.HfstTransducer)`` - -License -####### - -HFST is licensed under Gnu GPL version 3.0. - -Troubleshooting -############### - -(In the commands below, ``python[3]`` means either ``python`` or ``python3`` depending of the version of python you are using; -the same goes for ``pip[3]`` meaning ``pip`` or ``pip3``.) - -*Pip starts to compile from source although there is a wheel available:* - -Try upgrading pip with - -``pip[3] install --upgrade pip`` - -or - -``python[3] -m pip install --upgrade pip``. - -Another reason for this can be that -the source package on PyPI is newer (i.e. has a higher version number) than -the corresponding wheel for the given environment. Report this via our -`issue tracker `_ so a fresh wheel -will be created. - -*Error message "command ... failed with error code ...":* - -Try rerunning pip in verbose mode with - -``pip[3] install --verbose [--upgrade] hfst`` - -or - -``python[3] -m pip install --verbose [--upgrade] hfst`` - -to get more information. - -*Error message "error: could not delete ... : permission denied":* - -You do not have sufficient rights to install packages. On Mac and Linux, try -installing as super user with - -``sudo pip[3] install [--upgrade] hfst`` - -or - -``sudo python[3] -m pip install [--upgrade] hfst``. - -On Windows, reopen Command Prompt/Python command line/IDLE by right-clicking -and choose "Run as administrator", then run pip again. - - -Links -##### - -`HFST project main page `_: more information about -the project - -`Github issue tracker `_: for comments, -feature requests and bug reports - diff --git a/VERSION b/VERSION deleted file mode 100644 index ba89f9e..0000000 --- a/VERSION +++ /dev/null @@ -1 +0,0 @@ -3.16.0.1 \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index f63460d..a739838 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,10 +3,61 @@ requires = ["setuptools>=42", "wheel"] build-backend = "setuptools.build_meta" -[tool.pytest.ini_options] -minversion = "6.0" -# addopts = "-ra -q" -testpaths = ["test",] +[project] +name = "hfst" +description = "Python SWIG-bound interface for HFST" +authors = [ {name = "HFST team", email = "hfst-bugs@helsinki.fi"} ] +maintainers = [ + {name = "Rob Reynolds", email = "robert_reynolds@byu.edu"}, + {name = "Tino Didriksen"} +] +readme = "README.md" +keywords = [ "Finite-state transducer", "morphology", "morphological", "part of speech", "tagger", "Natural Language Processing", "NLP"] +license = {text = "GPL v3"} +requires-python = ">=3.6" +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Intended Audience :: Developers", + "Intended Audience :: Science/Research", + "License :: OSI Approved :: GNU General Public License v3 (GPLv3)", + "Operating System :: MacOS", + "Operating System :: POSIX :: Linux", + "Programming Language :: C++", + "Programming Language :: Python", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: Implementation :: CPython", + "Programming Language :: Python :: Implementation :: PyPy", + "Topic :: Education", + "Topic :: Scientific/Engineering", + "Topic :: Scientific/Engineering :: Artificial Intelligence", + "Topic :: Scientific/Engineering :: Human Machine Interfaces", + "Topic :: Text Processing :: Linguistic", + "Topic :: Utilities" +] +dynamic = ["version"] + +[tool.setuptools.dynamic] +version = {attr = "hfst.__version__"} + +[project.urls] +Homepage = "https://hfst.github.io/" +Documentation = "https://github.com/hfst/python/wiki" +Repository = "https://github.com/reynoldsnlp/hfst-python.git" + +[project.optional-dependencies] +test = [ + "pytest" +] +dev = [ + "black", + "mypy", + "ruff", +] [tool.cibuildwheel] build-verbosity = 3 @@ -22,8 +73,18 @@ before-all = "bash scripts/linux_before_all.sh" [tool.cibuildwheel.macos] archs = "x86_64 arm64" # Compare these environment variables to https://github.com/apertium/packaging/blob/main/osx-pre.sh -environment = { CXXFLAGS="-std=gnu++11 -stdlib=libc++", LDFLAGS="-stdlib=libc++ -L/usr/local/lib", MACOSX_DEPLOYMENT_TARGET="10.9", SDK_VERSION="10.9" } +environment = { + CXXFLAGS="-std=gnu++11 -stdlib=libc++", + LDFLAGS="-stdlib=libc++ -L/usr/local/lib", + MACOSX_DEPLOYMENT_TARGET="10.9", + SDK_VERSION="10.9" +} before-all = "bash scripts/macos_before_all.sh" [tool.cibuildwheel.windows] before-all = "C:\\msys64\\msys2_shell.cmd -mingw64 -defterm -here -full-path -no-start -shell bash scripts/win_before_all.sh" + +[tool.pytest.ini_options] +minversion = "6.0" +# addopts = "-ra -q" +testpaths = ["test",] diff --git a/scripts/bump_version.py b/scripts/bump_version.py index e8ecd7c..418ed79 100755 --- a/scripts/bump_version.py +++ b/scripts/bump_version.py @@ -1,7 +1,10 @@ #!/usr/bin/env python3 -"""Bump version number in VERSION based off the current HFST version and the -current version already uploaded to PyPI (or Test PyPI, if the --test flag is -given.""" + +""" +Bump version number in src/hfst/version.py based off the current HFST version +and the current version already uploaded to PyPI (or Test PyPI, if the --test +flag is given. +""" import json import re @@ -106,15 +109,11 @@ def tests(): def write_version_files(new_version): base_dir = __file__.replace('scripts/bump_version.py', '') - path_to_VERSION = base_dir + 'VERSION' - with open(path_to_VERSION, 'w') as f: - f.write(new_version) - path_to_version_py = base_dir + 'src/hfst/version.py' with open(path_to_version_py, 'w') as f: - print('version =', repr(new_version), file=f) + print(f'''version = "{new_version}"''', file=f) - print(f'VERSION updated to {new_version}.', file=sys.stderr) + print(f'src/hfst/version.py updated to {new_version}.', file=sys.stderr) if __name__ == '__main__': diff --git a/scripts/linux_before_all.sh b/scripts/linux_before_all.sh index f59a48b..4204ede 100755 --- a/scripts/linux_before_all.sh +++ b/scripts/linux_before_all.sh @@ -1,5 +1,4 @@ -set -e # stop script on error -set -x # print commands as they are executed +set -e -x if [ -x "$(command -v dnf)" ]; then PM=dnf @@ -15,29 +14,25 @@ ${PM} install -y autoconf automake bison flex libicu-devel libtool pkgconfig rea git clone https://github.com/apertium/packaging.git -# get foma +# build foma git clone https://github.com/mhulden/foma.git pushd foma/foma/ -cmake . +cmake -DCMAKE_INSTALL_LIBDIR=lib . make && make install -# foma installs to the wrong local folder, so fix that -cp -av /usr/local/lib64/* /usr/local/lib/ || true # allow this command to fail -ldconfig popd +# build openfst curl https://www.openfst.org/twiki/pub/FST/FstDownload/openfst-1.7.9.tar.gz -o openfst-1.7.9.tar.gz tar -xzf openfst-1.7.9.tar.gz pushd openfst-1.7.9/ patch -p1 <../packaging/tools/openfst/debian/patches/openfst-cxx17.diff patch -p1 <../packaging/tools/openfst/debian/patches/openfst-sse.diff -grep c++17 configure.ac # check that patches applied correctly autoreconf -fvi ./configure --enable-bin --enable-compact-fsts --enable-compress --enable-const-fsts --enable-far --enable-fsts --enable-grm --enable-linear-fsts --enable-lookahead-fsts --enable-mpdt --enable-ngram-fsts --enable-pdt --enable-special --disable-static make && make install popd -git clone https://github.com/hfst/hfst.git libhfst # TODO use libhfst_src submodule instead? -pushd libhfst/ +pushd libhfst_src/ autoreconf -fvi ./configure --disable-static --with-unicode-handler=icu --with-openfst-upstream --with-foma-upstream make && make install diff --git a/scripts/pre-commit b/scripts/pre-commit index b0ac7d5..70583dc 100755 --- a/scripts/pre-commit +++ b/scripts/pre-commit @@ -6,6 +6,7 @@ To use this script as a local pre-commit check... """ import os +import re import subprocess import sys @@ -44,7 +45,7 @@ def bump_version(beta, test): stderr=subprocess.PIPE, stdout=subprocess.PIPE, universal_newlines=True) - subprocess.run(['git', 'add', 'VERSION', 'src/hfst/version.py']) + subprocess.run(['git', 'add', 'src/hfst/version.py']) print(completed.stderr) autoversion = completed.stdout.strip() print(f'Version set to {autoversion}') @@ -59,17 +60,17 @@ def bump_version(beta, test): print(f'Running {__file__} ...', file=sys.stderr) -diff = subprocess.run(['git', 'diff', 'VERSION'], +diff = subprocess.run(['git', 'diff', 'src/hfst/version.py'], stdout=subprocess.PIPE, universal_newlines=True).stdout.strip() -with open('VERSION') as f: - new_version = f.read().strip() +with open('src/hfst/version.py') as f: + new_version = re.search(r'version = "([^"]+)"', f.read().strip()).group(1) diff_msg = f' with v{new_version}' if diff else '' are_swig_generated_files_outdated() if diff: - print('WARNING: The version number in VERSION has changed to ' + print('WARNING: The version number in src/hfst/version.py has changed to ' f'{new_version}. It is recommended that you leave version numbering ' 'up to this pre-commit script.') print('How would you like to proceed?') diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index 5f1bb9c..0000000 --- a/setup.cfg +++ /dev/null @@ -1,23 +0,0 @@ -[metadata] -name = hfst -version = file: VERSION -author = HFST team -author_email = hfst-bugs@helsinki.fi -url = https://hfst.github.io/ -description = Python SWIG-bound interface for HFST -long_description = file: README.rst -long_description_content_type = text/x-rst -license = GNU GPL3 -license_files = LICENSE - -[options] -include_package_data = True -py_modules = hfst.libhfst -python_requires = >=3.6 -tests_require = pytest -package_dir = - = src -packages = find: - -[options.packages.find] -where = src diff --git a/src/hfst-old-pypi/__init__.py b/src/hfst-old-pypi/__init__.py deleted file mode 100644 index e6d75ef..0000000 --- a/src/hfst-old-pypi/__init__.py +++ /dev/null @@ -1,1346 +0,0 @@ -"""Python bindings for HFST finite-state transducer library written in C++. - -FUNCTIONS: - - compile_lexc_file - compile_pmatch_expression - compile_pmatch_file - compile_xfst_file - concatenate - disjunct - empty_fst - epsilon_fst - fsa - fst - fst_type_to_string - get_default_fst_type - get_output_to_console - intersect - is_diacritic - read_att_input - read_att_string - read_att_transducer - read_prolog_transducer - regex - set_default_fst_type - set_output_to_console - start_xfst - tokenized_fst - -CLASSES: - - AttReader - HfstBasicTransducer - HfstBasicTransition - HfstInputStream - HfstOutputStream - HfstTokenizer - HfstTransducer - ImplementationType - LexcCompiler - PmatchContainer - PrologReader - XfstCompiler - XreCompiler -""" - -from io import StringIO -import readline -import sys - -import hfst.exceptions -import hfst.libhfst -from hfst.libhfst import compile_pmatch_expression -from hfst.libhfst import fst_type_to_string -from hfst.libhfst import get_default_fst_type -from hfst.libhfst import HfstBasicTransducer -from hfst.libhfst import HfstBasicTransition -from hfst.libhfst import HfstInputStream -from hfst.libhfst import HfstOutputStream -from hfst.libhfst import HfstTokenizer -from hfst.libhfst import HfstTransducer -from hfst.libhfst import is_diacritic -from hfst.libhfst import LexcCompiler -from hfst.libhfst import Location -from hfst.libhfst import PmatchContainer -from hfst.libhfst import set_default_fst_type -from hfst.libhfst import XfstCompiler -from hfst.libhfst import XreCompiler -import hfst.sfst_rules -import hfst.xerox_rules - -from .version import version as __version__ - - -if int(sys.version[0]) > 2: - def unicode(s, c): - return s - -EPSILON = '@_EPSILON_SYMBOL_@' -UNKNOWN = '@_UNKNOWN_SYMBOL_@' -IDENTITY = '@_IDENTITY_SYMBOL_@' - -# Windows... -OUTPUT_TO_CONSOLE = False - - -def set_output_to_console(val): - """(Windows-specific:) set whether output is printed to console - instead of standard output. - """ - global OUTPUT_TO_CONSOLE - OUTPUT_TO_CONSOLE = val - - -def get_output_to_console(): - """(Windows-specific:) get whether output is printed to console - instead of standard output. - """ - return OUTPUT_TO_CONSOLE - - -def start_xfst(**kwargs): - """Start interactive xfst compiler. - - Parameters - ---------- - * `kwargs` : - Arguments recognized are: type, quit_on_fail. - * `quit_on_fail` : - Whether the compiler exits on any error, defaults to False. - * `type` : - Implementation type of the compiler, defaults to - hfst.get_default_fst_type(). - """ - idle = 'idlelib' in sys.modules - if idle: - print('It seems that you are running python in in IDLE. Note that all output from xfst will be buffered.') - print('This means that all warnings, e.g. about time-consuming operations, will be printed only after the operation is carried out.') - print('Consider running python from shell, for example command prompt, if you wish to see output with no delays.') - - type = get_default_fst_type() - quit_on_fail = 'OFF' - to_console = get_output_to_console() - for k, v in kwargs.items(): - if k == 'type': - type = v - elif k == 'output_to_console': - to_console = v - elif k == 'quit_on_fail': - if v: - quit_on_fail = 'ON' - else: - print('Warning: ignoring unknown argument %s.' % (k)) - - comp = XfstCompiler(type) - comp.setReadInteractiveTextFromStdin(True) - comp.setReadline(False) # do not mix python and c++ readline - - if to_console and idle: - print('Cannot output to console when running libhfst from IDLE.') - to_console = False - comp.setOutputToConsole(to_console) - comp.set('quit-on-fail', quit_on_fail) - - rl_length_1 = 0 - rl_found = False - try: - rl_found = True - rl_length_1 = readline.get_current_history_length() - except ImportError: - pass - - expression = '' - while True: - expression += input(comp.get_prompt()).rstrip().lstrip() - if len(expression) == 0: - continue - if expression[-1] == '\\': - expression = expression[:-2] + '\n' - continue - retval = -1 - if idle: - retval = hfst.libhfst.hfst_compile_xfst_to_string_one(comp, expression) - sys.stdout.write(hfst.libhfst.get_hfst_xfst_string_one()) - else: - # interactive command - if (expression == 'apply down' or expression == 'apply up') and rl_found: - rl_length_2 = readline.get_current_history_length() - while True: - try: - line = input().rstrip().lstrip() - except EOFError: - break - if expression == 'apply down': - comp.apply_down(line) - elif expression == 'apply up': - comp.apply_up(line) - for foo in range(readline.get_current_history_length() - rl_length_2): - readline.remove_history_item(rl_length_2) - retval = 0 - elif expression == 'inspect' or expression == 'inspect net': - print('inspect net not supported') - retval = 0 - else: - retval = comp.parse_line(expression + '\n') - if retval != 0: - print("expression '%s' could not be parsed" % expression) - if comp.get('quit-on-fail') == 'ON': - return - if comp.quit_requested(): - break - expression = '' - - if rl_found: - for foo in range(readline.get_current_history_length() - rl_length_1): - readline.remove_history_item(rl_length_1) - - -def regex(re, **kwargs): - r"""Get a transducer as defined by regular expression *re*. - - Parameters - ---------- - * `re` : - The regular expression defined with Xerox transducer notation. - * `kwargs` : - Arguments recognized are: 'error' and 'definitions'. - * `error` : - Where warnings and errors are printed. Possible values are sys.stdout, - sys.stderr (the default), a StringIO or None, indicating a quiet mode. - * `definitions` : - A dictionary mapping variable names into transducers. - - - Regular expression operators: - - ~ complement - \ term complement - & intersection - - minus - - $. contains once - $? contains optionally - $ contains once or more - ( ) optionality - - + Kleene plus - * Kleene star - - ./. ignore internally (not yet implemented) - / ignoring - - | union - - <> shuffle - < before - > after - - .o. composition - .O. lenient composition - .m>. merge right - .n catenate more than n times - ^>n catenate less than n times - ^n catenate n times - - .r reverse - .i invert - .u input side - .l output side - - \\\\\\ left quotient - - Two-level rules: - - \<= left restriction - <=> left and right arrow - <= left arrow - => right arrow - - Replace rules: - - -> replace right - (->) optionally replace right - <- replace left - (<-) optionally replace left - <-> replace left and right - (<->) optionally replace left and right - @-> left-to-right longest match - @> left-to-right shortest match - ->@ right-to-left longest match - >@ right-to-left shortest match - - Rule contexts, markers and separators: - - || match contexts on input sides - // match left context on output side and right context on input side - \\ match left context on input side and right context on output side - \/ match contexts on output sides - _ center marker - ... markup marker - ,, rule separator in parallel rules - , context separator - [. .] match epsilons only once - - Read from file: - - @bin" " read binary transducer - @txt" " read transducer in att text format - @stxt" " read spaced text - @pl" " read transducer in prolog text format - @re" " read regular expression - - Symbols: - - .#. word boundary symbol in replacements, restrictions - 0 the epsilon - ? any token - % escape character - { } concatenate symbols - " " quote symbol - - : pair separator - :: weight - - ; end of expression - ! starts a comment until end of line - # starts a comment until end of line - """ - type_ = get_default_fst_type() - to_console = get_output_to_console() - err = None - defs = None - - for k, v in kwargs.items(): - if k == 'output_to_console': - to_console = v - if k == 'error': - err = v - if k == 'definitions': - defs = v - else: - print('Warning: ignoring unknown argument %s.' % (k)) - - comp = XreCompiler(type_) - comp.setOutputToConsole(to_console) - if defs is not None: - for k, v in defs.items(): - vtype = str(type(v)) - if 'HfstTransducer' in vtype: - comp.define_transducer(k, v) - # print('defining transducer') - else: - pass - - if err is None: - return hfst.libhfst.hfst_regex(comp, re, '') - elif err == sys.stdout: - return hfst.libhfst.hfst_regex(comp, re, 'cout') - elif err == sys.stderr: - return hfst.libhfst.hfst_regex(comp, re, 'cerr') - else: - retval = hfst.libhfst.hfst_regex(comp, re, '') - err.write(unicode(hfst.libhfst.get_hfst_regex_error_message(), 'utf-8')) - return retval - - -def _replace_symbols(symbol, epsilonstr=EPSILON): - if symbol == epsilonstr: - return EPSILON - if symbol == '@0@': - return EPSILON - symbol = symbol.replace('@_SPACE_@', ' ') - symbol = symbol.replace('@_TAB_@', '\t') - symbol = symbol.replace('@_COLON_@', ':') - return symbol - - -def _parse_att_line(line, fsm, epsilonstr=EPSILON): - # get rid of extra whitespace - line = line.replace('\t', ' ') - line = ' '.join(line.split()) - fields = line.split(' ') - try: - if len(fields) == 1: - if fields[0] == '': # empty transducer... - return True - fsm.add_state(int(fields[0])) - fsm.set_final_weight(int(fields[0]), 0) - elif len(fields) == 2: - fsm.add_state(int(fields[0])) - fsm.set_final_weight(int(fields[0]), float(fields[1])) - elif len(fields) == 4: - fsm.add_transition(int(fields[0]), int(fields[1]), _replace_symbols(fields[2]), _replace_symbols(fields[3]), 0) - elif len(fields) == 5: - fsm.add_transition(int(fields[0]), int(fields[1]), _replace_symbols(fields[2]), _replace_symbols(fields[3]), float(fields[4])) - else: - return False - except ValueError: - return False - return True - - -def read_att_string(att): - """Create a transducer as defined in AT&T format in *att*.""" - linecount = 0 - fsm = HfstBasicTransducer() - lines = att.split('\n') - for line in lines: - linecount = linecount + 1 - if not _parse_att_line(line, fsm): - raise hfst.exceptions.NotValidAttFormatException(line, '', linecount) - return HfstTransducer(fsm, get_default_fst_type()) - - -def read_att_input(): - """Create a transducer as defined in AT&T format in user input. - An empty line signals the end of input. - """ - linecount = 0 - fsm = HfstBasicTransducer() - while True: - line = input().rstrip() - if line == '': - break - linecount = linecount + 1 - if not _parse_att_line(line, fsm): - raise hfst.exceptions.NotValidAttFormatException(line, '', linecount) - return HfstTransducer(fsm, get_default_fst_type()) - - -def read_att_transducer(f, epsilonstr=EPSILON, linecount=[0]): - """Create a transducer as defined in AT&T format in file *f*. *epsilonstr* - defines how epsilons are represented. *linecount* keeps track of the current - line in the file. - """ - linecount_ = 0 - fsm = HfstBasicTransducer() - while True: - line = f.readline() - if line == '': - if linecount_ == 0: - raise hfst.exceptions.EndOfStreamException('', '', 0) - else: - linecount_ = linecount_ + 1 - break - linecount_ = linecount_ + 1 - if line[0] == '-': - break - if not _parse_att_line(line, fsm, epsilonstr): - raise hfst.exceptions.NotValidAttFormatException(line, '', linecount[0] + linecount_) - linecount[0] = linecount[0] + linecount_ - return HfstTransducer(fsm, get_default_fst_type()) - - -class AttReader: - """A class for reading input in AT&T text format and converting it into - transducer(s). - - An example that reads AT&T input from file 'testfile.att' where epsilon is - represented as \"\" and creates the corresponding transducers and prints - them. If the input cannot be parsed, a message showing the invalid line in AT&T - input is printed and reading is stopped. - - with open('testfile.att', 'r') as f: - try: - r = hfst.AttReader(f, \"\") - for tr in r: - print(tr) - except hfst.exceptions.NotValidAttFormatException as e: - print(e.what()) - """ - def __init__(self, f, epsilonstr=EPSILON): - """Create an AttReader that reads input from file *f* where - the epsilon is represented as *epsilonstr*. - - Parameters - ---------- - * `f` : - A python file. - * `epsilonstr` : - How epsilon is represented in the file. By default, \"@_EPSILON_SYMBOL_@\" - and \"@0@\" are both recognized. - """ - self.file = f - self.epsilonstr = epsilonstr - self.linecount = [0] - - def read(self): - """Read next transducer. - - Read next transducer description in AT&T format and return a corresponding - transducer. - - Exceptions - ---------- - * `hfst.exceptions.NotValidAttFormatException` : - * `hfst.exceptions.EndOfStreamException` : - """ - return read_att_transducer(self.file, self.epsilonstr, self.linecount) - - def __iter__(self): - """An iterator to the reader. - - Needed for 'for ... in' statement. - - for transducer in att_reader: - print(transducer) - """ - return self - - def next(self): - """Return next element (for python version 3). - - Needed for 'for ... in' statement. - - for transducer in att_reader: - print(transducer) - - Exceptions - ---------- - * `StopIteration` : - """ - try: - return self.read() - except hfst.exceptions.EndOfStreamException: - raise StopIteration - - def __next__(self): - """Return next element (for python version 2). - - Needed for 'for ... in' statement. - - for transducer in att_reader: - print(transducer) - - Exceptions - ---------- - * `StopIteration` : - """ - return self.next() - - -def read_prolog_transducer(f, linecount=[0]): - """Create a transducer as defined in prolog format in file *f*. *linecount* - keeps track of the current line in the file. - """ - linecount_ = 0 - fsm = HfstBasicTransducer() - - line = '' - while(True): - line = f.readline() - linecount_ = linecount_ + 1 - if line == '': - raise hfst.exceptions.EndOfStreamException('', '', linecount[0] + linecount_) - line = line.rstrip() - if line == '': - pass # allow extra prolog separator(s) - if line[0] == '#': - pass # comment line - else: - break - - if not hfst.libhfst.parse_prolog_network_line(line, fsm): - raise hfst.exceptions.NotValidPrologFormatException(line, '', linecount[0] + linecount_) - - while(True): - line = f.readline() - if (line == ''): - retval = HfstTransducer(fsm, get_default_fst_type()) - retval.set_name(fsm.name) - linecount[0] = linecount[0] + linecount_ - return retval - line = line.rstrip() - linecount_ = linecount_ + 1 - if line == '': # prolog separator - retval = HfstTransducer(fsm, get_default_fst_type()) - retval.set_name(fsm.name) - linecount[0] = linecount[0] + linecount_ - return retval - if hfst.libhfst.parse_prolog_arc_line(line, fsm): - pass - elif hfst.libhfst.parse_prolog_final_line(line, fsm): - pass - elif hfst.libhfst.parse_prolog_symbol_line(line, fsm): - pass - else: - raise hfst.exceptions.NotValidPrologFormatException(line, '', linecount[0] + linecount_) - - -class PrologReader: - """A class for reading input in prolog text format and converting it into - transducer(s). - - An example that reads prolog input from file 'testfile.prolog' and creates the - corresponding transducers and prints them. If the input cannot be parsed, a - message showing the invalid line in prolog input is printed and reading is - stopped. - - with open('testfile.prolog', 'r') as f: - try: - r = hfst.PrologReader(f) - for tr in r: - print(tr) - except hfst.exceptions.NotValidPrologFormatException as e: - print(e.what()) - """ - def __init__(self, f): - """Create a PrologReader that reads input from file *f*. - - Parameters - ---------- - * `f` : - A python file. - """ - self.file = f - self.linecount = [0] - - def read(self): - """Read next transducer. - - Read next transducer description in prolog format and return a corresponding - transducer. - - Exceptions - ---------- - * `hfst.exceptions.NotValidPrologFormatException` : - * `hfst.exceptions.EndOfStreamException` : - """ - return read_prolog_transducer(self.file, self.linecount) - - def __iter__(self): - """An iterator to the reader. - - Needed for 'for ... in' statement. - - for transducer in prolog_reader: - print(transducer) - """ - return self - - def next(self): - """Return next element (for python version 2). - - Needed for 'for ... in' statement. - - for transducer in prolog_reader: - print(transducer) - - Exceptions - ---------- - * `StopIteration` : - """ - try: - return self.read() - except hfst.exceptions.EndOfStreamException: - raise StopIteration - - def __next__(self): - """Return next element (for python version 2). - - Needed for 'for ... in' statement. - - for transducer in prolog_reader: - print(transducer) - - Exceptions - ---------- - * `StopIteration` : - """ - return self.next() - - -def compile_xfst_file(filename, **kwargs): - """Compile (run) xfst file *filename*. - - Parameters - ---------- - * `filename` : - The name of the xfst file. - * `kwargs` : - Arguments recognized are: verbosity, quit_on_fail, output, type. - * `verbosity` : - The verbosity of the compiler, defaults to 0 (silent). Possible values are: - 0, 1, 2. - * `quit_on_fail` : - Whether the script is exited on any error, defaults to True. - * `output` : - Where output is printed. Possible values are sys.stdout, sys.stderr, a - StringIO, sys.stderr being the default? - * `type` : - Implementation type of the compiler, defaults to - hfst.get_default_fst_type(). - - Returns - ------- - On success 0, else an integer greater than 0. - """ - if int(sys.version[0]) > 2: - pass - else: - raise RuntimeError('hfst.compile_xfst_file not supported for python version 2') - verbosity = 0 - quit_on_fail = 'ON' - type = get_default_fst_type() - output = None - error = None - to_console = get_output_to_console() - - for k, v in kwargs.items(): - if k == 'verbosity': - verbosity = v - elif k == 'quit_on_fail': - if not v: - quit_on_fail = 'OFF' - elif k == 'output': - output = v - elif k == 'error': - error = v - elif k == 'output_to_console': - to_console = v - else: - print('Warning: ignoring unknown argument %s.' % (k)) - - if verbosity > 1: - print('Compiling with %s implementation...' % fst_type_to_string(type)) - xfstcomp = XfstCompiler(type) - xfstcomp.setOutputToConsole(to_console) - xfstcomp.setVerbosity(verbosity > 0) - xfstcomp.set('quit-on-fail', quit_on_fail) - if verbosity > 1: - print('Opening xfst file %s...' % filename) - f = open(filename, 'r', encoding='utf-8') - data = f.read() - f.close() - if verbosity > 1: - print('File closed...') - - retval = -1 - - # check special case - if isinstance(output, StringIO) and isinstance(error, StringIO) and output == error: - retval = hfst.libhfst.hfst_compile_xfst_to_string_one(xfstcomp, data) - output.write(unicode(hfst.libhfst.get_hfst_xfst_string_one(), 'utf-8')) - else: - arg1 = '' - arg2 = '' - if output is None or output == sys.stdout: - arg1 = 'cout' - if output == sys.stderr: - arg1 == 'cerr' - if error is None or error == sys.stderr: - arg2 = 'cerr' - if error == sys.stdout: - arg2 == 'cout' - - retval = hfst.libhfst.hfst_compile_xfst(xfstcomp, data, arg1, arg2) - - if isinstance(output, StringIO): - output.write(unicode(hfst.libhfst.get_hfst_xfst_string_one(), 'utf-8')) - if isinstance(error, StringIO): - error.write(unicode(hfst.libhfst.get_hfst_xfst_string_two(), 'utf-8')) - - if verbosity > 1: - print('Parsed file with return value %i (0 indicating succesful parsing).' % retval) - return retval - - -def compile_twolc_file(inputfilename, outputfilename, **kwargs): - """Compile twolc file *inputfilename* and store the result to - file *outputfilename*. - - Parameters - ---------- - * `inputfilename` : - The name of the twolc input file. - * `outputfilename` : - The name of the transducer output file. - * `kwargs` : - Arguments recognized are: silent, verbose, resolve_right_conflicts, resolve_left_conflicts, type. - * `silent` : - Whether compilation is performed in silent mode, defaults to False. - * `verbose` : - Whether compilation is performed in verbose mode, defaults to False. - * `resolve_right_conflicts` : - Whether right arrow conflicts are resolved, defaults to True. - * `resolve_left_conflicts` : - Whether left arrow conflicts are resolved, defaults to False. - * `type` : - Implementation type of the compiler, defaults to hfst.get_default_fst_type(). - - Returns - ------- - On success zero, else an integer other than zero. - """ - silent = False - verbose = False - resolve_right_conflicts = True - resolve_left_conflicts = False - implementation_type = get_default_fst_type() - - for k, v in kwargs.items(): - if k == 'type': - implementation_type = v - elif k == 'silent': - silent = v - elif k == 'verbose': - verbose = v - elif k == 'resolve_right_conflicts': - resolve_right_conflicts = v - elif k == 'resolve_left_conflicts': - resolve_left_conflicts = v - else: - print('Warning: ignoring unknown argument %s.' % (k)) - - return hfst.libhfst.TwolcCompiler.compile(inputfilename, outputfilename, - silent, verbose, - resolve_right_conflicts, - resolve_left_conflicts, - implementation_type) - - -def compile_pmatch_file(filename): - """Compile pmatch expressions as defined in *filename* and - return a tuple of transducers. - - An example: - - If we have a file named streets.txt that contains: - - define CapWord UppercaseAlpha Alpha* ; define StreetWordFr [{avenue} | - {boulevard} | {rue}] ; define DeFr [ [{de} | {du} | {des} | {de la}] Whitespace - ] | [{d'} | {l'}] ; define StreetFr StreetWordFr (Whitespace DeFr) CapWord+ ; - regex StreetFr EndTag(FrenchStreetName) ; - - we can run: - - defs = hfst.compile_pmatch_file('streets.txt') - const = hfst.PmatchContainer(defs) - assert cont.match("Je marche seul dans l'avenue desTernes.") == - "Je marche seul dans l'avenue des Ternes." - """ - with open(filename, 'r') as myfile: - data = myfile.read() - myfile.close() - defs = compile_pmatch_expression(data) - return defs - - -def compile_sfst_file(filename, **kwargs): - """Compile sfst file *filename* into a transducer. - - Parameters - ---------- - * `filename` : - The name of the sfst file. - * `kwargs` : - Arguments recognized are: verbose, output. - * `verbose` : - Whether sfst file is processed in verbose mode, defaults to False. - * `output` : - Where output is printed. Possible values are sys.stdout, sys.stderr, a - StringI0, sys.stderr being the default. TODO - - Returns - ------- - On success the resulting transducer, else None. - """ - verbosity = False - # type = get_default_fst_type() - output = None - to_console = get_output_to_console() - - for k, v in kwargs.items(): - if k == 'verbose': - verbosity = v - elif k == 'output': - output = v - elif k == 'output_to_console': - to_console = v - else: - print('Warning: ignoring unknown argument %s.' % (k)) - - retval = None - if output is None: - retval = hfst.libhfst.hfst_compile_sfst(filename, '', verbosity, to_console) - elif output == sys.stdout: - retval = hfst.libhfst.hfst_compile_sfst(filename, 'cout', verbosity, to_console) - elif output == sys.stderr: - retval = hfst.libhfst.hfst_compile_sfst(filename, 'cerr', verbosity, to_console) - else: - retval = hfst.libhfst.hfst_compile_sfst(filename, '', verbosity, to_console) - output.write(unicode(hfst.libhfst.get_hfst_sfst_output(), 'utf-8')) - - return retval - - -def compile_lexc_file(filename, **kwargs): - """Compile lexc file *filename* into a transducer. - - Parameters - ---------- - * `filename` : - The name of the lexc file. - * `kwargs` : - Arguments recognized are: verbosity, with_flags, output. - * `verbosity` : - The verbosity of the compiler, defaults to 0 (silent). Possible values are: - 0, 1, 2. - * `with_flags` : - Whether lexc flags are used when compiling, defaults to False. - * `output` : - Where output is printed. Possible values are sys.stdout, sys.stderr, a - StringIO, sys.stderr being the default. - - Returns - ------- - On success the resulting transducer, else None. - """ - verbosity = 0 - withflags = False - alignstrings = False - type = get_default_fst_type() - output = None - to_console = get_output_to_console() - - for k, v in kwargs.items(): - if k == 'verbosity': - verbosity = v - elif k == 'with_flags': - if v: - withflags = v - elif k == 'align_strings': - alignstrings = v - elif k == 'output': - output = v - elif k == 'output_to_console': - to_console = v - else: - print('Warning: ignoring unknown argument %s.' % (k)) - - lexccomp = LexcCompiler(type, withflags, alignstrings) - lexccomp.setVerbosity(verbosity) - lexccomp.setOutputToConsole(to_console) - - retval = -1 - if output is None: - retval = hfst.libhfst.hfst_compile_lexc(lexccomp, filename, '') - elif output == sys.stdout: - retval = hfst.libhfst.hfst_compile_lexc(lexccomp, filename, 'cout') - elif output == sys.stderr: - retval = hfst.libhfst.hfst_compile_lexc(lexccomp, filename, 'cerr') - else: - retval = hfst.libhfst.hfst_compile_lexc(lexccomp, filename, '') - output.write(unicode(hfst.libhfst.get_hfst_lexc_output(), 'utf-8')) - - return retval - - -def _is_weighted_word(arg): - if isinstance(arg, tuple) and len(arg) == 2 and isinstance(arg[0], str) and isinstance(arg[1], (int, float)): - return True - return False - - -def _check_word(arg): - if len(arg) == 0: - raise RuntimeError('Empty word.') - return arg - - -def fsa(arg): - """Get a transducer (automaton in this case) that recognizes - one or more paths. - - Parameters - ---------- - * `arg` : - See example below - - Possible inputs: - - One unweighted identity path: - 'foo' -> [f o o] - - Weighted path: a tuple of string and number, e.g. - ('foo',1.4) - ('bar',-3) - ('baz',0) - - Several paths: a list or a tuple of paths and/or weighted paths, e.g. - ['foo', 'bar'] - ('foo', ('bar',5.0)) - ('foo', ('bar',5.0), 'baz', 'Foo', ('Bar',2.4)) - [('foo',-1), ('bar',0), ('baz',3.5)] - - """ - deftok = HfstTokenizer() - retval = HfstBasicTransducer() - if isinstance(arg, str): - if len(arg) == 0: - retval.set_final_weight(0, 0) # epsilon transducer with zero weight - else: - retval.disjunct(deftok.tokenize(_check_word(arg)), 0) - elif _is_weighted_word(arg): - if len(arg) == 0: - retval.set_final_weight(0, arg[1]) # epsilon transducer with weight - else: - retval.disjunct(deftok.tokenize(_check_word(arg[0])), arg[1]) - elif isinstance(arg, tuple) or isinstance(arg, list): - for word in arg: - if _is_weighted_word(word): - if len(word) == 0: - retval.set_final_weight(0, word[1]) # epsilon transducer with weight - else: - retval.disjunct(deftok.tokenize(_check_word(word[0])), word[1]) - elif isinstance(word, str): - if len(word) == 0: - retval.set_final_weight(0, 0) # epsilon transducer with zero weight - else: - retval.disjunct(deftok.tokenize(_check_word(word)), 0) - else: - raise RuntimeError('Tuple/list element not a string or tuple of string and weight.') - else: - raise RuntimeError('Not a string or tuple/list of strings.') - return HfstTransducer(retval, get_default_fst_type()) - - -def fst(arg): - """Get a transducer that recognizes one or more paths. - - Parameters - ---------- - * `arg` : - See example below - - Possible inputs: - - One unweighted identity path: - 'foo' -> [f o o] - - Weighted path: a tuple of string and number, e.g. - ('foo',1.4) - ('bar',-3) - ('baz',0) - - Several paths: a list or a tuple of paths and/or weighted paths, e.g. - ['foo', 'bar'] - ('foo', ('bar',5.0)) - ('foo', ('bar',5.0), 'baz', 'Foo', ('Bar',2.4)) - [('foo',-1), ('bar',0), ('baz',3.5)] - - A dictionary mapping strings to any of the above cases: - {'foo':'foo', 'bar':('foo',1.4), 'baz':(('foo',-1),'BAZ')} - """ - if isinstance(arg, dict): - retval = regex('[0-0]') # empty transducer - for input, output in arg.items(): - if not isinstance(input, str): - raise RuntimeError('Key not a string.') - left = fsa(input) - right = 0 - if isinstance(output, str): - right = fsa(output) - elif isinstance(output, list) or isinstance(output, tuple): - right = fsa(output) - else: - raise RuntimeError('Value not a string or tuple/list of strings.') - left.cross_product(right) - retval.disjunct(left) - return retval - return fsa(arg) - - -def fst_to_fsa(fst, separator=''): - """(Experimental) - - Encode a transducer into an automaton, i.e. create a transducer where each - transition of *fst* is replaced with a transition - where 'S' is *separator*, except if the transition symbol on both sides is - hfst.EPSILON, hfst.IDENTITY or hfst.UNKNOWN. - - All states and weights of transitions and end states are copied otherwise - as such. The alphabet is copied, and new symbols which are created when - encoding the transitions, are inserted to it. - - Parameters - ---------- - * `fst` : - The transducer. - * `separator` : - The separator symbol inserted between input and output symbols. - - Examples: - - import hfst - foo2bar = hfst.fst({'foo':'bar'}) - - creates a transducer [f:b o:a o:r]. Calling - - foobar = hfst.fst_to_fsa(foo2bar) - - will create the transducer [fb:fb oa:oa or:or] and - - foobar = hfst.fst_to_fsa(foo2bar, '^') - - the transducer [f^b:f^b o^a:o^a o^r:o^r]. - - """ - encoded_symbols = hfst.libhfst.StringSet() - retval = hfst.HfstBasicTransducer(fst) - for state in retval.states(): - arcs = retval.transitions(state) - for arc in arcs: - input = arc.get_input_symbol() - output = arc.get_output_symbol() - if (input == output) and ((input == hfst.EPSILON) or (input == hfst.UNKNOWN) or (input == hfst.IDENTITY)): - continue - symbol = input + separator + output - arc.set_input_symbol(symbol) - arc.set_output_symbol(symbol) - encoded_symbols.insert(symbol) - retval.add_symbols_to_alphabet(encoded_symbols) - if 'HfstTransducer' in str(type(fst)): - return hfst.HfstTransducer(retval) - else: - return retval - - -def fsa_to_fst(fsa, separator=''): - """(Experimental) - - Decode an encoded automaton back into a transducer, i.e. create a - transducer where each transition of *fsa*, where 'S' is - the first *separator* found in the compound symbol 'inSout', is replaced - with a transition . - - If no *separator* is found in the symbol, transition is copied as such. All - states and weights of transitions and end states are copied as such. The - alphabet is copied, omitting encoded symbols which were decoded according - to *separator*. Any new input and output symbols extracted from encoded - symbols are added to the alphabet. - - If *separator* is the empty string, 'in' must either be single-character - symbol or a special symbol of form '@...@'. - - Parameters - ---------- - * `fsa` : - The encoded transducer. Must be an automaton, i.e. for each - transition, the input and output symbols must be the same. Else, a - RuntimeError is thrown. - * `separator` : - The symbol separating input and output symbol parts in *fsa*. If it is - the empty string, each encoded transition symbol is must be of form - 'x...' (single-character input symbol 'x') or '@...@...' (special - symbol as input symbol). Else, a RuntimeError is thrown. - - Examples: - - import hfst - foo2bar = hfst.fst({'foo':'bar'}) # creates transducer [f:b o:a o:r] - foobar = hfst.fst_to_fsa(foo2bar, '^') - - creates the transducer [f^b:f^b o^a:o^a o^r:o^r]. Then calling - - foo2bar = hfst.fsa_to_fst(foobar, '^') - - will create again the original transducer [f:b o:a o:r]. - """ - retval = hfst.HfstBasicTransducer(fsa) - encoded_symbols = hfst.libhfst.StringSet() - for state in retval.states(): - arcs = retval.transitions(state) - for arc in arcs: - input = arc.get_input_symbol() - output = arc.get_output_symbol() - symbols = [] - if not (input == output): - raise RuntimeError('Transition input and output symbols differ.') - if input == '': - raise RuntimeError('Transition symbol cannot be the empty string.') - # separator given: - if len(separator) > 0: - symbols = input.split(separator, 1) - # no separator given: - else: - index = input.find('@') - if not index == 0: - symbols.append(input[0]) - if not input[1] == '': - symbols.append(input[1:]) - else: - index = input.find('@', 1) - if index == -1: - raise RuntimeError('Transition symbol cannot have only one "@" sign.') - symbols.append(input[0:index + 1]) - if not input[index + 1] == '': - symbols.append(input[index + 1:]) - arc.set_input_symbol(symbols[0]) - arc.set_output_symbol(symbols[-1]) - # encoded symbol to be removed from alphabet of result - if len(symbols) > 1: - encoded_symbols.insert(input) - retval.remove_symbols_from_alphabet(encoded_symbols) - if 'HfstTransducer' in str(type(fsa)): - return hfst.HfstTransducer(retval) - else: - return retval - - -def tokenized_fst(arg, weight=0): - """Get a transducer that recognizes the concatenation of symbols - or symbol pairs in *arg*. - - Parameters - ---------- - * `arg` : - The symbols or symbol pairs that form the path to be recognized. - - Example - - import hfst - tok = hfst.HfstTokenizer() - tok.add_multichar_symbol('foo') - tok.add_multichar_symbol('bar') - tr = hfst.tokenized_fst(tok.tokenize('foobar', 'foobaz')) - - will create the transducer [foo:foo bar:b 0:a 0:z]. - """ - retval = HfstBasicTransducer() - state = 0 - if isinstance(arg, list) or isinstance(arg, tuple): - for token in arg: - if isinstance(token, str): - new_state = retval.add_state() - retval.add_transition(state, new_state, token, token, 0) - state = new_state - elif isinstance(token, list) or isinstance(token, tuple): - if len(token) == 2: - new_state = retval.add_state() - retval.add_transition(state, new_state, token[0], token[1], 0) - state = new_state - elif len(token) == 1: - new_state = retval.add_state() - retval.add_transition(state, new_state, token, token, 0) - state = new_state - else: - raise RuntimeError('Symbol or symbol pair must be given.') - retval.set_final_weight(state, weight) - return HfstTransducer(retval, get_default_fst_type()) - else: - raise RuntimeError('Argument must be a list or a tuple') - - -def empty_fst(): - """Get an empty transducer. - - Empty transducer has one state that is not final, i.e. it does not recognize any - string. - """ - return regex('[0-0]') - - -def epsilon_fst(weight=0): - """Get an epsilon transducer. - - Parameters - ---------- - * `weight` : - The weight of the final state. Epsilon transducer has one state that is - final (with final weight *weight*), i.e. it recognizes the empty string. - """ - return regex('[0]::' + str(weight)) - - -def concatenate(transducers): - """Return a concatenation of *transducers*.""" - retval = epsilon_fst() - for tr in transducers: - retval.concatenate(tr) - retval.minimize() - return retval - - -def disjunct(transducers): - """Return a disjunction of *transducers*.""" - retval = empty_fst() - for tr in transducers: - retval.disjunct(tr) - retval.minimize() - return retval - - -def intersect(transducers): - """Return an intersection of *transducers*.""" - retval = None - for tr in transducers: - if retval is None: - retval = HfstTransducer(tr) - else: - retval.intersect(tr) - retval.minimize() - return retval - - -def compose(transducers): - """Return a composition of *transducers*.""" - retval = None - for tr in transducers: - if retval is None: - retval = HfstTransducer(tr) - else: - retval.compose(tr) - retval.minimize() - return retval - - -def cross_product(transducers): - """Return a cross product of *transducers*.""" - retval = None - for tr in transducers: - if retval is None: - retval = HfstTransducer(tr) - else: - retval.cross_product(tr) - retval.minimize() - return retval - - -class ImplementationType: - """Back-end implementation. - - Attributes: - - SFST_TYPE: SFST type, unweighted - TROPICAL_OPENFST_TYPE: OpenFst type with tropical weights - LOG_OPENFST_TYPE: OpenFst type with logarithmic weights (limited support) - FOMA_TYPE: FOMA type, unweighted - XFSM_TYPE: XFST type, unweighted (limited support) - HFST_OL_TYPE: HFST optimized-lookup type, unweighted - HFST_OLW_TYPE: HFST optimized-lookup type, weighted - HFST2_TYPE: HFST version 2 legacy type - UNSPECIFIED_TYPE: type not specified - ERROR_TYPE: (something went wrong) - - """ - SFST_TYPE = hfst.libhfst.SFST_TYPE - TROPICAL_OPENFST_TYPE = hfst.libhfst.TROPICAL_OPENFST_TYPE - LOG_OPENFST_TYPE = hfst.libhfst.LOG_OPENFST_TYPE - FOMA_TYPE = hfst.libhfst.FOMA_TYPE - XFSM_TYPE = hfst.libhfst.XFSM_TYPE - HFST_OL_TYPE = hfst.libhfst.HFST_OL_TYPE - HFST_OLW_TYPE = hfst.libhfst.HFST_OLW_TYPE - HFST2_TYPE = hfst.libhfst.HFST2_TYPE - UNSPECIFIED_TYPE = hfst.libhfst.UNSPECIFIED_TYPE - ERROR_TYPE = hfst.libhfst.ERROR_TYPE diff --git a/src/hfst-old-pypi/docstrings.i b/src/hfst-old-pypi/docstrings.i deleted file mode 100644 index 3853090..0000000 --- a/src/hfst-old-pypi/docstrings.i +++ /dev/null @@ -1,3501 +0,0 @@ - -// File: classhfst_1_1AttReader.xml - - -%feature("docstring") hfst::AttReader -""" - -A class for reading input in AT&T text format and converting it into -transducer(s). - -An example that reads AT&T input from file 'testfile.att' where epsilon is -represented as \"\" and creates the corresponding transducers and prints -them. If the input cannot be parsed, a message showing the invalid line in AT&T -input is printed and reading is stopped. - - with open('testfile.att', 'r') as f: - try: - r = hfst.AttReader(f, \"\") - for tr in r: - print(tr) - except hfst.exceptions.NotValidAttFormatException as e: - print(e.what()) -""" - -%feature("docstring") hfst::AttReader::__init__ -""" - -Create an AttReader that reads input from file *f* where the epsilon is -represented as *epsilonstr*. - -Parameters ----------- -* `f` : - A python file. -* `epsilonstr` : - How epsilon is represented in the file. By default, \"@_EPSILON_SYMBOL_@\" - and \"@0@\" are both recognized. -""" - -%feature("docstring") hfst::AttReader::__next__ -""" - -Return next element (for python version 3). - -Needed for 'for ... in' statement. - - for transducer in att_reader: - print(transducer) - -Exceptions ----------- -* `StopIteration` : -""" - -%feature("docstring") hfst::AttReader::read -""" - -Read next transducer. - -Read next transducer description in AT&T format and return a corresponding -transducer. - -Exceptions ----------- -* `hfst.exceptions.NotValidAttFormatException` : -* `hfst.exceptions.EndOfStreamException` : -""" - -%feature("docstring") hfst::AttReader::__iter__ -""" - -An iterator to the reader. - -Needed for 'for ... in' statement. - - for transducer in att_reader: - print(transducer) -""" - -%feature("docstring") hfst::AttReader::next -""" - -Return next element (for python version 2). - -Needed for 'for ... in' statement. - - for transducer in att_reader: - print(transducer) - -Exceptions ----------- -* `StopIteration` : -""" - - -// File: classhfst_1_1HfstBasicTransducer.xml - - -%feature("docstring") hfst::implementations::HfstBasicTransducer -""" - -A simple transducer class with tropical weights. - -An example of creating an HfstBasicTransducer [foo:bar baz:baz] with weight 0.4 -from scratch: - - # Create an empty transducer - # The transducer has initially one start state (number zero) - # that is not final - fsm = hfst.HfstBasicTransducer() - # Add two states to the transducer - fsm.add_state(1) - fsm.add_state(2) - # Create a transition [foo:bar] leading to state 1 with weight 0.1 - tr = hfst.HfstBasicTransition(1, 'foo', 'bar', 0.1) - # and add it to state zero - fsm.add_transition(0, tr) - # Add a transition [baz:baz] with weight 0 from state 1 to state 2 - fsm.add_transition(1, hfst.HfstBasicTransition(2, 'baz', 'baz', 0.0)) - # Set state 2 as final with weight 0.3 - fsm.set_final_weight(2, 0.3) - -An example of iterating through the states and transitions of the above -transducer when printing them in AT&T format to standard output: - - # Go through all states - for state, arcs in enumerate(fsm): - for arc in arcs: - print('%i ' % (state), end='') - print(arc) - if fsm.is_final_state(state): - print('%i %f' % (state, fsm.get_final_weight(state)) ) - -See also: hfst.HfstBasicTransition -""" - -%feature("docstring") hfst::HfstBasicTransducer::states_and_transitions -""" - -The states and transitions of the transducer. - -Returns -------- -A tuple of tuples of HfstBasicTransitions. - -See also: hfst.HfstBasicTransducer.__enumerate__ -""" - -%feature("docstring") hfst::HfstBasicTransducer::get_final_weight -""" - -Get the final weight of state *state* in this transducer. - -Parameters ----------- -* `state` : - The number of the state. If it does not exist, a StateIsNotFinalException is - thrown. - -Exceptions ----------- -* `hfst.exceptions.StateIsNotFinalException.` : -""" - -%feature("docstring") hfst::HfstBasicTransducer::__init__ -""" - -Create a transducer with one initial state that has state number zero and is not -a final state, i.e. - -create an empty transducer. - - tr = hfst.HfstBasicTransducer() -""" - -%feature("docstring") hfst::HfstBasicTransducer::__init__ -""" - -Create a transducer equivalent to *transducer*. - -Parameters ----------- -* `transducer` : - The transducer to be copied, hfst.HfstBasicTransducer or - hfst.HfstTransducer. - - tr = hfst.regex('foo') # creates an HfstTransducer - TR = hfst.HfstBasicTransducer(tr) - TR2 = hfst.HfstBasicTransducer(TR) -""" - -%feature("docstring") hfst::HfstBasicTransducer::symbols_used -""" - -Get a list of all symbols used in the transitions of this transducer. -""" - -%feature("docstring") hfst::HfstBasicTransducer::remove_symbol_from_alphabet -""" - -Remove symbol *symbol* from the alphabet of the graph. - -note: Use with care, removing symbols that occur in the transitions of the graph - can have unexpected results. - -Parameters ----------- -* `symbol` : - The string to be removed. -""" - -%feature("docstring") hfst::HfstBasicTransducer::get_transition_pairs -""" - -Get a list of all input/output symbol pairs used in the transitions of this -transducer. -""" - -%feature("docstring") hfst::HfstBasicTransducer::is_infinitely_ambiguous -""" - -Whether the transducer is infinitely ambiguous. - -A transducer is infinitely ambiguous if there exists an input that will yield -infinitely many results, i.e. there are input epsilon loops that are traversed -with that input. -""" - -%feature("docstring") hfst::HfstBasicTransducer::harmonize -""" - -Harmonize this transducer and *another*. - -In harmonization the unknown and identity symbols in transitions of both graphs -are expanded according to the symbols that are previously unknown to the graph. - -For example the graphs - - [a:b ?:?] - [c:d ? ?:c] are expanded to - - [ a:b [?:? | ?:c | ?:d | c:d | d:c | c:? | d:?] ] - [ c:d [? | a | b] [?:c| a:c | b:?] ] when harmonized. - -The symbol '?' means hfst.UNKNOWN in either or both sides of a transition -(transitions of type [?:x], [x:?] and [?:?]). The transition [?] means -hfst.IDENTITY. - -note: This function is always called for all transducer arguments of functions - that take two or more graphs as their arguments, unless otherwise said. -""" - -%feature("docstring") hfst::HfstBasicTransducer::sort_arcs -""" - -Sort the arcs of this transducer according to input and output symbols. - -Returns -------- -This transducer. -""" - -%feature("docstring") hfst::HfstBasicTransducer::states -""" - -The states of the transducer. - -Returns -------- -A tuple of state numbers. - -An example: /verbatim for state in fsm.states(): for arc in -fsm.transitions(state): print('i ' % (state), end='') print(arc) if -fsm.is_final_state(state): print('i f' % (state, fsm.get_final_weight(state)) ) -/endverbatim -""" - -%feature("docstring") hfst::HfstBasicTransducer::get_max_state -""" - -Get the biggest state number in use. - -Returns -------- -The biggest state number in use. -""" - -%feature("docstring") hfst::HfstBasicTransducer::add_state -""" - -Add a new state to this transducer and return its number. - -Returns -------- -The next (smallest) free state number. -""" - -%feature("docstring") hfst::HfstBasicTransducer::add_state -""" - -Add a state *s* to this graph. - -Parameters ----------- -* `state` : - The number of the state to be added. - -Returns -------- -*state* - -If the state already exists, it is not added again. All states with state number -smaller than *s* are also added to the transducer if they did not exist before. -""" - -%feature("docstring") hfst::HfstBasicTransducer::write_att -""" - -Write this transducer in AT&T format to file *f*, *write_weights* defines -whether weights are written. -""" - -%feature("docstring") hfst::HfstBasicTransducer::remove_symbols_from_alphabet -""" - -Remove symbols *symbols* from the alphabet of the graph. - -note: Use with care, removing symbols that occur in the transitions of the graph - can have unexpected results. - -Parameters ----------- -* `symbols` : - A tuple of strings to be removed. -""" - -%feature("docstring") hfst::HfstBasicTransducer::__enumerate__ -""" - -Return an enumeration of the states and transitions of the transducer. - - for state, arcs in enumerate(fsm): - for arc in arcs: - print('%i ' % (state), end='') - print(arc) - if fsm.is_final_state(state): - print('%i %f' % (state, fsm.get_final_weight(state)) ) -""" - -%feature("docstring") hfst::HfstBasicTransducer::longest_path_size -""" - -The length of the longest path in transducer. - -Length of a path means number of arcs on that path. -""" - -%feature("docstring") hfst::HfstBasicTransducer::get_alphabet -""" - -The symbols in the alphabet of the transducer. - -The symbols do not necessarily occur in any transitions of the transducer. -Epsilon, unknown and identity symbols are always included in the alphabet. - -Returns -------- -A tuple of strings. -""" - -%feature("docstring") hfst::HfstBasicTransducer::substitute -""" - -Substitute symbols or transitions in the transducer. - -Parameters ----------- -* `s` : - The symbol or transition to be substituted. Can also be a dictionary of - substitutions, if S == None. -* `S` : - The symbol, transition, a tuple of transitions or a transducer - (hfst.HfstBasicTransducer) that substitutes *s*. -* `kwargs` : - Arguments recognized are 'input' and 'output', their values can be False or - True, True being the default. These arguments are valid only if *s* and *S* - are strings, else they are ignored. -* `input` : - Whether substitution is performed on input side, defaults to True. Valid - only if *s* and *S* are strings. -* `output` : - Whether substitution is performed on output side, defaults to True. Valid - only if *s* and *S* are strings. - -Possible combinations of arguments and their types are: - -(1) substitute(str, str, input=bool, output=bool): substitute symbol with symbol -on input, output or both sides of each transition in the transducer. (2) -substitute(strpair, strpair): substitute transition with transition (3) -substitute(strpair, strpairtuple): substitute transition with several -transitions (4) substitute(strpair, transducer): substitute transition with a -transducer (5) substitute(dict): perform several symbol-to-symbol substitutions -(6) substitute(dict): perform several transition-to-transition substitutions - -Examples: - -(1) tr.substitute('a', 'A', input=True, output=False): substitute lowercase a:s -with uppercase ones (2) tr.substitute(('a','b'),('A','B')): substitute -transitions that map lowercase a into lowercase b with transitions that map -uppercase a into uppercase b (3) tr.substitute(('a','b'), -(('A','B'),('a','B'),('A','b'))): change either or both sides of a transition -[a:b] to uppercase (4) tr.substitute(('a','b'), hfst.regex('[a:b]+')) change -[a:b] transition into one or more consecutive [a:b] transitions (5) -tr.substitute({'a':'A', 'b':'B', 'c':'C'}) change lowercase a, b and c into -their uppercase variants (6) tr.substitute( {('a','a'):('A','A'), -('b','b'):('B','B'), ('c','c'):('C','C')} ): change lowercase a, b and c into -their uppercase variants - -In case (4), epsilon transitions are used to attach copies of transducer *S* -between the SOURCE and TARGET state of each transition that is substituted. The -transition itself is deleted, but its weight is copied to the epsilon transition -leading from SOURCE to the initial state of *S*. Each final state of *S* is made -non-final and an epsilon transition leading to TARGET is attached to it. The -final weight is copied to the epsilon transition. -""" - -%feature("docstring") hfst::HfstBasicTransducer::remove_transition -""" -Remove all transitions equivalent to *transition* from state *s*. - -Parameters ----------- -* `s` : - The state which *transition* belongs to. -* `transition` : - A transition which is compared with all transitions of state *s*, ignoring - the weights. It a transition is equivalent to *transition*, it is removed - from the transducer. -* `remove_symbols_from_alphabet` : - Remove such symbols from transducer alphabet that no longer occur in its - transitions (as a result of transition removal). Defaults to False. - -Note: Removing transitions during iteration (e.g. with 'transitions') will -invalidate the iteration. Iteration of states (e.g. with 'states') is possible. -""" - -%feature("docstring") hfst::HfstBasicTransducer::add_transition -""" - -Add a transition *transition* to state *state*, *add_symbols_to_alphabet* -defines whether the transition symbols are added to the alphabet. - -Parameters ----------- -* `state` : - The number of the state where the transition is added. If it does not exist, - it is created. -* `transition` : - A hfst.HfstBasicTransition that is added to *state*. -* `add_symbols_to_alphabet` : - Whether the transition symbols are added to the alphabet of the transducer. - (In special cases this is not wanted.) - -Note: Adding transitions during iteration (e.g. with 'transitions') will -invalidate the iteration. Iteration of states (e.g. with 'states') is possible. -""" - -%feature("docstring") hfst::HfstBasicTransducer::add_transition -""" - -Add a transition from state *source* to state *target* with input symbol -*input*, output symbol *output* and weight *weight*. - -Parameters ----------- -* `source` : - The number of the state where the transition is added. If it does not exist, - it is created. -* `target` : - The number of the state where the transition leads. If it does not exist, it - is created. -* `input` : - The input symbol of the transition. -* `output` : - The output symbol of the transition. -* `weight` : - The weight of the transition. - -Note: Adding transitions during iteration (e.g. with 'transitions') will -invalidate the iteration. Iteration of states (e.g. with 'states') is possible. -""" - -%feature("docstring") hfst::HfstBasicTransducer::read_prolog -""" - -Read a transducer from prolog file *f*. - -*linecount* is incremented as lines are read (is it in python?). - -Returns -------- -A transducer constructed by reading from file *file*. This function is a static -one. -""" - -%feature("docstring") hfst::HfstBasicTransducer::lookup_fd -""" - -Lookup tokenized input *input* in the transducer minding flag diacritics. - -Parameters ----------- -* `str` : - A list/tuple of strings to look up. -* `kwargs` : - infinite_cutoff=-1, max_weight=None -* `infinite_cutoff` : - Defaults to -1, i.e. infinite. -* `max_weight` : - Defaults to None, i.e. infinity. -""" - -%feature("docstring") hfst::HfstBasicTransducer::prune_alphabet -""" - -Remove all symbols that do not occur in transitions of the transducer from its -alphabet. - -Epsilon, unknown and identity symbols are always included in the alphabet. -""" - -%feature("docstring") hfst::HfstBasicTransducer::write_prolog -""" - -Write the transducer in prolog format to file *f*. - -Name the transducer *name*. -""" - -%feature("docstring") hfst::HfstBasicTransducer::disjunct -""" - -Disjunct this transducer with a one-path transducer defined by consecutive -string pairs in *spv* that has weight *weight*. - -pre: This graph must be a trie where all weights are in final states, i.e. all - transitions have a zero weight. - -There is no way to test whether a graph is a trie, so the use of this function -is probably limited to fast construction of a lexicon. Here is an example: - - lexicon = hfst.HfstBasicTransducer() - tok = hfst.HfstTokenizer() - lexicon.disjunct(tok.tokenize('dog'), 0.3) - lexicon.disjunct(tok.tokenize('cat'), 0.5) - lexicon.disjunct(tok.tokenize('elephant'), 1.6) -""" - -%feature("docstring") hfst::HfstBasicTransducer::read_att -""" - -Read a transducer in AT&T format from file *f*. - -*epsilon_symbol* defines the symbol used for epsilon, *linecount* is incremented -as lines are read. - -Returns -------- -A transducer constructed by reading from file *file*. This function is a static -one. -""" - -%feature("docstring") hfst::HfstBasicTransducer::add_symbol_to_alphabet -""" - -Explicitly add *symbol* to the alphabet of the graph. - -note: Usually the user does not have to take care of the alphabet of a graph. - This function can be useful in some special cases. @ param symbol The string - to be added. -""" - -%feature("docstring") hfst::HfstBasicTransducer::__str__ -""" - -Return a string representation of the transducer. - - print(fsm) -""" - -%feature("docstring") hfst::HfstBasicTransducer::set_final_weight -""" - -Set the final weight of state *state* in this transducer to *weight*. - -If the state does not exist, it is created. -""" - -%feature("docstring") hfst::HfstBasicTransducer::remove_final_weight -""" - -Remove the final weight of state *state* in this transducer, i.e. make the state non-final. -""" - -%feature("docstring") hfst::HfstBasicTransducer::add_symbols_to_alphabet -""" - -Explicitly add *symbols* to the alphabet of the graph. - -note: Usually the user does not have to take care of the alphabet of a graph. - This function can be useful in some special cases. - -Parameters ----------- -* `symbols` : - A tuple of strings to be added. -""" - -%feature("docstring") hfst::HfstBasicTransducer::transitions -""" - -Get the transitions of state *state* in this transducer. - -If the state does not exist, a *StateIndexOutOfBoundsException* is thrown. - -Returns -------- -A tuple of HfstBasicTransitions. - - for state in fsm.states(): - for arc in fsm.transitions(state): - print('%i ' % (state), end='') - print(arc) - if fsm.is_final_state(state): - print('%i %f' % (state, fsm.get_final_weight(state)) ) -""" - -%feature("docstring") hfst::HfstBasicTransducer::insert_freely -""" - -Insert freely any number of *symbol_pair* in the transducer with weight -*weight*. - -Parameters ----------- -* `symbol_pair` : - A string pair to be inserted. -* `weight` : - The weight of the inserted symbol pair. -""" - -%feature("docstring") hfst::HfstBasicTransducer::insert_freely -""" - -Insert freely any number of *transducer* in this transducer. - -param transducer An HfstBasicTransducer to be inserted. -""" - -%feature("docstring") hfst::HfstBasicTransducer::write_xfst -""" - -Write the transducer in xfst format to file *f*. -""" - -%feature("docstring") hfst::HfstBasicTransducer::is_final_state -""" - -Whether state *state* is final. - -Parameters ----------- -* `state` : - The state whose finality is returned. -""" - -%feature("docstring") hfst::HfstBasicTransducer::is_lookup_infinitely_ambiguous -""" - -Whether the transducer is infinitely ambiguous with input *str*. - -Parameters ----------- -* `str` : - The input. - -A transducer is infinitely ambiguous with a given input if the input yields -infinitely many results, i.e. there are input epsilon loops that are traversed -with the input. -""" - - -// File: classhfst_1_1HfstBasicTransition.xml - - -%feature("docstring") hfst::HfstBasicTransition -""" - -A transition class that consists of a target state, input and output symbols and -a a tropical weight. - -See also: hfst.HfstBasicTransducer -""" - -%feature("docstring") hfst::HfstBasicTransition::get_input_symbol -""" - -Get the input symbol of the transition. -""" - -%feature("docstring") hfst::HfstBasicTransition::get_weight -""" - -Get the weight of the transition. -""" - -%feature("docstring") hfst::HfstBasicTransition::set_weight -""" - -Set the weight of the transition. - -Parameters ----------- -* `weight` : - Weight of the transition. -""" - -%feature("docstring") hfst::HfstBasicTransition::get_output_symbol -""" - -Get the output symbol of the transition. -""" - -%feature("docstring") hfst::HfstBasicTransition::get_target_state -""" - -Get number of the target state of the transition. -""" - -%feature("docstring") hfst::HfstBasicTransition::__init__ -""" - -Create an HfstBasicTransition leading to target state *state* with input symbol -*input*, output symbol *output* and weight *weight*. - -Parameters ----------- -* `state` : - Number of the target state. -* `input` : - The input string. -* `output` : - The output string. -* `weight` : - The weight. - -Exceptions ----------- -* `EmptyStringException` : - transition = hfst.HfstBasicTransition(1, 'foo', 'bar', 0.5) -""" - - -// File: classhfst_1_1HfstInputStream.xml - - -%feature("docstring") hfst::HfstInputStream -""" - -A stream for reading HFST binary transducers. - -An example: - - istr = hfst.HfstInputStream('testfile1.hfst') - transducers = [] - while not (istr.is_eof()): - transducers.append(istr.read()) - istr.close() - print(\"Read %i transducers in total.\" % len(transducers)) - -For documentation on the HFST binary transducer format, see here. -""" - -%feature("docstring") hfst::HfstInputStream::is_bad -""" - -Whether badbit is set. -""" - -%feature("docstring") hfst::HfstInputStream::is_eof -""" - -Whether the stream is at end. -""" - -%feature("docstring") hfst::HfstInputStream::__init__ -""" - -Create a stream for reading binary transducers. - -Parameters ----------- -* `filename` : - The name of the transducer file. If not given, standard input is used. - -Exceptions ----------- -* `StreamNotReadableException` : -* `NotTransducerStreamException` : -* `EndOfStreamException` : -* `TransducerHeaderException` : - istr_to_stdin = hfst.HfstInputStream() - istr_to_file = hfst.HfstInputStream(filename='transducer.hfst') -""" - -%feature("docstring") hfst::HfstInputStream::read -""" - -Return next transducer. - -Exceptions ----------- -* `EndOfStreamException` : -""" - -%feature("docstring") hfst::HfstInputStream::close -""" - -Close the stream. - -If the stream points to standard input, nothing is done. -""" - -%feature("docstring") hfst::HfstInputStream::get_type -""" - -The type of the first transducer in the stream. - -By default, all transducers in a stream have the same type, else a -TransducerTypeMismatchException is thrown when reading the first transducer that -has a different type than the previous ones. -""" - -%feature("docstring") hfst::HfstInputStream::is_good -""" - -Whether the state of the stream is good for input operations. -""" - - -// File: classhfst_1_1HfstOutputStream.xml - - -%feature("docstring") hfst::HfstOutputStream -""" - -A stream for writing binary transducers. - -An example: - - res = ['foo:bar','0','0 - 0','\"?\":?','a* b+'] - ostr = hfst.HfstOutputStream(filename='testfile1.hfst') - for re in res: - ostr.write(hfst.regex(re)) - ostr.flush() - ostr.close() - -For more information on HFST transducer structure, see this page. -""" - -%feature("docstring") hfst::HfstOutputStream::close -""" - -Close the stream. - -If the stream points to standard output, nothing is done. -""" - -%feature("docstring") hfst::HfstOutputStream::__init__ -""" - -Open a stream for writing binary transducers. - -Parameters ----------- -* `kwargs` : - Arguments recognized are filename, hfst_format, type. -* `filename` : - The name of the file where transducers are written. If the file exists, it - is overwritten. If *filename* is not given, transducers are written to - standard output. -* `hfst_format` : - Whether transducers are written in hfst format (default is True) or as such - in their backend format. -* `type` : - The type of the transducers that will be written to the stream. Default is - hfst.get_default_fst_type(). - - ostr = hfst.HfstOutputStream() # a stream for writing default type -transducers in hfst format to standard output - transducer = hfst.regex('foo:bar::0.5') - ostr.write(transducer) - ostr.flush() - - ostr = hfst.HfstOutputStream(filename='transducer.sfst', hfst_format=False, -type=hfst.ImplementationType.SFST_TYPE) # a stream for writing SFST_TYPE transducers in -their back-end format to a file - transducer1 = hfst.regex('foo:bar') - transducer1.convert(hfst.ImplementationType.SFST_TYPE) # if not set as the default type - transducer2 = hfst.regex('bar:baz') - transducer2.convert(hfst.ImplementationType.SFST_TYPE) # if not set as the default type - ostr.write(transducer1) - ostr.write(transducer2) - ostr.flush() - ostr.close() -""" - -%feature("docstring") hfst::HfstOutputStream::flush -""" - -Flush the stream. -""" - -%feature("docstring") hfst::HfstOutputStream::write -""" - -Write the transducer *transducer* in binary format to the stream. - -All transducers must have the same type as the stream, else a -TransducerTypeMismatchException is thrown. - -Exceptions ----------- -* `hfst.exceptions.TransducerTypeMismatchException` : -""" - - -// File: classhfst_1_1HfstTransducer.xml - - -%feature("docstring") hfst::HfstTransducer -""" - -A synchronous finite-state transducer. - -""" - -%feature("docstring") hfst::HfstTransducer::get_type -""" - -The implementation type of the transducer. - -Returns -------- -hfst.ImplementationType -""" - -%feature("docstring") hfst::HfstTransducer::get_name -""" - -Get the name of the transducer. - -See also: set_name -""" - -%feature("docstring") hfst::HfstTransducer::repeat_plus -""" - -A concatenation of N transducers where N is any number from one to infinity. -""" - -%feature("docstring") hfst::HfstTransducer::output_project -""" - -Extract the output language of the transducer. - -All transition symbol pairs *isymbol:osymbol* are changed to *osymbol:osymbol*. -""" - -%feature("docstring") hfst::HfstTransducer::number_of_states -""" - -The number of states in the transducer. -""" - -%feature("docstring") hfst::HfstTransducer::minus -""" - -Alias for subtract. - -See also: hfst.HfstTransducer.subtract -""" - -%feature("docstring") hfst::HfstTransducer::is_infinitely_ambiguous -""" - -Whether the transducer is infinitely ambiguous. - -A transducer is infinitely ambiguous if there exists an input that will yield -infinitely many results, i.e. there are input epsilon loops that are traversed -with that input. -""" - -%feature("docstring") hfst::HfstTransducer::eliminate_flags -""" - -Eliminate flag diacritics listed in *symbols* from the transducer. - -Parameters ----------- -* `symbols` : - The flags to be eliminated. TODO: explain more. - -An equivalent transducer with no flags listed in *symbols*. -""" - -%feature("docstring") hfst::HfstTransducer::longest_path_size -""" - -Get length of longest path of the transducer. -""" - -%feature("docstring") hfst::HfstTransducer::get_properties -""" - -Get all properties from the transducer. - -Returns -------- -A dictionary whose keys are properties and whose values are the values of those -properties. -""" - -%feature("docstring") hfst::HfstTransducer::optionalize -""" - -Disjunct the transducer with an epsilon transducer. -""" - -%feature("docstring") hfst::HfstTransducer::intersect -""" - -Intersect this transducer with *another*. -""" - -%feature("docstring") hfst::HfstTransducer::repeat_n_plus -""" - -A concatenation of N transducers where N is any number from *n* to infinity, -inclusive. -""" - -%feature("docstring") hfst::HfstTransducer::compare -""" - -Whether this transducer and *another* are equivalent. - -Parameters ----------- -* `another` : - The compared transducer. - -pre: *self* and *another* must have the same implementation type. - -Two transducers are equivalent iff they accept the same input/output string -pairs with the same weights and the same alignments. - -note: For weighted transducers, the function often returns false negatives due - to weight precision issues. -""" - -%feature("docstring") hfst::HfstTransducer::remove_from_alphabet -""" - -Remove *symbol* from the alphabet of the transducer. - -Parameters ----------- -* `symbol` : - The symbol (string) to be removed. - -pre: *symbol* does not occur in any transition of the transducer. - -note: Use with care, removing a symbol that occurs in a transition of the - transducer can have unexpected results. -""" - -%feature("docstring") hfst::HfstTransducer::substitute -""" - -Substitute symbols or transitions in the transducer. - -Parameters ----------- -* `s` : - The symbol or transition to be substituted. Can also be a dictionary of - substitutions, if S == None. -* `S` : - The symbol, transition, a tuple of transitions or a transducer - (hfst.HfstTransducer) that substitutes *s*. -* `kwargs` : - Arguments recognized are 'input' and 'output', their values can be False or - True, True being the default. These arguments are valid only if *s* and *S* - are strings, else they are ignored. -* `input` : - Whether substitution is performed on input side, defaults to True. Valid - only if *s* and *S* are strings. -* `output` : - Whether substitution is performed on output side, defaults to True. Valid - only if *s* and \\ S are strings. - -For more information, see hfst.HfstBasicTransducer.substitute. The function -works similarly, with the exception of argument *S*, which must be -hfst.HfstTransducer instead of hfst.HfstBasicTransducer. - -See also: hfst.HfstBasicTransducer.substitute -""" - -%feature("docstring") hfst::HfstTransducer::compose -""" - -Compose this transducer with *another*. - -Parameters ----------- -* `another` : - The second argument in the composition. Not modified. -""" - -%feature("docstring") hfst::HfstTransducer::write_prolog -""" - -Write the transducer in prolog format with name *name* to file *f*, -*write_weights* defined whether weights are written. - -Parameters ----------- -* `f` : - A python file where the transducer is written. -* `name` : - The name of the transducer that must be given in a prolog file. -* `write_weights` : - Whether weights are written. -""" - -%feature("docstring") hfst::HfstTransducer::repeat_n_to_k -""" - -A concatenation of N transducers where N is any number from *n* to *k*, -inclusive. -""" - -%feature("docstring") hfst::HfstTransducer::conjunct -""" - -Alias for intersect. - -See also: hfst.HfstTransducer.intersect -""" - -%feature("docstring") hfst::HfstTransducer::repeat_n_minus -""" - -A concatenation of N transducers where N is any number from zero to *n*, -inclusive. -""" - -%feature("docstring") hfst::HfstTransducer::disjunct -""" - -Disjunct this transducer with *another*. -""" - -%feature("docstring") hfst::HfstTransducer::lookup_optimize -""" - -Optimize the transducer for lookup. - -This effectively converts the transducer into hfst.ImplementationType.HFST_OL_TYPE. -""" - -%feature("docstring") hfst::HfstTransducer::extract_longest_paths -""" - -Extract longest paths of the transducer. - -Returns -------- -A dictionary. -""" - -%feature("docstring") hfst::HfstTransducer::n_best -""" - -Extract *n* best paths of the transducer. - -In the case of a weighted transducer (hfst.ImplementationType.TROPICAL_OPENFST_TYPE or -hfst.ImplementationType.LOG_OPENFST_TYPE), best paths are defined as paths with the lowest -weight. In the case of an unweighted transducer (hfst.ImplementationType.SFST_TYPE or -hfst.ImplementationType.FOMA_TYPE), the function returns random paths. - -This function is not implemented for hfst.ImplementationType.FOMA_TYPE or -hfst.ImplementationType.SFST_TYPE. If this function is called by an HfstTransducer of type -hfst.ImplementationType.FOMA_TYPE or hfst.ImplementationType.SFST_TYPE, it is converted to -hfst.ImplementationType.TROPICAL_OPENFST_TYPE, paths are extracted and it is converted back -to hfst.ImplementationType.FOMA_TYPE or hfst.ImplementationType.SFST_TYPE. If HFST is not linked to -OpenFst library, an hfst.exceptions.ImplementationTypeNotAvailableException is -thrown. -""" - -%feature("docstring") hfst::HfstTransducer::is_implementation_type_available -""" - -Whether HFST is linked to the transducer library needed by implementation type -*type*. -""" - -%feature("docstring") hfst::HfstTransducer::invert -""" - -Swap the input and output symbols of each transition in the transducer. -""" - -%feature("docstring") hfst::HfstTransducer::extract_paths -""" - -Extract paths that are recognized by the transducer. - -Parameters ----------- -* `kwargs` : - Arguments recognized are filter_flags, max_cycles, max_number, obey_flags, - output, random. -* `filter_flags` : - Whether flags diacritics are filtered out from the result (default True). -* `max_cycles` : - Indicates how many times a cycle will be followed, with negative numbers - indicating unlimited (default -1 i.e. unlimited). -* `max_number` : - The total number of resulting strings is capped at this value, with 0 or - negative indicating unlimited (default -1 i.e. unlimited). -* `obey_flags` : - Whether flag diacritics are validated (default True). -* `output` : - Output format. Values recognized: 'text', 'raw', 'dict' (the default). 'text' - returns a string where paths are separated by newlines and each path is represented - as input_string + ':' + output_string + '\t' + weight. 'raw' yields a tuple of - all paths where each path is a 2-tuple consisting of a weight and a tuple of - all transition symbol pairs, each symbol pair being a 2-tuple of an input and - an output symbol. 'dict' gives a dictionary that maps each input string into a - list of possible outputs, each output being a 2-tuple of an output string and - a weight. -* `random` : - Whether result strings are fetched randomly (default False). - -Returns -------- -The extracted strings. *output* controls how they are represented. - -pre: The transducer must be acyclic, if both *max_number* and *max_cycles* have - unlimited values. Else a hfst.exceptions.TransducerIsCyclicException will be - thrown. - -An example: - - >>> tr = hfst.regex('a:b+ (a:c+)') - >>> print(tr) - 0 1 a b 0.000000 - 1 1 a b 0.000000 - 1 2 a c 0.000000 - 1 0.000000 - 2 2 a c 0.000000 - 2 0.000000 - - >>> print(tr.extract_paths(max_cycles=1, output='text')) - a:b 0 - aa:bb 0 - aaa:bbc 0 - aaaa:bbcc 0 - aa:bc 0 - aaa:bcc 0 - - >>> print(tr.extract_paths(max_number=4, output='text')) - a:b 0 - aa:bc 0 - aaa:bcc 0 - aaaa:bccc 0 - - >>> print(tr.extract_paths(max_cycles=1, max_number=4, output='text')) - a:b 0 - aa:bb 0 - aa:bc 0 - aaa:bcc 0 - -Exceptions ----------- -* `TransducerIsCyclicException` : - -See also: hfst.HfstTransducer.n_best - -note: Special symbols are printed as such. -Todo -a link to flag diacritics -""" - -%feature("docstring") hfst::HfstTransducer::__str__ -""" - -An AT&T representation of the transducer. - -Defined for print command. An example: - - >>> print(hfst.regex('[foo:bar::2]+')) - 0 1 foo bar 2.000000 - 1 1 foo bar 2.000000 - 1 0.000000 Todo -Works only for small transducers. -""" - -%feature("docstring") hfst::HfstTransducer::is_cyclic -""" - -Whether the transducer is cyclic. -""" - -%feature("docstring") hfst::HfstTransducer::has_flag_diacritics -""" - -Whether the transducer has flag diacritics in its transitions. -""" - -%feature("docstring") hfst::HfstTransducer::eliminate_flag -""" - -Eliminate flag diacritic *symbol* from the transducer. - -Parameters ----------- -* `symbol` : - The flag to be eliminated. TODO: explain more. - -An equivalent transducer with no flags *symbol*. -""" - -%feature("docstring") hfst::HfstTransducer::is_lookup_infinitely_ambiguous -""" - -Whether lookup of path *input* will have infinite results. - -Currently, this function will return whether the transducer is infinitely -ambiguous on any lookup path found in the transducer, i.e. the argument *input* -is ignored. - -Todo -Do not ignore the argument *input* -""" - -%feature("docstring") hfst::HfstTransducer::set_name -""" - -Rename the transducer *name*. - -Parameters ----------- -* `name` : - The name of the transducer. - -See also: get_name -""" - -%feature("docstring") hfst::HfstTransducer::priority_union -""" - -Make priority union of this transducer with *another*. - -For the operation t1.priority_union(t2), the result is a union of t1 and t2, -except that whenever t1 and t2 have the same string on left side, the path in t2 -overrides the path in t1. - -Example - - Transducer 1 (t1): - a : a - b : b - - Transducer 2 (t2): - b : B - c : C - - Result ( t1.priority_union(t2) ): - a : a - b : B - c : C For more information, read fsmbook. -""" - -%feature("docstring") hfst::HfstTransducer::insert_freely -""" - -Freely insert a transition or a transducer into the transducer. - -Parameters ----------- -* `ins` : - The transition or transducer to be inserted. - -If *ins* is a transition, i.e. a 2-tuple of strings: A transition is added to -each state in this transducer. The transition leads from that state to itself -with input and output symbols defined by *ins*. The weight of the transition is -zero. - -If *ins* is an hfst.HfstTransducer: A copy of *ins* is attached with epsilon -transitions to each state of this transducer. After the operation, for each -state S in this transducer, there is an epsilon transition that leads from state -S to the initial state of *ins*, and for each final state of *ins*, there is an -epsilon transition that leads from that final state to state S in this -transducer. The weights of the final states in *ins* are copied to the epsilon -transitions leading to state S. -""" - -%feature("docstring") hfst::HfstTransducer::input_project -""" - -Extract the input language of the transducer. - -All transition symbol pairs *isymbol:osymbol* are changed to *isymbol:isymbol*. -""" - -%feature("docstring") hfst::HfstTransducer::reverse -""" - -Reverse the transducer. - -A reverted transducer accepts the string 'n(0) n(1) ... n(N)' iff the original -transducer accepts the string 'n(N) n(N-1) ... n(0)' -""" - -%feature("docstring") hfst::HfstTransducer::compose_intersect -""" - -Compose this transducer with the intersection of transducers in *v*. - -If *invert* is true, then compose the intersection of the transducers in *v* -with this transducer. - -The algorithm used by this function is faster than intersecting all transducers -one by one and then composing this transducer with the intersection. - -pre: The transducers in *v* are deterministic and epsilon-free. - -Parameters ----------- -* `v` : - A tuple of transducers. -* `invert` : - Whether the intersection of the transducers in *v* is composed with this - transducer. -""" - -%feature("docstring") hfst::HfstTransducer::copy -""" - -Return a deep copy of the transducer. - - tr = hfst.regex('[foo:bar::0.3]*') - TR = tr.copy() - assert(tr.compare(TR)) -""" - -%feature("docstring") hfst::HfstTransducer::shuffle -""" - -Shuffle this transducer with transducer *another*. - -If transducer A accepts string 'foo' and transducer B string 'bar', the -transducer that results from shuffling A and B accepts all strings -[(f|b)(o|a)(o|r)]. - -pre: Both transducers must be automata, i.e. map strings onto themselves. -""" - -%feature("docstring") hfst::HfstTransducer::prune -""" - -Make transducer coaccessible. - -A transducer is coaccessible iff there is a path from every state to a final -state. -""" - -%feature("docstring") hfst::HfstTransducer::extract_shortest_paths -""" - -Extract shortest paths of the transducer. - -Returns -------- -A dictionary. -""" - -%feature("docstring") hfst::HfstTransducer::set_final_weights -""" - -Set the weights of all final states to *weight*. - -If the HfstTransducer is of unweighted type (hfst.ImplementationType.SFST_TYPE or -hfst.ImplementationType.FOMA_TYPE), nothing is done. -""" - -%feature("docstring") hfst::HfstTransducer::push_weights_to_end -""" - -Push weights towards final state(s). - -If the HfstTransducer is of unweighted type (hfst.ImplementationType.SFST_TYPE or -hfst.ImplementationType.FOMA_TYPE), nothing is done. - -An example: - - >>> import hfst - >>> tr = hfst.regex('[a::1 a:b::0.3 (b::0)]::0.7;') - >>> tr.push_weights_to_end() - >>> print(tr) - 0 1 a a 0.000000 - 1 2 a b 0.000000 - 2 3 b b 0.000000 - 2 2.000000 - 3 2.000000 - -See also: hfst.HfstTransducer.push_weights_to_start -""" - -%feature("docstring") hfst::HfstTransducer::push_weights_to_start -""" - -Push weights towards initial state. - -If the HfstTransducer is of unweighted type (hfst.ImplementationType.SFST_TYPE or -hfst.ImplementationType.FOMA_TYPE), nothing is done. - -An example: - - >>> import hfst - >>> tr = hfst.regex('[a::1 a:b::0.3 (b::0)]::0.7;') - >>> tr.push_weights_to_start() - >>> print(tr) - 0 1 a a 2.000000 - 1 2 a b 0.000000 - 2 3 b b 0.000000 - 2 0.000000 - 3 0.000000 - -See also: hfst.HfstTransducer.push_weights_to_end -""" - -%feature("docstring") hfst::HfstTransducer::subtract -""" - -Subtract transducer *another* from this transducer. -""" - -%feature("docstring") hfst::HfstTransducer::repeat_star -""" - -A concatenation of N transducers where N is any number from zero to infinity. -""" - -%feature("docstring") hfst::HfstTransducer::write_att -""" - -Write the transducer in AT&T format to file *f*, *write_weights* defined whether -weights are written. - -Parameters ----------- -* `f` : - A python file where transducer is written. -* `write_weights` : - Whether weights are written. -""" - -%feature("docstring") hfst::HfstTransducer::write_att -""" - -Write the transducer in AT&T format to file *ofile*, *write_weights* defines -whether weights are written. - -The fields in the resulting AT&T format are separated by tabulator characters. - -NOTE: If the transition symbols contain space characters,the spaces are printed -as '@_SPACE_@' because whitespace characters are used as field separators in -AT&T format. Epsilon symbols are printed as '@0@'. - -If several transducers are written in the same file, they must be separated by a -line of two consecutive hyphens \"--\", so that they will be read correctly by -hfst.read_att. - -An example: - - tr1 = hfst.regex('[foo:bar baz:0 \" \"]::0.3') - tr2 = hfst.empty_fst() - tr3 = hfst.epsilon_fst(0.5) - tr4 = hfst.regex('[foo]') - tr5 = hfst.empty_fst() - - f = hfst.hfst_open('testfile.att', 'w') - for tr in [tr1, tr2, tr3, tr4]: - tr.write_att(f) - f.write('--\\n') - tr5.write_att(f) - f.close() - -This will yield a file 'testfile.att' that looks as follows: - - 0 1 foo bar 0.299805 - 1 2 baz @0@ 0.000000 - 2 3 @_SPACE_@ @_SPACE_@ 0.000000 - 3 0.000000 - -- - -- - 0 0.500000 - -- - 0 1 foo foo 0.000000 - 1 0.000000 - -- - -Exceptions ----------- -* `StreamCannotBeWrittenException` : -* `StreamIsClosedException` : - -See also: hfst.HfstOutputStream.write - -See also: hfst.HfstTransducer.__init__ -""" - -%feature("docstring") hfst::HfstTransducer::write_att -""" - -Write the transducer in AT&T format to file named *filename*. - -*write_weights* defines whether weights are written. - -If the file exists, it is overwritten. If the file does not exist, it is -created. -""" - -%feature("docstring") hfst::HfstTransducer::lookup -""" - -Lookup string *input*. - -Parameters ----------- -* `input` : - The input. -* `kwargs` : - Possible parameters and their default values are: obey_flags=True, - max_number=-1, time_cutoff=0.0, output='tuple' -* `obey_flags` : - Whether flag diacritics are obeyed. Currently always True. -* `max_number` : - Maximum number of results returned, defaults to -1, i.e. infinity. -* `time_cutoff` : - How long the function can search for results before returning, expressed in - seconds. Defaults to 0.0, i.e. infinitely. -* `output` : - Possible values are 'tuple', 'text' and 'raw', 'tuple' being the default. - -note: This function is implemented only for optimized lookup format - (hfst.ImplementationType.HFST_OL_TYPE or hfst.ImplementationType.HFST_OLW_TYPE). Either convert to - optimized lookup format or to HfstBasicTransducer if you wish to perform - lookup. Conversion to OL might take a while but it lookup is fast. - Conversion to HfstBasicTransducer is quick but lookup is slower. -""" - -%feature("docstring") hfst::HfstTransducer::__init__ -""" - -Create an empty transducer. - - tr = hfst.HfstTransducer() - assert(tr.compare(hfst.empty_fst())) -""" - -%feature("docstring") hfst::HfstTransducer::__init__ -""" - -Create a deep copy of HfstTransducer *another* or a transducer equivalent to -HfstBasicTransducer *another*. - -Parameters ----------- -* `another` : - An HfstTransducer or HfstBasicTransducer. - -An example: - - tr1 = hfst.regex('foo bar foo') - tr2 = hfst.HfstTransducer(tr1) - tr2.substitute('foo','FOO') - tr1.concatenate(tr2) -""" - -%feature("docstring") hfst::HfstTransducer::__init__ -""" - -Create an HFST transducer equivalent to HfstBasicTransducer *t*. - -The type of the created transducer is defined by *type*. - -Parameters ----------- -* `t` : - An HfstBasicTransducer. -* `type` : - The type of the resulting transducer. If you want to use the default type, - you can just call hfst.HfstTransducer(fsm) -""" - -%feature("docstring") hfst::HfstTransducer::insert_to_alphabet -""" - -Explicitly insert *symbol* to the alphabet of the transducer. - -Parameters ----------- -* `symbol` : - The symbol (string) to be inserted. - -note: Usually this function is not needed since new symbols are added to the - alphabet by default. -""" - -%feature("docstring") hfst::HfstTransducer::concatenate -""" - -Concatenate this transducer with *another*. -""" - -%feature("docstring") hfst::HfstTransducer::determinize -""" - -Determinize the transducer. - -Determinizing a transducer yields an equivalent transducer that has no state -with two or more transitions whose input:output symbol pairs are the same. -""" - -%feature("docstring") hfst::HfstTransducer::is_automaton -""" - -Whether each transition in the transducer has equivalent input and output -symbols. - -note: Transition with hfst.UNKNOWN on both sides IS NOT a transition with - equivalent input and output symbols. - -note: Transition with hfst.IDENTITY on both sides IS a transition with - equivalent input and output symbols. -""" - -%feature("docstring") hfst::HfstTransducer::minimize -""" - -Minimize the transducer. - -Minimizing a transducer yields an equivalent transducer with the smallest number -of states. - -Bug -OpenFst's minimization algorithm seems to add epsilon transitions to weighted -transducers? -""" - -%feature("docstring") hfst::HfstTransducer::set_property -""" - -Set arbitrary string property *property* to *value*. - -Parameters ----------- -* `property` : - A string naming the property. -* `value` : - A string expressing the value of *property*. - -set_property('name', 'name of the transducer') equals set_name('name of the -transducer'). - -note: While this function is capable of creating endless amounts of arbitrary - metadata, it is suggested that property names are drawn from central - repository, or prefixed with \"x-\". A property that does not follow this - convention may affect the behavior of transducer in future releases. -""" - -%feature("docstring") hfst::HfstTransducer::convert -""" - -Convert the transducer into an equivalent transducer in format *type*. - -If a weighted transducer is converted into an unweighted one, all weights are -lost. In the reverse case, all weights are initialized to the semiring's one. - -A transducer of type hfst.ImplementationType.SFST_TYPE, hfst.ImplementationType.TROPICAL_OPENFST_TYPE, -hfst.ImplementationType.LOG_OPENFST_TYPE or hfst.ImplementationType.FOMA_TYPE can be converted into an -hfst.ImplementationType.HFST_OL_TYPE or hfst.ImplementationType.HFST_OLW_TYPE transducer, but an -hfst.ImplementationType.HFST_OL_TYPE or hfst.ImplementationType.HFST_OLW_TYPE transducer cannot be -converted to any other type. - -note: For conversion between HfstBasicTransducer and HfstTransducer, see - hfst.HfstTransducer.__init__ and hfst.HfstBasicTransducer.__init__ -""" - -%feature("docstring") hfst::HfstTransducer::remove_epsilons -""" - -Remove all *epsilon:epsilon* transitions from the transducer so that the -resulting transducer is equivalent to the original one. -""" - -%feature("docstring") hfst::HfstTransducer::repeat_n -""" - -A concatenation of *n* transducers. -""" - -%feature("docstring") hfst::HfstTransducer::number_of_arcs -""" - -The number of transitions in the transducer. -""" - -%feature("docstring") hfst::HfstTransducer::cross_product -""" - -Make cross product of this transducer with *another*. - -It pairs every string of this with every string of *another*. If strings are not -the same length, epsilon padding will be added in the end of the shorter string. - -pre: Both transducers must be automata, i.e. map strings onto themselves. -""" - -%feature("docstring") hfst::HfstTransducer::write -""" - -Write the transducer in binary format to *ostr*. - -Parameters ----------- -* `ostr` : - A hfst.HfstOutputStream where the transducer is written. -""" - -%feature("docstring") hfst::HfstTransducer::lenient_composition -""" - -Perform a lenient composition on this transducer and *another*. - -TODO: explain more. -""" - -%feature("docstring") hfst::HfstTransducer::remove_optimization -""" - -Remove lookup optimization. - -This effectively converts transducer (back) into default fst type. -""" - -%feature("docstring") hfst::HfstTransducer::get_property -""" - -Get arbitrary string propert *property*. - -Parameters ----------- -* `property` : - The name of the property whose value is returned. get_property('name') works - like get_name(). -""" - -%feature("docstring") hfst::HfstTransducer::get_alphabet -""" - -Get the alphabet of the transducer. - -The alphabet is defined as the set of symbols known to the transducer. - -Returns -------- -A tuple of strings. -""" - - -// File: classhfst_1_1MultiCharSymbolTrie.xml - - -%feature("docstring") hfst::MultiCharSymbolTrie -""" - -TODO: documentation ??? -""" - -%feature("docstring") hfst::MultiCharSymbolTrie::__init__ -""" - -TODO: documentation. -""" - -%feature("docstring") hfst::MultiCharSymbolTrie::add -""" - -TODO: documentation. - -Parameters ----------- -* `string` : - const char * -""" - - -// File: classhfst_1_1PmatchContainer.xml - -%feature("docstring") hfst_ol::Location -""" - Location of a pmatch result. - - Attributes: - - start: start index of match - length: length of match - input: the matched input string - output: the matching output string - tag: the tag of match - weight: the weight of match - input_parts: tuple of indices in input_symbol_strings - output_string: tuple of indices in output_symbol_strings - input_symbol_strings: tuple of matched input symbol strings - output_symbol_strings: tuple of matching output symbol strings -""" - -%feature("docstring") hfst_ol::PmatchContainer -""" - -A class for performing pattern matching. -""" - -%feature("docstring") hfst_ol::PmatchContainer::__init__ -""" - -Create a PmatchContainer based on definitions *defs* or transducer read from *filename*. -NOTE: the first variant performs many checks and conversion and is much slower than -the second one. The second variant assumes that the transducer has been compiled for -pmatch and is in valid format. - -* defs A tuple of transducers in hfst.HFST_OLW_FORMAT defining how pmatch is - done. -* filename Name of the file that contains a compiled transducer (archive) that is - used for pmatching. - - See also: hfst.compile_pmatch_file -""" - -%feature("docstring") hfst_ol::PmatchContainer::locate -""" - -The locations of pmatched strings for string *input* where the results are limited -as defined by *time_cutoff* and *weight_cutoff*. - -Parameters ----------- -* `input` : - The input string. -* `time_cutoff` : - Time cutoff, defaults to zero, i.e. no cutoff. -* `weight_cutoff` : - Weight cutoff, defaults to infinity, i.e. no cutoff. - -Returns -------- -A tuple of tuples of Location. -""" - -%feature("docstring") hfst_ol::PmatchContainer::get_profiling_info -""" - -todo -""" - -%feature("docstring") hfst_ol::PmatchContainer::set_profile -""" - -todo -""" - -%feature("docstring") hfst_ol::PmatchContainer::set_extract_tags_mode -""" - -todo -""" - -%feature("docstring") hfst_ol::PmatchContainer::match -""" - -Match input *input*. -""" - -%feature("docstring") hfst_ol::PmatchContainer::set_verbose -""" - -todo -""" - - -// File: classhfst_1_1PrologReader.xml - - -%feature("docstring") hfst::PrologReader -""" - -A class for reading input in prolog text format and converting it into -transducer(s). - -An example that reads prolog input from file 'testfile.prolog' and creates the -corresponding transducers and prints them. If the input cannot be parsed, a -message showing the invalid line in prolog input is printed and reading is -stopped. - - with open('testfile.prolog', 'r') as f: - try: - r = hfst.PrologReader(f) - for tr in r: - print(tr) - except hfst.exceptions.NotValidPrologFormatException as e: - print(e.what()) -""" - -%feature("docstring") hfst::PrologReader::next -""" - -Return next element (for python version 2). - -Needed for 'for ... in' statement. - - for transducer in prolog_reader: - print(transducer) - -Exceptions ----------- -* `StopIteration` : -""" - -%feature("docstring") hfst::PrologReader::__iter__ -""" - -An iterator to the reader. - -Needed for 'for ... in' statement. - - for transducer in prolog_reader: - print(transducer) -""" - -%feature("docstring") hfst::PrologReader::__next__ -""" - -Return next element (for python version 3). - -Needed for 'for ... in' statement. - - for transducer in prolog_reader: - print(transducer) - -Exceptions ----------- -* `StopIteration` : -""" - -%feature("docstring") hfst::PrologReader::__init__ -""" - -Create a PrologReader that reads input from file *f*. - -Parameters ----------- -* `f` : - A python file. -""" - -%feature("docstring") hfst::PrologReader::read -""" - -Read next transducer. - -Read next transducer description in prolog format and return a corresponding -transducer. - -Exceptions ----------- -* `hfst.exceptions.NotValidPrologFormatException` : -* `hfst.exceptions.EndOfStreamException` : -""" - - -// File: classhfst_1_1XreCompiler.xml - - -%feature("docstring") hfst::XreCompiler -""" - -A regular expression compiler. -""" - -%feature("docstring") hfst::XreCompiler::__init__ -""" - -Construct compiler for OpenFst format (the default) transducers. -""" - -%feature("docstring") hfst::XreCompiler::__init__ -""" - -Create compiler for *impl* format transducers. -""" - -%feature("docstring") hfst::XreCompiler::define_list -""" - -todo -""" - -%feature("docstring") hfst::XreCompiler::is_function_definition -""" - -Whether *name* is a function definition. -""" - -%feature("docstring") hfst::XreCompiler::is_definition -""" - -Whether *name* is a definition. -""" - -%feature("docstring") hfst::XreCompiler::set_verbosity -""" - -Set the verbosity of the compiler. - -* v True or False -""" - -%feature("docstring") hfst::XreCompiler::undefine -""" - -todo -""" - -%feature("docstring") hfst::XreCompiler::setOutputToConsole -""" - -(Windows-specific) Whether output is printed to console instead of standard -output. - -* v True or False -""" - -%feature("docstring") hfst::XreCompiler::compile -""" - -Compile a transducer defined by *xre*. - -May return a pointer to *empty* transducer on non-fatal error. A None pointer is -returned on fatal error, if abort is not called. - -Returns -------- -An HfstTransducer pointer. -""" - -%feature("docstring") hfst::XreCompiler::set_expand_definitions -""" - -Whether definitions are expanded. - -* v True or False -""" - -%feature("docstring") hfst::XreCompiler::define_xre -""" - -Add a definition macro. - -Compilers will replace arcs labeled *name*, with a transducer defined by regular -expression *xre* in later phases of compilation (if set_expand_definitions(True) -has been called). -""" - -%feature("docstring") hfst::XreCompiler::define_transducer -""" - -Add a definition macro. - -Compilers will replace arcs labeled *name*, with a transducer *transducer* in -later phases of compilation (if set_expand_definitions(True) has been called). -""" - -%feature("docstring") hfst::XreCompiler::define_function -""" - -todo -""" - -%feature("docstring") hfst::XreCompiler::getOutputToConsole -""" - -(Windows-specific) Whether output is printed to console instead of standard -output. -""" - - -// File: exceptions_2____init_____8py.xml - - -// File: ____init_____8py.xml - - -// File: namespacehfst_1_1exceptions.xml - - -// File: namespacehfst_1_1rules.xml - -%feature("docstring") hfst::xeroxRules::Rule -""" -todo -""" - -%feature("docstring") hfst::xeroxRules::replace -""" -todo -""" - -// note: this function is offered as 'replace_left' in package hfst.xerox_rules -%feature("docstring") hfst::xeroxRules::xerox_replace_left -""" -todo -""" - -%feature("docstring") hfst::xeroxRules::replace_leftmost_longest_match -""" -todo -""" - -%feature("docstring") hfst::xeroxRules::replace_rightmost_longest_match -""" -todo -""" - -%feature("docstring") hfst::xeroxRules::replace_leftmost_shortest_match -""" -todo -""" - -%feature("docstring") hfst::xeroxRules::replace_rightmost_shortest_match -""" -todo -""" - -%feature("docstring") hfst::xeroxRules::replace_epenthesis -""" -todo -""" - -// note: this function is offered as 'restriction' in package hfst.xerox_rules -%feature("docstring") hfst::xeroxRules::xerox_restriction -""" -todo -""" - -%feature("docstring") hfst::xeroxRules::before -""" -todo -""" - -%feature("docstring") hfst::xeroxRules::after -""" -todo -""" - - -%feature("docstring") hfst::rules::two_level_if -""" - -A transducer that obligatorily performs the mappings defined by *mappings* in -the context *context* when the alphabet is *alphabet*. - -Parameters ----------- -* `context` : - A pair of transducers where the first transducer defines the left context - and the second transducer the right context. -* `mappings` : - A set of mappings (a tuple of string pairs) that the resulting transducer - will perform in the context given in *context*. -* `alphabet` : - The set of symbol pairs (a tuple of string pairs) that defines the alphabet - (see the example). - -For example, a transducer yielded by the following arguments (in pseudcode) - - context = pair( [c|d], [e] ) - mappings = set(a:b) - alphabet = set(a, a:b, b, c, d, e, ...) obligatorily maps the symbol a to b -if c or d precedes and e follows. (Elsewhere, the mapping of a to b is -optional). This expression is identical to ![.* [c|d] [a:. & !a:b] [e] .*] Note -that the alphabet must contain the pair a:b here. - -See also: SFST manual -""" - -%feature("docstring") hfst::rules::replace_down -""" - -The same as replace_up, but matching is done on the output side of *mapping*. - -See also: replace_up SFST manual. -""" - -%feature("docstring") hfst::rules::replace_down -""" - -The same as replace_down(context, mapping, optional, alphabet) but *mapping* is -performed in every context. - -See also: replace_up -""" - -%feature("docstring") hfst::rules::deep_restriction_and_coercion -""" - -A transducer that is equivalent to the intersection of deep_restriction and -deep_coercion. - -See also: deep_restriction deep_coercion SFST manual. - -Parameters ----------- -* `contexts` : - A tuple of HfstTransducer pairs. -* `mapping` : - An HfstTransducer. -* `alphabet` : - A tuple of string pairs. -""" - -%feature("docstring") hfst::rules::surface_restriction_and_coercion -""" - -A transducer that is equivalent to the intersection of surface_restriction and -surface_coercion. - -See also: surface_restriction surface_coercion SFST manual. - -Parameters ----------- -* `contexts` : - A tuple of HfstTransducer pairs. -* `mapping` : - An HfstTransducer. -* `alphabet` : - A tuple of string pairs. -""" - -%feature("docstring") hfst::rules::left_replace_down_karttunen -""" - -Inversion of the replace_up and the result needs to be composed on the upper -side of the input language. - -However, matching is done on the output side of *mapping*. - -See also: replace_up -""" - -%feature("docstring") hfst::rules::coercion -""" - -A transducer that requires that one of the mappings defined by *mapping* must -occur in each context in *contexts*. - -Symbols outside of the matching substrings are mapped to any symbol allowed by -*alphabet*. - -See also: SFST manual. - -Parameters ----------- -* `contexts` : - A tuple of HfstTransducer pairs. -* `mapping` : - An HfstTransducer. -* `alphabet` : - A tuple of string pairs. -""" - -%feature("docstring") hfst::rules::left_replace_down -""" - -Inversion of the replace_up and the result needs to be composed on the upper -side of the input language. - -However, matching is done on the output side of *mapping*. - -See also: replace_up -""" - -%feature("docstring") hfst::rules::surface_coercion -""" - -A transducer that specifies that a string from the input language of the -transducer *mapping* always has to the mapped to one of its output strings -according to transducer *mapping* if it appears in any of the contexts in -*contexts*. - -Symbols outside of the matching substrings are mapped to any symbol allowed by -*alphabet*. - -See also: SFST manual. - -Parameters ----------- -* `contexts` : - A tuple of HfstTransducer pairs. -* `mapping` : - An HfstTransducer. -* `alphabet` : - A tuple of string pairs. -""" - -%feature("docstring") hfst::rules::deep_coercion -""" - -A transducer that specifies that a string from the output language of the -transducer *mapping* always has to be mapped to one of its input strings -(according to transducer *mappings*) if it appears in any of the contexts in -*contexts*. - -Symbols outside of the matching substrings are mapped to any symbol allowed by -*alphabet*. - -See also: SFST manual. - -Parameters ----------- -* `contexts` : - A tuple of HfstTransducer pairs. -* `mapping` : - An HfstTransducer. -* `alphabet` : - A tuple of string pairs. -""" - -%feature("docstring") hfst::rules::replace_down_karttunen -""" - -TODO: document. -""" - -%feature("docstring") hfst::rules::replace_left -""" - -The same as replace_up, but left context matching is done on the output side of -*mapping* and right context on the input side of *mapping*. - -See also: replace_up -""" - -%feature("docstring") hfst::rules::two_level_if_and_only_if -""" - -A transducer that always performs the mappings defined by *mappings* in the -context *context* and only in that context, when the alphabet is *alphabet*. - -If called with the same arguments as in the example of two_level_if, the -transducer maps symbol a to b only and only if c or d precedes and e follows. -The mapping of a to b is obligatory in this context and cannot occur in any -other context. - -The expression is equivalent to ![.* [c|d] [a:. & !a:b] [e] .*] & ![ [ ![.* -[c|d]] a:b .* ] | [ .* a:b ![[e] .*] ] ] - -See also: two_level_if -""" - -%feature("docstring") hfst::rules::surface_restriction -""" - -A transducer that specifies that a string from the input language of the -transducer *mapping* may only be mapped to one of its output strings (according -to transducer *mapping*) if it appears in any of the contexts in *contexts*. - -Symbols outside of the matching substrings are mapped to any symbol allowed by -*alphabet*. - -See also: SFST manual. - -Parameters ----------- -* `contexts` : - A tuple of HfstTransducer pairs. -* `mapping` : - An HfstTransducer. -* `alphabet` : - A tuple of string pairs. -""" - -%feature("docstring") hfst::rules::left_replace_left -""" - -Inversion of the replace_up and the result needs to be composed on the upper -side of the input language. - -However, left context matching is done on the input side of *mapping* and right -context on the output side of *mapping*. - -See also: replace_up */ -""" - -%feature("docstring") hfst::rules::deep_restriction -""" - -A transducer that specifies that a string from the output language of the -transducer *mapping* may only be mapped to one of its input strings (according -to transducer *mappings*) if it appears in any of the contexts in -*contexts.Symbols* outside of the matching substrings are mapped to any symbol -allowed by *alphabet*. - -See also: SFST manual. - -Parameters ----------- -* `contexts` : - A tuple of HfstTransducer pairs. -* `mapping` : - An HfstTransducer. -* `alphabet` : - A tuple of string pairs. -""" - -%feature("docstring") hfst::rules::left_replace_up -""" - -Inversion of the replace_up and the result needs to be composed on the upper -side of the input language. - -B <- A is the inversion of A -> B. *mapping* is performed in every context. - -See also: replace_up -""" - -%feature("docstring") hfst::rules::left_replace_up -""" - -Inversion of the replace_up and the result needs to be composed on the upper -side of the input language. - -B <- A is the inversion of A -> B. - -See also: replace_up -""" - -%feature("docstring") hfst::rules::left_replace_right -""" - -Inversion of the replace_up and the result needs to be composed on the upper -side of the input language. - -However, left context matching is done on the output side of *mapping* and right -context on the input side of *mapping*. - -See also: replace_up -""" - -%feature("docstring") hfst::rules::replace_up -""" - -A transducer that performs an upward mapping *mapping* in the context *context* -when the alphabet is *alphabet*. - -*optional* defines whether the mapping is optional. - -Parameters ----------- -* `context` : - A pair of transducers where the first transducer defines the left context - and the second transducer the right context. Both transducers must be - automata, i.e. map strings onto themselves. -* `mapping` : - The mapping (transducer) that the resulting transducer will perform in the - context given in *context*. -* `optional` : - Whether the mapping is optional. -* `alphabet` : - The set of symbol pairs that defines the alphabet (a tuple of string pairs). - -Each substring s of the input string which is in the input language of the -transducer *mapping* and whose left context is matched by the expression [.* l] -(where l is the first element of *context*) and whose right context is matched -by [r .*] (where r is the second element in the context) is mapped to the -respective surface strings defined by transducer *mapping*. Any other character -is mapped to the characters specified in *alphabet*. The left and right contexts -must be automata (i.e. transducers which map strings onto themselves). - -For example, a transducer yielded by the following arguments (in pseudocode) - - context = pair( [c], [c] ) - mappings = [ a:b a:b ] - alphabet = set(a, b, c) would map the string \"caacac\" to \"cbbcac\". - -Note that the alphabet must contain the characters a and b, but not the pair a:b -(unless this replacement is to be allowed everywhere in the context). - -Note that replace operations (unlike the two-level rules) have to be combined by -composition rather than intersection. - -Exceptions ----------- -* `ContextTransducersAreNotAutomataException` : - -See also: SFST manual -""" - -%feature("docstring") hfst::rules::replace_up -""" - -The same as replace_up but *mapping* is performed in every context. - -See also: replace_up -""" - -%feature("docstring") hfst::rules::two_level_only_if -""" - -A transducer that allows the mappings defined by *mappings* only in the context -*context*, when the alphabet is *alphabet*. - -If called with the same arguments as in the example of two_level_if, the -transducer allows the mapping of symbol a to b only if c or d precedes and e -follows. The mapping of a to b is optional in this context but cannot occur in -any other context. - -The expression is equivalent to ![ [ ![.* [c|d]] a:b .* ] | [ .* a:b ![[e] .*] ] -] - -See also: two_level_if -""" - -%feature("docstring") hfst::rules::restriction_and_coercion -""" - -A transducer that is equivalent to the intersection of restriction and coercion -and requires that the mappings defined by *mapping* occur always and only in the -given contexts in *contexts*. - -Symbols outside of the matching substrings are mapped to any symbol allowed by -*alphabet*. - -See also: restriction coercion SFST manual - -Parameters ----------- -* `contexts` : - A tuple of HfstTransducer pairs. -* `mapping` : - An HfstTransducer. -* `alphabet` : - A tuple of string pairs. -""" - -%feature("docstring") hfst::rules::restriction -""" - -A transducer that allows any (substring) mapping defined by *mapping* only if it -occurs in any of the contexts in *contexts*. - -Symbols outside of the matching substrings are mapped to any symbol allowed by -*alphabet*. - -Exceptions ----------- -* `EmptySetOfContextsException` : - -See also: SFST manual. - -Parameters ----------- -* `contexts` : - A tuple of HfstTransducer pairs. -* `mapping` : - An HfstTransducer. -* `alphabet` : - A tuple of string pairs. -""" - -%feature("docstring") hfst::rules::replace_right -""" - -The same as replace_up, but left context matching is done on the input side of -*mapping* and right context on the output side of *mapping*. - -See also: replace_up SFST manual. -""" - - -// File: namespacehfst_1_1types.xml - - -// File: namespacehfst.xml - -%feature("docstring") set_default_fst_type -""" - -Set the default implementation type. - -Parameters ----------- -* `impl` : - An hfst.ImplementationType. - -Set the implementation type (SFST_TYPE, TROPICAL_OPENFST_TYPE, FOMA_TYPE) that -is used by default by all operations that create transducers. The default value -is TROPICAL_OPENFST_TYPE -""" - -%feature("docstring") read_att_transducer -""" - -Read next transducer from AT&T file pointed by *f*. - -*epsilonstr* defines the symbol used for epsilon in the file. - -Parameters ----------- -* `f` : - A python file -* `epsilonstr` : - How epsilon is represented in the file. By default, \"@_EPSILON_SYMBOL_@\" - and \"@0@\" are both recognized. - -If the file contains several transducers, they must be separated by \"--\" -lines. In AT&T format, the transition lines are of the form: - - [0-9]+[\\w]+[0-9]+[\\w]+[^\\w]+[\\w]+[^\\w]([\\w]+(-)[0-9]+(\\.[0-9]+)) - -and final state lines: - - [0-9]+[\\w]+([\\w]+(-)[0-9]+(\\.[0-9]+)) - -If several transducers are listed in the same file, they are separated by lines -of two consecutive hyphens \"--\". If the weight - - ([\\w]+(-)[0-9]+(\\.[0-9]+)) is missing, the transition or final state is -given a zero weight. - -NOTE: If transition symbols contains spaces, they must be escaped as '@_SPACE_@' -because spaces are used as field separators. Both '@0@' and '@_EPSILON_SYMBOL_@' -are always interpreted as epsilons. - -An example: - - 0 1 foo bar 0.3 - 1 0.5 - -- - 0 0.0 - -- - -- - 0 0.0 - 0 0 a 0.2 - -The example lists four transducers in AT&T format: one transducer accepting the -string pair <'foo','bar'>, one epsilon transducer, one empty transducer and one -transducer that accepts any number of 'a's and produces an empty string in all -cases. The transducers can be read with the following commands (from a file -named 'testfile.att'): - - transducers = [] - ifile = open('testfile.att', 'r') - try: - while (True): - t = hfst.read_att_transducer(ifile, '') - transducers.append(t) - print(\"read one transducer\") - except hfst.exceptions.NotValidAttFormatException as e: - print(\"Error reading transducer: not valid AT&T format.\") - except hfst.exceptions.EndOfStreamException as e: - pass - ifile.close() - print(\"Read %i transducers in total\" % len(transducers)) - -Epsilon will be represented as hfst.EPSILON in the resulting transducer. The -argument *epsilon_symbol* only denotes how epsilons are represented in *ifile*. - -Bug -Empty transducers are in theory represented as empty strings in AT&T format. -However, this sometimes results in them getting interpreted as end-of-file. To -avoid this, use an empty line instead, i.e. a single newline character. - -Exceptions ----------- -* `NotValidAttFormatException` : -* `StreamNotReadableException` : -* `StreamIsClosedException` : -* `EndOfStreamException` : - -See also: #write_att -""" - -%feature("docstring") read_att_input -""" - -Read AT&T input from the user and return a transducer. - -Returns -------- -An HfstTransducer whose type is hfst.get_default_fst_type(). Read one AT&T line -at a time from standard input and finally return an equivalent transducer. An -empty line signals the end of input. -""" - -%feature("docstring") compile_lexc_file -""" - -Compile lexc file *filename* into a transducer. - -Parameters ----------- -* `filename` : - The name of the lexc file. -* `kwargs` : - Arguments recognized are: verbosity, with_flags, output. -* `verbosity` : - The verbosity of the compiler, defaults to 0 (silent). Possible values are: - 0, 1, 2. -* `with_flags` : - Whether lexc flags are used when compiling, defaults to False. -* `output` : - Where output is printed. Possible values are sys.stdout, sys.stderr, a - StringIO, sys.stderr being the default? -""" - -%feature("docstring") fst_type_to_string -""" - -Get a string representation of transducer implementation type *type*. - -Parameters ----------- -* `type` : - An hfst.ImplementationType. -""" - -%feature("docstring") epsilon_fst -""" - -Get an epsilon transducer. - -Parameters ----------- -* `weight` : - The weight of the final state. Epsilon transducer has one state that is - final (with final weight *weight*), i.e. it recognizes the empty string. -""" - -%feature("docstring") empty_fst -""" - -Get an empty transducer. - -Empty transducer has one state that is not final, i.e. it does not recognize any -string. -""" - -%feature("docstring") compile_pmatch_expression -""" - -Compile a pmatch expression into a tuple of transducers. - -Parameters ----------- -* `expr` : - A string defining how pmatch is done. - -See also: hfst.compile_pmatch_file -""" - -%feature("docstring") start_xfst -""" - -Start interactive xfst compiler. - -Parameters ----------- -* `kwargs` : - Arguments recognized are: type, quit_on_fail. -* `quit_on_fail` : - Whether the compiler exits on any error, defaults to False. -* `type` : - Implementation type of the compiler, defaults to - hfst.get_default_fst_type(). -""" - -%feature("docstring") compile_pmatch_file -""" - -Compile pmatch expressions as defined in *filename* and return a tuple of -transducers. - -An example: - -If we have a file named streets.txt that contains: - -define CapWord UppercaseAlpha Alpha* ; define StreetWordFr [{avenue} | -{boulevard} | {rue}] ; define DeFr [ [{de} | {du} | {des} | {de la}] Whitespace -] | [{d'} | {l'}] ; define StreetFr StreetWordFr (Whitespace DeFr) CapWord+ ; -regex StreetFr EndTag(FrenchStreetName) ; - -we can run: - -defs = hfst.compile_pmatch_file('streets.txt') const = -hfst.PmatchContainer(defs) assert cont.match(\"Je marche seul dans l'avenue des -Ternes.\") == \"Je marche seul dans l'avenue des -Ternes.\" -""" - -%feature("docstring") fst -""" - -Get a transducer that recognizes one or more paths. - -Parameters ----------- -* `arg` : - See example below - -Possible inputs: - - One unweighted identity path: - 'foo' -> [f o o] - Weighted path: a tuple of string and number, e.g. - ('foo',1.4) - ('bar',-3) - ('baz',0) - Several paths: a list or a tuple of paths and/or weighted paths, e.g. - ['foo', 'bar'] - ('foo', ('bar',5.0)) - ('foo', ('bar',5.0), 'baz', 'Foo', ('Bar',2.4)) - [('foo',-1), ('bar',0), ('baz',3.5)] - A dictionary mapping strings to any of the above cases: - {'foo':'foo', 'bar':('foo',1.4), 'baz':(('foo',-1),'BAZ')} -""" - -%feature("docstring") get_default_fst_type -""" - -Get default transducer implementation type. - -If the default type is not set, it defaults to hfst.ImplementationType.TROPICAL_OPENFST_TYPE -""" - -%feature("docstring") regex -""" - -Get a transducer as defined by regular expression *regexp*. - -Parameters ----------- -* `regexp` : - The regular expression defined with Xerox transducer notation. -* `kwargs` : - Argumnets recognized are: error. -* `error` : - Where warnings and errors are printed. Possible values are sys.stdout, - sys.stderr (the default), a StringIO or None, indicating a quiet mode. -""" - -%feature("docstring") is_diacritic -""" - -Whether symbol *symbol* is a flag diacritic. - -Flag diacritics are of the form - - @[PNDRCU][.][A-Z]+([.][A-Z]+)?@ -""" - -%feature("docstring") compile_xfst_file -""" - -Compile (is 'run' a better term?) xfst file *filename*. - -Parameters ----------- -* `filename` : - The name of the xfst file. -* `kwargs` : - Arguments recognized are: verbosity, quit_on_fail, output, type. -* `verbosity` : - The verbosity of the compiler, defaults to 0 (silent). Possible values are: - 0, 1, 2. -* `quit_on_fail` : - Whether the script is exited on any error, defaults to True. -* `output` : - Where output is printed. Possible values are sys.stdout, sys.stderr, a - StringIO, sys.stderr being the default? -* `type` : - Implementation type of the compiler, defaults to - hfst.get_default_fst_type(). -""" - -%feature("docstring") tokenized_fst -""" - -Get a transducer that recognizes the concatenation of symbols or symbol pairs in -*arg*. - -Parameters ----------- -* `arg` : - The symbols or symbol pairs that form the path to be recognized. - -Example - - import libhfst - tok = hfst.HfstTokenizer() - tok.add_multichar_symbol('foo') - tok.add_multichar_symbol('bar') - tr = hfst.tokenized_fst(tok.tokenize('foobar', 'foobaz')) will create the -transducer [foo:foo bar:b 0:a 0:z] -""" - -%feature("docstring") read_att_string -""" - -Read a multiline string *att* and return a transducer. - -Parameters ----------- -* `att` : - A string in AT&& format that defines the transducer. - -Returns -------- -An HfstTransducer whose type is hfst.get_default_fst_type(). Read *att* and -create a transducer as defined in it. -""" - -%feature("docstring") read_prolog_transducer -""" -""" - - -// File: rules_2____init_____8py.xml - - -// File: types_2____init_____8py.xml - - -// File: classhfst_1_1exceptions_1_1ContextTransducersAreNotAutomataException.xml - - -%feature("docstring") hfst::exceptions::ContextTransducersAreNotAutomataException -""" - -Transducers given as rule context are not automata. - -See also: hfst.HfstTransducer.is_automaton() -""" - - -// File: classhfst_1_1exceptions_1_1EmptySetOfContextsException.xml - - -%feature("docstring") hfst::exceptions::EmptySetOfContextsException -""" - -The set of transducer pairs is empty. - -Thrown by rule functions. -""" - - -// File: classhfst_1_1exceptions_1_1EmptyStringException.xml - - -%feature("docstring") hfst::exceptions::EmptyStringException -""" - -An argument string is an empty string. - -A transition symbol cannot be an empty string. -""" - - -// File: classhfst_1_1exceptions_1_1EndOfStreamException.xml - - -%feature("docstring") hfst::exceptions::EndOfStreamException -""" - -The stream is at end. - -Thrown by hfst.HfstTransducer hfst.HfstInputStream.__init__ -""" - - -// File: classhfst_1_1exceptions_1_1FlagDiacriticsAreNotIdentitiesException.xml - - -%feature("docstring") hfst::exceptions::FlagDiacriticsAreNotIdentitiesException -""" - -Flag diacritics encountered on one but not the other side of a transition. -""" - - -// File: classhfst_1_1exceptions_1_1FunctionNotImplementedException.xml - - -%feature("docstring") hfst::exceptions::FunctionNotImplementedException -""" - -Function has not been implemented (yet). -""" - - -// File: classhfst_1_1exceptions_1_1HfstException.xml - - -%feature("docstring") hfst::exceptions::HfstException -""" - -Base class for HfstExceptions. - -Holds its own name and the file and line number where it was thrown. -""" - -%feature("docstring") hfst::exceptions::HfstException::what -""" - -A message describing the error in more detail. -""" - - -// File: classhfst_1_1exceptions_1_1HfstFatalException.xml - - -%feature("docstring") hfst::exceptions::HfstFatalException -""" - -An error happened probably due to a bug in the HFST code. -""" - - -// File: classhfst_1_1exceptions_1_1HfstTransducerTypeMismatchException.xml - - -%feature("docstring") hfst::exceptions::HfstTransducerTypeMismatchException -""" - -Two or more HfstTransducers are not of the same type. - -Same as HfstTransducerTypeMismatchException ??? -""" - - -// File: classhfst_1_1exceptions_1_1ImplementationTypeNotAvailableException.xml - - -%feature("docstring") hfst::exceptions::ImplementationTypeNotAvailableException -""" - -The library required by the implementation type requested is not linked to HFST. -""" - - -// File: classhfst_1_1exceptions_1_1IncorrectUtf8CodingException.xml - - -%feature("docstring") hfst::exceptions::IncorrectUtf8CodingException -""" - -String is not valid utf-8. - -This exception suggests that an input string is not valid utf8. -""" - - -// File: classhfst_1_1exceptions_1_1MetadataException.xml - - -%feature("docstring") hfst::exceptions::MetadataException -""" - -A piece of metadata in an HFST header is not supported. -""" - - -// File: classhfst_1_1exceptions_1_1MissingOpenFstInputSymbolTableException.xml - - -%feature("docstring") hfst::exceptions::MissingOpenFstInputSymbolTableException -""" - -An OpenFst transducer does not have an input symbol table. - -When converting from OpenFst to tropical or log HFST, the OpenFst transducer -must have at least an input symbol table. If the output symbol table is missing, -it is assumed to be equivalent to the input symbol table. - -Thrown by hfst.HfstTransducer.__init__ -""" - - -// File: classhfst_1_1exceptions_1_1NotTransducerStreamException.xml - - -%feature("docstring") hfst::exceptions::NotTransducerStreamException -""" - -The stream does not contain transducers. - -Thrown by hfst.HfstTransducer hfst.HfstInputStream.__init__ - -An example. - - f = open('foofile', 'w') - f.write('This is an ordinary text file.\\n') - f.close() - try: - instr = hfst.HfstInputStream('foofile') - tr = instr.read() - print(tr) - instr.close() - except hfst.exceptions.NotTransducerStreamException: - print(\"Could not print transducer: the file does not contain binary -transducers.\") -""" - - -// File: classhfst_1_1exceptions_1_1NotValidAttFormatException.xml - - -%feature("docstring") hfst::exceptions::NotValidAttFormatException -""" - -The stream is not in valid AT&T format. - -An example: - - f = open('testfile1.att', 'w') - f.write('0 1 a b\\n\\ - 1 2 c\\n\\ - 2\\n') - f.close() - f = hfst.hfst_open('testfile1.att', 'r') - try: - tr = hfst.read_att(f) - except hfst.exceptions.NotValidAttFormatException: - print('Could not read file: it is not in valid ATT format.') - f.close() thrown by hfst.HfstTransducer.__init__ -""" - - -// File: classhfst_1_1exceptions_1_1NotValidLexcFormatException.xml - - -%feature("docstring") hfst::exceptions::NotValidLexcFormatException -""" - -The input is not in valid LexC format. -""" - - -// File: classhfst_1_1exceptions_1_1NotValidPrologFormatException.xml - - -%feature("docstring") hfst::exceptions::NotValidPrologFormatException -""" - -The input is not in valid prolog format. -""" - - -// File: classhfst_1_1exceptions_1_1SpecifiedTypeRequiredException.xml - - -%feature("docstring") hfst::exceptions::SpecifiedTypeRequiredException -""" - -The type of a transducer is not specified. - -This exception is thrown when an implementation type argument is -hfst.ImplementationType.ERROR_TYPE. -""" - - -// File: classhfst_1_1exceptions_1_1StateIndexOutOfBoundsException.xml - - -%feature("docstring") hfst::exceptions::StateIndexOutOfBoundsException -""" - -The state number argument is not valid. - -An example : - - tr = hfst.HfstBasicTransducer() - tr.add_state(1) - try: - w = tr.get_final_weight(2) - except hfst.exceptions.StateIndexOutOfBoundsException: - print('State number 2 does not exist') -""" - - -// File: classhfst_1_1exceptions_1_1StateIsNotFinalException.xml - - -%feature("docstring") hfst::exceptions::StateIsNotFinalException -""" - -State is not final (and cannot have a final weight). - -An example : - - tr = hfst.HfstBasicTransducer() - tr.add_state(1) - # An exception is thrown as state number 1 is not final - try: - w = tr.get_final_weight(1) - except hfst.exceptions.StateIsNotFinalException: - print(\"State is not final.\") - -You should use function hfst.HfstBasicTransducer.is_final_state if you are not -sure whether a state is final. - -Thrown by hfst.HfstBasicTransducer get_final_weight. -""" - - -// File: classhfst_1_1exceptions_1_1StreamCannotBeWrittenException.xml - - -%feature("docstring") hfst::exceptions::StreamCannotBeWrittenException -""" - -Stream cannot be written. - -Thrown by hfst.HfstOutputStream.write and hfst.HfstTransducer.write_att -""" - - -// File: classhfst_1_1exceptions_1_1StreamIsClosedException.xml - - -%feature("docstring") hfst::exceptions::StreamIsClosedException -""" - -Stream is closed. - -Thrown by hfst.HfstTransducer.write_att hfst.HfstOutputStream.write - -An example: - - try: - tr = hfst.regex('foo') - outstr = hfst.HfstOutputStream(filename='testfile') - outstr.close() - outstr.write(tr) - except hfst.exceptions.StreamIsClosedException: - print(\"Could not write transducer: stream to file was closed.\") -""" - - -// File: classhfst_1_1exceptions_1_1StreamNotReadableException.xml - - -%feature("docstring") hfst::exceptions::StreamNotReadableException -""" - -Stream cannot be read. -""" - - -// File: classhfst_1_1exceptions_1_1SymbolNotFoundException.xml - - -%feature("docstring") hfst::exceptions::SymbolNotFoundException -""" - -A bug in the HFST code. -""" - - -// File: classhfst_1_1exceptions_1_1TransducerHasWrongTypeException.xml - - -%feature("docstring") hfst::exceptions::TransducerHasWrongTypeException -""" - -Transducer has wrong type. - -This exception suggests that an HfstTransducer has not been properly -initialized, probably due to a bug in the HFST library. Alternatively the -default constructor of HfstTransducer has been called at some point. - -See also: hfst.HfstTransducer.__init__ -""" - - -// File: classhfst_1_1exceptions_1_1TransducerHeaderException.xml - - -%feature("docstring") hfst::exceptions::TransducerHeaderException -""" - -Transducer has a malformed HFST header. - -Thrown by hfst.HfstTransducer.__init__ hfst.HfstInputStream -""" - - -// File: classhfst_1_1exceptions_1_1TransducerIsCyclicException.xml - - -%feature("docstring") hfst::exceptions::TransducerIsCyclicException -""" - -Transducer is cyclic. - -Thrown by hfst.HfstTransducer.extract_paths. An example - - transducer = hfst.regex('[a:b]*') - try: - results = transducer.extract_paths(output='text') - print(\"The transducer has %i paths:\" % len(results)) - print(results) - except hfst.exceptions.TransducerIsCyclicException: - print(\"The transducer is cyclic and has an infinite number of paths. -Some of them:\") - results = transducer.extract_paths(output='text', max_cycles=5) - print(results) -""" - - -// File: classhfst_1_1exceptions_1_1TransducerTypeMismatchException.xml - - -%feature("docstring") hfst::exceptions::TransducerTypeMismatchException -""" - -Two or more transducers do not have the same type. - -This can happen if (1) the calling and called transducer in a binary operation, -(2) two transducers in a pair of transducers, (3) two consecutive transducers -coming from an HfstInputStream or (4) two transducers in a function taking two -or more transducers as arguments do not have the same type. - -An example: - - hfst.set_default_fst_type(hfst.ImplementationType.TROPICAL_OPENFST_TYPE) - tr1 = hfst.regex('foo') - tr2 = hfst.regex('bar') - tr2.convert(hfst.ImplementationType.FOMA_TYPE) - try: - tr1.disjunct(tr2) - except hfst.exceptions.TransducerTypeMismatchException: - print('The implementation types of transducers must be the same.') -""" - - -// File: classhfst_1_1exceptions_1_1TransducersAreNotAutomataException.xml - - -%feature("docstring") hfst::exceptions::TransducersAreNotAutomataException -""" - -Transducers are not automata. - -Example: - - tr1 = hfst.regex('foo:bar') - tr2 = hfst.regex('bar:baz') - try: - tr1.cross_product(tr2) - except hfst.exceptions.TransducersAreNotAutomataException: - print('Transducers must be automata in cross product.') This exception -is thrown by hfst.HfstTransducer.cross_product when either input transducer does -not have equivalent input and output symbols in all its transitions. -""" - diff --git a/src/hfst-old-pypi/exceptions/__init__.py b/src/hfst-old-pypi/exceptions/__init__.py deleted file mode 100644 index 93cfca4..0000000 --- a/src/hfst-old-pypi/exceptions/__init__.py +++ /dev/null @@ -1,66 +0,0 @@ -""" -class HfstException and its subclasses - -CLASSES: - - ContextTransducersAreNotAutomataException - EmptySetOfContextsException - EmptyStringException - EndOfStreamException - FlagDiacriticsAreNotIdentitiesException - FunctionNotImplementedException - HfstException - HfstFatalException - HfstTransducerTypeMismatchException - ImplementationTypeNotAvailableException - IncorrectUtf8CodingException - MetadataException - MissingOpenFstInputSymbolTableException - NotTransducerStreamException - NotValidAttFormatException - NotValidLexcFormatException - NotValidPrologFormatException - SpecifiedTypeRequiredException - StateIndexOutOfBoundsException - StateIsNotFinalException - StreamCannotBeWrittenException - StreamIsClosedException - StreamNotReadableException - SymbolNotFoundException - TransducerHasWrongTypeException - TransducerHeaderException - TransducerIsCyclicException - TransducersAreNotAutomataException - TransducerTypeMismatchException - -""" - -from hfst.libhfst import ContextTransducersAreNotAutomataException -from hfst.libhfst import EmptySetOfContextsException -from hfst.libhfst import EmptyStringException -from hfst.libhfst import EndOfStreamException -from hfst.libhfst import FlagDiacriticsAreNotIdentitiesException -from hfst.libhfst import FunctionNotImplementedException -from hfst.libhfst import HfstException -from hfst.libhfst import HfstFatalException -from hfst.libhfst import HfstTransducerTypeMismatchException -from hfst.libhfst import ImplementationTypeNotAvailableException -from hfst.libhfst import IncorrectUtf8CodingException -from hfst.libhfst import MetadataException -from hfst.libhfst import MissingOpenFstInputSymbolTableException -from hfst.libhfst import NotTransducerStreamException -from hfst.libhfst import NotValidAttFormatException -from hfst.libhfst import NotValidLexcFormatException -from hfst.libhfst import NotValidPrologFormatException -from hfst.libhfst import SpecifiedTypeRequiredException -from hfst.libhfst import StateIndexOutOfBoundsException -from hfst.libhfst import StateIsNotFinalException -from hfst.libhfst import StreamCannotBeWrittenException -from hfst.libhfst import StreamIsClosedException -from hfst.libhfst import StreamNotReadableException -from hfst.libhfst import SymbolNotFoundException -from hfst.libhfst import TransducerHasWrongTypeException -from hfst.libhfst import TransducerHeaderException -from hfst.libhfst import TransducerIsCyclicException -from hfst.libhfst import TransducerTypeMismatchException -from hfst.libhfst import TransducersAreNotAutomataException diff --git a/src/hfst-old-pypi/hfst_extensions.cpp b/src/hfst-old-pypi/hfst_extensions.cpp deleted file mode 100644 index c028bca..0000000 --- a/src/hfst-old-pypi/hfst_extensions.cpp +++ /dev/null @@ -1,38 +0,0 @@ -namespace hfst { - - // *** Add default implementation type *** // - - hfst::ImplementationType type = hfst::TROPICAL_OPENFST_TYPE; - void set_default_fst_type(hfst::ImplementationType t) { type = t; } - hfst::ImplementationType get_default_fst_type() { return type; } - - std::string fst_type_to_string(hfst::ImplementationType t) { std::string retval = hfst::implementation_type_to_string(t); return retval; } - - bool is_diacritic(const std::string & symbol) { return hfst::FdOperation::is_diacritic(symbol); } - - HfstTransducer * empty_transducer() - { - hfst::xre::XreCompiler comp(hfst::get_default_fst_type()); - return hfst::hfst_regex(comp, "[0 - 0]", ""); - } - HfstTransducer * copy_hfst_transducer(const hfst::HfstTransducer & t) { return new HfstTransducer(t); } - HfstTransducer * copy_hfst_transducer_from_basic_transducer(const hfst::implementations::HfstBasicTransducer & t) { return new HfstTransducer(t, type); } - HfstTransducer * copy_hfst_transducer_from_basic_transducer(const hfst::implementations::HfstBasicTransducer & t, hfst::ImplementationType impl) { return new HfstTransducer(t, impl); } - - hfst::HfstOutputStream * create_hfst_output_stream(const std::string & filename, hfst::ImplementationType type, bool hfst_format) - { - if (filename == "") { return new hfst::HfstOutputStream(type, hfst_format); } - else { return new hfst::HfstOutputStream(filename, type, hfst_format); } - } - - hfst_ol::PmatchContainer * create_pmatch_container(const std::string & filename) - { - std::ifstream instream(filename.c_str(), - std::ifstream::binary); - if (!instream.good()) { - return NULL; - } - return new hfst_ol::PmatchContainer(instream); - } - -} diff --git a/src/hfst-old-pypi/hfst_file_extensions.cpp b/src/hfst-old-pypi/hfst_file_extensions.cpp deleted file mode 100644 index 564a35d..0000000 --- a/src/hfst-old-pypi/hfst_file_extensions.cpp +++ /dev/null @@ -1,44 +0,0 @@ -namespace hfst { - - class HfstFile { - private: - FILE * file; - public: - HfstFile(); - ~HfstFile(); - void set_file(FILE * f); - FILE * get_file(); - void close(); - void write(const char * str); - bool is_eof(void); - }; - - HfstFile::HfstFile(): file(NULL){}; - HfstFile::~HfstFile() {}; - void HfstFile::set_file(FILE * f) { file = f; }; - FILE * HfstFile::get_file() { return file; }; - void HfstFile::close() { if (file != stdout && file != stderr && file != stdin) { fclose(file); } }; - void HfstFile::write(const char * str) { fprintf(file, "%s", str); }; - bool HfstFile::is_eof(void) { return (feof(file) != 0); }; - - HfstFile hfst_open(const char * filename, const char * mode) { - FILE * f = fopen(filename, mode); - if (f == NULL) { throw StreamNotReadableException("", "", 0); } - HfstFile file; - file.set_file(f); - return file; - }; - - HfstFile hfst_stdin() { - HfstFile file; - file.set_file(stdin); - return file; - }; - - HfstFile hfst_stdout() { - HfstFile file; - file.set_file(stdout); - return file; - }; - -} diff --git a/src/hfst-old-pypi/hfst_lexc_extensions.cpp b/src/hfst-old-pypi/hfst_lexc_extensions.cpp deleted file mode 100644 index 5bd845a..0000000 --- a/src/hfst-old-pypi/hfst_lexc_extensions.cpp +++ /dev/null @@ -1,57 +0,0 @@ -namespace hfst { - -// *** Wrapper variables for IOString outputs *** // - -std::string hfst_lexc_output(""); -std::string get_hfst_lexc_output() { return hfst::hfst_lexc_output; } - -hfst::HfstTransducer * hfst_compile_lexc(hfst::lexc::LexcCompiler & comp, const std::string & filename, const std::string & error_stream) -{ - hfst_lexc_output=""; - - if (error_stream == "cout") - { - comp.set_error_stream(&std::cout); - if (comp.getVerbosity() > 1) - std::cout << "Parsing the lexc file..." << std::endl; - comp.parse(filename.c_str()); - if (comp.getVerbosity() > 1) - std::cout << "Compiling..." << std::endl; - hfst::HfstTransducer * retval = comp.compileLexical(); - if (comp.getVerbosity() > 1) - std::cout << "Compilation done." << std::endl; - return retval; - } - else if (error_stream == "cerr") - { - comp.set_error_stream(&std::cerr); - if (comp.getVerbosity() > 1) - std::cerr << "Parsing the lexc file..." << std::endl; - comp.parse(filename.c_str()); - if (comp.getVerbosity() > 1) - std::cerr << "Compiling..." << std::endl; - hfst::HfstTransducer * retval = comp.compileLexical(); - if (comp.getVerbosity() > 1) - std::cerr << "Compilation done." << std::endl; - return retval; - } - else - { - std::ostringstream os(std::ostringstream::ate); - comp.set_error_stream(&os); - hfst::set_warning_stream(&os); - if (comp.getVerbosity() > 1) - os << "Parsing the lexc file..." << std::endl; - comp.parse(filename.c_str()); - if (comp.getVerbosity() > 1) - os << "Compiling..." << std::endl; - hfst::HfstTransducer * retval = comp.compileLexical(); - if (comp.getVerbosity() > 1) - os << "Compilation done." << std::endl; - hfst_lexc_output = os.str(); - hfst::set_warning_stream(&std::cerr); - return retval; - } -} - -} diff --git a/src/hfst-old-pypi/hfst_lookup_extensions.cpp b/src/hfst-old-pypi/hfst_lookup_extensions.cpp deleted file mode 100644 index 24c90bf..0000000 --- a/src/hfst-old-pypi/hfst_lookup_extensions.cpp +++ /dev/null @@ -1,91 +0,0 @@ -namespace hfst { - -std::string one_level_paths_to_string(const hfst::HfstOneLevelPaths & paths) -{ - std::ostringstream oss; - for(hfst::HfstOneLevelPaths::const_iterator it = paths.begin(); it != paths.end(); it++) - { - for (hfst::StringVector::const_iterator svit = it->second.begin(); svit != it->second.end(); svit++) - { - oss << *svit; - } - oss << "\t" << it->first << std::endl; - } - return oss.str(); -} - -hfst::HfstOneLevelPaths extract_output_side(const hfst::HfstTwoLevelPaths & paths) -{ - hfst::HfstOneLevelPaths result; - for(hfst::HfstTwoLevelPaths::const_iterator it = paths.begin(); it != paths.end(); it++) - { - hfst::StringVector sv; - for (hfst::StringPairVector::const_iterator svit = it->second.begin(); svit != it->second.end(); svit++) - { - sv.push_back(svit->second); - } - result.insert(std::pair(it->first, sv)); - } - return result; -} - -std::string two_level_paths_to_string(const hfst::HfstTwoLevelPaths & paths) -{ - std::ostringstream oss; - for(hfst::HfstTwoLevelPaths::const_iterator it = paths.begin(); it != paths.end(); it++) - { - std::string input(""); - std::string output(""); - for (hfst::StringPairVector::const_iterator svit = it->second.begin(); svit != it->second.end(); svit++) - { - input += svit->first; - output += svit->second; - } - oss << input << ":" << output << "\t" << it->first << std::endl; - } - return oss.str(); -} - -// *** Wrappers for lookup functions *** // - -HfstOneLevelPaths lookup_vector(const hfst::HfstTransducer * tr, bool fd, const StringVector& s, int limit = -1, double time_cutoff = 0.0) throw(TransducerIsCyclicException, FunctionNotImplementedException) -{ - if (tr->get_type() == hfst::HFST_OL_TYPE || tr->get_type() == hfst::HFST_OLW_TYPE) - { - HfstOneLevelPaths *res_ptr = \ - fd ? tr->lookup_fd(s, limit, time_cutoff) : tr->lookup(s, limit, time_cutoff); - HfstOneLevelPaths res = *res_ptr; - delete res_ptr; - return res; - } - - hfst::HfstTwoLevelPaths result; - hfst::HfstBasicTransducer fsm(*tr); - (void)time_cutoff; - fsm.lookup(s, result, NULL, NULL, limit, fd); - return hfst::extract_output_side(result); -} - -HfstOneLevelPaths lookup_string(const hfst::HfstTransducer * tr, bool fd, const std::string& s, int limit = -1, double time_cutoff = 0.0) throw(TransducerIsCyclicException, FunctionNotImplementedException) -{ - if (tr->get_type() == hfst::HFST_OL_TYPE || tr->get_type() == hfst::HFST_OLW_TYPE) - { - HfstOneLevelPaths *res_ptr = \ - fd ? tr->lookup_fd(s, limit, time_cutoff) : tr->lookup(s, limit, time_cutoff); - HfstOneLevelPaths res = *res_ptr; - delete res_ptr; - return res; - } - hfst::HfstBasicTransducer fsm(*tr); - hfst::StringSet alpha = fsm.get_input_symbols(); - hfst::HfstTokenizer tok; - for (hfst::StringSet::const_iterator it = alpha.begin(); it != alpha.end(); it++) - { tok.add_multichar_symbol(*it); } - StringVector sv = tok.tokenize_one_level(s); - hfst::HfstTwoLevelPaths result; - (void)time_cutoff; - fsm.lookup(sv, result, NULL, NULL, limit, fd); - return hfst::extract_output_side(result); -} - -} diff --git a/src/hfst-old-pypi/hfst_pmatch_extensions.cpp b/src/hfst-old-pypi/hfst_pmatch_extensions.cpp deleted file mode 100644 index c731c78..0000000 --- a/src/hfst-old-pypi/hfst_pmatch_extensions.cpp +++ /dev/null @@ -1,93 +0,0 @@ -#include "parsers/PmatchCompiler.h" - -namespace hfst { - - //hfst::ImplementationType get_default_fst_type(); - -// Mostly copied from file 'tools/src/hfst-pmatch2fst.cc'. -// TODO: HfstTransducer pointers in variable 'definitions' need to be deleted manually? -std::vector compile_pmatch_expression(const std::string & pmatch) -{ - std::vector retval; - hfst::pmatch::PmatchCompiler comp(hfst::TROPICAL_OPENFST_TYPE); - comp.set_verbose(false/*verbose*/); - comp.set_flatten(false/*flatten*/); - std::map definitions; - try { - definitions = comp.compile(pmatch); - } catch(...) { - throw HfstException(); // TODO - } - - // A dummy transducer with an alphabet with all the symbols - hfst::HfstTransducer harmonizer(hfst::TROPICAL_OPENFST_TYPE); - - // First we need to collect a unified alphabet from all the transducers. - hfst::StringSet symbols_seen; - for (std::map::const_iterator it = - definitions.begin(); it != definitions.end(); ++it) { - hfst::StringSet string_set = it->second->get_alphabet(); - for (hfst::StringSet::const_iterator sym = string_set.begin(); - sym != string_set.end(); ++sym) { - if (symbols_seen.count(*sym) == 0) { - harmonizer.disjunct(hfst::HfstTransducer(*sym, hfst::TROPICAL_OPENFST_TYPE)); - symbols_seen.insert(*sym); - } - } - } - if (symbols_seen.size() == 0) { - // We don't recognise anything, go home early - std::cerr << "Empty ruleset, nothing to write\n"; - throw HfstException(); // TODO - } - - // Then we convert it... - harmonizer.convert(hfst::HFST_OLW_TYPE); - // Use these for naughty intermediate steps to make sure - // everything has the same alphabet - hfst::HfstBasicTransducer * intermediate_tmp; - hfst_ol::Transducer * harmonized_tmp; - hfst::HfstTransducer * output_tmp; - - // When done compiling everything, look for TOP and output it first. - if (definitions.count("TOP") == 1) { - intermediate_tmp = hfst::implementations::ConversionFunctions:: - hfst_transducer_to_hfst_basic_transducer(*definitions["TOP"]); - harmonized_tmp = hfst::implementations::ConversionFunctions:: - hfst_basic_transducer_to_hfst_ol(intermediate_tmp, - true, // weighted - "", // no special options - &harmonizer); // harmonize with this - output_tmp = hfst::implementations::ConversionFunctions:: - hfst_ol_to_hfst_transducer(harmonized_tmp); - output_tmp->set_name("TOP"); - retval.push_back(*output_tmp); - delete definitions["TOP"]; - definitions.erase("TOP"); - delete intermediate_tmp; - delete output_tmp; - - for (std::map::iterator it = - definitions.begin(); it != definitions.end(); ++it) { - intermediate_tmp = hfst::implementations::ConversionFunctions:: - hfst_transducer_to_hfst_basic_transducer(*(it->second)); - harmonized_tmp = hfst::implementations::ConversionFunctions:: - hfst_basic_transducer_to_hfst_ol(intermediate_tmp, - true, // weighted - "", // no special options - &harmonizer); // harmonize with this - output_tmp = hfst::implementations::ConversionFunctions:: - hfst_ol_to_hfst_transducer(harmonized_tmp); - output_tmp->set_name(it->first); - retval.push_back(*output_tmp); - delete it->second; - delete intermediate_tmp; - delete output_tmp; - } - } else { - std::cerr << "Empty ruleset, nothing to write\n"; - throw HfstException(); // TODO - } - return retval; - } -} diff --git a/src/hfst-old-pypi/hfst_pmatch_tokenize_extensions.cpp b/src/hfst-old-pypi/hfst_pmatch_tokenize_extensions.cpp deleted file mode 100644 index 965c351..0000000 --- a/src/hfst-old-pypi/hfst_pmatch_tokenize_extensions.cpp +++ /dev/null @@ -1,67 +0,0 @@ -namespace hfst -{ - hfst_ol::LocationVectorVector pmatch_locate - (hfst_ol::PmatchContainer * cont, - const std::string & input, - double time_cutoff = 0.0) - { - return cont->locate(input, time_cutoff); - } - - hfst_ol::LocationVectorVector pmatch_locate - (hfst_ol::PmatchContainer * cont, - const std::string & input, - double time_cutoff, - float weight_cutoff) - { - return cont->locate(input, time_cutoff, weight_cutoff); - } - - std::ostringstream pmatch_tokenize_ostringstream; - - std::string pmatch_get_tokenized_output - (hfst_ol::PmatchContainer * cont, - const std::string & input_text, - const std::string & output_format, - int * max_weight_classes, - bool dedupe, - bool print_weights, - bool print_all, - double time_cutoff, - bool verbose, - float beam, - bool tokenize_multichar) - { - pmatch_tokenize_ostringstream.str(""); - hfst_ol_tokenize::TokenizeSettings settings; - if (output_format == "tokenize") - settings.output_format=hfst_ol_tokenize::OutputFormat::tokenize; - else if (output_format == "space_separated") - settings.output_format=hfst_ol_tokenize::OutputFormat::space_separated; - else if (output_format == "xerox") - settings.output_format=hfst_ol_tokenize::OutputFormat::xerox; - else if (output_format == "cg") - settings.output_format=hfst_ol_tokenize::OutputFormat::cg; - else if (output_format == "finnpos") - settings.output_format=hfst_ol_tokenize::OutputFormat::finnpos; - else if (output_format == "giellacg") - settings.output_format=hfst_ol_tokenize::OutputFormat::giellacg; - else if (output_format == "conllu") - settings.output_format=hfst_ol_tokenize::OutputFormat::conllu; - else - throw "output_format not recognized"; - if (max_weight_classes == NULL) - settings.max_weight_classes = std::numeric_limits::max(); - else - settings.max_weight_classes = *max_weight_classes; - settings.dedupe = dedupe; - settings.print_weights = print_weights; - settings.print_all = print_all; - settings.time_cutoff = time_cutoff; - settings.verbose = verbose; - settings.beam = beam; - settings.tokenize_multichar = tokenize_multichar; - hfst_ol_tokenize::match_and_print(*cont, pmatch_tokenize_ostringstream, input_text, settings); - return pmatch_tokenize_ostringstream.str(); - } -} diff --git a/src/hfst-old-pypi/hfst_prolog_extensions.cpp b/src/hfst-old-pypi/hfst_prolog_extensions.cpp deleted file mode 100644 index 23d9fbe..0000000 --- a/src/hfst-old-pypi/hfst_prolog_extensions.cpp +++ /dev/null @@ -1,28 +0,0 @@ -namespace hfst -{ - - bool parse_prolog_network_line(const std::string & line, hfst::implementations::HfstBasicTransducer * graph) - { - bool retval = hfst::implementations::HfstBasicTransducer::parse_prolog_network_line(line, *graph); - return retval; - } - - bool parse_prolog_arc_line(const std::string & line, hfst::implementations::HfstBasicTransducer * graph) - { - bool retval = hfst::implementations::HfstBasicTransducer::parse_prolog_arc_line(line, *graph); - return retval; - } - - bool parse_prolog_symbol_line(const std::string & line, hfst::implementations::HfstBasicTransducer * graph) - { - bool retval = hfst::implementations::HfstBasicTransducer::parse_prolog_symbol_line(line, *graph); - return retval; - } - - bool parse_prolog_final_line(const std::string & line, hfst::implementations::HfstBasicTransducer * graph) - { - bool retval = hfst::implementations::HfstBasicTransducer::parse_prolog_final_line(line, *graph); - return retval; - } - -} diff --git a/src/hfst-old-pypi/hfst_regex_extensions.cpp b/src/hfst-old-pypi/hfst_regex_extensions.cpp deleted file mode 100644 index 6951066..0000000 --- a/src/hfst-old-pypi/hfst_regex_extensions.cpp +++ /dev/null @@ -1,34 +0,0 @@ -namespace hfst { - -// *** Wrapper variables for IOString outputs *** // - -std::string hfst_regex_error_message(""); -std::string get_hfst_regex_error_message() { return hfst::hfst_regex_error_message; } - -hfst::HfstTransducer * hfst_regex(hfst::xre::XreCompiler & comp, const std::string & regex_string, const std::string & error_stream) -{ - hfst_regex_error_message=""; - - if (error_stream == "cout") - { - comp.set_error_stream(&std::cout); - return comp.compile(regex_string); - } - else if (error_stream == "cerr") - { - comp.set_error_stream(&std::cerr); - return comp.compile(regex_string); - } - else - { - std::ostringstream os(std::ostringstream::ate); - comp.set_error_stream(&os); - hfst::set_warning_stream(&os); - hfst::HfstTransducer * retval = comp.compile(regex_string); - hfst_regex_error_message = os.str(); - hfst::set_warning_stream(&std::cerr); - return retval; - } -} - -} diff --git a/src/hfst-old-pypi/hfst_rules_extensions.cpp b/src/hfst-old-pypi/hfst_rules_extensions.cpp deleted file mode 100644 index dee3254..0000000 --- a/src/hfst-old-pypi/hfst_rules_extensions.cpp +++ /dev/null @@ -1,174 +0,0 @@ -namespace hfst { -// *** Wrappers for rule functions. *** // - -namespace hfst_rules { - - HfstTransducer two_level_if(const HfstTransducerPair & context, const StringPairSet & mappings, const StringPairSet & alphabet) - { - hfst::HfstTransducerPair context_(context); - StringPairSet mappings_(mappings); - StringPairSet alphabet_(alphabet); - return hfst::rules::two_level_if(context_, mappings_, alphabet_); - } - HfstTransducer two_level_only_if(const HfstTransducerPair &context, const StringPairSet &mappings, const StringPairSet &alphabet) - { - hfst::HfstTransducerPair context_(context); - StringPairSet mappings_(mappings); - StringPairSet alphabet_(alphabet); - return hfst::rules::two_level_only_if(context_, mappings_, alphabet_); - } - HfstTransducer two_level_if_and_only_if(const HfstTransducerPair &context, const StringPairSet &mappings, const StringPairSet &alphabet) - { - hfst::HfstTransducerPair context_(context); - StringPairSet mappings_(mappings); - StringPairSet alphabet_(alphabet); - return hfst::rules::two_level_if_and_only_if(context_, mappings_, alphabet_); - } - HfstTransducer replace_down(const HfstTransducerPair &context, const HfstTransducer &mapping, bool optional, const StringPairSet &alphabet) - { - hfst::HfstTransducerPair context_(context); - hfst::HfstTransducer mapping_(mapping); - StringPairSet alphabet_(alphabet); - return hfst::rules::replace_down(context_, mapping_, optional, alphabet_); - } - HfstTransducer replace_down_karttunen(const HfstTransducerPair &context, const HfstTransducer &mapping, bool optional, const StringPairSet &alphabet) - { - hfst::HfstTransducerPair context_(context); - hfst::HfstTransducer mapping_(mapping); - StringPairSet alphabet_(alphabet); - return hfst::rules::replace_down_karttunen(context_, mapping_, optional, alphabet_); - } - HfstTransducer replace_right(const HfstTransducerPair &context, const HfstTransducer &mapping, bool optional, const StringPairSet &alphabet) - { - hfst::HfstTransducerPair context_(context); - hfst::HfstTransducer mapping_(mapping); - StringPairSet alphabet_(alphabet); - return hfst::rules::replace_right(context_, mapping_, optional, alphabet_); - } - HfstTransducer replace_left(const HfstTransducerPair &context, const HfstTransducer &mapping, bool optional, const StringPairSet &alphabet) - { - hfst::HfstTransducerPair context_(context); - hfst::HfstTransducer mapping_(mapping); - StringPairSet alphabet_(alphabet); - return hfst::rules::replace_left(context_, mapping_, optional, alphabet_); - } - HfstTransducer replace_up(const HfstTransducer &mapping, bool optional, const StringPairSet &alphabet) - { - hfst::HfstTransducer mapping_(mapping); - StringPairSet alphabet_(alphabet); - return hfst::rules::replace_up(mapping_, optional, alphabet_); - } - HfstTransducer replace_down(const HfstTransducer &mapping, bool optional, const StringPairSet &alphabet) - { - hfst::HfstTransducer mapping_(mapping); - StringPairSet alphabet_(alphabet); - return hfst::rules::replace_down(mapping_, optional, alphabet_); - } - HfstTransducer left_replace_up(const HfstTransducer &mapping, bool optional, const StringPairSet &alphabet) - { - hfst::HfstTransducer mapping_(mapping); - StringPairSet alphabet_(alphabet); - return hfst::rules::left_replace_up(mapping_, optional, alphabet_); - } - HfstTransducer left_replace_up(const HfstTransducerPair &context, const HfstTransducer &mapping, bool optional, const StringPairSet &alphabet) - { - hfst::HfstTransducerPair context_(context); - hfst::HfstTransducer mapping_(mapping); - StringPairSet alphabet_(alphabet); - return hfst::rules::left_replace_up(context_, mapping_, optional, alphabet_); - } - HfstTransducer left_replace_down(const HfstTransducerPair &context, const HfstTransducer &mapping, bool optional, const StringPairSet &alphabet) - { - hfst::HfstTransducerPair context_(context); - hfst::HfstTransducer mapping_(mapping); - StringPairSet alphabet_(alphabet); - return hfst::rules::left_replace_down(context_, mapping_, optional, alphabet_); - } - HfstTransducer left_replace_down_karttunen(const HfstTransducerPair &context, const HfstTransducer &mapping, bool optional, const StringPairSet &alphabet) - { - hfst::HfstTransducerPair context_(context); - hfst::HfstTransducer mapping_(mapping); - StringPairSet alphabet_(alphabet); - return hfst::rules::left_replace_down_karttunen(context_, mapping_, optional, alphabet_); - } - HfstTransducer left_replace_left(const HfstTransducerPair &context, const HfstTransducer &mapping, bool optional, const StringPairSet &alphabet) - { - hfst::HfstTransducerPair context_(context); - hfst::HfstTransducer mapping_(mapping); - StringPairSet alphabet_(alphabet); - return hfst::rules::left_replace_left(context_, mapping_, optional, alphabet_); - } - HfstTransducer left_replace_right(const HfstTransducerPair &context, const HfstTransducer &mapping, bool optional, const StringPairSet &alphabet) - { - hfst::HfstTransducerPair context_(context); - hfst::HfstTransducer mapping_(mapping); - StringPairSet alphabet_(alphabet); - return hfst::rules::left_replace_right(context_, mapping_, optional, alphabet_); - } - HfstTransducer restriction(const HfstTransducerPairVector &contexts, const HfstTransducer &mapping, const StringPairSet &alphabet) - { - hfst::HfstTransducerPairVector contexts_(contexts); - hfst::HfstTransducer mapping_(mapping); - StringPairSet alphabet_(alphabet); - return hfst::rules::restriction(contexts_, mapping_, alphabet_); - } - HfstTransducer coercion(const HfstTransducerPairVector &contexts, const HfstTransducer &mapping, const StringPairSet &alphabet) - { - hfst::HfstTransducerPairVector contexts_(contexts); - hfst::HfstTransducer mapping_(mapping); - StringPairSet alphabet_(alphabet); - return hfst::rules::coercion(contexts_, mapping_, alphabet_); - } - HfstTransducer restriction_and_coercion(const HfstTransducerPairVector &contexts, const HfstTransducer &mapping, const StringPairSet &alphabet) - { - hfst::HfstTransducerPairVector contexts_(contexts); - hfst::HfstTransducer mapping_(mapping); - StringPairSet alphabet_(alphabet); - return hfst::rules::restriction_and_coercion(contexts_, mapping_, alphabet_); - } - HfstTransducer surface_restriction(const HfstTransducerPairVector &contexts, const HfstTransducer &mapping, const StringPairSet &alphabet) - { - hfst::HfstTransducerPairVector contexts_(contexts); - hfst::HfstTransducer mapping_(mapping); - StringPairSet alphabet_(alphabet); - return hfst::rules::surface_restriction(contexts_, mapping_, alphabet_); - } - HfstTransducer surface_coercion(const HfstTransducerPairVector &contexts, const HfstTransducer &mapping, const StringPairSet &alphabet) - { - hfst::HfstTransducerPairVector contexts_(contexts); - hfst::HfstTransducer mapping_(mapping); - StringPairSet alphabet_(alphabet); - return hfst::rules::surface_coercion(contexts_, mapping_, alphabet_); - } - HfstTransducer surface_restriction_and_coercion(const HfstTransducerPairVector &contexts, const HfstTransducer &mapping, const StringPairSet &alphabet) - { - hfst::HfstTransducerPairVector contexts_(contexts); - hfst::HfstTransducer mapping_(mapping); - StringPairSet alphabet_(alphabet); - return hfst::rules::surface_restriction_and_coercion(contexts_, mapping_, alphabet_); - } - HfstTransducer deep_restriction(const HfstTransducerPairVector &contexts, const HfstTransducer &mapping, const StringPairSet &alphabet) - { - hfst::HfstTransducerPairVector contexts_(contexts); - hfst::HfstTransducer mapping_(mapping); - StringPairSet alphabet_(alphabet); - return hfst::rules::deep_restriction(contexts_, mapping_, alphabet_); - } - HfstTransducer deep_coercion(const HfstTransducerPairVector &contexts, const HfstTransducer &mapping, const StringPairSet &alphabet) - { - hfst::HfstTransducerPairVector contexts_(contexts); - hfst::HfstTransducer mapping_(mapping); - StringPairSet alphabet_(alphabet); - return hfst::rules::deep_coercion(contexts_, mapping_, alphabet_); - } - HfstTransducer deep_restriction_and_coercion(const HfstTransducerPairVector &contexts, const HfstTransducer &mapping, const StringPairSet &alphabet) - { - hfst::HfstTransducerPairVector contexts_(contexts); - hfst::HfstTransducer mapping_(mapping); - StringPairSet alphabet_(alphabet); - return hfst::rules::deep_restriction_and_coercion(contexts_, mapping_, alphabet_); - } - -} - -} diff --git a/src/hfst-old-pypi/hfst_sfst_extensions.cpp b/src/hfst-old-pypi/hfst_sfst_extensions.cpp deleted file mode 100644 index 947c3e6..0000000 --- a/src/hfst-old-pypi/hfst_sfst_extensions.cpp +++ /dev/null @@ -1,56 +0,0 @@ -namespace hfst { - -// *** Wrapper variables for IOString outputs, TODO *** // - -std::string hfst_sfst_output(""); -std::string get_hfst_sfst_output() { return hfst::hfst_sfst_output; } - -hfst::HfstTransducer * hfst_compile_sfst(const std::string & filename, const std::string & error_stream, bool verbose, bool output_to_console) -{ - (void)error_stream; - (void)output_to_console; - - FILE * inputfile; - if (filename == "") - { - inputfile = stdin; - } - else - { - inputfile = fopen(filename.c_str(), "rb"); - if (inputfile == NULL) - return NULL; - } - - bool unknown_in_use = hfst::get_unknown_symbols_in_use(); - hfst::set_unknown_symbols_in_use(false); - - hfst::SfstCompiler * compiler = new hfst::SfstCompiler(hfst::get_default_fst_type(), verbose); - compiler->set_input(inputfile); - compiler->set_filename(filename); - - try - { - compiler->parse(); - hfst::set_unknown_symbols_in_use(unknown_in_use); - if (filename != "") - { - fclose(inputfile); - } - return compiler->get_result(); - } - catch (HfstException e) - { - hfst::set_unknown_symbols_in_use(unknown_in_use); - printf("\nAn error happened when compiling sfst file \"%s\"\n", filename.c_str()); - return NULL; - } - catch(const char* p) - { - hfst::set_unknown_symbols_in_use(unknown_in_use); - printf("\nAn error happened when compiling sfst file \"%s\"\n", filename.c_str()); - return NULL; - } -} - -} diff --git a/src/hfst-old-pypi/hfst_xfst_extensions.cpp b/src/hfst-old-pypi/hfst_xfst_extensions.cpp deleted file mode 100644 index eb7de47..0000000 --- a/src/hfst-old-pypi/hfst_xfst_extensions.cpp +++ /dev/null @@ -1,68 +0,0 @@ -namespace hfst { - -// *** Wrapper variables for IOString outputs *** // - -std::string hfst_xfst_string_one(""); -char * get_hfst_xfst_string_one() { return strdup(hfst::hfst_xfst_string_one.c_str()); } -std::string hfst_xfst_string_two(""); -char * get_hfst_xfst_string_two() { return strdup(hfst::hfst_xfst_string_two.c_str()); } - -int hfst_compile_xfst_to_string_one(hfst::xfst::XfstCompiler & comp, std::string input) -{ - hfst::hfst_xfst_string_one=""; - hfst::hfst_xfst_string_two=""; - - std::ostringstream os(std::ostringstream::ate); - hfst::set_warning_stream(&os); - comp.set_output_stream(os); - comp.set_error_stream(os); - int retval = comp.parse_line(input); - hfst::hfst_xfst_string_one = os.str(); - hfst::set_warning_stream(&std::cerr); - return retval; -} - -int hfst_compile_xfst(hfst::xfst::XfstCompiler & comp, std::string input, const std::string & output_stream, const std::string & error_stream) -{ - hfst::hfst_xfst_string_one=""; - hfst::hfst_xfst_string_two=""; - std::ostringstream * os1 = NULL; - std::ostringstream * os2 = NULL; - - if (output_stream == "cout") - comp.set_output_stream(std::cout); - else if (output_stream == "cerr") - comp.set_output_stream(std::cerr); - else { - os1 = new std::ostringstream(std::ostringstream::ate); - comp.set_output_stream(*os1); - } - - if (error_stream == "cout") { - comp.set_error_stream(std::cout); - hfst::set_warning_stream(&std::cout); - } - else if (error_stream == "cerr") - comp.set_error_stream(std::cerr); - else { - os2 = new std::ostringstream(std::ostringstream::ate); - comp.set_error_stream(*os2); - hfst::set_warning_stream(os2); - } - - int retval = comp.parse_line(input); - hfst::set_warning_stream(&std::cerr); - - if (output_stream == "") { - hfst::hfst_xfst_string_one = os1->str(); - delete os1; - } - if (error_stream == "") { - hfst::hfst_xfst_string_two = os2->str(); - delete os2; - } - - return retval; -} - -} diff --git a/src/hfst-old-pypi/lib/README.md b/src/hfst-old-pypi/lib/README.md deleted file mode 100644 index 2da8db4..0000000 --- a/src/hfst-old-pypi/lib/README.md +++ /dev/null @@ -1 +0,0 @@ -The `dylib` files for the build will be copied here. diff --git a/src/hfst-old-pypi/libhfst.i b/src/hfst-old-pypi/libhfst.i deleted file mode 100644 index 68923a4..0000000 --- a/src/hfst-old-pypi/libhfst.i +++ /dev/null @@ -1,1875 +0,0 @@ -// Copyright (c) 2016 University of Helsinki -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 3 of the License, or (at your option) any later version. -// See the file COPYING included with this distribution for more -// information. - -// This is a swig interface file that is used to create python bindings for HFST. -// Everything will be visible under module 'libhfst', but will be wrapped under -// package 'hfst' and its subpackages 'hfst.exceptions' and 'hfst.rules' (see -// folder 'hfst' in the current directory). - -%module libhfst -// Needed for type conversions between c++ and python. -%include "std_string.i" -%include "std_vector.i" -%include "std_pair.i" -%include "std_set.i" -%include "std_map.i" -%include "exception.i" - -// We want warnings to be printed to standard error. -%init %{ - hfst::set_warning_stream(&std::cerr); -%} - -// Make swig aware of what hfst offers. -%{ -#define HFSTIMPORT -#include "HfstDataTypes.h" -#include "HfstTransducer.h" -#include "HfstOutputStream.h" -#include "HfstInputStream.h" -#include "HfstExceptionDefs.h" -#include "HfstTokenizer.h" -#include "HfstFlagDiacritics.h" -#include "HfstXeroxRules.h" -#include "parsers/XreCompiler.h" -#include "parsers/LexcCompiler.h" -#include "parsers/XfstCompiler.h" -#include "parsers/SfstCompiler.h" -#include "implementations/HfstBasicTransition.h" -#include "implementations/HfstBasicTransducer.h" -#include "implementations/optimized-lookup/pmatch.h" -#include "implementations/optimized-lookup/pmatch_tokenize.h" -#include "parsers/TwolcCompiler.h" -namespace hfst { typedef std::vector HfstRuleVector; } -namespace hfst { typedef std::pair HfstTransducerUIntPair; } - -// Most of C++ extension code is located in separate files. -#include "hfst_regex_extensions.cpp" -#include "hfst_extensions.cpp" -#include "hfst_lexc_extensions.cpp" -#include "hfst_xfst_extensions.cpp" -#include "hfst_pmatch_extensions.cpp" -#include "hfst_pmatch_tokenize_extensions.cpp" -#include "hfst_sfst_extensions.cpp" -#include "hfst_lookup_extensions.cpp" -#include "hfst_rules_extensions.cpp" -#include "hfst_prolog_extensions.cpp" -%} - -#ifdef _MSC_VER -%include -#endif - -// Templates needed for conversion between c++ and python datatypes. -// -// Note that templating order matters; simple templates used as part of -// more complex templates must be defined first, e.g. StringPair must be -// defined before StringPairSet. Also templates that are not used as such -// but are used as part of other templates must be defined. - -%include "typemaps.i" - -namespace std { -%template(StringVector) vector; -%template(StringPair) pair; -%template(StringPairVector) vector >; -%template(FloatVector) vector; -%template(StringSet) set; -%template(StringPairSet) set >; -%template(HfstTransducerVector) vector; -%template(HfstSymbolSubstitutions) map; -%template(HfstSymbolPairSubstitutions) map, pair >; -// needed for HfstBasicTransducer.states() -%template(BarBazFoo) vector; -%template(HfstBasicTransitions) vector; -%template(HfstOneLevelPath) pair >; -%template(HfstOneLevelPaths) set > >; -%template(HfstTwoLevelPath) pair > >; -%template(HfstTwoLevelPaths) set > > >; -%template(HfstTransducerPair) pair; -%template(HfstTransducerPairVector) vector >; -%template(HfstRuleVector) vector; -%template(HfstTransducerUIntPair) pair; -%template(LocationVector) vector; -%template(LocationVectorVector) vector >; -} - - -%include "docstrings.i" - -// ****************************************************** // -// ********** WHAT IS MADE AVAILABLE ON PYTHON ********** // -// ****************************************************** // - -// *** HfstException and its subclasses (will be wrapped under module hfst.exceptions). *** // - -class HfstException -{ - public: - HfstException(); - HfstException(const std::string&, const std::string&, size_t); - ~HfstException(); - std::string what() const; -}; - -class HfstTransducerTypeMismatchException : public HfstException { public: HfstTransducerTypeMismatchException(const std::string&, const std::string&, size_t); ~HfstTransducerTypeMismatchException(); std::string what() const; }; -class ImplementationTypeNotAvailableException : public HfstException { public: ImplementationTypeNotAvailableException(const std::string&, const std::string&, size_t, hfst::ImplementationType type); ~ImplementationTypeNotAvailableException(); std::string what() const; hfst::ImplementationType get_type() const; }; -class FunctionNotImplementedException : public HfstException { public: FunctionNotImplementedException(const std::string&, const std::string&, size_t); ~FunctionNotImplementedException(); std::string what() const; }; -class StreamNotReadableException : public HfstException { public: StreamNotReadableException(const std::string&, const std::string&, size_t); ~StreamNotReadableException(); std::string what() const; }; -class StreamCannotBeWrittenException : public HfstException { public: StreamCannotBeWrittenException(const std::string&, const std::string&, size_t); ~StreamCannotBeWrittenException(); std::string what() const; }; -class StreamIsClosedException : public HfstException { public: StreamIsClosedException(const std::string&, const std::string&, size_t); ~StreamIsClosedException(); std::string what() const; }; -class EndOfStreamException : public HfstException { public: EndOfStreamException(const std::string&, const std::string&, size_t); ~EndOfStreamException(); std::string what() const; }; -class TransducerIsCyclicException : public HfstException { public: TransducerIsCyclicException(const std::string&, const std::string&, size_t); ~TransducerIsCyclicException(); std::string what() const; }; -class NotTransducerStreamException : public HfstException { public: NotTransducerStreamException(const std::string&, const std::string&, size_t); ~NotTransducerStreamException(); std::string what() const; }; -class NotValidAttFormatException : public HfstException { public: NotValidAttFormatException(const std::string&, const std::string&, size_t); ~NotValidAttFormatException(); std::string what() const; }; -class NotValidPrologFormatException : public HfstException { public: NotValidPrologFormatException(const std::string&, const std::string&, size_t); ~NotValidPrologFormatException(); std::string what() const; }; -class NotValidLexcFormatException : public HfstException { public: NotValidLexcFormatException(const std::string&, const std::string&, size_t); ~NotValidLexcFormatException(); std::string what() const; }; -class StateIsNotFinalException : public HfstException { public: StateIsNotFinalException(const std::string&, const std::string&, size_t); ~StateIsNotFinalException(); std::string what() const; }; -class ContextTransducersAreNotAutomataException : public HfstException { public: ContextTransducersAreNotAutomataException(const std::string&, const std::string&, size_t); ~ContextTransducersAreNotAutomataException(); std::string what() const; }; -class TransducersAreNotAutomataException : public HfstException { public: TransducersAreNotAutomataException(const std::string&, const std::string&, size_t); ~TransducersAreNotAutomataException(); std::string what() const; }; -class StateIndexOutOfBoundsException : public HfstException { public: StateIndexOutOfBoundsException(const std::string&, const std::string&, size_t); ~StateIndexOutOfBoundsException(); std::string what() const; }; -class TransducerHeaderException : public HfstException { public: TransducerHeaderException(const std::string&, const std::string&, size_t); ~TransducerHeaderException(); std::string what() const; }; -class MissingOpenFstInputSymbolTableException : public HfstException { public: MissingOpenFstInputSymbolTableException(const std::string&, const std::string&, size_t); ~MissingOpenFstInputSymbolTableException(); std::string what() const; }; -class TransducerTypeMismatchException : public HfstException { public: TransducerTypeMismatchException(const std::string&, const std::string&, size_t); ~TransducerTypeMismatchException(); std::string what() const; }; -class EmptySetOfContextsException : public HfstException { public: EmptySetOfContextsException(const std::string&, const std::string&, size_t); ~EmptySetOfContextsException(); std::string what() const; }; -class SpecifiedTypeRequiredException : public HfstException { public: SpecifiedTypeRequiredException(const std::string&, const std::string&, size_t); ~SpecifiedTypeRequiredException(); std::string what() const; }; -class HfstFatalException : public HfstException { public: HfstFatalException(const std::string&, const std::string&, size_t); ~HfstFatalException(); std::string what() const; }; -class TransducerHasWrongTypeException : public HfstException { public: TransducerHasWrongTypeException(const std::string&, const std::string&, size_t); ~TransducerHasWrongTypeException(); std::string what() const; }; -class IncorrectUtf8CodingException : public HfstException { public: IncorrectUtf8CodingException(const std::string&, const std::string&, size_t); ~IncorrectUtf8CodingException(); std::string what() const; }; -class EmptyStringException : public HfstException { public: EmptyStringException(const std::string&, const std::string&, size_t); ~EmptyStringException(); std::string what() const; }; -class SymbolNotFoundException : public HfstException { public: SymbolNotFoundException(const std::string&, const std::string&, size_t); ~SymbolNotFoundException(); std::string what() const; }; -class MetadataException : public HfstException { public: MetadataException(const std::string&, const std::string&, size_t); ~MetadataException(); std::string what() const; }; -class FlagDiacriticsAreNotIdentitiesException : public HfstException { public: FlagDiacriticsAreNotIdentitiesException(const std::string&, const std::string&, size_t); ~FlagDiacriticsAreNotIdentitiesException(); std::string what() const; }; - - -namespace hfst_ol -{ - - struct Location - { - unsigned int start; - unsigned int length; - std::string input; - std::string output; - std::string tag; - float weight; - std::vector input_parts; // indices in input_symbol_strings - std::vector output_parts; // indices in output_symbol_strings - std::vector input_symbol_strings; - std::vector output_symbol_strings; - - //bool operator<(Location rhs) const - //{ return this->weight < rhs.weight; } - }; - - typedef std::vector LocationVector; - typedef std::vector > LocationVectorVector; - -} - -namespace hfst -{ - -// Needed for conversion between c++ and python datatypes. - -typedef std::vector StringVector; -typedef std::pair StringPair; -typedef std::vector > StringPairVector; -typedef std::vector FloatVector; -typedef std::set StringSet; -typedef std::set > StringPairSet; -typedef std::pair > HfstOneLevelPath; -typedef std::set > > HfstOneLevelPaths; -typedef std::pair > > HfstTwoLevelPath; -typedef std::set > > > HfstTwoLevelPaths; -typedef std::map HfstSymbolSubstitutions; -typedef std::map, std::pair > HfstSymbolPairSubstitutions; -typedef std::vector HfstTransducerVector; -typedef std::pair HfstTransducerPair; -typedef std::vector > HfstTransducerPairVector; -typedef std::vector HfstRuleVector; -typedef std::pair HfstTransducerUIntPair; - -// *** Some enumerations *** // - -enum ImplementationType -{ SFST_TYPE, TROPICAL_OPENFST_TYPE, LOG_OPENFST_TYPE, FOMA_TYPE, - XFSM_TYPE, HFST_OL_TYPE, HFST_OLW_TYPE, HFST2_TYPE, - UNSPECIFIED_TYPE, ERROR_TYPE }; - - namespace xeroxRules - { - enum ReplaceType {REPL_UP, REPL_DOWN, REPL_RIGHT, REPL_LEFT}; - - class Rule - { - public: - Rule(); - Rule(const hfst::HfstTransducerPairVector&); - Rule(const hfst::HfstTransducerPairVector&, const hfst::HfstTransducerPairVector&, ReplaceType); - Rule(const Rule&); - hfst::HfstTransducerPairVector get_mapping() const; - hfst::HfstTransducerPairVector get_context() const; - ReplaceType get_replType() const; - void encodeFlags(); - // friend std::ostream& operator<<(std::ostream &out, const Rule &r); - }; - - // replace up, left, right, down - hfst::HfstTransducer replace(const Rule &rule, bool optional); - // for parallel rules - hfst::HfstTransducer replace(const HfstRuleVector &ruleVector, bool optional); - // replace up, left, right, down -%rename("xerox_replace_left") replace_left(const Rule &rule, bool optional); - hfst::HfstTransducer replace_left(const Rule &rule, bool optional); - // for parallel rules -%rename("xerox_replace_left") replace_left(const HfstRuleVector &ruleVector, bool optional); - hfst::HfstTransducer replace_left(const HfstRuleVector &ruleVector, bool optional); - // left to right - hfst::HfstTransducer replace_leftmost_longest_match(const Rule &rule); - // left to right - hfst::HfstTransducer replace_leftmost_longest_match(const HfstRuleVector &ruleVector); - // right to left - hfst::HfstTransducer replace_rightmost_longest_match(const Rule &rule); - - // right to left - hfst::HfstTransducer replace_rightmost_longest_match(const HfstRuleVector &ruleVector); - - hfst::HfstTransducer replace_leftmost_shortest_match(const Rule &rule); - - hfst::HfstTransducer replace_leftmost_shortest_match(const HfstRuleVector &ruleVector); - hfst::HfstTransducer replace_rightmost_shortest_match(const Rule &rule); - hfst::HfstTransducer replace_rightmost_shortest_match(const HfstRuleVector &ruleVector); - - // replace up, left, right, down - hfst::HfstTransducer replace_epenthesis(const Rule &rule, bool optional); - // replace up, left, right, down - hfst::HfstTransducer replace_epenthesis(const HfstRuleVector &ruleVector, bool optional); - - // Restriction function "=>" -%rename("xerox_restriction") restriction(const hfst::HfstTransducer &automata, const hfst::HfstTransducerPairVector &context); - hfst::HfstTransducer restriction(const hfst::HfstTransducer &automata, const hfst::HfstTransducerPairVector &context); - hfst::HfstTransducer before(const hfst::HfstTransducer &left, const hfst::HfstTransducer &right); - hfst::HfstTransducer after(const hfst::HfstTransducer &left, const hfst::HfstTransducer &right); - - } - -// *** Some other functions *** // - -bool is_diacritic(const std::string & symbol); -hfst::HfstTransducerVector compile_pmatch_expression(const std::string & pmatch) throw(HfstException); - -// internal functions -%pythoncode %{ - def _is_string(s): - if isinstance(s, str): - return True - else: - return False - def _is_string_pair(sp): - if not isinstance(sp, tuple): - return False - if len(sp) != 2: - return False - if not _is_string(sp[0]): - return False - if not _is_string(sp[1]): - return False - return True - def _is_string_vector(sv): - if not isinstance(sv, tuple): - return False - for s in sv: - if not _is_string(s): - return False - return True - def _is_string_pair_vector(spv): - if not isinstance(spv, tuple): - return False - for sp in spv: - if not _is_string_pair(sp): - return False - return True - - def _two_level_paths_to_dict(tlps): - retval = {} - for tlp in tlps: - input = "" - output = "" - for sp in tlp[1]: - input += sp[0] - output += sp[1] - if input in retval: - retval[input].append((output, tlp[0])) - else: - retval[input] = [(output, tlp[0])] - return retval - - def _one_level_paths_to_tuple(olps): - retval = [] - for olp in olps: - path = "" - for s in olp[1]: - path += s - retval.append((path, olp[0])) - return tuple(retval) -%} - -// *** HfstTransducer *** // - -// NOTE: all functions returning an HfstTransducer& are commented out and extended -// by replacing them with equivalent functions that return void. This is done in -// order to avoid use of references that are not handled well by swig/python. -// Some constructors and the destructor are also redefined. - -class HfstTransducer -{ -public: - void set_name(const std::string &name); - std::string get_name() const; - hfst::ImplementationType get_type() const; - void set_property(const std::string& property, const std::string& value); - std::string get_property(const std::string& property) const; - const std::map& get_properties() const; - bool compare(const HfstTransducer&, bool harmonize=true) const throw(TransducerTypeMismatchException); - unsigned int number_of_states() const; - unsigned int number_of_arcs() const; - StringSet get_alphabet() const; - bool is_cyclic() const; - bool is_automaton() const; - bool is_infinitely_ambiguous() const; - bool is_lookup_infinitely_ambiguous(const std::string &) const; - bool has_flag_diacritics() const; - void insert_to_alphabet(const std::string &); - void remove_from_alphabet(const std::string &); - static bool is_implementation_type_available(hfst::ImplementationType type); - int longest_path_size(bool obey_flags=true) const; - -%extend { - - // First versions of all functions returning an HfstTransducer& that return void instead: - - void concatenate(const HfstTransducer& tr, bool harmonize=true) throw(TransducerTypeMismatchException) { self->concatenate(tr, harmonize); } - void disjunct(const HfstTransducer& tr, bool harmonize=true) throw(TransducerTypeMismatchException) { self->disjunct(tr, harmonize); } - void subtract(const HfstTransducer& tr, bool harmonize=true) throw(TransducerTypeMismatchException) { self->subtract(tr, harmonize); } - void intersect(const HfstTransducer& tr, bool harmonize=true) throw(TransducerTypeMismatchException) { self->intersect(tr, harmonize); } - void compose(const HfstTransducer& tr, bool harmonize=true) throw(TransducerTypeMismatchException) { self->compose(tr, harmonize); } - void compose_intersect(const HfstTransducerVector &v, bool invert=false, bool harmonize=true) { self->compose_intersect(v, invert, harmonize); } - void priority_union(const HfstTransducer &another) { self->priority_union(another); } - void lenient_composition(const HfstTransducer &another, bool harmonize=true) { self->lenient_composition(another, harmonize); } - void cross_product(const HfstTransducer &another, bool harmonize=true) throw(TransducersAreNotAutomataException) { self->cross_product(another, harmonize); } - void shuffle(const HfstTransducer &another, bool harmonize=true) { self->shuffle(another, harmonize); } - void remove_epsilons() { self->remove_epsilons(); } - void determinize() { self->determinize(); } - void minimize() { self->minimize(); } - void prune() { self->prune(); } - void eliminate_flags() { self->eliminate_flags(); } - void eliminate_flag(const std::string& f) throw(HfstException) { self->eliminate_flag(f); } - void n_best(unsigned int n) { self->n_best(n); } - void convert(ImplementationType impl) { self->convert(impl); } - void repeat_star() { self->repeat_star(); } - void repeat_plus() { self->repeat_plus(); } - void repeat_n(unsigned int n) { self->repeat_n(n); } - void repeat_n_to_k(unsigned int n, unsigned int k) { self->repeat_n_to_k(n, k); } - void repeat_n_minus(unsigned int n) { self->repeat_n_minus(n); } - void repeat_n_plus(unsigned int n) { self->repeat_n_plus(n); } - void invert() { self->invert(); } - void reverse() { self->reverse(); } - void input_project() { self->input_project(); } - void output_project() { self->output_project(); } - void optionalize() { self->optionalize(); } - void insert_freely(const StringPair &symbol_pair, bool harmonize=true) { self->insert_freely(symbol_pair, harmonize); } - void insert_freely(const HfstTransducer &tr, bool harmonize=true) { self->insert_freely(tr, harmonize); } - void _substitute_symbol(const std::string &old_symbol, const std::string &new_symbol, bool input_side=true, bool output_side=true) { self->substitute_symbol(old_symbol, new_symbol, input_side, output_side); } - void _substitute_symbol_pair(const StringPair &old_symbol_pair, const StringPair &new_symbol_pair) { self->substitute_symbol_pair(old_symbol_pair, new_symbol_pair); } - void _substitute_symbol_pair_with_set(const StringPair &old_symbol_pair, const hfst::StringPairSet &new_symbol_pair_set) { self->substitute_symbol_pair_with_set(old_symbol_pair, new_symbol_pair_set); } - void _substitute_symbol_pair_with_transducer(const StringPair &symbol_pair, HfstTransducer &transducer, bool harmonize=true) { self->substitute_symbol_pair_with_transducer(symbol_pair, transducer, harmonize); } - void _substitute_symbols(const hfst::HfstSymbolSubstitutions &substitutions) { self->substitute_symbols(substitutions); } // alias for the previous function which is shadowed - void _substitute_symbol_pairs(const hfst::HfstSymbolPairSubstitutions &substitutions) { self->substitute_symbol_pairs(substitutions); } // alias for the previous function which is shadowed - void set_final_weights(float weight, bool increment=false) { self->set_final_weights(weight, increment); }; - - void push_weights_to_start() { self->push_weights(hfst::TO_INITIAL_STATE); }; - void push_weights_to_end() { self->push_weights(hfst::TO_FINAL_STATE); }; - - // And some aliases: - // 'union' is a reserved word in python, so it cannot be used as an alias for function 'disjunct' - void minus(const HfstTransducer& t, bool harmonize=true) { $self->subtract(t, harmonize); } - void conjunct(const HfstTransducer& t, bool harmonize=true) { $self->intersect(t, harmonize); } - - // Then the actual extensions: - - void lookup_optimize() { self->convert(hfst::HFST_OLW_TYPE); } - void remove_optimization() { self->convert(hfst::get_default_fst_type()); } - - HfstTransducer() { return hfst::empty_transducer(); } - HfstTransducer(const hfst::HfstTransducer & t) { return hfst::copy_hfst_transducer(t); } - HfstTransducer(const hfst::implementations::HfstBasicTransducer & t) { return hfst::copy_hfst_transducer_from_basic_transducer(t); } - HfstTransducer(const hfst::implementations::HfstBasicTransducer & t, hfst::ImplementationType impl) { return hfst::copy_hfst_transducer_from_basic_transducer(t, impl); } - ~HfstTransducer() - { - if ($self->get_type() == hfst::UNSPECIFIED_TYPE || $self->get_type() == hfst::ERROR_TYPE) - { - return; - } - delete $self; - } - // For python's 'print' - char *__str__() { - std::ostringstream oss; - hfst::implementations::HfstBasicTransducer fsm(*$self); - fsm.write_in_att_format(oss,true); - return strdup(oss.str().c_str()); - } - void write(hfst::HfstOutputStream & os) { (void) os.redirect(*$self); } - - hfst::HfstTwoLevelPaths _extract_shortest_paths() - { - hfst::HfstTwoLevelPaths results; - $self->extract_shortest_paths(results); - return results; - } - hfst::HfstTwoLevelPaths _extract_longest_paths(bool obey_flags) - { - hfst::HfstTwoLevelPaths results; - $self->extract_longest_paths(results, obey_flags); - return results; - } - hfst::HfstTwoLevelPaths _extract_paths(int max_num=-1, int cycles=-1) const throw(TransducerIsCyclicException) - { - hfst::HfstTwoLevelPaths results; - $self->extract_paths(results, max_num, cycles); - return results; - } - hfst::HfstTwoLevelPaths _extract_paths_fd(int max_num=-1, int cycles=-1, bool filter_fd=true) const throw(TransducerIsCyclicException) - { - hfst::HfstTwoLevelPaths results; - $self->extract_paths_fd(results, max_num, cycles, filter_fd); - return results; - } - hfst::HfstTwoLevelPaths _extract_random_paths(int max_num) const - { - hfst::HfstTwoLevelPaths results; - $self->extract_random_paths(results, max_num); - return results; - } - hfst::HfstTwoLevelPaths _extract_random_paths_fd(int max_num, bool filter_fd) const - { - hfst::HfstTwoLevelPaths results; - $self->extract_random_paths_fd(results, max_num, filter_fd); - return results; - } - - HfstOneLevelPaths _lookup_vector(const StringVector& s, int limit = -1, double time_cutoff = 0.0) const throw(TransducerIsCyclicException, FunctionNotImplementedException) - { - return hfst::lookup_vector($self, false /*fd*/, s, limit, time_cutoff); - } - HfstOneLevelPaths _lookup_fd_vector(const StringVector& s, int limit = -1, double time_cutoff = 0.0) const throw(TransducerIsCyclicException, FunctionNotImplementedException) - { - return hfst::lookup_vector($self, true /*fd*/, s, limit, time_cutoff); - } - HfstOneLevelPaths _lookup_fd_string(const std::string& s, int limit = -1, double time_cutoff = 0.0) const throw(TransducerIsCyclicException, FunctionNotImplementedException) - { - return hfst::lookup_string($self, true /*fd*/, s, limit, time_cutoff); - } - HfstOneLevelPaths _lookup_string(const std::string & s, int limit = -1, double time_cutoff = 0.0) const throw(TransducerIsCyclicException, FunctionNotImplementedException) - { - return hfst::lookup_string($self, false /*fd*/, s, limit, time_cutoff); - } - -%pythoncode %{ - - def copy(self): - """ - Return a deep copy of the transducer. - """ - return HfstTransducer(self) - - def write_to_file(self, filename_): - """ - Write the transducer in binary format to file *filename_*. - """ - ostr = HfstOutputStream(filename=filename_, type=self.get_type(), hfst_format=True) - ostr.write(self) - ostr.close() - - def read_from_file(filename_): - """ - Read a binary transducer from file *filename_*. - """ - istr = HfstInputStream(filename_) - tr = istr.read() - istr.close() - return tr - - def write_prolog(self, f, write_weights=True): - """ - Write the transducer in prolog format with name *name* to file *f*, - *write_weights* defined whether weights are written. - - Parameters - ---------- - * `f` : - A python file where the transducer is written. - * `write_weights` : - Whether weights are written. - """ - fsm = HfstBasicTransducer(self) - fsm.name = self.get_name() - prologstr = fsm.get_prolog_string(write_weights) - f.write(prologstr) - - def write_xfst(self, f, write_weights=True): - """ - Write the transducer in xfst format to file *f*, *write_weights* defined whether - weights are written. - - Parameters - ---------- - * `f` : - A python file where transducer is written. - * `write_weights` : - Whether weights are written. - """ - fsm = HfstBasicTransducer(self) - fsm.name = self.get_name() - xfststr = fsm.get_xfst_string(write_weights) - f.write(xfst) - - def write_att(self, f, write_weights=True): - """ - Write the transducer in AT&T format to file *f*, *write_weights* defined whether - weights are written. - - Parameters - ---------- - * `f` : - A python file where transducer is written. - * `write_weights` : - Whether weights are written. - """ - fsm = HfstBasicTransducer(self) - fsm.name = self.get_name() - attstr = fsm.get_att_string(write_weights) - f.write(attstr) - - def lookup(self, input, **kwargs): - """ - Lookup string *input*. - - Parameters - ---------- - * `input` : - The input. A string or a pre-tokenized tuple of symbols (i.e. a tuple of strings). - * `kwargs` : - Possible parameters and their default values are: obey_flags=True, - max_number=-1, time_cutoff=0.0, output='tuple' - * `obey_flags` : - Whether flag diacritics are obeyed. Always True for HFST_OL(W)_TYPE transducers. - * `max_number` : - Maximum number of results returned, defaults to -1, i.e. infinity. - * `time_cutoff` : - How long the function can search for results before returning, expressed in - seconds. Defaults to 0.0, i.e. infinitely. Always 0.0 for transducers that are - not of HFST_OL(W)_TYPE. - * `output` : - Possible values are 'tuple', 'text' and 'raw', 'tuple' being the default. - - Note: This function has an efficient implementation only for optimized lookup format - (hfst.ImplementationType.HFST_OL_TYPE or hfst.ImplementationType.HFST_OLW_TYPE). Other formats perform the - lookup via composition. Consider converting the transducer to optimized lookup format - or to a HfstBasicTransducer. Conversion to HFST_OL(W)_TYPE might take a while but the - lookup is fast. Conversion to HfstBasicTransducer is quick but lookup is slower. - """ - obey_flags=True - max_number=-1 - time_cutoff=0.0 - output='tuple' # 'tuple' (default), 'text', 'raw' - - for k,v in kwargs.items(): - if k == 'obey_flags': - if v == True: - pass - elif v == False: - obey_flags=False - else: - print('Warning: ignoring argument %s as it has value %s.' % (k, v)) - print("Possible values are True and False.") - elif k == 'output': - if v == 'text': - output='text' - elif v == 'raw': - output='raw' - elif v == 'tuple': - output='tuple' - else: - print('Warning: ignoring argument %s as it has value %s.' % (k, v)) - print("Possible values are 'tuple' (default), 'text', 'raw'.") - elif k == 'max_number' : - max_number=v - elif k == 'time_cutoff' : - time_cutoff=v - else: - print('Warning: ignoring unknown argument %s.' % (k)) - - retval=0 - - if isinstance(input, tuple): - if obey_flags: - retval=self._lookup_fd_vector(input, max_number, time_cutoff) - else: - retval=self._lookup_vector(input, max_number, time_cutoff) - elif isinstance(input, str): - if obey_flags: - retval=self._lookup_fd_string(input, max_number, time_cutoff) - else: - retval=self._lookup_string(input, max_number, time_cutoff) - else: - try: - if obey_flags: - retval=self._lookup_fd_string(str(input), max_number, time_cutoff) - else: - retval=self._lookup_string(str(input), max_number, time_cutoff) - except: - raise RuntimeError('Input argument must be string or tuple.') - - if output == 'text': - return one_level_paths_to_string(retval) - elif output == 'tuple': - return _one_level_paths_to_tuple(retval) - else: - return retval - - def extract_longest_paths(self, **kwargs): - """ - Extract longest paths of the transducer. - - Parameters - ---------- - * `kwargs` : - Possible parameters and their default values are: obey_flags=True, - output='dict' - * `obey_flags` : - Whether flag diacritics are obeyed. The default is True. - * `output` : - Possible values are 'dict', 'text' and 'raw', 'dict' being the default. - - """ - obey_flags=True - output='dict' # 'dict' (default), 'text', 'raw' - - for k,v in kwargs.items(): - if k == 'obey_flags': - if v == True: - pass - elif v == False: - obey_flags=False - else: - print('Warning: ignoring argument %s as it has value %s.' % (k, v)) - print("Possible values are True and False.") - elif k == 'output': - if v == 'text': - output == 'text' - elif v == 'raw': - output='raw' - elif v == 'dict': - output='dict' - else: - print('Warning: ignoring argument %s as it has value %s.' % (k, v)) - print("Possible values are 'dict' (default), 'text', 'raw'.") - else: - print('Warning: ignoring unknown argument %s.' % (k)) - - retval = self._extract_longest_paths(obey_flags) - - if output == 'text': - return two_level_paths_to_string(retval) - elif output == 'dict': - return _two_level_paths_to_dict(retval) - else: - return retval - - def extract_shortest_paths(self, **kwargs): - """ - Extract shortest paths of the transducer. - - Parameters - ---------- - * `kwargs` : - Possible parameters and their default values are: obey_flags=True. - * `output` : - Possible values are 'dict', 'text' and 'raw', 'dict' being the default. - - """ - output='dict' # 'dict' (default), 'text', 'raw' - - for k,v in kwargs.items(): - if k == 'output': - if v == 'text': - output == 'text' - elif v == 'raw': - output='raw' - elif v == 'dict': - output='dict' - else: - print('Warning: ignoring argument %s as it has value %s.' % (k, v)) - print("Possible values are 'dict' (default), 'text', 'raw'.") - else: - print('Warning: ignoring unknown argument %s.' % (k)) - - retval = self._extract_shortest_paths() - - if output == 'text': - return two_level_paths_to_string(retval) - elif output == 'dict': - return _two_level_paths_to_dict(retval) - else: - return retval - - def extract_paths(self, **kwargs): - """ - - Extract paths that are recognized by the transducer. - - Parameters - ---------- - * `kwargs` : - Arguments recognized are filter_flags, max_cycles, max_number, obey_flags, - output, random. - * `filter_flags` : - Whether flags diacritics are filtered out from the result (default True). - * `max_cycles` : - Indicates how many times a cycle will be followed, with negative numbers - indicating unlimited (default -1 i.e. unlimited). - * `max_number` : - The total number of resulting strings is capped at this value, with 0 or - negative indicating unlimited (default -1 i.e. unlimited). - * `obey_flags` : - Whether flag diacritics are validated (default True). - * `output` : - Output format. Values recognized: 'text' (as a string, separated by - newlines), 'raw' (a dictionary that maps each input string into a list of - tuples of an output string and a weight), 'dict' (a dictionary that maps - each input string into a tuple of tuples of an output string and a weight, - the default). - * `random` : - Whether result strings are fetched randomly (default False). - - Returns - ------- - The extracted strings. *output* controls how they are represented. - - pre: The transducer must be acyclic, if both *max_number* and *max_cycles* have - unlimited values. Else a hfst.exceptions.TransducerIsCyclicException will be - thrown. - - An example: - - >>> tr = hfst.regex('a:b+ (a:c+)') - >>> print(tr) - 0 1 a b 0.000000 - 1 1 a b 0.000000 - 1 2 a c 0.000000 - 1 0.000000 - 2 2 a c 0.000000 - 2 0.000000 - - >>> print(tr.extract_paths(max_cycles=1, output='text')) - a:b 0 - aa:bb 0 - aaa:bbc 0 - aaaa:bbcc 0 - aa:bc 0 - aaa:bcc 0 - - >>> print(tr.extract_paths(max_number=4, output='text')) - a:b 0 - aa:bc 0 - aaa:bcc 0 - aaaa:bccc 0 - - >>> print(tr.extract_paths(max_cycles=1, max_number=4, output='text')) - a:b 0 - aa:bb 0 - aa:bc 0 - aaa:bcc 0 - - Exceptions - ---------- - * `TransducerIsCyclicException` : - - See also: hfst.HfstTransducer.n_best - """ - obey_flags=True - filter_flags=True - max_cycles=-1 - max_number=-1 - random=False - output='dict' # 'dict' (default), 'text', 'raw' - - for k,v in kwargs.items(): - if k == 'obey_flags' : - if v == True: - pass - elif v == False: - obey_flags=False - else: - print('Warning: ignoring argument %s as it has value %s.' % (k, v)) - print("Possible values are True and False.") - elif k == 'filter_flags' : - if v == True: - pass - elif v == False: - filter_flags=False - else: - print('Warning: ignoring argument %s as it has value %s.' % (k, v)) - print("Possible values are True and False.") - elif k == 'max_cycles' : - max_cycles=v - elif k == 'max_number' : - max_number=v - elif k == 'random' : - if v == False: - pass - elif v == True: - random=True - else: - print('Warning: ignoring argument %s as it has value %s.' % (k, v)) - print("Possible values are True and False.") - elif k == 'output': - if v == 'text': - output = 'text' - elif v == 'raw': - output='raw' - elif v == 'dict': - output='dict' - else: - print('Warning: ignoring argument %s as it has value %s.' % (k, v)) - print("Possible values are 'dict' (default), 'text', 'raw'.") - else: - print('Warning: ignoring unknown argument %s.' % (k)) - - retval=0 - - if obey_flags : - if random : - retval=self._extract_random_paths_fd(max_number, filter_flags) - else : - retval=self._extract_paths_fd(max_number, max_cycles) - else : - if random : - retval=self._extract_random_paths(max_number) - else : - retval=self._extract_paths(max_number, max_cycles) - - if output == 'text': - return two_level_paths_to_string(retval) - elif output == 'dict': - return _two_level_paths_to_dict(retval) - else: - return retval - - def substitute(self, s, S=None, **kwargs): - """ - Substitute symbols or transitions in the transducer. - - Parameters - ---------- - * `s` : - The symbol or transition to be substituted. Can also be a dictionary of - substitutions, if S == None. - * `S` : - The symbol, transition, a tuple of transitions or a transducer - (hfst.HfstTransducer) that substitutes *s*. - * `kwargs` : - Arguments recognized are 'input' and 'output', their values can be False or - True, True being the default. These arguments are valid only if *s* and *S* - are strings, else they are ignored. - * `input` : - Whether substitution is performed on input side, defaults to True. Valid - only if *s* and *S* are strings. - * `output` : - Whether substitution is performed on output side, defaults to True. Valid - only if *s* and \\ S are strings. - - For more information, see hfst.HfstBasicTransducer.substitute. The function - works similarly, with the exception of argument *S*, which must be - hfst.HfstTransducer instead of hfst.HfstBasicTransducer. - - See also: hfst.HfstBasicTransducer.substitute - """ - if S == None: - if not isinstance(s, dict): - raise RuntimeError('Sole input argument must be a dictionary.') - - subst_type="" - - for k, v in s.items(): - if _is_string(k): - if not subst_type: - subst_type="string" - elif subst_type == "string pair": - raise RuntimeError('') - if not _is_string(v): - raise RuntimeError('') - elif _is_string_pair(k): - if not subst_type: - subst_type="string pair" - elif subst_type == "string": - raise RuntimeError('') - if not _is_string_pair(v): - raise RuntimeError('') - else: - raise RuntimeError('') - - if subst_type == "string": - return self._substitute_symbols(s) - else: - return self._substitute_symbol_pairs(s) - - if _is_string(s): - if _is_string(S): - input=True - output=True - for k,v in kwargs.items(): - if k == 'input': - if v == False: - input=False - elif k == 'output': - if v == False: - output=False - else: - raise RuntimeError('Free argument not recognized.') - return self._substitute_symbol(s, S, input, output) - else: - raise RuntimeError('...') - elif _is_string_pair(s): - if _is_string_pair(S): - return self._substitute_symbol_pair(s, S) - elif _is_string_pair_vector(S): - return self._substitute_symbol_pair_with_set(s, S) - elif isinstance(S, HfstTransducer): - return self._substitute_symbol_pair_with_transducer(s, S, True) - else: - raise RuntimeError('...') - else: - raise RuntimeError('...') -%} - -}; - -}; // class HfstTransducer - - -// *** HfstOutputStream *** // - -hfst::HfstOutputStream * create_hfst_output_stream(const std::string & filename, hfst::ImplementationType type, bool hfst_format); - -class HfstOutputStream -{ -public: -~HfstOutputStream(void); -HfstOutputStream &flush(); -void close(void); -hfst::HfstOutputStream & redirect(hfst::HfstTransducer &) throw(StreamIsClosedException); - -%extend { - -HfstOutputStream() { return new hfst::HfstOutputStream(hfst::get_default_fst_type()); } - -%pythoncode %{ - -def write(self, tr): - """ - Write one or more transducers to stream. - - Parameters - ---------- - * `tr` : - An HfstTransducer or an iterable object of several HfstTransducers. - """ - if isinstance(tr, HfstTransducer): - self.redirect(tr) - else: - for t in tr: - if isinstance(t, HfstTransducer): - self.redirect(t) - else: - raise RuntimeError('Cannot write objects that are not instances of HfstTransducer') - -def __init__(self, **kwargs): - """ - Open a stream for writing binary transducers. Note: hfst.HfstTransducer.write_to_file - is probably the easiest way to write a single binary transducer to a file. - - Parameters - ---------- - * `kwargs` : - Arguments recognized are filename, hfst_format, type. - * `filename` : - The name of the file where transducers are written. If the file exists, it - is overwritten. If *filename* is not given, transducers are written to - standard output. - * `hfst_format` : - Whether transducers are written in hfst format (default is True) or as such - in their backend format. - * `type` : - The type of the transducers that will be written to the stream. Default is - hfst.get_default_fst_type(). - - Examples: - - # a stream for writing default type transducers in hfst format to standard output - ostr = hfst.HfstOutputStream() - transducer = hfst.regex('foo:bar::0.5') - ostr.write(transducer) - ostr.flush() - - # a stream for writing native sfst type transducers to a file - ostr = hfst.HfstOutputStream(filename='transducer.sfst', hfst_format=False, type=hfst.ImplementationType.SFST_TYPE) - transducer1 = hfst.regex('foo:bar') - transducer1.convert(hfst.ImplementationType.SFST_TYPE) # if not set as the default type - transducer2 = hfst.regex('bar:baz') - transducer2.convert(hfst.ImplementationType.SFST_TYPE) # if not set as the default type - ostr.write(transducer1) - ostr.write(transducer2) - ostr.flush() - ostr.close() - """ - filename = "" - hfst_format = True - type = _libhfst.get_default_fst_type() - for k,v in kwargs.items(): - if k == 'filename': - filename = v - if k == 'hfst_format': - hfst_format = v - if k == 'type': - type = v - if not filename: - self.this = _libhfst.create_hfst_output_stream("", type, hfst_format) - else: - self.this = _libhfst.create_hfst_output_stream(filename, type, hfst_format) -%} - -} - -}; // class HfstOutputStream - -// *** HfstInputStream *** // - -class HfstInputStream -{ -public: - HfstInputStream(void) throw(StreamNotReadableException, NotTransducerStreamException, EndOfStreamException, TransducerHeaderException); - HfstInputStream(const std::string &filename) throw(StreamNotReadableException, NotTransducerStreamException, EndOfStreamException, TransducerHeaderException); - ~HfstInputStream(void); - void close(void); - bool is_eof(void); - bool is_bad(void); - bool is_good(void); - ImplementationType get_type(void) const throw(TransducerTypeMismatchException); - -%extend { - -hfst::HfstTransducer * read() throw (EndOfStreamException) { return new hfst::HfstTransducer(*($self)); } - -%pythoncode %{ - -def read_all(self): - """ - Read all transducers from stream and return them in a list. - """ - retval = [] - while(not self.is_eof()): - retval.append(self.read()) - return retval - -def __iter__(self): - """ - Return *self*. Needed for 'for ... in' statement. - """ - return self - -def next(self): - """ - Read next transducer from stream and return it. Needed for 'for ... in' statement. - """ - if self.is_eof(): - raise StopIteration - else: - return self.read(); - -def __next__(self): - """ - Read next transducer from stream and return it. Needed for 'for ... in' statement. - """ - return self.next() - -%} - -} - -}; // class HfstInputStream - - -// *** HfstTokenizer *** // - - class HfstTokenizer - { - public: - HfstTokenizer(); - void add_skip_symbol(const std::string &symbol); - void add_multichar_symbol(const std::string& symbol); - StringPairVector tokenize(const std::string &input_string) const; - StringVector tokenize_one_level(const std::string &input_string) const; - static StringPairVector tokenize_space_separated(const std::string & str); - StringPairVector tokenize(const std::string &input_string, - const std::string &output_string) const; - static void check_utf8_correctness(const std::string &input_string); - }; - -namespace implementations { - - class HfstBasicTransducer; - class HfstBasicTransition; - typedef unsigned int HfstState; - - typedef std::vector HfstBasicTransitions; - - -// *** HfstBasicTransducer *** // - -class HfstBasicTransducer { - - public: - - HfstBasicTransducer(void); - HfstBasicTransducer(const HfstBasicTransducer &graph); - HfstBasicTransducer(const hfst::HfstTransducer &transducer); - - std::string name; - void add_symbol_to_alphabet(const std::string &symbol); - void remove_symbol_from_alphabet(const std::string &symbol); - void remove_symbols_from_alphabet(const StringSet &symbols); - void add_symbols_to_alphabet(const StringSet &symbols); - // shadowed by the previous function: void add_symbols_to_alphabet(const StringPairSet &symbols); - std::set symbols_used(); - void prune_alphabet(bool force=true); - const std::set &get_alphabet() const; - StringSet get_input_symbols() const; - StringSet get_output_symbols() const; - StringPairSet get_transition_pairs() const; - HfstState add_state(void); - HfstState add_state(HfstState s); - HfstState get_max_state() const; - std::vector states() const; - void add_transition(HfstState s, const hfst::implementations::HfstBasicTransition & transition, bool add_symbols_to_alphabet=true); - void remove_transition(HfstState s, const hfst::implementations::HfstBasicTransition & transition, bool remove_symbols_from_alphabet=false); - bool is_final_state(HfstState s) const; - float get_final_weight(HfstState s) const throw(StateIsNotFinalException, StateIndexOutOfBoundsException); - void set_final_weight(HfstState s, const float & weight); - void remove_final_weight(HfstState s); -%rename("_transitions") transitions(HfstState s); - hfst::implementations::HfstBasicTransitions & transitions(HfstState s); - bool is_infinitely_ambiguous(); - bool is_lookup_infinitely_ambiguous(const StringVector & s); - int longest_path_size(); - -%extend { - - void _substitute_symbol(const std::string &old_symbol, const std::string &new_symbol, bool input_side=true, bool output_side=true) { self->substitute_symbol(old_symbol, new_symbol, input_side, output_side); } - void _substitute_symbol_pair(const StringPair &old_symbol_pair, const StringPair &new_symbol_pair) { self->substitute_symbol_pair(old_symbol_pair, new_symbol_pair); } - void _substitute_symbol_pair_with_set(const StringPair &old_symbol_pair, const hfst::StringPairSet &new_symbol_pair_set) { self->substitute_symbol_pair_with_set(old_symbol_pair, new_symbol_pair_set); } - void _substitute_symbol_pair_with_transducer(const StringPair &symbol_pair, HfstBasicTransducer &transducer) { self->substitute_symbol_pair_with_transducer(symbol_pair, transducer); } - void _substitute_symbols(const hfst::HfstSymbolSubstitutions &substitutions) { self->substitute_symbols(substitutions); } // alias for the previous function which is shadowed - void _substitute_symbol_pairs(const hfst::HfstSymbolPairSubstitutions &substitutions) { self->substitute_symbol_pairs(substitutions); } // alias for the previous function which is shadowed - void insert_freely(const StringPair &symbol_pair, float weight) { self->insert_freely(symbol_pair, weight); } - void insert_freely(const HfstBasicTransducer &tr) { self->insert_freely(tr); } - void sort_arcs() { self->sort_arcs(); } - void disjunct(const StringPairVector &spv, float weight) { self->disjunct(spv, weight); } - void harmonize(HfstBasicTransducer &another) { self->harmonize(another); } - - HfstTwoLevelPaths _lookup(const StringVector &lookup_path, size_t * infinite_cutoff, float * max_weight, bool obey_flags) throw(TransducerIsCyclicException) - { - hfst::HfstTwoLevelPaths results; - $self->lookup(lookup_path, results, infinite_cutoff, max_weight, -1, obey_flags); - return results; - } - - std::string get_prolog_string(bool write_weights) - { - std::ostringstream oss; - $self->write_in_prolog_format(oss, self->name, write_weights); - return oss.str(); - } - - std::string get_xfst_string(bool write_weights) - { - std::ostringstream oss; - $self->write_in_xfst_format(oss, write_weights); - return oss.str(); - } - - std::string get_att_string(bool write_weights) - { - std::ostringstream oss; - $self->write_in_att_format(oss, write_weights); - std::string retval = oss.str(); - if (retval.empty()) // empty transducer must be represented as empty line in python, else read_att fails... - retval = std::string("\n"); - return retval; - } - - char * __str__() - { - std::ostringstream oss; - $self->write_in_att_format(oss, true); - return strdup(oss.str().c_str()); - } - - void add_transition(HfstState source, HfstState target, std::string input, std::string output, float weight=0) { - hfst::implementations::HfstBasicTransition tr(target, input, output, weight); - $self->add_transition(source, tr); - } - -%pythoncode %{ - def transitions(self, s): - """ - ... - """ - tr = self._transitions(s) - retval = [] - for i in range(0, len(tr)): - retval.append(tr[i]) - return retval - - def states_and_transitions(self): - """ - ... - """ - retval = [] - for s in self.states(): - retval.append(self.transitions(s)) - return retval - - def __iter__(self): - """ - Return states and transitions of the transducer. - """ - return self.states_and_transitions().__iter__() - - def __enumerate__(self): - """ - Return an enumeration of states and transitions of the transducer. - """ - return enumerate(self.states_and_transitions()) - - def write_prolog(self, f, write_weights=True): - """ - Write the transducer in prolog format with name *name* to file *f*, - *write_weights* defined whether weights are written. - - Parameters - ---------- - * `f` : - A python file where the transducer is written. - * `write_weights` : - Whether weights are written. - """ - prologstr = self.get_prolog_string(write_weights) - f.write(prologstr) - - def write_xfst(self, f, write_weights=True): - """ - Write the transducer in xfst format to file *f*, *write_weights* defined whether - weights are written. - - Parameters - ---------- - * `f` : - A python file where transducer is written. - * `write_weights` : - Whether weights are written. - """ - xfststr = self.get_xfst_string(write_weights) - f.write(xfststr) - - def write_att(self, f, write_weights=True): - """ - Write the transducer in AT&T format to file *f*, *write_weights* defined whether - weights are written. - - Parameters - ---------- - * `f` : - A python file where transducer is written. - * `write_weights` : - Whether weights are written. - """ - attstr = self.get_att_string(write_weights) - f.write(attstr) - - def lookup(self, lookup_path, **kwargs): - """ - Lookup tokenized input *input* in the transducer. - - Parameters - ---------- - * `str` : - A list/tuple of strings to look up. - * `kwargs` : - infinite_cutoff=-1, max_weight=None, obey_flags=False - * `max_epsilon_loops` : - How many times epsilon input loops are followed. Defaults to -1, i.e. infinitely. - * `max_weight` : - What is the maximum weight of a result allowed. Defaults to None, i.e. infinity. - * `obey_flags` : - Whether flag diacritic constraints are obeyed. Defaults to False. - """ - max_weight = None - max_epsilon_loops = None - obey_flags = False - output='dict' # 'dict' (default), 'text', 'raw' - - for k,v in kwargs.items(): - if k == 'max_weight' : - max_weight=v - elif k == 'max_epsilon_loops' : - infinite_cutoff=v - elif k == 'obey_flags' : - obey_flags=v - elif k == 'output': - if v == 'text': - output == 'text' - elif v == 'raw': - output='raw' - elif v == 'dict': - output='dict' - else: - print('Warning: ignoring argument %s as it has value %s.' % (k, v)) - print("Possible values are 'dict' (default), 'text', 'raw'.") - else: - print('Warning: ignoring unknown argument %s.' % (k)) - - retval = self._lookup(lookup_path, max_epsilon_loops, max_weight, obey_flags) - - if output == 'text': - return _two_level_paths_to_string(retval) - elif output == 'dict': - return _two_level_paths_to_dict(retval) - else: - return retval - - def substitute(self, s, S=None, **kwargs): - """ - - Substitute symbols or transitions in the transducer. - - Parameters - ---------- - * `s` : - The symbol or transition to be substituted. Can also be a dictionary of - substitutions, if S == None. - * `S` : - The symbol, transition, a tuple of transitions or a transducer - (hfst.HfstBasicTransducer) that substitutes *s*. - * `kwargs` : - Arguments recognized are 'input' and 'output', their values can be False or - True, True being the default. These arguments are valid only if *s* and *S* - are strings, else they are ignored. - * `input` : - Whether substitution is performed on input side, defaults to True. Valid - only if *s* and *S* are strings. - * `output` : - Whether substitution is performed on output side, defaults to True. Valid - only if *s* and *S* are strings. - - Possible combinations of arguments and their types are: - - (1) substitute(str, str, input=bool, output=bool): substitute symbol with symbol - on input, output or both sides of each transition in the transducer. (2) - substitute(strpair, strpair): substitute transition with transition (3) - substitute(strpair, strpairtuple): substitute transition with several - transitions (4) substitute(strpair, transducer): substitute transition with a - transducer (5) substitute(dict): perform several symbol-to-symbol substitutions - (6) substitute(dict): perform several transition-to-transition substitutions - - Examples: - - (1) tr.substitute('a', 'A', input=True, output=False): substitute lowercase a:s - with uppercase ones (2) tr.substitute(('a','b'),('A','B')): substitute - transitions that map lowercase a into lowercase b with transitions that map - uppercase a into uppercase b (3) tr.substitute(('a','b'), - (('A','B'),('a','B'),('A','b'))): change either or both sides of a transition - [a:b] to uppercase (4) tr.substitute(('a','b'), hfst.regex('[a:b]+')) change - [a:b] transition into one or more consecutive [a:b] transitions (5) - tr.substitute({'a':'A', 'b':'B', 'c':'C'}) change lowercase a, b and c into - their uppercase variants (6) tr.substitute( {('a','a'):('A','A'), - ('b','b'):('B','B'), ('c','c'):('C','C')} ): change lowercase a, b and c into - their uppercase variants - - In case (4), epsilon transitions are used to attach copies of transducer *S* - between the SOURCE and TARGET state of each transition that is substituted. The - transition itself is deleted, but its weight is copied to the epsilon transition - leading from SOURCE to the initial state of *S*. Each final state of *S* is made - non-final and an epsilon transition leading to TARGET is attached to it. The - final weight is copied to the epsilon transition. - """ - if S == None: - if not isinstance(s, dict): - raise RuntimeError('First input argument must be a dictionary.') - - subst_type="" - - for k, v in s.items(): - if _is_string(k): - if not subst_type: - subst_type="string" - elif subst_type == "string pair": - raise RuntimeError('') - if not _is_string(v): - raise RuntimeError('') - elif _is_string_pair(k): - if not subst_type: - subst_type="string pair" - elif subst_type == "string": - raise RuntimeError('') - if not _is_string_pair(v): - raise RuntimeError('') - else: - raise RuntimeError('') - - if subst_type == "string": - return self._substitute_symbols(s) - else: - return self._substitute_symbol_pairs(s) - - if _is_string(s): - if _is_string(S): - input=True - output=True - for k,v in kwargs.items(): - if k == 'input': - if v == False: - input=False - elif k == 'output': - if v == False: - output=False - else: - raise RuntimeError('Free argument not recognized.') - return self._substitute_symbol(s, S, input, output) - else: - raise RuntimeError('...') - elif _is_string_pair(s): - if _is_string_pair(S): - return self._substitute_symbol_pair(s, S) - elif _is_string_pair_vector(S): - return self._substitute_symbol_pair_with_set(s, S) - elif isinstance(S, HfstBasicTransducer): - return self._substitute_symbol_pair_with_transducer(s, S) - else: - raise RuntimeError('...') - else: - raise RuntimeError('...') - -%} - -} - -}; // class HfstBasicTransducer - -// *** HfstBasicTransition *** // - -class HfstBasicTransition { - public: - HfstBasicTransition(); - HfstBasicTransition(hfst::implementations::HfstState, std::string, std::string, float); - ~HfstBasicTransition(); - HfstState get_target_state() const; - std::string get_input_symbol() const; - void set_input_symbol(const std::string & symbol); - std::string get_output_symbol() const; - void set_output_symbol(const std::string & symbol); - float get_weight() const; - void set_weight(float f); - -%extend{ - char *__str__() { - static char str[1024]; - sprintf(str, "%u %s %s %f", $self->get_target_state(), $self->get_input_symbol().c_str(), $self->get_output_symbol().c_str(), $self->get_weight()); - return str; - } -} - -}; // class HfstBasicTransition - -} // namespace implementations - - -// *** XreCompiler: offer only a limited set of functions *** - -namespace xre { -class XreCompiler -{ - public: - XreCompiler(); - XreCompiler(hfst::ImplementationType impl); - void define_list(const std::string& name, const std::set& symbol_list); - bool define_function(const std::string& name, unsigned int arguments, const std::string& xre); - bool is_definition(const std::string& name); - bool is_function_definition(const std::string& name); - void undefine(const std::string& name); - HfstTransducer* compile(const std::string& xre); - //HfstTransducer* compile_first(const std::string& xre, unsigned int & chars_read); - void set_verbosity(bool verbose); - bool getOutputToConsole(); - void set_expand_definitions(bool expand); // TODO: should this be set automatically to True? - void set_harmonization(bool harmonize); - bool contained_only_comments(); - - // *** Some wrappers *** // -%extend{ - void define_xre(const std::string& name, const std::string& xre) - { - self->set_expand_definitions(true); - self->define(name, xre); - } - void define_transducer(const std::string& name, const HfstTransducer & transducer) - { - self->set_expand_definitions(true); - self->define(name, transducer); - } - void setOutputToConsole(bool value) - { - (void)self->setOutputToConsole(value); - } - HfstTransducerUIntPair compile_first(const std::string & xre) - { - unsigned int c=0; - hfst::HfstTransducer * result = self->compile_first(xre, c); - return std::pair(result, c); - } -} - -}; -} - -// *** The LexcCompiler functions are offered only because they are needed in some python functions... *** // - -namespace lexc { - class LexcCompiler - { - public: - LexcCompiler(); - LexcCompiler(hfst::ImplementationType impl); - LexcCompiler(hfst::ImplementationType impl, bool withFlags, bool alignStrings); - LexcCompiler& setVerbosity(unsigned int verbose); - void setOutputToConsole(bool); - }; - -} - -// *** The XfstCompiler functions are offered only because they are needed in some python functions... *** // - -namespace xfst { - class XfstCompiler - { - public: - XfstCompiler(); - XfstCompiler(hfst::ImplementationType impl); - XfstCompiler& setOutputToConsole(bool value); - XfstCompiler& setReadInteractiveTextFromStdin(bool Value); - XfstCompiler& setReadline(bool value); - XfstCompiler& setVerbosity(bool verbosity); - XfstCompiler& set(const char* name, const char* text); - char * get_prompt() const; - XfstCompiler& apply_up(const char* indata); - XfstCompiler& apply_down(const char* indata); - int parse_line(std::string line); - bool quit_requested() const; - }; -} - -// internal functions - -std::string hfst::get_hfst_regex_error_message(); -hfst::HfstTransducer * hfst::hfst_regex(hfst::xre::XreCompiler & comp, const std::string & regex_string, const std::string & error_stream); - -char * hfst::get_hfst_xfst_string_one(); -char * hfst::get_hfst_xfst_string_two(); -int hfst::hfst_compile_xfst_to_string_one(hfst::xfst::XfstCompiler & comp, std::string input); -int hfst::hfst_compile_xfst(hfst::xfst::XfstCompiler & comp, std::string input, const std::string & output_stream, const std::string & error_stream); - -std::string hfst::get_hfst_lexc_output(); -hfst::HfstTransducer * hfst::hfst_compile_lexc(hfst::lexc::LexcCompiler & comp, const std::string & filename, const std::string & error_stream); - -std::string hfst::get_hfst_sfst_output(); -hfst::HfstTransducer * hfst::hfst_compile_sfst(const std::string & filename, const std::string & error_stream, bool verbose, bool output_to_console); - -std::string hfst::one_level_paths_to_string(const HfstOneLevelPaths &); -std::string hfst::two_level_paths_to_string(const HfstTwoLevelPaths &); - -bool parse_prolog_network_line(const std::string & line, hfst::implementations::HfstBasicTransducer * graph); -bool parse_prolog_arc_line(const std::string & line, hfst::implementations::HfstBasicTransducer * graph); -bool parse_prolog_symbol_line(const std::string & line, hfst::implementations::HfstBasicTransducer * graph); -bool parse_prolog_final_line(const std::string & line, hfst::implementations::HfstBasicTransducer * graph); - - -// fuctions visible under module hfst - -void hfst::set_default_fst_type(hfst::ImplementationType t); -hfst::ImplementationType hfst::get_default_fst_type(); -std::string hfst::fst_type_to_string(hfst::ImplementationType t); - - -// *** hfst_rules (will be wrapped under module hfst.rules) *** // - -namespace hfst_rules { - - HfstTransducer two_level_if(const HfstTransducerPair & context, const StringPairSet & mappings, const StringPairSet & alphabet); - HfstTransducer two_level_only_if(const HfstTransducerPair &context, const StringPairSet &mappings, const StringPairSet &alphabet); - HfstTransducer two_level_if_and_only_if(const HfstTransducerPair &context, const StringPairSet &mappings, const StringPairSet &alphabet); - HfstTransducer replace_down(const HfstTransducerPair &context, const HfstTransducer &mapping, bool optional, const StringPairSet &alphabet); - HfstTransducer replace_down_karttunen(const HfstTransducerPair &context, const HfstTransducer &mapping, bool optional, const StringPairSet &alphabet); - HfstTransducer replace_right(const HfstTransducerPair &context, const HfstTransducer &mapping, bool optional, const StringPairSet &alphabet); - HfstTransducer replace_left(const HfstTransducerPair &context, const HfstTransducer &mapping, bool optional, const StringPairSet &alphabet); - HfstTransducer replace_up(const HfstTransducer &mapping, bool optional, const StringPairSet &alphabet); - HfstTransducer replace_down(const HfstTransducer &mapping, bool optional, const StringPairSet &alphabet); - HfstTransducer left_replace_up(const HfstTransducer &mapping, bool optional, const StringPairSet &alphabet); - HfstTransducer left_replace_up(const HfstTransducerPair &context, const HfstTransducer &mapping, bool optional, const StringPairSet &alphabet); - HfstTransducer left_replace_down(const HfstTransducerPair &context, const HfstTransducer &mapping, bool optional, const StringPairSet &alphabet); - HfstTransducer left_replace_down_karttunen(const HfstTransducerPair &context, const HfstTransducer &mapping, bool optional, const StringPairSet &alphabet); - HfstTransducer left_replace_left(const HfstTransducerPair &context, const HfstTransducer &mapping, bool optional, const StringPairSet &alphabet); - HfstTransducer left_replace_right(const HfstTransducerPair &context, const HfstTransducer &mapping, bool optional, const StringPairSet &alphabet); - HfstTransducer restriction(const HfstTransducerPairVector &contexts, const HfstTransducer &mapping, const StringPairSet &alphabet); - HfstTransducer coercion(const HfstTransducerPairVector &contexts, const HfstTransducer &mapping, const StringPairSet &alphabet); - HfstTransducer restriction_and_coercion(const HfstTransducerPairVector &contexts, const HfstTransducer &mapping, const StringPairSet &alphabet); - HfstTransducer surface_restriction(const HfstTransducerPairVector &contexts, const HfstTransducer &mapping, const StringPairSet &alphabet); - HfstTransducer surface_coercion(const HfstTransducerPairVector &contexts, const HfstTransducer &mapping, const StringPairSet &alphabet); - HfstTransducer surface_restriction_and_coercion(const HfstTransducerPairVector &contexts, const HfstTransducer &mapping, const StringPairSet &alphabet); - HfstTransducer deep_restriction(const HfstTransducerPairVector &contexts, const HfstTransducer &mapping, const StringPairSet &alphabet); - HfstTransducer deep_coercion(const HfstTransducerPairVector &contexts, const HfstTransducer &mapping, const StringPairSet &alphabet); - HfstTransducer deep_restriction_and_coercion(const HfstTransducerPairVector &contexts, const HfstTransducer &mapping, const StringPairSet &alphabet); - -} // namespace hfst_rules - - -} // namespace hfst - -namespace hfst { - namespace twolc { - class TwolcCompiler - { - public: - static int compile(const std::string & inputfile, const std::string & outputfile, - bool silent, bool verbose, bool resolve_left_conflicts, - bool resolve_right_conflicts, hfst::ImplementationType type); - }; - } -} - -// *** PmatchContainer *** // - -// hfst_pmatch_tokenize_extensions.cc -namespace hfst { - std::string pmatch_get_tokenized_output(hfst_ol::PmatchContainer * cont, - const std::string & input_text, - const std::string & output_format, - int * max_weight_classes, - bool dedupe, - bool print_weights, - bool print_all, - double time_cutoff, - bool verbose, - float beam, - bool tokenize_multichar); - hfst_ol::LocationVectorVector pmatch_locate(hfst_ol::PmatchContainer * cont, - const std::string & input, - double time_cutoff = 0.0); - hfst_ol::LocationVectorVector pmatch_locate(hfst_ol::PmatchContainer * cont, - const std::string & input, - double time_cutoff, - float weight_cutoff); -} - -namespace hfst_ol { - class PmatchContainer - { - public: - PmatchContainer(void); - PmatchContainer(hfst::HfstTransducerVector transducers); - ~PmatchContainer(void); - std::string match(const std::string & input, double time_cutoff = 0.0); - std::string get_profiling_info(void); - void set_verbose(bool b); - //void set_extract_tags_mode(bool b); - void set_profile(bool b); - -%extend { - PmatchContainer(const std::string & filename) - { - std::ifstream ifs(filename.c_str()); - hfst_ol::PmatchContainer * retval = new hfst_ol::PmatchContainer(ifs); - ifs.close(); - return retval; - } - // extension because of inf default value of weight_cutoff... - hfst_ol::LocationVectorVector locate(const std::string & input, - double time_cutoff = 0.0) - { - return hfst::pmatch_locate(self, input, time_cutoff); - }; - hfst_ol::LocationVectorVector locate(const std::string & input, - double time_cutoff, - float weight_cutoff) - { - return hfst::pmatch_locate(self, input, time_cutoff, weight_cutoff); - }; -%pythoncode %{ - def get_tokenized_output(self, input, **kwargs): - """ - Tokenize *input* and get a string representation of the tokenization - (essentially the same that command line tool hfst-tokenize would give). - - Parameters - ---------- - * `input` : - The input string to be tokenized. - * `kwargs` : - Possible parameters are: - output_format, max_weight_classes, dedupe, print_weights, print_all, - time_cutoff, verbose, beam, tokenize_multichar. - * `output_format` : - The format of output; possible values are 'tokenize', 'xerox', 'cg', 'finnpos', - 'giellacg', 'conllu' and 'visl'; 'tokenize' being the default. - * `max_weight_classes` : - Maximum number of best weight classes to output - (where analyses with equal weight constitute a class), defaults to None i.e. no limit. - * `dedupe` : - Whether duplicate analyses are removed, defaults to False. - * `print_weights` : - Whether weights are printd, defaults to False. - * `print_all` : - Whether nonmatching text is printed, defaults to False. - * `time_cutoff` : - Maximum number of seconds used per input after limiting the search. - * `verbose` : - Whether input is processed verbosely, defaults to True. - * `beam` : - Beam within analyses must be to get printed. - * `tokenize_multichar` : - Tokenize input into multicharacter symbols present in the transducer, defaults to false. - """ - output_format='tokenize' - max_weight_classes=None - dedupe=False - print_weights=False - print_all=False - time_cutoff=0.0 - verbose=True - beam=-1.0 - tokenize_multichar=False - for k,v in kwargs.items(): - if k == 'output_format': - if v == 'tokenize' or v == 'space_separated' or v == 'xerox' or v == 'cg' or v == 'finnpos' or v == 'giellacg' or v == 'conllu': - output_format=v - else: - print('Warning: ignoring unknown value %s for argument %s.' % (v,k)) - elif k == 'max_weight_classes': - max_weight_classes=int(v) - elif k == 'dedupe': - dedupe=v - elif k == 'print_weights': - print_weights=v - elif k == 'print_all': - print_all=v - elif k == 'time_cutoff': - time_cutoff=float(v) - elif k == 'verbose': - verbose=v - elif k == 'beam': - beam=float(v) - elif k == 'tokenize_multichar': - tokenize_multichar=v - else: - print('Warning: ignoring unknown argument %s.' % (k)) - return pmatch_get_tokenized_output(self, input, output_format, max_weight_classes, dedupe, print_weights, print_all, time_cutoff, verbose, beam, tokenize_multichar) - - def tokenize(self, input): - """ - Tokenize *input* and return a list of tokens i.e. strings. - - Parameters - ---------- - * `input` : - The string to be tokenized. - """ - retval = [] - locations = self.locate(input) - for loc in locations: - if loc[0].output != "@_NONMATCHING_@": - retval.append(loc[0].input) - return retval - -%} - -} - -}; // class PmatchContainer -} // namespace hfst_ol - -%pythoncode %{ - -class ImplementationType: - """ - Back-end implementation. - - Attributes: - - SFST_TYPE: SFST type, unweighted - TROPICAL_OPENFST_TYPE: OpenFst type with tropical weights - LOG_OPENFST_TYPE: OpenFst type with logarithmic weights (limited support) - FOMA_TYPE: FOMA type, unweighted - XFSM_TYPE: XFST type, unweighted (limited support) - HFST_OL_TYPE: HFST optimized-lookup type, unweighted - HFST_OLW_TYPE: HFST optimized-lookup type, weighted - HFST2_TYPE: HFST version 2 legacy type - UNSPECIFIED_TYPE: type not specified - ERROR_TYPE: (something went wrong) - - """ - SFST_TYPE = _libhfst.SFST_TYPE - TROPICAL_OPENFST_TYPE = _libhfst.TROPICAL_OPENFST_TYPE - LOG_OPENFST_TYPE = _libhfst.LOG_OPENFST_TYPE - FOMA_TYPE = _libhfst.FOMA_TYPE - XFSM_TYPE = _libhfst.XFSM_TYPE - HFST_OL_TYPE = _libhfst.HFST_OL_TYPE - HFST_OLW_TYPE = _libhfst.HFST_OLW_TYPE - HFST2_TYPE = _libhfst.HFST2_TYPE - UNSPECIFIED_TYPE = _libhfst.UNSPECIFIED_TYPE - ERROR_TYPE = _libhfst.ERROR_TYPE - -class ReplaceType: - """ - Replace type in Xerox-type rules. - - Attributes: - - REPL_UP: Match contexts on input level - REPL_DOWN: Match contexts on output level - REPL_RIGHT: Match left contexts on input level and right contexts on output level - REPL_LEFT: Match left contexts on output level and right contexts on input level - - """ - REPL_UP = _libhfst.REPL_UP - REPL_DOWN = _libhfst.REPL_DOWN - REPL_RIGHT = _libhfst.REPL_RIGHT - REPL_LEFT = _libhfst.REPL_LEFT - -%} diff --git a/src/hfst-old-pypi/libhfst.py b/src/hfst-old-pypi/libhfst.py deleted file mode 100644 index 55fc58d..0000000 --- a/src/hfst-old-pypi/libhfst.py +++ /dev/null @@ -1,5128 +0,0 @@ -# This file was automatically generated by SWIG (http://www.swig.org). -# Version 4.0.2 -# -# 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 as _swig_python_version_info -if _swig_python_version_info < (2, 7, 0): - raise RuntimeError("Python 2.7 or later required") - -# Import the low-level C/C++ module -if __package__ or "." in __name__: - from . import _libhfst -else: - import _libhfst - -try: - import builtins as __builtin__ -except ImportError: - import __builtin__ - -def _swig_repr(self): - try: - strthis = "proxy of " + self.this.__repr__() - except __builtin__.Exception: - strthis = "" - return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,) - - -def _swig_setattr_nondynamic_instance_variable(set): - def set_instance_attr(self, name, value): - if name == "thisown": - self.this.own(value) - elif name == "this": - set(self, name, value) - elif hasattr(self, name) and isinstance(getattr(type(self), name), property): - set(self, name, value) - else: - raise AttributeError("You cannot add instance attributes to %s" % self) - return set_instance_attr - - -def _swig_setattr_nondynamic_class_variable(set): - def set_class_attr(cls, name, value): - if hasattr(cls, name) and not isinstance(getattr(cls, name), property): - set(cls, name, value) - else: - raise AttributeError("You cannot add class attributes to %s" % cls) - return set_class_attr - - -def _swig_add_metaclass(metaclass): - """Class decorator for adding a metaclass to a SWIG wrapped class - a slimmed down version of six.add_metaclass""" - def wrapper(cls): - return metaclass(cls.__name__, cls.__bases__, cls.__dict__.copy()) - return wrapper - - -class _SwigNonDynamicMeta(type): - """Meta class to enforce nondynamic attributes (no new attributes) for a class""" - __setattr__ = _swig_setattr_nondynamic_class_variable(type.__setattr__) - - -class SwigPyIterator(object): - thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") - - def __init__(self, *args, **kwargs): - raise AttributeError("No constructor defined - class is abstract") - __repr__ = _swig_repr - __swig_destroy__ = _libhfst.delete_SwigPyIterator - - def value(self): - return _libhfst.SwigPyIterator_value(self) - - def incr(self, n=1): - return _libhfst.SwigPyIterator_incr(self, n) - - def decr(self, n=1): - return _libhfst.SwigPyIterator_decr(self, n) - - def distance(self, x): - return _libhfst.SwigPyIterator_distance(self, x) - - def equal(self, x): - return _libhfst.SwigPyIterator_equal(self, x) - - def copy(self): - return _libhfst.SwigPyIterator_copy(self) - - def next(self): - return _libhfst.SwigPyIterator_next(self) - - def __next__(self): - return _libhfst.SwigPyIterator___next__(self) - - def previous(self): - return _libhfst.SwigPyIterator_previous(self) - - def advance(self, n): - return _libhfst.SwigPyIterator_advance(self, n) - - def __eq__(self, x): - return _libhfst.SwigPyIterator___eq__(self, x) - - def __ne__(self, x): - return _libhfst.SwigPyIterator___ne__(self, x) - - def __iadd__(self, n): - return _libhfst.SwigPyIterator___iadd__(self, n) - - def __isub__(self, n): - return _libhfst.SwigPyIterator___isub__(self, n) - - def __add__(self, n): - return _libhfst.SwigPyIterator___add__(self, n) - - def __sub__(self, *args): - return _libhfst.SwigPyIterator___sub__(self, *args) - def __iter__(self): - return self - -# Register SwigPyIterator in _libhfst: -_libhfst.SwigPyIterator_swigregister(SwigPyIterator) - -class StringVector(object): - thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") - __repr__ = _swig_repr - - def iterator(self): - return _libhfst.StringVector_iterator(self) - def __iter__(self): - return self.iterator() - - def __nonzero__(self): - return _libhfst.StringVector___nonzero__(self) - - def __bool__(self): - return _libhfst.StringVector___bool__(self) - - def __len__(self): - return _libhfst.StringVector___len__(self) - - def __getslice__(self, i, j): - return _libhfst.StringVector___getslice__(self, i, j) - - def __setslice__(self, *args): - return _libhfst.StringVector___setslice__(self, *args) - - def __delslice__(self, i, j): - return _libhfst.StringVector___delslice__(self, i, j) - - def __delitem__(self, *args): - return _libhfst.StringVector___delitem__(self, *args) - - def __getitem__(self, *args): - return _libhfst.StringVector___getitem__(self, *args) - - def __setitem__(self, *args): - return _libhfst.StringVector___setitem__(self, *args) - - def pop(self): - return _libhfst.StringVector_pop(self) - - def append(self, x): - return _libhfst.StringVector_append(self, x) - - def empty(self): - return _libhfst.StringVector_empty(self) - - def size(self): - return _libhfst.StringVector_size(self) - - def swap(self, v): - return _libhfst.StringVector_swap(self, v) - - def begin(self): - return _libhfst.StringVector_begin(self) - - def end(self): - return _libhfst.StringVector_end(self) - - def rbegin(self): - return _libhfst.StringVector_rbegin(self) - - def rend(self): - return _libhfst.StringVector_rend(self) - - def clear(self): - return _libhfst.StringVector_clear(self) - - def get_allocator(self): - return _libhfst.StringVector_get_allocator(self) - - def pop_back(self): - return _libhfst.StringVector_pop_back(self) - - def erase(self, *args): - return _libhfst.StringVector_erase(self, *args) - - def __init__(self, *args): - _libhfst.StringVector_swiginit(self, _libhfst.new_StringVector(*args)) - - def push_back(self, x): - return _libhfst.StringVector_push_back(self, x) - - def front(self): - return _libhfst.StringVector_front(self) - - def back(self): - return _libhfst.StringVector_back(self) - - def assign(self, n, x): - return _libhfst.StringVector_assign(self, n, x) - - def resize(self, *args): - return _libhfst.StringVector_resize(self, *args) - - def insert(self, *args): - return _libhfst.StringVector_insert(self, *args) - - def reserve(self, n): - return _libhfst.StringVector_reserve(self, n) - - def capacity(self): - return _libhfst.StringVector_capacity(self) - __swig_destroy__ = _libhfst.delete_StringVector - -# Register StringVector in _libhfst: -_libhfst.StringVector_swigregister(StringVector) - -class StringPair(object): - thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") - __repr__ = _swig_repr - - def __init__(self, *args): - _libhfst.StringPair_swiginit(self, _libhfst.new_StringPair(*args)) - first = property(_libhfst.StringPair_first_get, _libhfst.StringPair_first_set) - second = property(_libhfst.StringPair_second_get, _libhfst.StringPair_second_set) - def __len__(self): - return 2 - def __repr__(self): - return str((self.first, self.second)) - def __getitem__(self, index): - if not (index % 2): - return self.first - else: - return self.second - def __setitem__(self, index, val): - if not (index % 2): - self.first = val - else: - self.second = val - __swig_destroy__ = _libhfst.delete_StringPair - -# Register StringPair in _libhfst: -_libhfst.StringPair_swigregister(StringPair) - -class StringPairVector(object): - thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") - __repr__ = _swig_repr - - def iterator(self): - return _libhfst.StringPairVector_iterator(self) - def __iter__(self): - return self.iterator() - - def __nonzero__(self): - return _libhfst.StringPairVector___nonzero__(self) - - def __bool__(self): - return _libhfst.StringPairVector___bool__(self) - - def __len__(self): - return _libhfst.StringPairVector___len__(self) - - def __getslice__(self, i, j): - return _libhfst.StringPairVector___getslice__(self, i, j) - - def __setslice__(self, *args): - return _libhfst.StringPairVector___setslice__(self, *args) - - def __delslice__(self, i, j): - return _libhfst.StringPairVector___delslice__(self, i, j) - - def __delitem__(self, *args): - return _libhfst.StringPairVector___delitem__(self, *args) - - def __getitem__(self, *args): - return _libhfst.StringPairVector___getitem__(self, *args) - - def __setitem__(self, *args): - return _libhfst.StringPairVector___setitem__(self, *args) - - def pop(self): - return _libhfst.StringPairVector_pop(self) - - def append(self, x): - return _libhfst.StringPairVector_append(self, x) - - def empty(self): - return _libhfst.StringPairVector_empty(self) - - def size(self): - return _libhfst.StringPairVector_size(self) - - def swap(self, v): - return _libhfst.StringPairVector_swap(self, v) - - def begin(self): - return _libhfst.StringPairVector_begin(self) - - def end(self): - return _libhfst.StringPairVector_end(self) - - def rbegin(self): - return _libhfst.StringPairVector_rbegin(self) - - def rend(self): - return _libhfst.StringPairVector_rend(self) - - def clear(self): - return _libhfst.StringPairVector_clear(self) - - def get_allocator(self): - return _libhfst.StringPairVector_get_allocator(self) - - def pop_back(self): - return _libhfst.StringPairVector_pop_back(self) - - def erase(self, *args): - return _libhfst.StringPairVector_erase(self, *args) - - def __init__(self, *args): - _libhfst.StringPairVector_swiginit(self, _libhfst.new_StringPairVector(*args)) - - def push_back(self, x): - return _libhfst.StringPairVector_push_back(self, x) - - def front(self): - return _libhfst.StringPairVector_front(self) - - def back(self): - return _libhfst.StringPairVector_back(self) - - def assign(self, n, x): - return _libhfst.StringPairVector_assign(self, n, x) - - def resize(self, *args): - return _libhfst.StringPairVector_resize(self, *args) - - def insert(self, *args): - return _libhfst.StringPairVector_insert(self, *args) - - def reserve(self, n): - return _libhfst.StringPairVector_reserve(self, n) - - def capacity(self): - return _libhfst.StringPairVector_capacity(self) - __swig_destroy__ = _libhfst.delete_StringPairVector - -# Register StringPairVector in _libhfst: -_libhfst.StringPairVector_swigregister(StringPairVector) - -class FloatVector(object): - thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") - __repr__ = _swig_repr - - def iterator(self): - return _libhfst.FloatVector_iterator(self) - def __iter__(self): - return self.iterator() - - def __nonzero__(self): - return _libhfst.FloatVector___nonzero__(self) - - def __bool__(self): - return _libhfst.FloatVector___bool__(self) - - def __len__(self): - return _libhfst.FloatVector___len__(self) - - def __getslice__(self, i, j): - return _libhfst.FloatVector___getslice__(self, i, j) - - def __setslice__(self, *args): - return _libhfst.FloatVector___setslice__(self, *args) - - def __delslice__(self, i, j): - return _libhfst.FloatVector___delslice__(self, i, j) - - def __delitem__(self, *args): - return _libhfst.FloatVector___delitem__(self, *args) - - def __getitem__(self, *args): - return _libhfst.FloatVector___getitem__(self, *args) - - def __setitem__(self, *args): - return _libhfst.FloatVector___setitem__(self, *args) - - def pop(self): - return _libhfst.FloatVector_pop(self) - - def append(self, x): - return _libhfst.FloatVector_append(self, x) - - def empty(self): - return _libhfst.FloatVector_empty(self) - - def size(self): - return _libhfst.FloatVector_size(self) - - def swap(self, v): - return _libhfst.FloatVector_swap(self, v) - - def begin(self): - return _libhfst.FloatVector_begin(self) - - def end(self): - return _libhfst.FloatVector_end(self) - - def rbegin(self): - return _libhfst.FloatVector_rbegin(self) - - def rend(self): - return _libhfst.FloatVector_rend(self) - - def clear(self): - return _libhfst.FloatVector_clear(self) - - def get_allocator(self): - return _libhfst.FloatVector_get_allocator(self) - - def pop_back(self): - return _libhfst.FloatVector_pop_back(self) - - def erase(self, *args): - return _libhfst.FloatVector_erase(self, *args) - - def __init__(self, *args): - _libhfst.FloatVector_swiginit(self, _libhfst.new_FloatVector(*args)) - - def push_back(self, x): - return _libhfst.FloatVector_push_back(self, x) - - def front(self): - return _libhfst.FloatVector_front(self) - - def back(self): - return _libhfst.FloatVector_back(self) - - def assign(self, n, x): - return _libhfst.FloatVector_assign(self, n, x) - - def resize(self, *args): - return _libhfst.FloatVector_resize(self, *args) - - def insert(self, *args): - return _libhfst.FloatVector_insert(self, *args) - - def reserve(self, n): - return _libhfst.FloatVector_reserve(self, n) - - def capacity(self): - return _libhfst.FloatVector_capacity(self) - __swig_destroy__ = _libhfst.delete_FloatVector - -# Register FloatVector in _libhfst: -_libhfst.FloatVector_swigregister(FloatVector) - -class StringSet(object): - thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") - __repr__ = _swig_repr - - def iterator(self): - return _libhfst.StringSet_iterator(self) - def __iter__(self): - return self.iterator() - - def __nonzero__(self): - return _libhfst.StringSet___nonzero__(self) - - def __bool__(self): - return _libhfst.StringSet___bool__(self) - - def __len__(self): - return _libhfst.StringSet___len__(self) - - def append(self, x): - return _libhfst.StringSet_append(self, x) - - def __contains__(self, x): - return _libhfst.StringSet___contains__(self, x) - - def __getitem__(self, i): - return _libhfst.StringSet___getitem__(self, i) - - def add(self, x): - return _libhfst.StringSet_add(self, x) - - def discard(self, x): - return _libhfst.StringSet_discard(self, x) - - def __init__(self, *args): - _libhfst.StringSet_swiginit(self, _libhfst.new_StringSet(*args)) - - def empty(self): - return _libhfst.StringSet_empty(self) - - def size(self): - return _libhfst.StringSet_size(self) - - def clear(self): - return _libhfst.StringSet_clear(self) - - def swap(self, v): - return _libhfst.StringSet_swap(self, v) - - def count(self, x): - return _libhfst.StringSet_count(self, x) - - def begin(self): - return _libhfst.StringSet_begin(self) - - def end(self): - return _libhfst.StringSet_end(self) - - def rbegin(self): - return _libhfst.StringSet_rbegin(self) - - def rend(self): - return _libhfst.StringSet_rend(self) - - def erase(self, *args): - return _libhfst.StringSet_erase(self, *args) - - def find(self, x): - return _libhfst.StringSet_find(self, x) - - def lower_bound(self, x): - return _libhfst.StringSet_lower_bound(self, x) - - def upper_bound(self, x): - return _libhfst.StringSet_upper_bound(self, x) - - def equal_range(self, x): - return _libhfst.StringSet_equal_range(self, x) - - def insert(self, __x): - return _libhfst.StringSet_insert(self, __x) - __swig_destroy__ = _libhfst.delete_StringSet - -# Register StringSet in _libhfst: -_libhfst.StringSet_swigregister(StringSet) - -class StringPairSet(object): - thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") - __repr__ = _swig_repr - - def iterator(self): - return _libhfst.StringPairSet_iterator(self) - def __iter__(self): - return self.iterator() - - def __nonzero__(self): - return _libhfst.StringPairSet___nonzero__(self) - - def __bool__(self): - return _libhfst.StringPairSet___bool__(self) - - def __len__(self): - return _libhfst.StringPairSet___len__(self) - - def append(self, x): - return _libhfst.StringPairSet_append(self, x) - - def __contains__(self, x): - return _libhfst.StringPairSet___contains__(self, x) - - def __getitem__(self, i): - return _libhfst.StringPairSet___getitem__(self, i) - - def add(self, x): - return _libhfst.StringPairSet_add(self, x) - - def discard(self, x): - return _libhfst.StringPairSet_discard(self, x) - - def __init__(self, *args): - _libhfst.StringPairSet_swiginit(self, _libhfst.new_StringPairSet(*args)) - - def empty(self): - return _libhfst.StringPairSet_empty(self) - - def size(self): - return _libhfst.StringPairSet_size(self) - - def clear(self): - return _libhfst.StringPairSet_clear(self) - - def swap(self, v): - return _libhfst.StringPairSet_swap(self, v) - - def count(self, x): - return _libhfst.StringPairSet_count(self, x) - - def begin(self): - return _libhfst.StringPairSet_begin(self) - - def end(self): - return _libhfst.StringPairSet_end(self) - - def rbegin(self): - return _libhfst.StringPairSet_rbegin(self) - - def rend(self): - return _libhfst.StringPairSet_rend(self) - - def erase(self, *args): - return _libhfst.StringPairSet_erase(self, *args) - - def find(self, x): - return _libhfst.StringPairSet_find(self, x) - - def lower_bound(self, x): - return _libhfst.StringPairSet_lower_bound(self, x) - - def upper_bound(self, x): - return _libhfst.StringPairSet_upper_bound(self, x) - - def equal_range(self, x): - return _libhfst.StringPairSet_equal_range(self, x) - - def insert(self, __x): - return _libhfst.StringPairSet_insert(self, __x) - __swig_destroy__ = _libhfst.delete_StringPairSet - -# Register StringPairSet in _libhfst: -_libhfst.StringPairSet_swigregister(StringPairSet) - -class HfstTransducerVector(object): - thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") - __repr__ = _swig_repr - - def iterator(self): - return _libhfst.HfstTransducerVector_iterator(self) - def __iter__(self): - return self.iterator() - - def __nonzero__(self): - return _libhfst.HfstTransducerVector___nonzero__(self) - - def __bool__(self): - return _libhfst.HfstTransducerVector___bool__(self) - - def __len__(self): - return _libhfst.HfstTransducerVector___len__(self) - - def __getslice__(self, i, j): - return _libhfst.HfstTransducerVector___getslice__(self, i, j) - - def __setslice__(self, *args): - return _libhfst.HfstTransducerVector___setslice__(self, *args) - - def __delslice__(self, i, j): - return _libhfst.HfstTransducerVector___delslice__(self, i, j) - - def __delitem__(self, *args): - return _libhfst.HfstTransducerVector___delitem__(self, *args) - - def __getitem__(self, *args): - return _libhfst.HfstTransducerVector___getitem__(self, *args) - - def __setitem__(self, *args): - return _libhfst.HfstTransducerVector___setitem__(self, *args) - - def pop(self): - return _libhfst.HfstTransducerVector_pop(self) - - def append(self, x): - return _libhfst.HfstTransducerVector_append(self, x) - - def empty(self): - return _libhfst.HfstTransducerVector_empty(self) - - def size(self): - return _libhfst.HfstTransducerVector_size(self) - - def swap(self, v): - return _libhfst.HfstTransducerVector_swap(self, v) - - def begin(self): - return _libhfst.HfstTransducerVector_begin(self) - - def end(self): - return _libhfst.HfstTransducerVector_end(self) - - def rbegin(self): - return _libhfst.HfstTransducerVector_rbegin(self) - - def rend(self): - return _libhfst.HfstTransducerVector_rend(self) - - def clear(self): - return _libhfst.HfstTransducerVector_clear(self) - - def get_allocator(self): - return _libhfst.HfstTransducerVector_get_allocator(self) - - def pop_back(self): - return _libhfst.HfstTransducerVector_pop_back(self) - - def erase(self, *args): - return _libhfst.HfstTransducerVector_erase(self, *args) - - def __init__(self, *args): - _libhfst.HfstTransducerVector_swiginit(self, _libhfst.new_HfstTransducerVector(*args)) - - def push_back(self, x): - return _libhfst.HfstTransducerVector_push_back(self, x) - - def front(self): - return _libhfst.HfstTransducerVector_front(self) - - def back(self): - return _libhfst.HfstTransducerVector_back(self) - - def assign(self, n, x): - return _libhfst.HfstTransducerVector_assign(self, n, x) - - def resize(self, *args): - return _libhfst.HfstTransducerVector_resize(self, *args) - - def insert(self, *args): - return _libhfst.HfstTransducerVector_insert(self, *args) - - def reserve(self, n): - return _libhfst.HfstTransducerVector_reserve(self, n) - - def capacity(self): - return _libhfst.HfstTransducerVector_capacity(self) - __swig_destroy__ = _libhfst.delete_HfstTransducerVector - -# Register HfstTransducerVector in _libhfst: -_libhfst.HfstTransducerVector_swigregister(HfstTransducerVector) - -class HfstSymbolSubstitutions(object): - thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") - __repr__ = _swig_repr - - def iterator(self): - return _libhfst.HfstSymbolSubstitutions_iterator(self) - def __iter__(self): - return self.iterator() - - def __nonzero__(self): - return _libhfst.HfstSymbolSubstitutions___nonzero__(self) - - def __bool__(self): - return _libhfst.HfstSymbolSubstitutions___bool__(self) - - def __len__(self): - return _libhfst.HfstSymbolSubstitutions___len__(self) - def __iter__(self): - return self.key_iterator() - def iterkeys(self): - return self.key_iterator() - def itervalues(self): - return self.value_iterator() - def iteritems(self): - return self.iterator() - - def __getitem__(self, key): - return _libhfst.HfstSymbolSubstitutions___getitem__(self, key) - - def __delitem__(self, key): - return _libhfst.HfstSymbolSubstitutions___delitem__(self, key) - - def has_key(self, key): - return _libhfst.HfstSymbolSubstitutions_has_key(self, key) - - def keys(self): - return _libhfst.HfstSymbolSubstitutions_keys(self) - - def values(self): - return _libhfst.HfstSymbolSubstitutions_values(self) - - def items(self): - return _libhfst.HfstSymbolSubstitutions_items(self) - - def __contains__(self, key): - return _libhfst.HfstSymbolSubstitutions___contains__(self, key) - - def key_iterator(self): - return _libhfst.HfstSymbolSubstitutions_key_iterator(self) - - def value_iterator(self): - return _libhfst.HfstSymbolSubstitutions_value_iterator(self) - - def __setitem__(self, *args): - return _libhfst.HfstSymbolSubstitutions___setitem__(self, *args) - - def asdict(self): - return _libhfst.HfstSymbolSubstitutions_asdict(self) - - def __init__(self, *args): - _libhfst.HfstSymbolSubstitutions_swiginit(self, _libhfst.new_HfstSymbolSubstitutions(*args)) - - def empty(self): - return _libhfst.HfstSymbolSubstitutions_empty(self) - - def size(self): - return _libhfst.HfstSymbolSubstitutions_size(self) - - def swap(self, v): - return _libhfst.HfstSymbolSubstitutions_swap(self, v) - - def begin(self): - return _libhfst.HfstSymbolSubstitutions_begin(self) - - def end(self): - return _libhfst.HfstSymbolSubstitutions_end(self) - - def rbegin(self): - return _libhfst.HfstSymbolSubstitutions_rbegin(self) - - def rend(self): - return _libhfst.HfstSymbolSubstitutions_rend(self) - - def clear(self): - return _libhfst.HfstSymbolSubstitutions_clear(self) - - def get_allocator(self): - return _libhfst.HfstSymbolSubstitutions_get_allocator(self) - - def count(self, x): - return _libhfst.HfstSymbolSubstitutions_count(self, x) - - def erase(self, *args): - return _libhfst.HfstSymbolSubstitutions_erase(self, *args) - - def find(self, x): - return _libhfst.HfstSymbolSubstitutions_find(self, x) - - def lower_bound(self, x): - return _libhfst.HfstSymbolSubstitutions_lower_bound(self, x) - - def upper_bound(self, x): - return _libhfst.HfstSymbolSubstitutions_upper_bound(self, x) - __swig_destroy__ = _libhfst.delete_HfstSymbolSubstitutions - -# Register HfstSymbolSubstitutions in _libhfst: -_libhfst.HfstSymbolSubstitutions_swigregister(HfstSymbolSubstitutions) - -class HfstSymbolPairSubstitutions(object): - thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") - __repr__ = _swig_repr - - def iterator(self): - return _libhfst.HfstSymbolPairSubstitutions_iterator(self) - def __iter__(self): - return self.iterator() - - def __nonzero__(self): - return _libhfst.HfstSymbolPairSubstitutions___nonzero__(self) - - def __bool__(self): - return _libhfst.HfstSymbolPairSubstitutions___bool__(self) - - def __len__(self): - return _libhfst.HfstSymbolPairSubstitutions___len__(self) - def __iter__(self): - return self.key_iterator() - def iterkeys(self): - return self.key_iterator() - def itervalues(self): - return self.value_iterator() - def iteritems(self): - return self.iterator() - - def __getitem__(self, key): - return _libhfst.HfstSymbolPairSubstitutions___getitem__(self, key) - - def __delitem__(self, key): - return _libhfst.HfstSymbolPairSubstitutions___delitem__(self, key) - - def has_key(self, key): - return _libhfst.HfstSymbolPairSubstitutions_has_key(self, key) - - def keys(self): - return _libhfst.HfstSymbolPairSubstitutions_keys(self) - - def values(self): - return _libhfst.HfstSymbolPairSubstitutions_values(self) - - def items(self): - return _libhfst.HfstSymbolPairSubstitutions_items(self) - - def __contains__(self, key): - return _libhfst.HfstSymbolPairSubstitutions___contains__(self, key) - - def key_iterator(self): - return _libhfst.HfstSymbolPairSubstitutions_key_iterator(self) - - def value_iterator(self): - return _libhfst.HfstSymbolPairSubstitutions_value_iterator(self) - - def __setitem__(self, *args): - return _libhfst.HfstSymbolPairSubstitutions___setitem__(self, *args) - - def asdict(self): - return _libhfst.HfstSymbolPairSubstitutions_asdict(self) - - def __init__(self, *args): - _libhfst.HfstSymbolPairSubstitutions_swiginit(self, _libhfst.new_HfstSymbolPairSubstitutions(*args)) - - def empty(self): - return _libhfst.HfstSymbolPairSubstitutions_empty(self) - - def size(self): - return _libhfst.HfstSymbolPairSubstitutions_size(self) - - def swap(self, v): - return _libhfst.HfstSymbolPairSubstitutions_swap(self, v) - - def begin(self): - return _libhfst.HfstSymbolPairSubstitutions_begin(self) - - def end(self): - return _libhfst.HfstSymbolPairSubstitutions_end(self) - - def rbegin(self): - return _libhfst.HfstSymbolPairSubstitutions_rbegin(self) - - def rend(self): - return _libhfst.HfstSymbolPairSubstitutions_rend(self) - - def clear(self): - return _libhfst.HfstSymbolPairSubstitutions_clear(self) - - def get_allocator(self): - return _libhfst.HfstSymbolPairSubstitutions_get_allocator(self) - - def count(self, x): - return _libhfst.HfstSymbolPairSubstitutions_count(self, x) - - def erase(self, *args): - return _libhfst.HfstSymbolPairSubstitutions_erase(self, *args) - - def find(self, x): - return _libhfst.HfstSymbolPairSubstitutions_find(self, x) - - def lower_bound(self, x): - return _libhfst.HfstSymbolPairSubstitutions_lower_bound(self, x) - - def upper_bound(self, x): - return _libhfst.HfstSymbolPairSubstitutions_upper_bound(self, x) - __swig_destroy__ = _libhfst.delete_HfstSymbolPairSubstitutions - -# Register HfstSymbolPairSubstitutions in _libhfst: -_libhfst.HfstSymbolPairSubstitutions_swigregister(HfstSymbolPairSubstitutions) - -class BarBazFoo(object): - thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") - __repr__ = _swig_repr - - def iterator(self): - return _libhfst.BarBazFoo_iterator(self) - def __iter__(self): - return self.iterator() - - def __nonzero__(self): - return _libhfst.BarBazFoo___nonzero__(self) - - def __bool__(self): - return _libhfst.BarBazFoo___bool__(self) - - def __len__(self): - return _libhfst.BarBazFoo___len__(self) - - def __getslice__(self, i, j): - return _libhfst.BarBazFoo___getslice__(self, i, j) - - def __setslice__(self, *args): - return _libhfst.BarBazFoo___setslice__(self, *args) - - def __delslice__(self, i, j): - return _libhfst.BarBazFoo___delslice__(self, i, j) - - def __delitem__(self, *args): - return _libhfst.BarBazFoo___delitem__(self, *args) - - def __getitem__(self, *args): - return _libhfst.BarBazFoo___getitem__(self, *args) - - def __setitem__(self, *args): - return _libhfst.BarBazFoo___setitem__(self, *args) - - def pop(self): - return _libhfst.BarBazFoo_pop(self) - - def append(self, x): - return _libhfst.BarBazFoo_append(self, x) - - def empty(self): - return _libhfst.BarBazFoo_empty(self) - - def size(self): - return _libhfst.BarBazFoo_size(self) - - def swap(self, v): - return _libhfst.BarBazFoo_swap(self, v) - - def begin(self): - return _libhfst.BarBazFoo_begin(self) - - def end(self): - return _libhfst.BarBazFoo_end(self) - - def rbegin(self): - return _libhfst.BarBazFoo_rbegin(self) - - def rend(self): - return _libhfst.BarBazFoo_rend(self) - - def clear(self): - return _libhfst.BarBazFoo_clear(self) - - def get_allocator(self): - return _libhfst.BarBazFoo_get_allocator(self) - - def pop_back(self): - return _libhfst.BarBazFoo_pop_back(self) - - def erase(self, *args): - return _libhfst.BarBazFoo_erase(self, *args) - - def __init__(self, *args): - _libhfst.BarBazFoo_swiginit(self, _libhfst.new_BarBazFoo(*args)) - - def push_back(self, x): - return _libhfst.BarBazFoo_push_back(self, x) - - def front(self): - return _libhfst.BarBazFoo_front(self) - - def back(self): - return _libhfst.BarBazFoo_back(self) - - def assign(self, n, x): - return _libhfst.BarBazFoo_assign(self, n, x) - - def resize(self, *args): - return _libhfst.BarBazFoo_resize(self, *args) - - def insert(self, *args): - return _libhfst.BarBazFoo_insert(self, *args) - - def reserve(self, n): - return _libhfst.BarBazFoo_reserve(self, n) - - def capacity(self): - return _libhfst.BarBazFoo_capacity(self) - __swig_destroy__ = _libhfst.delete_BarBazFoo - -# Register BarBazFoo in _libhfst: -_libhfst.BarBazFoo_swigregister(BarBazFoo) - -class HfstBasicTransitions(object): - thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") - __repr__ = _swig_repr - - def iterator(self): - return _libhfst.HfstBasicTransitions_iterator(self) - def __iter__(self): - return self.iterator() - - def __nonzero__(self): - return _libhfst.HfstBasicTransitions___nonzero__(self) - - def __bool__(self): - return _libhfst.HfstBasicTransitions___bool__(self) - - def __len__(self): - return _libhfst.HfstBasicTransitions___len__(self) - - def __getslice__(self, i, j): - return _libhfst.HfstBasicTransitions___getslice__(self, i, j) - - def __setslice__(self, *args): - return _libhfst.HfstBasicTransitions___setslice__(self, *args) - - def __delslice__(self, i, j): - return _libhfst.HfstBasicTransitions___delslice__(self, i, j) - - def __delitem__(self, *args): - return _libhfst.HfstBasicTransitions___delitem__(self, *args) - - def __getitem__(self, *args): - return _libhfst.HfstBasicTransitions___getitem__(self, *args) - - def __setitem__(self, *args): - return _libhfst.HfstBasicTransitions___setitem__(self, *args) - - def pop(self): - return _libhfst.HfstBasicTransitions_pop(self) - - def append(self, x): - return _libhfst.HfstBasicTransitions_append(self, x) - - def empty(self): - return _libhfst.HfstBasicTransitions_empty(self) - - def size(self): - return _libhfst.HfstBasicTransitions_size(self) - - def swap(self, v): - return _libhfst.HfstBasicTransitions_swap(self, v) - - def begin(self): - return _libhfst.HfstBasicTransitions_begin(self) - - def end(self): - return _libhfst.HfstBasicTransitions_end(self) - - def rbegin(self): - return _libhfst.HfstBasicTransitions_rbegin(self) - - def rend(self): - return _libhfst.HfstBasicTransitions_rend(self) - - def clear(self): - return _libhfst.HfstBasicTransitions_clear(self) - - def get_allocator(self): - return _libhfst.HfstBasicTransitions_get_allocator(self) - - def pop_back(self): - return _libhfst.HfstBasicTransitions_pop_back(self) - - def erase(self, *args): - return _libhfst.HfstBasicTransitions_erase(self, *args) - - def __init__(self, *args): - _libhfst.HfstBasicTransitions_swiginit(self, _libhfst.new_HfstBasicTransitions(*args)) - - def push_back(self, x): - return _libhfst.HfstBasicTransitions_push_back(self, x) - - def front(self): - return _libhfst.HfstBasicTransitions_front(self) - - def back(self): - return _libhfst.HfstBasicTransitions_back(self) - - def assign(self, n, x): - return _libhfst.HfstBasicTransitions_assign(self, n, x) - - def resize(self, *args): - return _libhfst.HfstBasicTransitions_resize(self, *args) - - def insert(self, *args): - return _libhfst.HfstBasicTransitions_insert(self, *args) - - def reserve(self, n): - return _libhfst.HfstBasicTransitions_reserve(self, n) - - def capacity(self): - return _libhfst.HfstBasicTransitions_capacity(self) - __swig_destroy__ = _libhfst.delete_HfstBasicTransitions - -# Register HfstBasicTransitions in _libhfst: -_libhfst.HfstBasicTransitions_swigregister(HfstBasicTransitions) - -class HfstOneLevelPath(object): - thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") - __repr__ = _swig_repr - - def __init__(self, *args): - _libhfst.HfstOneLevelPath_swiginit(self, _libhfst.new_HfstOneLevelPath(*args)) - first = property(_libhfst.HfstOneLevelPath_first_get, _libhfst.HfstOneLevelPath_first_set) - second = property(_libhfst.HfstOneLevelPath_second_get, _libhfst.HfstOneLevelPath_second_set) - def __len__(self): - return 2 - def __repr__(self): - return str((self.first, self.second)) - def __getitem__(self, index): - if not (index % 2): - return self.first - else: - return self.second - def __setitem__(self, index, val): - if not (index % 2): - self.first = val - else: - self.second = val - __swig_destroy__ = _libhfst.delete_HfstOneLevelPath - -# Register HfstOneLevelPath in _libhfst: -_libhfst.HfstOneLevelPath_swigregister(HfstOneLevelPath) - -class HfstOneLevelPaths(object): - thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") - __repr__ = _swig_repr - - def iterator(self): - return _libhfst.HfstOneLevelPaths_iterator(self) - def __iter__(self): - return self.iterator() - - def __nonzero__(self): - return _libhfst.HfstOneLevelPaths___nonzero__(self) - - def __bool__(self): - return _libhfst.HfstOneLevelPaths___bool__(self) - - def __len__(self): - return _libhfst.HfstOneLevelPaths___len__(self) - - def append(self, x): - return _libhfst.HfstOneLevelPaths_append(self, x) - - def __contains__(self, x): - return _libhfst.HfstOneLevelPaths___contains__(self, x) - - def __getitem__(self, i): - return _libhfst.HfstOneLevelPaths___getitem__(self, i) - - def add(self, x): - return _libhfst.HfstOneLevelPaths_add(self, x) - - def discard(self, x): - return _libhfst.HfstOneLevelPaths_discard(self, x) - - def __init__(self, *args): - _libhfst.HfstOneLevelPaths_swiginit(self, _libhfst.new_HfstOneLevelPaths(*args)) - - def empty(self): - return _libhfst.HfstOneLevelPaths_empty(self) - - def size(self): - return _libhfst.HfstOneLevelPaths_size(self) - - def clear(self): - return _libhfst.HfstOneLevelPaths_clear(self) - - def swap(self, v): - return _libhfst.HfstOneLevelPaths_swap(self, v) - - def count(self, x): - return _libhfst.HfstOneLevelPaths_count(self, x) - - def begin(self): - return _libhfst.HfstOneLevelPaths_begin(self) - - def end(self): - return _libhfst.HfstOneLevelPaths_end(self) - - def rbegin(self): - return _libhfst.HfstOneLevelPaths_rbegin(self) - - def rend(self): - return _libhfst.HfstOneLevelPaths_rend(self) - - def erase(self, *args): - return _libhfst.HfstOneLevelPaths_erase(self, *args) - - def find(self, x): - return _libhfst.HfstOneLevelPaths_find(self, x) - - def lower_bound(self, x): - return _libhfst.HfstOneLevelPaths_lower_bound(self, x) - - def upper_bound(self, x): - return _libhfst.HfstOneLevelPaths_upper_bound(self, x) - - def equal_range(self, x): - return _libhfst.HfstOneLevelPaths_equal_range(self, x) - - def insert(self, __x): - return _libhfst.HfstOneLevelPaths_insert(self, __x) - __swig_destroy__ = _libhfst.delete_HfstOneLevelPaths - -# Register HfstOneLevelPaths in _libhfst: -_libhfst.HfstOneLevelPaths_swigregister(HfstOneLevelPaths) - -class HfstTwoLevelPath(object): - thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") - __repr__ = _swig_repr - - def __init__(self, *args): - _libhfst.HfstTwoLevelPath_swiginit(self, _libhfst.new_HfstTwoLevelPath(*args)) - first = property(_libhfst.HfstTwoLevelPath_first_get, _libhfst.HfstTwoLevelPath_first_set) - second = property(_libhfst.HfstTwoLevelPath_second_get, _libhfst.HfstTwoLevelPath_second_set) - def __len__(self): - return 2 - def __repr__(self): - return str((self.first, self.second)) - def __getitem__(self, index): - if not (index % 2): - return self.first - else: - return self.second - def __setitem__(self, index, val): - if not (index % 2): - self.first = val - else: - self.second = val - __swig_destroy__ = _libhfst.delete_HfstTwoLevelPath - -# Register HfstTwoLevelPath in _libhfst: -_libhfst.HfstTwoLevelPath_swigregister(HfstTwoLevelPath) - -class HfstTwoLevelPaths(object): - thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") - __repr__ = _swig_repr - - def iterator(self): - return _libhfst.HfstTwoLevelPaths_iterator(self) - def __iter__(self): - return self.iterator() - - def __nonzero__(self): - return _libhfst.HfstTwoLevelPaths___nonzero__(self) - - def __bool__(self): - return _libhfst.HfstTwoLevelPaths___bool__(self) - - def __len__(self): - return _libhfst.HfstTwoLevelPaths___len__(self) - - def append(self, x): - return _libhfst.HfstTwoLevelPaths_append(self, x) - - def __contains__(self, x): - return _libhfst.HfstTwoLevelPaths___contains__(self, x) - - def __getitem__(self, i): - return _libhfst.HfstTwoLevelPaths___getitem__(self, i) - - def add(self, x): - return _libhfst.HfstTwoLevelPaths_add(self, x) - - def discard(self, x): - return _libhfst.HfstTwoLevelPaths_discard(self, x) - - def __init__(self, *args): - _libhfst.HfstTwoLevelPaths_swiginit(self, _libhfst.new_HfstTwoLevelPaths(*args)) - - def empty(self): - return _libhfst.HfstTwoLevelPaths_empty(self) - - def size(self): - return _libhfst.HfstTwoLevelPaths_size(self) - - def clear(self): - return _libhfst.HfstTwoLevelPaths_clear(self) - - def swap(self, v): - return _libhfst.HfstTwoLevelPaths_swap(self, v) - - def count(self, x): - return _libhfst.HfstTwoLevelPaths_count(self, x) - - def begin(self): - return _libhfst.HfstTwoLevelPaths_begin(self) - - def end(self): - return _libhfst.HfstTwoLevelPaths_end(self) - - def rbegin(self): - return _libhfst.HfstTwoLevelPaths_rbegin(self) - - def rend(self): - return _libhfst.HfstTwoLevelPaths_rend(self) - - def erase(self, *args): - return _libhfst.HfstTwoLevelPaths_erase(self, *args) - - def find(self, x): - return _libhfst.HfstTwoLevelPaths_find(self, x) - - def lower_bound(self, x): - return _libhfst.HfstTwoLevelPaths_lower_bound(self, x) - - def upper_bound(self, x): - return _libhfst.HfstTwoLevelPaths_upper_bound(self, x) - - def equal_range(self, x): - return _libhfst.HfstTwoLevelPaths_equal_range(self, x) - - def insert(self, __x): - return _libhfst.HfstTwoLevelPaths_insert(self, __x) - __swig_destroy__ = _libhfst.delete_HfstTwoLevelPaths - -# Register HfstTwoLevelPaths in _libhfst: -_libhfst.HfstTwoLevelPaths_swigregister(HfstTwoLevelPaths) - -class HfstTransducerPair(object): - thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") - __repr__ = _swig_repr - - def __init__(self, *args): - _libhfst.HfstTransducerPair_swiginit(self, _libhfst.new_HfstTransducerPair(*args)) - first = property(_libhfst.HfstTransducerPair_first_get, _libhfst.HfstTransducerPair_first_set) - second = property(_libhfst.HfstTransducerPair_second_get, _libhfst.HfstTransducerPair_second_set) - def __len__(self): - return 2 - def __repr__(self): - return str((self.first, self.second)) - def __getitem__(self, index): - if not (index % 2): - return self.first - else: - return self.second - def __setitem__(self, index, val): - if not (index % 2): - self.first = val - else: - self.second = val - __swig_destroy__ = _libhfst.delete_HfstTransducerPair - -# Register HfstTransducerPair in _libhfst: -_libhfst.HfstTransducerPair_swigregister(HfstTransducerPair) - -class HfstTransducerPairVector(object): - thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") - __repr__ = _swig_repr - - def iterator(self): - return _libhfst.HfstTransducerPairVector_iterator(self) - def __iter__(self): - return self.iterator() - - def __nonzero__(self): - return _libhfst.HfstTransducerPairVector___nonzero__(self) - - def __bool__(self): - return _libhfst.HfstTransducerPairVector___bool__(self) - - def __len__(self): - return _libhfst.HfstTransducerPairVector___len__(self) - - def __getslice__(self, i, j): - return _libhfst.HfstTransducerPairVector___getslice__(self, i, j) - - def __setslice__(self, *args): - return _libhfst.HfstTransducerPairVector___setslice__(self, *args) - - def __delslice__(self, i, j): - return _libhfst.HfstTransducerPairVector___delslice__(self, i, j) - - def __delitem__(self, *args): - return _libhfst.HfstTransducerPairVector___delitem__(self, *args) - - def __getitem__(self, *args): - return _libhfst.HfstTransducerPairVector___getitem__(self, *args) - - def __setitem__(self, *args): - return _libhfst.HfstTransducerPairVector___setitem__(self, *args) - - def pop(self): - return _libhfst.HfstTransducerPairVector_pop(self) - - def append(self, x): - return _libhfst.HfstTransducerPairVector_append(self, x) - - def empty(self): - return _libhfst.HfstTransducerPairVector_empty(self) - - def size(self): - return _libhfst.HfstTransducerPairVector_size(self) - - def swap(self, v): - return _libhfst.HfstTransducerPairVector_swap(self, v) - - def begin(self): - return _libhfst.HfstTransducerPairVector_begin(self) - - def end(self): - return _libhfst.HfstTransducerPairVector_end(self) - - def rbegin(self): - return _libhfst.HfstTransducerPairVector_rbegin(self) - - def rend(self): - return _libhfst.HfstTransducerPairVector_rend(self) - - def clear(self): - return _libhfst.HfstTransducerPairVector_clear(self) - - def get_allocator(self): - return _libhfst.HfstTransducerPairVector_get_allocator(self) - - def pop_back(self): - return _libhfst.HfstTransducerPairVector_pop_back(self) - - def erase(self, *args): - return _libhfst.HfstTransducerPairVector_erase(self, *args) - - def __init__(self, *args): - _libhfst.HfstTransducerPairVector_swiginit(self, _libhfst.new_HfstTransducerPairVector(*args)) - - def push_back(self, x): - return _libhfst.HfstTransducerPairVector_push_back(self, x) - - def front(self): - return _libhfst.HfstTransducerPairVector_front(self) - - def back(self): - return _libhfst.HfstTransducerPairVector_back(self) - - def assign(self, n, x): - return _libhfst.HfstTransducerPairVector_assign(self, n, x) - - def resize(self, *args): - return _libhfst.HfstTransducerPairVector_resize(self, *args) - - def insert(self, *args): - return _libhfst.HfstTransducerPairVector_insert(self, *args) - - def reserve(self, n): - return _libhfst.HfstTransducerPairVector_reserve(self, n) - - def capacity(self): - return _libhfst.HfstTransducerPairVector_capacity(self) - __swig_destroy__ = _libhfst.delete_HfstTransducerPairVector - -# Register HfstTransducerPairVector in _libhfst: -_libhfst.HfstTransducerPairVector_swigregister(HfstTransducerPairVector) - -class HfstRuleVector(object): - thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") - __repr__ = _swig_repr - - def iterator(self): - return _libhfst.HfstRuleVector_iterator(self) - def __iter__(self): - return self.iterator() - - def __nonzero__(self): - return _libhfst.HfstRuleVector___nonzero__(self) - - def __bool__(self): - return _libhfst.HfstRuleVector___bool__(self) - - def __len__(self): - return _libhfst.HfstRuleVector___len__(self) - - def __getslice__(self, i, j): - return _libhfst.HfstRuleVector___getslice__(self, i, j) - - def __setslice__(self, *args): - return _libhfst.HfstRuleVector___setslice__(self, *args) - - def __delslice__(self, i, j): - return _libhfst.HfstRuleVector___delslice__(self, i, j) - - def __delitem__(self, *args): - return _libhfst.HfstRuleVector___delitem__(self, *args) - - def __getitem__(self, *args): - return _libhfst.HfstRuleVector___getitem__(self, *args) - - def __setitem__(self, *args): - return _libhfst.HfstRuleVector___setitem__(self, *args) - - def pop(self): - return _libhfst.HfstRuleVector_pop(self) - - def append(self, x): - return _libhfst.HfstRuleVector_append(self, x) - - def empty(self): - return _libhfst.HfstRuleVector_empty(self) - - def size(self): - return _libhfst.HfstRuleVector_size(self) - - def swap(self, v): - return _libhfst.HfstRuleVector_swap(self, v) - - def begin(self): - return _libhfst.HfstRuleVector_begin(self) - - def end(self): - return _libhfst.HfstRuleVector_end(self) - - def rbegin(self): - return _libhfst.HfstRuleVector_rbegin(self) - - def rend(self): - return _libhfst.HfstRuleVector_rend(self) - - def clear(self): - return _libhfst.HfstRuleVector_clear(self) - - def get_allocator(self): - return _libhfst.HfstRuleVector_get_allocator(self) - - def pop_back(self): - return _libhfst.HfstRuleVector_pop_back(self) - - def erase(self, *args): - return _libhfst.HfstRuleVector_erase(self, *args) - - def __init__(self, *args): - _libhfst.HfstRuleVector_swiginit(self, _libhfst.new_HfstRuleVector(*args)) - - def push_back(self, x): - return _libhfst.HfstRuleVector_push_back(self, x) - - def front(self): - return _libhfst.HfstRuleVector_front(self) - - def back(self): - return _libhfst.HfstRuleVector_back(self) - - def assign(self, n, x): - return _libhfst.HfstRuleVector_assign(self, n, x) - - def resize(self, *args): - return _libhfst.HfstRuleVector_resize(self, *args) - - def insert(self, *args): - return _libhfst.HfstRuleVector_insert(self, *args) - - def reserve(self, n): - return _libhfst.HfstRuleVector_reserve(self, n) - - def capacity(self): - return _libhfst.HfstRuleVector_capacity(self) - __swig_destroy__ = _libhfst.delete_HfstRuleVector - -# Register HfstRuleVector in _libhfst: -_libhfst.HfstRuleVector_swigregister(HfstRuleVector) - -class HfstTransducerUIntPair(object): - thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") - __repr__ = _swig_repr - - def __init__(self, *args): - _libhfst.HfstTransducerUIntPair_swiginit(self, _libhfst.new_HfstTransducerUIntPair(*args)) - first = property(_libhfst.HfstTransducerUIntPair_first_get, _libhfst.HfstTransducerUIntPair_first_set) - second = property(_libhfst.HfstTransducerUIntPair_second_get, _libhfst.HfstTransducerUIntPair_second_set) - def __len__(self): - return 2 - def __repr__(self): - return str((self.first, self.second)) - def __getitem__(self, index): - if not (index % 2): - return self.first - else: - return self.second - def __setitem__(self, index, val): - if not (index % 2): - self.first = val - else: - self.second = val - __swig_destroy__ = _libhfst.delete_HfstTransducerUIntPair - -# Register HfstTransducerUIntPair in _libhfst: -_libhfst.HfstTransducerUIntPair_swigregister(HfstTransducerUIntPair) - -class LocationVector(object): - thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") - __repr__ = _swig_repr - - def iterator(self): - return _libhfst.LocationVector_iterator(self) - def __iter__(self): - return self.iterator() - - def __nonzero__(self): - return _libhfst.LocationVector___nonzero__(self) - - def __bool__(self): - return _libhfst.LocationVector___bool__(self) - - def __len__(self): - return _libhfst.LocationVector___len__(self) - - def __getslice__(self, i, j): - return _libhfst.LocationVector___getslice__(self, i, j) - - def __setslice__(self, *args): - return _libhfst.LocationVector___setslice__(self, *args) - - def __delslice__(self, i, j): - return _libhfst.LocationVector___delslice__(self, i, j) - - def __delitem__(self, *args): - return _libhfst.LocationVector___delitem__(self, *args) - - def __getitem__(self, *args): - return _libhfst.LocationVector___getitem__(self, *args) - - def __setitem__(self, *args): - return _libhfst.LocationVector___setitem__(self, *args) - - def pop(self): - return _libhfst.LocationVector_pop(self) - - def append(self, x): - return _libhfst.LocationVector_append(self, x) - - def empty(self): - return _libhfst.LocationVector_empty(self) - - def size(self): - return _libhfst.LocationVector_size(self) - - def swap(self, v): - return _libhfst.LocationVector_swap(self, v) - - def begin(self): - return _libhfst.LocationVector_begin(self) - - def end(self): - return _libhfst.LocationVector_end(self) - - def rbegin(self): - return _libhfst.LocationVector_rbegin(self) - - def rend(self): - return _libhfst.LocationVector_rend(self) - - def clear(self): - return _libhfst.LocationVector_clear(self) - - def get_allocator(self): - return _libhfst.LocationVector_get_allocator(self) - - def pop_back(self): - return _libhfst.LocationVector_pop_back(self) - - def erase(self, *args): - return _libhfst.LocationVector_erase(self, *args) - - def __init__(self, *args): - _libhfst.LocationVector_swiginit(self, _libhfst.new_LocationVector(*args)) - - def push_back(self, x): - return _libhfst.LocationVector_push_back(self, x) - - def front(self): - return _libhfst.LocationVector_front(self) - - def back(self): - return _libhfst.LocationVector_back(self) - - def assign(self, n, x): - return _libhfst.LocationVector_assign(self, n, x) - - def resize(self, *args): - return _libhfst.LocationVector_resize(self, *args) - - def insert(self, *args): - return _libhfst.LocationVector_insert(self, *args) - - def reserve(self, n): - return _libhfst.LocationVector_reserve(self, n) - - def capacity(self): - return _libhfst.LocationVector_capacity(self) - __swig_destroy__ = _libhfst.delete_LocationVector - -# Register LocationVector in _libhfst: -_libhfst.LocationVector_swigregister(LocationVector) - -class LocationVectorVector(object): - thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") - __repr__ = _swig_repr - - def iterator(self): - return _libhfst.LocationVectorVector_iterator(self) - def __iter__(self): - return self.iterator() - - def __nonzero__(self): - return _libhfst.LocationVectorVector___nonzero__(self) - - def __bool__(self): - return _libhfst.LocationVectorVector___bool__(self) - - def __len__(self): - return _libhfst.LocationVectorVector___len__(self) - - def __getslice__(self, i, j): - return _libhfst.LocationVectorVector___getslice__(self, i, j) - - def __setslice__(self, *args): - return _libhfst.LocationVectorVector___setslice__(self, *args) - - def __delslice__(self, i, j): - return _libhfst.LocationVectorVector___delslice__(self, i, j) - - def __delitem__(self, *args): - return _libhfst.LocationVectorVector___delitem__(self, *args) - - def __getitem__(self, *args): - return _libhfst.LocationVectorVector___getitem__(self, *args) - - def __setitem__(self, *args): - return _libhfst.LocationVectorVector___setitem__(self, *args) - - def pop(self): - return _libhfst.LocationVectorVector_pop(self) - - def append(self, x): - return _libhfst.LocationVectorVector_append(self, x) - - def empty(self): - return _libhfst.LocationVectorVector_empty(self) - - def size(self): - return _libhfst.LocationVectorVector_size(self) - - def swap(self, v): - return _libhfst.LocationVectorVector_swap(self, v) - - def begin(self): - return _libhfst.LocationVectorVector_begin(self) - - def end(self): - return _libhfst.LocationVectorVector_end(self) - - def rbegin(self): - return _libhfst.LocationVectorVector_rbegin(self) - - def rend(self): - return _libhfst.LocationVectorVector_rend(self) - - def clear(self): - return _libhfst.LocationVectorVector_clear(self) - - def get_allocator(self): - return _libhfst.LocationVectorVector_get_allocator(self) - - def pop_back(self): - return _libhfst.LocationVectorVector_pop_back(self) - - def erase(self, *args): - return _libhfst.LocationVectorVector_erase(self, *args) - - def __init__(self, *args): - _libhfst.LocationVectorVector_swiginit(self, _libhfst.new_LocationVectorVector(*args)) - - def push_back(self, x): - return _libhfst.LocationVectorVector_push_back(self, x) - - def front(self): - return _libhfst.LocationVectorVector_front(self) - - def back(self): - return _libhfst.LocationVectorVector_back(self) - - def assign(self, n, x): - return _libhfst.LocationVectorVector_assign(self, n, x) - - def resize(self, *args): - return _libhfst.LocationVectorVector_resize(self, *args) - - def insert(self, *args): - return _libhfst.LocationVectorVector_insert(self, *args) - - def reserve(self, n): - return _libhfst.LocationVectorVector_reserve(self, n) - - def capacity(self): - return _libhfst.LocationVectorVector_capacity(self) - __swig_destroy__ = _libhfst.delete_LocationVectorVector - -# Register LocationVectorVector in _libhfst: -_libhfst.LocationVectorVector_swigregister(LocationVectorVector) - -class HfstException(Exception): - thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") - __repr__ = _swig_repr - - def __init__(self, *args): - _libhfst.HfstException_swiginit(self, _libhfst.new_HfstException(*args)) - __swig_destroy__ = _libhfst.delete_HfstException - - def what(self): - return _libhfst.HfstException_what(self) - -# Register HfstException in _libhfst: -_libhfst.HfstException_swigregister(HfstException) - -class HfstTransducerTypeMismatchException(HfstException): - thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") - __repr__ = _swig_repr - - def __init__(self, arg2, arg3, arg4): - _libhfst.HfstTransducerTypeMismatchException_swiginit(self, _libhfst.new_HfstTransducerTypeMismatchException(arg2, arg3, arg4)) - __swig_destroy__ = _libhfst.delete_HfstTransducerTypeMismatchException - - def what(self): - return _libhfst.HfstTransducerTypeMismatchException_what(self) - -# Register HfstTransducerTypeMismatchException in _libhfst: -_libhfst.HfstTransducerTypeMismatchException_swigregister(HfstTransducerTypeMismatchException) - -class ImplementationTypeNotAvailableException(HfstException): - thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") - __repr__ = _swig_repr - - def __init__(self, arg2, arg3, arg4, type): - _libhfst.ImplementationTypeNotAvailableException_swiginit(self, _libhfst.new_ImplementationTypeNotAvailableException(arg2, arg3, arg4, type)) - __swig_destroy__ = _libhfst.delete_ImplementationTypeNotAvailableException - - def what(self): - return _libhfst.ImplementationTypeNotAvailableException_what(self) - - def get_type(self): - return _libhfst.ImplementationTypeNotAvailableException_get_type(self) - -# Register ImplementationTypeNotAvailableException in _libhfst: -_libhfst.ImplementationTypeNotAvailableException_swigregister(ImplementationTypeNotAvailableException) - -class FunctionNotImplementedException(HfstException): - thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") - __repr__ = _swig_repr - - def __init__(self, arg2, arg3, arg4): - _libhfst.FunctionNotImplementedException_swiginit(self, _libhfst.new_FunctionNotImplementedException(arg2, arg3, arg4)) - __swig_destroy__ = _libhfst.delete_FunctionNotImplementedException - - def what(self): - return _libhfst.FunctionNotImplementedException_what(self) - -# Register FunctionNotImplementedException in _libhfst: -_libhfst.FunctionNotImplementedException_swigregister(FunctionNotImplementedException) - -class StreamNotReadableException(HfstException): - thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") - __repr__ = _swig_repr - - def __init__(self, arg2, arg3, arg4): - _libhfst.StreamNotReadableException_swiginit(self, _libhfst.new_StreamNotReadableException(arg2, arg3, arg4)) - __swig_destroy__ = _libhfst.delete_StreamNotReadableException - - def what(self): - return _libhfst.StreamNotReadableException_what(self) - -# Register StreamNotReadableException in _libhfst: -_libhfst.StreamNotReadableException_swigregister(StreamNotReadableException) - -class StreamCannotBeWrittenException(HfstException): - thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") - __repr__ = _swig_repr - - def __init__(self, arg2, arg3, arg4): - _libhfst.StreamCannotBeWrittenException_swiginit(self, _libhfst.new_StreamCannotBeWrittenException(arg2, arg3, arg4)) - __swig_destroy__ = _libhfst.delete_StreamCannotBeWrittenException - - def what(self): - return _libhfst.StreamCannotBeWrittenException_what(self) - -# Register StreamCannotBeWrittenException in _libhfst: -_libhfst.StreamCannotBeWrittenException_swigregister(StreamCannotBeWrittenException) - -class StreamIsClosedException(HfstException): - thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") - __repr__ = _swig_repr - - def __init__(self, arg2, arg3, arg4): - _libhfst.StreamIsClosedException_swiginit(self, _libhfst.new_StreamIsClosedException(arg2, arg3, arg4)) - __swig_destroy__ = _libhfst.delete_StreamIsClosedException - - def what(self): - return _libhfst.StreamIsClosedException_what(self) - -# Register StreamIsClosedException in _libhfst: -_libhfst.StreamIsClosedException_swigregister(StreamIsClosedException) - -class EndOfStreamException(HfstException): - thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") - __repr__ = _swig_repr - - def __init__(self, arg2, arg3, arg4): - _libhfst.EndOfStreamException_swiginit(self, _libhfst.new_EndOfStreamException(arg2, arg3, arg4)) - __swig_destroy__ = _libhfst.delete_EndOfStreamException - - def what(self): - return _libhfst.EndOfStreamException_what(self) - -# Register EndOfStreamException in _libhfst: -_libhfst.EndOfStreamException_swigregister(EndOfStreamException) - -class TransducerIsCyclicException(HfstException): - thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") - __repr__ = _swig_repr - - def __init__(self, arg2, arg3, arg4): - _libhfst.TransducerIsCyclicException_swiginit(self, _libhfst.new_TransducerIsCyclicException(arg2, arg3, arg4)) - __swig_destroy__ = _libhfst.delete_TransducerIsCyclicException - - def what(self): - return _libhfst.TransducerIsCyclicException_what(self) - -# Register TransducerIsCyclicException in _libhfst: -_libhfst.TransducerIsCyclicException_swigregister(TransducerIsCyclicException) - -class NotTransducerStreamException(HfstException): - thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") - __repr__ = _swig_repr - - def __init__(self, arg2, arg3, arg4): - _libhfst.NotTransducerStreamException_swiginit(self, _libhfst.new_NotTransducerStreamException(arg2, arg3, arg4)) - __swig_destroy__ = _libhfst.delete_NotTransducerStreamException - - def what(self): - return _libhfst.NotTransducerStreamException_what(self) - -# Register NotTransducerStreamException in _libhfst: -_libhfst.NotTransducerStreamException_swigregister(NotTransducerStreamException) - -class NotValidAttFormatException(HfstException): - thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") - __repr__ = _swig_repr - - def __init__(self, arg2, arg3, arg4): - _libhfst.NotValidAttFormatException_swiginit(self, _libhfst.new_NotValidAttFormatException(arg2, arg3, arg4)) - __swig_destroy__ = _libhfst.delete_NotValidAttFormatException - - def what(self): - return _libhfst.NotValidAttFormatException_what(self) - -# Register NotValidAttFormatException in _libhfst: -_libhfst.NotValidAttFormatException_swigregister(NotValidAttFormatException) - -class NotValidPrologFormatException(HfstException): - thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") - __repr__ = _swig_repr - - def __init__(self, arg2, arg3, arg4): - _libhfst.NotValidPrologFormatException_swiginit(self, _libhfst.new_NotValidPrologFormatException(arg2, arg3, arg4)) - __swig_destroy__ = _libhfst.delete_NotValidPrologFormatException - - def what(self): - return _libhfst.NotValidPrologFormatException_what(self) - -# Register NotValidPrologFormatException in _libhfst: -_libhfst.NotValidPrologFormatException_swigregister(NotValidPrologFormatException) - -class NotValidLexcFormatException(HfstException): - thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") - __repr__ = _swig_repr - - def __init__(self, arg2, arg3, arg4): - _libhfst.NotValidLexcFormatException_swiginit(self, _libhfst.new_NotValidLexcFormatException(arg2, arg3, arg4)) - __swig_destroy__ = _libhfst.delete_NotValidLexcFormatException - - def what(self): - return _libhfst.NotValidLexcFormatException_what(self) - -# Register NotValidLexcFormatException in _libhfst: -_libhfst.NotValidLexcFormatException_swigregister(NotValidLexcFormatException) - -class StateIsNotFinalException(HfstException): - thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") - __repr__ = _swig_repr - - def __init__(self, arg2, arg3, arg4): - _libhfst.StateIsNotFinalException_swiginit(self, _libhfst.new_StateIsNotFinalException(arg2, arg3, arg4)) - __swig_destroy__ = _libhfst.delete_StateIsNotFinalException - - def what(self): - return _libhfst.StateIsNotFinalException_what(self) - -# Register StateIsNotFinalException in _libhfst: -_libhfst.StateIsNotFinalException_swigregister(StateIsNotFinalException) - -class ContextTransducersAreNotAutomataException(HfstException): - thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") - __repr__ = _swig_repr - - def __init__(self, arg2, arg3, arg4): - _libhfst.ContextTransducersAreNotAutomataException_swiginit(self, _libhfst.new_ContextTransducersAreNotAutomataException(arg2, arg3, arg4)) - __swig_destroy__ = _libhfst.delete_ContextTransducersAreNotAutomataException - - def what(self): - return _libhfst.ContextTransducersAreNotAutomataException_what(self) - -# Register ContextTransducersAreNotAutomataException in _libhfst: -_libhfst.ContextTransducersAreNotAutomataException_swigregister(ContextTransducersAreNotAutomataException) - -class TransducersAreNotAutomataException(HfstException): - thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") - __repr__ = _swig_repr - - def __init__(self, arg2, arg3, arg4): - _libhfst.TransducersAreNotAutomataException_swiginit(self, _libhfst.new_TransducersAreNotAutomataException(arg2, arg3, arg4)) - __swig_destroy__ = _libhfst.delete_TransducersAreNotAutomataException - - def what(self): - return _libhfst.TransducersAreNotAutomataException_what(self) - -# Register TransducersAreNotAutomataException in _libhfst: -_libhfst.TransducersAreNotAutomataException_swigregister(TransducersAreNotAutomataException) - -class StateIndexOutOfBoundsException(HfstException): - thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") - __repr__ = _swig_repr - - def __init__(self, arg2, arg3, arg4): - _libhfst.StateIndexOutOfBoundsException_swiginit(self, _libhfst.new_StateIndexOutOfBoundsException(arg2, arg3, arg4)) - __swig_destroy__ = _libhfst.delete_StateIndexOutOfBoundsException - - def what(self): - return _libhfst.StateIndexOutOfBoundsException_what(self) - -# Register StateIndexOutOfBoundsException in _libhfst: -_libhfst.StateIndexOutOfBoundsException_swigregister(StateIndexOutOfBoundsException) - -class TransducerHeaderException(HfstException): - thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") - __repr__ = _swig_repr - - def __init__(self, arg2, arg3, arg4): - _libhfst.TransducerHeaderException_swiginit(self, _libhfst.new_TransducerHeaderException(arg2, arg3, arg4)) - __swig_destroy__ = _libhfst.delete_TransducerHeaderException - - def what(self): - return _libhfst.TransducerHeaderException_what(self) - -# Register TransducerHeaderException in _libhfst: -_libhfst.TransducerHeaderException_swigregister(TransducerHeaderException) - -class MissingOpenFstInputSymbolTableException(HfstException): - thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") - __repr__ = _swig_repr - - def __init__(self, arg2, arg3, arg4): - _libhfst.MissingOpenFstInputSymbolTableException_swiginit(self, _libhfst.new_MissingOpenFstInputSymbolTableException(arg2, arg3, arg4)) - __swig_destroy__ = _libhfst.delete_MissingOpenFstInputSymbolTableException - - def what(self): - return _libhfst.MissingOpenFstInputSymbolTableException_what(self) - -# Register MissingOpenFstInputSymbolTableException in _libhfst: -_libhfst.MissingOpenFstInputSymbolTableException_swigregister(MissingOpenFstInputSymbolTableException) - -class TransducerTypeMismatchException(HfstException): - thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") - __repr__ = _swig_repr - - def __init__(self, arg2, arg3, arg4): - _libhfst.TransducerTypeMismatchException_swiginit(self, _libhfst.new_TransducerTypeMismatchException(arg2, arg3, arg4)) - __swig_destroy__ = _libhfst.delete_TransducerTypeMismatchException - - def what(self): - return _libhfst.TransducerTypeMismatchException_what(self) - -# Register TransducerTypeMismatchException in _libhfst: -_libhfst.TransducerTypeMismatchException_swigregister(TransducerTypeMismatchException) - -class EmptySetOfContextsException(HfstException): - thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") - __repr__ = _swig_repr - - def __init__(self, arg2, arg3, arg4): - _libhfst.EmptySetOfContextsException_swiginit(self, _libhfst.new_EmptySetOfContextsException(arg2, arg3, arg4)) - __swig_destroy__ = _libhfst.delete_EmptySetOfContextsException - - def what(self): - return _libhfst.EmptySetOfContextsException_what(self) - -# Register EmptySetOfContextsException in _libhfst: -_libhfst.EmptySetOfContextsException_swigregister(EmptySetOfContextsException) - -class SpecifiedTypeRequiredException(HfstException): - thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") - __repr__ = _swig_repr - - def __init__(self, arg2, arg3, arg4): - _libhfst.SpecifiedTypeRequiredException_swiginit(self, _libhfst.new_SpecifiedTypeRequiredException(arg2, arg3, arg4)) - __swig_destroy__ = _libhfst.delete_SpecifiedTypeRequiredException - - def what(self): - return _libhfst.SpecifiedTypeRequiredException_what(self) - -# Register SpecifiedTypeRequiredException in _libhfst: -_libhfst.SpecifiedTypeRequiredException_swigregister(SpecifiedTypeRequiredException) - -class HfstFatalException(HfstException): - thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") - __repr__ = _swig_repr - - def __init__(self, arg2, arg3, arg4): - _libhfst.HfstFatalException_swiginit(self, _libhfst.new_HfstFatalException(arg2, arg3, arg4)) - __swig_destroy__ = _libhfst.delete_HfstFatalException - - def what(self): - return _libhfst.HfstFatalException_what(self) - -# Register HfstFatalException in _libhfst: -_libhfst.HfstFatalException_swigregister(HfstFatalException) - -class TransducerHasWrongTypeException(HfstException): - thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") - __repr__ = _swig_repr - - def __init__(self, arg2, arg3, arg4): - _libhfst.TransducerHasWrongTypeException_swiginit(self, _libhfst.new_TransducerHasWrongTypeException(arg2, arg3, arg4)) - __swig_destroy__ = _libhfst.delete_TransducerHasWrongTypeException - - def what(self): - return _libhfst.TransducerHasWrongTypeException_what(self) - -# Register TransducerHasWrongTypeException in _libhfst: -_libhfst.TransducerHasWrongTypeException_swigregister(TransducerHasWrongTypeException) - -class IncorrectUtf8CodingException(HfstException): - thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") - __repr__ = _swig_repr - - def __init__(self, arg2, arg3, arg4): - _libhfst.IncorrectUtf8CodingException_swiginit(self, _libhfst.new_IncorrectUtf8CodingException(arg2, arg3, arg4)) - __swig_destroy__ = _libhfst.delete_IncorrectUtf8CodingException - - def what(self): - return _libhfst.IncorrectUtf8CodingException_what(self) - -# Register IncorrectUtf8CodingException in _libhfst: -_libhfst.IncorrectUtf8CodingException_swigregister(IncorrectUtf8CodingException) - -class EmptyStringException(HfstException): - thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") - __repr__ = _swig_repr - - def __init__(self, arg2, arg3, arg4): - _libhfst.EmptyStringException_swiginit(self, _libhfst.new_EmptyStringException(arg2, arg3, arg4)) - __swig_destroy__ = _libhfst.delete_EmptyStringException - - def what(self): - return _libhfst.EmptyStringException_what(self) - -# Register EmptyStringException in _libhfst: -_libhfst.EmptyStringException_swigregister(EmptyStringException) - -class SymbolNotFoundException(HfstException): - thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") - __repr__ = _swig_repr - - def __init__(self, arg2, arg3, arg4): - _libhfst.SymbolNotFoundException_swiginit(self, _libhfst.new_SymbolNotFoundException(arg2, arg3, arg4)) - __swig_destroy__ = _libhfst.delete_SymbolNotFoundException - - def what(self): - return _libhfst.SymbolNotFoundException_what(self) - -# Register SymbolNotFoundException in _libhfst: -_libhfst.SymbolNotFoundException_swigregister(SymbolNotFoundException) - -class MetadataException(HfstException): - thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") - __repr__ = _swig_repr - - def __init__(self, arg2, arg3, arg4): - _libhfst.MetadataException_swiginit(self, _libhfst.new_MetadataException(arg2, arg3, arg4)) - __swig_destroy__ = _libhfst.delete_MetadataException - - def what(self): - return _libhfst.MetadataException_what(self) - -# Register MetadataException in _libhfst: -_libhfst.MetadataException_swigregister(MetadataException) - -class FlagDiacriticsAreNotIdentitiesException(HfstException): - thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") - __repr__ = _swig_repr - - def __init__(self, arg2, arg3, arg4): - _libhfst.FlagDiacriticsAreNotIdentitiesException_swiginit(self, _libhfst.new_FlagDiacriticsAreNotIdentitiesException(arg2, arg3, arg4)) - __swig_destroy__ = _libhfst.delete_FlagDiacriticsAreNotIdentitiesException - - def what(self): - return _libhfst.FlagDiacriticsAreNotIdentitiesException_what(self) - -# Register FlagDiacriticsAreNotIdentitiesException in _libhfst: -_libhfst.FlagDiacriticsAreNotIdentitiesException_swigregister(FlagDiacriticsAreNotIdentitiesException) - -class Location(object): - r""" - - Location of a pmatch result. - - Attributes: - - start: start index of match - length: length of match - input: the matched input string - output: the matching output string - tag: the tag of match - weight: the weight of match - input_parts: tuple of indices in input_symbol_strings - output_string: tuple of indices in output_symbol_strings - input_symbol_strings: tuple of matched input symbol strings - output_symbol_strings: tuple of matching output symbol strings - - """ - - thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") - __repr__ = _swig_repr - start = property(_libhfst.Location_start_get, _libhfst.Location_start_set) - length = property(_libhfst.Location_length_get, _libhfst.Location_length_set) - input = property(_libhfst.Location_input_get, _libhfst.Location_input_set) - output = property(_libhfst.Location_output_get, _libhfst.Location_output_set) - tag = property(_libhfst.Location_tag_get, _libhfst.Location_tag_set) - weight = property(_libhfst.Location_weight_get, _libhfst.Location_weight_set) - input_parts = property(_libhfst.Location_input_parts_get, _libhfst.Location_input_parts_set) - output_parts = property(_libhfst.Location_output_parts_get, _libhfst.Location_output_parts_set) - input_symbol_strings = property(_libhfst.Location_input_symbol_strings_get, _libhfst.Location_input_symbol_strings_set) - output_symbol_strings = property(_libhfst.Location_output_symbol_strings_get, _libhfst.Location_output_symbol_strings_set) - - def __init__(self): - _libhfst.Location_swiginit(self, _libhfst.new_Location()) - __swig_destroy__ = _libhfst.delete_Location - -# Register Location in _libhfst: -_libhfst.Location_swigregister(Location) - -SFST_TYPE = _libhfst.SFST_TYPE -TROPICAL_OPENFST_TYPE = _libhfst.TROPICAL_OPENFST_TYPE -LOG_OPENFST_TYPE = _libhfst.LOG_OPENFST_TYPE -FOMA_TYPE = _libhfst.FOMA_TYPE -XFSM_TYPE = _libhfst.XFSM_TYPE -HFST_OL_TYPE = _libhfst.HFST_OL_TYPE -HFST_OLW_TYPE = _libhfst.HFST_OLW_TYPE -HFST2_TYPE = _libhfst.HFST2_TYPE -UNSPECIFIED_TYPE = _libhfst.UNSPECIFIED_TYPE -ERROR_TYPE = _libhfst.ERROR_TYPE -REPL_UP = _libhfst.REPL_UP -REPL_DOWN = _libhfst.REPL_DOWN -REPL_RIGHT = _libhfst.REPL_RIGHT -REPL_LEFT = _libhfst.REPL_LEFT -class Rule(object): - r""" - - todo - - """ - - thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") - __repr__ = _swig_repr - - def __init__(self, *args): - _libhfst.Rule_swiginit(self, _libhfst.new_Rule(*args)) - - def get_mapping(self): - return _libhfst.Rule_get_mapping(self) - - def get_context(self): - return _libhfst.Rule_get_context(self) - - def get_replType(self): - return _libhfst.Rule_get_replType(self) - - def encodeFlags(self): - return _libhfst.Rule_encodeFlags(self) - __swig_destroy__ = _libhfst.delete_Rule - -# Register Rule in _libhfst: -_libhfst.Rule_swigregister(Rule) - - -def replace(*args): - r""" - - todo - - """ - return _libhfst.replace(*args) - -def xerox_replace_left(*args): - return _libhfst.xerox_replace_left(*args) - -def replace_leftmost_longest_match(*args): - r""" - - todo - - """ - return _libhfst.replace_leftmost_longest_match(*args) - -def replace_rightmost_longest_match(*args): - r""" - - todo - - """ - return _libhfst.replace_rightmost_longest_match(*args) - -def replace_leftmost_shortest_match(*args): - r""" - - todo - - """ - return _libhfst.replace_leftmost_shortest_match(*args) - -def replace_rightmost_shortest_match(*args): - r""" - - todo - - """ - return _libhfst.replace_rightmost_shortest_match(*args) - -def replace_epenthesis(*args): - r""" - - todo - - """ - return _libhfst.replace_epenthesis(*args) - -def xerox_restriction(automata, context): - return _libhfst.xerox_restriction(automata, context) - -def before(left, right): - r""" - - todo - - """ - return _libhfst.before(left, right) - -def after(left, right): - r""" - - todo - - """ - return _libhfst.after(left, right) - -def is_diacritic(symbol): - r""" - - - Whether symbol *symbol* is a flag diacritic. - - Flag diacritics are of the form - - @[PNDRCU][.][A-Z]+([.][A-Z]+)?@ - - """ - return _libhfst.is_diacritic(symbol) - -def compile_pmatch_expression(pmatch): - r""" - - - Compile a pmatch expression into a tuple of transducers. - - Parameters - ---------- - * `expr` : - A string defining how pmatch is done. - - See also: hfst.compile_pmatch_file - - """ - return _libhfst.compile_pmatch_expression(pmatch) - -def _is_string(s): - if isinstance(s, str): - return True - else: - return False -def _is_string_pair(sp): - if not isinstance(sp, tuple): - return False - if len(sp) != 2: - return False - if not _is_string(sp[0]): - return False - if not _is_string(sp[1]): - return False - return True -def _is_string_vector(sv): - if not isinstance(sv, tuple): - return False - for s in sv: - if not _is_string(s): - return False - return True -def _is_string_pair_vector(spv): - if not isinstance(spv, tuple): - return False - for sp in spv: - if not _is_string_pair(sp): - return False - return True - -def _two_level_paths_to_dict(tlps): - retval = {} - for tlp in tlps: - input = "" - output = "" - for sp in tlp[1]: - input += sp[0] - output += sp[1] - if input in retval: - retval[input].append((output, tlp[0])) - else: - retval[input] = [(output, tlp[0])] - return retval - -def _one_level_paths_to_tuple(olps): - retval = [] - for olp in olps: - path = "" - for s in olp[1]: - path += s - retval.append((path, olp[0])) - return tuple(retval) - -class HfstTransducer(object): - r""" - - - A synchronous finite-state transducer. - - - """ - - thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") - __repr__ = _swig_repr - - def set_name(self, name): - r""" - - - Rename the transducer *name*. - - Parameters - ---------- - * `name` : - The name of the transducer. - - See also: get_name - - """ - return _libhfst.HfstTransducer_set_name(self, name) - - def get_name(self): - r""" - - - Get the name of the transducer. - - See also: set_name - - """ - return _libhfst.HfstTransducer_get_name(self) - - def get_type(self): - r""" - - - The implementation type of the transducer. - - Returns - ------- - hfst.ImplementationType - - """ - return _libhfst.HfstTransducer_get_type(self) - - def set_property(self, property, value): - r""" - - - Set arbitrary string property *property* to *value*. - - Parameters - ---------- - * `property` : - A string naming the property. - * `value` : - A string expressing the value of *property*. - - set_property('name', 'name of the transducer') equals set_name('name of the - transducer'). - - note: While this function is capable of creating endless amounts of arbitrary - metadata, it is suggested that property names are drawn from central - repository, or prefixed with "x-". A property that does not follow this - convention may affect the behavior of transducer in future releases. - - """ - return _libhfst.HfstTransducer_set_property(self, property, value) - - def get_property(self, property): - r""" - - - Get arbitrary string propert *property*. - - Parameters - ---------- - * `property` : - The name of the property whose value is returned. get_property('name') works - like get_name(). - - """ - return _libhfst.HfstTransducer_get_property(self, property) - - def get_properties(self): - r""" - - - Get all properties from the transducer. - - Returns - ------- - A dictionary whose keys are properties and whose values are the values of those - properties. - - """ - return _libhfst.HfstTransducer_get_properties(self) - - def compare(self, arg2, harmonize=True): - r""" - - - Whether this transducer and *another* are equivalent. - - Parameters - ---------- - * `another` : - The compared transducer. - - pre: *self* and *another* must have the same implementation type. - - Two transducers are equivalent iff they accept the same input/output string - pairs with the same weights and the same alignments. - - note: For weighted transducers, the function often returns false negatives due - to weight precision issues. - - """ - return _libhfst.HfstTransducer_compare(self, arg2, harmonize) - - def number_of_states(self): - r""" - - - The number of states in the transducer. - - """ - return _libhfst.HfstTransducer_number_of_states(self) - - def number_of_arcs(self): - r""" - - - The number of transitions in the transducer. - - """ - return _libhfst.HfstTransducer_number_of_arcs(self) - - def get_alphabet(self): - r""" - - - Get the alphabet of the transducer. - - The alphabet is defined as the set of symbols known to the transducer. - - Returns - ------- - A tuple of strings. - - """ - return _libhfst.HfstTransducer_get_alphabet(self) - - def is_cyclic(self): - r""" - - - Whether the transducer is cyclic. - - """ - return _libhfst.HfstTransducer_is_cyclic(self) - - def is_automaton(self): - r""" - - - Whether each transition in the transducer has equivalent input and output - symbols. - - note: Transition with hfst.UNKNOWN on both sides IS NOT a transition with - equivalent input and output symbols. - - note: Transition with hfst.IDENTITY on both sides IS a transition with - equivalent input and output symbols. - - """ - return _libhfst.HfstTransducer_is_automaton(self) - - def is_infinitely_ambiguous(self): - r""" - - - Whether the transducer is infinitely ambiguous. - - A transducer is infinitely ambiguous if there exists an input that will yield - infinitely many results, i.e. there are input epsilon loops that are traversed - with that input. - - """ - return _libhfst.HfstTransducer_is_infinitely_ambiguous(self) - - def is_lookup_infinitely_ambiguous(self, arg2): - r""" - - - Whether lookup of path *input* will have infinite results. - - Currently, this function will return whether the transducer is infinitely - ambiguous on any lookup path found in the transducer, i.e. the argument *input* - is ignored. - - Todo - Do not ignore the argument *input* - - """ - return _libhfst.HfstTransducer_is_lookup_infinitely_ambiguous(self, arg2) - - def has_flag_diacritics(self): - r""" - - - Whether the transducer has flag diacritics in its transitions. - - """ - return _libhfst.HfstTransducer_has_flag_diacritics(self) - - def insert_to_alphabet(self, arg2): - r""" - - - Explicitly insert *symbol* to the alphabet of the transducer. - - Parameters - ---------- - * `symbol` : - The symbol (string) to be inserted. - - note: Usually this function is not needed since new symbols are added to the - alphabet by default. - - """ - return _libhfst.HfstTransducer_insert_to_alphabet(self, arg2) - - def remove_from_alphabet(self, arg2): - r""" - - - Remove *symbol* from the alphabet of the transducer. - - Parameters - ---------- - * `symbol` : - The symbol (string) to be removed. - - pre: *symbol* does not occur in any transition of the transducer. - - note: Use with care, removing a symbol that occurs in a transition of the - transducer can have unexpected results. - - """ - return _libhfst.HfstTransducer_remove_from_alphabet(self, arg2) - - @staticmethod - def is_implementation_type_available(type): - r""" - - - Whether HFST is linked to the transducer library needed by implementation type - *type*. - - """ - return _libhfst.HfstTransducer_is_implementation_type_available(type) - - def longest_path_size(self, obey_flags=True): - r""" - - - Get length of longest path of the transducer. - - """ - return _libhfst.HfstTransducer_longest_path_size(self, obey_flags) - - def concatenate(self, tr, harmonize=True): - r""" - - - Concatenate this transducer with *another*. - - """ - return _libhfst.HfstTransducer_concatenate(self, tr, harmonize) - - def disjunct(self, tr, harmonize=True): - r""" - - - Disjunct this transducer with *another*. - - """ - return _libhfst.HfstTransducer_disjunct(self, tr, harmonize) - - def subtract(self, tr, harmonize=True): - r""" - - - Subtract transducer *another* from this transducer. - - """ - return _libhfst.HfstTransducer_subtract(self, tr, harmonize) - - def intersect(self, tr, harmonize=True): - r""" - - - Intersect this transducer with *another*. - - """ - return _libhfst.HfstTransducer_intersect(self, tr, harmonize) - - def compose(self, tr, harmonize=True): - r""" - - - Compose this transducer with *another*. - - Parameters - ---------- - * `another` : - The second argument in the composition. Not modified. - - """ - return _libhfst.HfstTransducer_compose(self, tr, harmonize) - - def compose_intersect(self, v, invert=False, harmonize=True): - r""" - - - Compose this transducer with the intersection of transducers in *v*. - - If *invert* is true, then compose the intersection of the transducers in *v* - with this transducer. - - The algorithm used by this function is faster than intersecting all transducers - one by one and then composing this transducer with the intersection. - - pre: The transducers in *v* are deterministic and epsilon-free. - - Parameters - ---------- - * `v` : - A tuple of transducers. - * `invert` : - Whether the intersection of the transducers in *v* is composed with this - transducer. - - """ - return _libhfst.HfstTransducer_compose_intersect(self, v, invert, harmonize) - - def priority_union(self, another): - r""" - - - Make priority union of this transducer with *another*. - - For the operation t1.priority_union(t2), the result is a union of t1 and t2, - except that whenever t1 and t2 have the same string on left side, the path in t2 - overrides the path in t1. - - Example - - Transducer 1 (t1): - a : a - b : b - - Transducer 2 (t2): - b : B - c : C - - Result ( t1.priority_union(t2) ): - a : a - b : B - c : C For more information, read fsmbook. - - """ - return _libhfst.HfstTransducer_priority_union(self, another) - - def lenient_composition(self, another, harmonize=True): - r""" - - - Perform a lenient composition on this transducer and *another*. - - TODO: explain more. - - """ - return _libhfst.HfstTransducer_lenient_composition(self, another, harmonize) - - def cross_product(self, another, harmonize=True): - r""" - - - Make cross product of this transducer with *another*. - - It pairs every string of this with every string of *another*. If strings are not - the same length, epsilon padding will be added in the end of the shorter string. - - pre: Both transducers must be automata, i.e. map strings onto themselves. - - """ - return _libhfst.HfstTransducer_cross_product(self, another, harmonize) - - def shuffle(self, another, harmonize=True): - r""" - - - Shuffle this transducer with transducer *another*. - - If transducer A accepts string 'foo' and transducer B string 'bar', the - transducer that results from shuffling A and B accepts all strings - [(f|b)(o|a)(o|r)]. - - pre: Both transducers must be automata, i.e. map strings onto themselves. - - """ - return _libhfst.HfstTransducer_shuffle(self, another, harmonize) - - def remove_epsilons(self): - r""" - - - Remove all *epsilon:epsilon* transitions from the transducer so that the - resulting transducer is equivalent to the original one. - - """ - return _libhfst.HfstTransducer_remove_epsilons(self) - - def determinize(self): - r""" - - - Determinize the transducer. - - Determinizing a transducer yields an equivalent transducer that has no state - with two or more transitions whose input:output symbol pairs are the same. - - """ - return _libhfst.HfstTransducer_determinize(self) - - def minimize(self): - r""" - - - Minimize the transducer. - - Minimizing a transducer yields an equivalent transducer with the smallest number - of states. - - Bug - OpenFst's minimization algorithm seems to add epsilon transitions to weighted - transducers? - - """ - return _libhfst.HfstTransducer_minimize(self) - - def prune(self): - r""" - - - Make transducer coaccessible. - - A transducer is coaccessible iff there is a path from every state to a final - state. - - """ - return _libhfst.HfstTransducer_prune(self) - - def eliminate_flags(self): - r""" - - - Eliminate flag diacritics listed in *symbols* from the transducer. - - Parameters - ---------- - * `symbols` : - The flags to be eliminated. TODO: explain more. - - An equivalent transducer with no flags listed in *symbols*. - - """ - return _libhfst.HfstTransducer_eliminate_flags(self) - - def eliminate_flag(self, f): - r""" - - - Eliminate flag diacritic *symbol* from the transducer. - - Parameters - ---------- - * `symbol` : - The flag to be eliminated. TODO: explain more. - - An equivalent transducer with no flags *symbol*. - - """ - return _libhfst.HfstTransducer_eliminate_flag(self, f) - - def n_best(self, n): - r""" - - - Extract *n* best paths of the transducer. - - In the case of a weighted transducer (hfst.ImplementationType.TROPICAL_OPENFST_TYPE or - hfst.ImplementationType.LOG_OPENFST_TYPE), best paths are defined as paths with the lowest - weight. In the case of an unweighted transducer (hfst.ImplementationType.SFST_TYPE or - hfst.ImplementationType.FOMA_TYPE), the function returns random paths. - - This function is not implemented for hfst.ImplementationType.FOMA_TYPE or - hfst.ImplementationType.SFST_TYPE. If this function is called by an HfstTransducer of type - hfst.ImplementationType.FOMA_TYPE or hfst.ImplementationType.SFST_TYPE, it is converted to - hfst.ImplementationType.TROPICAL_OPENFST_TYPE, paths are extracted and it is converted back - to hfst.ImplementationType.FOMA_TYPE or hfst.ImplementationType.SFST_TYPE. If HFST is not linked to - OpenFst library, an hfst.exceptions.ImplementationTypeNotAvailableException is - thrown. - - """ - return _libhfst.HfstTransducer_n_best(self, n) - - def convert(self, impl): - r""" - - - Convert the transducer into an equivalent transducer in format *type*. - - If a weighted transducer is converted into an unweighted one, all weights are - lost. In the reverse case, all weights are initialized to the semiring's one. - - A transducer of type hfst.ImplementationType.SFST_TYPE, hfst.ImplementationType.TROPICAL_OPENFST_TYPE, - hfst.ImplementationType.LOG_OPENFST_TYPE or hfst.ImplementationType.FOMA_TYPE can be converted into an - hfst.ImplementationType.HFST_OL_TYPE or hfst.ImplementationType.HFST_OLW_TYPE transducer, but an - hfst.ImplementationType.HFST_OL_TYPE or hfst.ImplementationType.HFST_OLW_TYPE transducer cannot be - converted to any other type. - - note: For conversion between HfstBasicTransducer and HfstTransducer, see - hfst.HfstTransducer.__init__ and hfst.HfstBasicTransducer.__init__ - - """ - return _libhfst.HfstTransducer_convert(self, impl) - - def repeat_star(self): - r""" - - - A concatenation of N transducers where N is any number from zero to infinity. - - """ - return _libhfst.HfstTransducer_repeat_star(self) - - def repeat_plus(self): - r""" - - - A concatenation of N transducers where N is any number from one to infinity. - - """ - return _libhfst.HfstTransducer_repeat_plus(self) - - def repeat_n(self, n): - r""" - - - A concatenation of *n* transducers. - - """ - return _libhfst.HfstTransducer_repeat_n(self, n) - - def repeat_n_to_k(self, n, k): - r""" - - - A concatenation of N transducers where N is any number from *n* to *k*, - inclusive. - - """ - return _libhfst.HfstTransducer_repeat_n_to_k(self, n, k) - - def repeat_n_minus(self, n): - r""" - - - A concatenation of N transducers where N is any number from zero to *n*, - inclusive. - - """ - return _libhfst.HfstTransducer_repeat_n_minus(self, n) - - def repeat_n_plus(self, n): - r""" - - - A concatenation of N transducers where N is any number from *n* to infinity, - inclusive. - - """ - return _libhfst.HfstTransducer_repeat_n_plus(self, n) - - def invert(self): - r""" - - - Swap the input and output symbols of each transition in the transducer. - - """ - return _libhfst.HfstTransducer_invert(self) - - def reverse(self): - r""" - - - Reverse the transducer. - - A reverted transducer accepts the string 'n(0) n(1) ... n(N)' iff the original - transducer accepts the string 'n(N) n(N-1) ... n(0)' - - """ - return _libhfst.HfstTransducer_reverse(self) - - def input_project(self): - r""" - - - Extract the input language of the transducer. - - All transition symbol pairs *isymbol:osymbol* are changed to *isymbol:isymbol*. - - """ - return _libhfst.HfstTransducer_input_project(self) - - def output_project(self): - r""" - - - Extract the output language of the transducer. - - All transition symbol pairs *isymbol:osymbol* are changed to *osymbol:osymbol*. - - """ - return _libhfst.HfstTransducer_output_project(self) - - def optionalize(self): - r""" - - - Disjunct the transducer with an epsilon transducer. - - """ - return _libhfst.HfstTransducer_optionalize(self) - - def insert_freely(self, *args): - r""" - - - Freely insert a transition or a transducer into the transducer. - - Parameters - ---------- - * `ins` : - The transition or transducer to be inserted. - - If *ins* is a transition, i.e. a 2-tuple of strings: A transition is added to - each state in this transducer. The transition leads from that state to itself - with input and output symbols defined by *ins*. The weight of the transition is - zero. - - If *ins* is an hfst.HfstTransducer: A copy of *ins* is attached with epsilon - transitions to each state of this transducer. After the operation, for each - state S in this transducer, there is an epsilon transition that leads from state - S to the initial state of *ins*, and for each final state of *ins*, there is an - epsilon transition that leads from that final state to state S in this - transducer. The weights of the final states in *ins* are copied to the epsilon - transitions leading to state S. - - """ - return _libhfst.HfstTransducer_insert_freely(self, *args) - - def _substitute_symbol(self, old_symbol, new_symbol, input_side=True, output_side=True): - return _libhfst.HfstTransducer__substitute_symbol(self, old_symbol, new_symbol, input_side, output_side) - - def _substitute_symbol_pair(self, old_symbol_pair, new_symbol_pair): - return _libhfst.HfstTransducer__substitute_symbol_pair(self, old_symbol_pair, new_symbol_pair) - - def _substitute_symbol_pair_with_set(self, old_symbol_pair, new_symbol_pair_set): - return _libhfst.HfstTransducer__substitute_symbol_pair_with_set(self, old_symbol_pair, new_symbol_pair_set) - - def _substitute_symbol_pair_with_transducer(self, symbol_pair, transducer, harmonize=True): - return _libhfst.HfstTransducer__substitute_symbol_pair_with_transducer(self, symbol_pair, transducer, harmonize) - - def _substitute_symbols(self, substitutions): - return _libhfst.HfstTransducer__substitute_symbols(self, substitutions) - - def _substitute_symbol_pairs(self, substitutions): - return _libhfst.HfstTransducer__substitute_symbol_pairs(self, substitutions) - - def set_final_weights(self, weight, increment=False): - r""" - - - Set the weights of all final states to *weight*. - - If the HfstTransducer is of unweighted type (hfst.ImplementationType.SFST_TYPE or - hfst.ImplementationType.FOMA_TYPE), nothing is done. - - """ - return _libhfst.HfstTransducer_set_final_weights(self, weight, increment) - - def push_weights_to_start(self): - r""" - - - Push weights towards initial state. - - If the HfstTransducer is of unweighted type (hfst.ImplementationType.SFST_TYPE or - hfst.ImplementationType.FOMA_TYPE), nothing is done. - - An example: - - >>> import hfst - >>> tr = hfst.regex('[a::1 a:b::0.3 (b::0)]::0.7;') - >>> tr.push_weights_to_start() - >>> print(tr) - 0 1 a a 2.000000 - 1 2 a b 0.000000 - 2 3 b b 0.000000 - 2 0.000000 - 3 0.000000 - - See also: hfst.HfstTransducer.push_weights_to_end - - """ - return _libhfst.HfstTransducer_push_weights_to_start(self) - - def push_weights_to_end(self): - r""" - - - Push weights towards final state(s). - - If the HfstTransducer is of unweighted type (hfst.ImplementationType.SFST_TYPE or - hfst.ImplementationType.FOMA_TYPE), nothing is done. - - An example: - - >>> import hfst - >>> tr = hfst.regex('[a::1 a:b::0.3 (b::0)]::0.7;') - >>> tr.push_weights_to_end() - >>> print(tr) - 0 1 a a 0.000000 - 1 2 a b 0.000000 - 2 3 b b 0.000000 - 2 2.000000 - 3 2.000000 - - See also: hfst.HfstTransducer.push_weights_to_start - - """ - return _libhfst.HfstTransducer_push_weights_to_end(self) - - def minus(self, t, harmonize=True): - r""" - - - Alias for subtract. - - See also: hfst.HfstTransducer.subtract - - """ - return _libhfst.HfstTransducer_minus(self, t, harmonize) - - def conjunct(self, t, harmonize=True): - r""" - - - Alias for intersect. - - See also: hfst.HfstTransducer.intersect - - """ - return _libhfst.HfstTransducer_conjunct(self, t, harmonize) - - def lookup_optimize(self): - r""" - - - Optimize the transducer for lookup. - - This effectively converts the transducer into hfst.ImplementationType.HFST_OL_TYPE. - - """ - return _libhfst.HfstTransducer_lookup_optimize(self) - - def remove_optimization(self): - r""" - - - Remove lookup optimization. - - This effectively converts transducer (back) into default fst type. - - """ - return _libhfst.HfstTransducer_remove_optimization(self) - - def __init__(self, *args): - _libhfst.HfstTransducer_swiginit(self, _libhfst.new_HfstTransducer(*args)) - __swig_destroy__ = _libhfst.delete_HfstTransducer - - def __str__(self): - r""" - - - An AT&T representation of the transducer. - - Defined for print command. An example: - - >>> print(hfst.regex('[foo:bar::2]+')) - 0 1 foo bar 2.000000 - 1 1 foo bar 2.000000 - 1 0.000000 Todo - Works only for small transducers. - - """ - return _libhfst.HfstTransducer___str__(self) - - def write(self, os): - r""" - - - Write the transducer in binary format to *ostr*. - - Parameters - ---------- - * `ostr` : - A hfst.HfstOutputStream where the transducer is written. - - """ - return _libhfst.HfstTransducer_write(self, os) - - def _extract_shortest_paths(self): - return _libhfst.HfstTransducer__extract_shortest_paths(self) - - def _extract_longest_paths(self, obey_flags): - return _libhfst.HfstTransducer__extract_longest_paths(self, obey_flags) - - def _extract_paths(self, max_num=-1, cycles=-1): - return _libhfst.HfstTransducer__extract_paths(self, max_num, cycles) - - def _extract_paths_fd(self, max_num=-1, cycles=-1, filter_fd=True): - return _libhfst.HfstTransducer__extract_paths_fd(self, max_num, cycles, filter_fd) - - def _extract_random_paths(self, max_num): - return _libhfst.HfstTransducer__extract_random_paths(self, max_num) - - def _extract_random_paths_fd(self, max_num, filter_fd): - return _libhfst.HfstTransducer__extract_random_paths_fd(self, max_num, filter_fd) - - def _lookup_vector(self, s, limit=-1, time_cutoff=0.0): - return _libhfst.HfstTransducer__lookup_vector(self, s, limit, time_cutoff) - - def _lookup_fd_vector(self, s, limit=-1, time_cutoff=0.0): - return _libhfst.HfstTransducer__lookup_fd_vector(self, s, limit, time_cutoff) - - def _lookup_fd_string(self, s, limit=-1, time_cutoff=0.0): - return _libhfst.HfstTransducer__lookup_fd_string(self, s, limit, time_cutoff) - - def _lookup_string(self, s, limit=-1, time_cutoff=0.0): - return _libhfst.HfstTransducer__lookup_string(self, s, limit, time_cutoff) - - - def copy(self): - """ - Return a deep copy of the transducer. - """ - return HfstTransducer(self) - - def write_to_file(self, filename_): - """ - Write the transducer in binary format to file *filename_*. - """ - ostr = HfstOutputStream(filename=filename_, type=self.get_type(), hfst_format=True) - ostr.write(self) - ostr.close() - - def read_from_file(filename_): - """ - Read a binary transducer from file *filename_*. - """ - istr = HfstInputStream(filename_) - tr = istr.read() - istr.close() - return tr - - def write_prolog(self, f, write_weights=True): - """ - Write the transducer in prolog format with name *name* to file *f*, - *write_weights* defined whether weights are written. - - Parameters - ---------- - * `f` : - A python file where the transducer is written. - * `write_weights` : - Whether weights are written. - """ - fsm = HfstBasicTransducer(self) - fsm.name = self.get_name() - prologstr = fsm.get_prolog_string(write_weights) - f.write(prologstr) - - def write_xfst(self, f, write_weights=True): - """ - Write the transducer in xfst format to file *f*, *write_weights* defined whether - weights are written. - - Parameters - ---------- - * `f` : - A python file where transducer is written. - * `write_weights` : - Whether weights are written. - """ - fsm = HfstBasicTransducer(self) - fsm.name = self.get_name() - xfststr = fsm.get_xfst_string(write_weights) - f.write(xfst) - - def write_att(self, f, write_weights=True): - """ - Write the transducer in AT&T format to file *f*, *write_weights* defined whether - weights are written. - - Parameters - ---------- - * `f` : - A python file where transducer is written. - * `write_weights` : - Whether weights are written. - """ - fsm = HfstBasicTransducer(self) - fsm.name = self.get_name() - attstr = fsm.get_att_string(write_weights) - f.write(attstr) - - def lookup(self, input, **kwargs): - """ - Lookup string *input*. - - Parameters - ---------- - * `input` : - The input. A string or a pre-tokenized tuple of symbols (i.e. a tuple of strings). - * `kwargs` : - Possible parameters and their default values are: obey_flags=True, - max_number=-1, time_cutoff=0.0, output='tuple' - * `obey_flags` : - Whether flag diacritics are obeyed. Always True for HFST_OL(W)_TYPE transducers. - * `max_number` : - Maximum number of results returned, defaults to -1, i.e. infinity. - * `time_cutoff` : - How long the function can search for results before returning, expressed in - seconds. Defaults to 0.0, i.e. infinitely. Always 0.0 for transducers that are - not of HFST_OL(W)_TYPE. - * `output` : - Possible values are 'tuple', 'text' and 'raw', 'tuple' being the default. - - Note: This function has an efficient implementation only for optimized lookup format - (hfst.ImplementationType.HFST_OL_TYPE or hfst.ImplementationType.HFST_OLW_TYPE). Other formats perform the - lookup via composition. Consider converting the transducer to optimized lookup format - or to a HfstBasicTransducer. Conversion to HFST_OL(W)_TYPE might take a while but the - lookup is fast. Conversion to HfstBasicTransducer is quick but lookup is slower. - """ - obey_flags=True - max_number=-1 - time_cutoff=0.0 - output='tuple' # 'tuple' (default), 'text', 'raw' - - for k,v in kwargs.items(): - if k == 'obey_flags': - if v == True: - pass - elif v == False: - obey_flags=False - else: - print('Warning: ignoring argument %s as it has value %s.' % (k, v)) - print("Possible values are True and False.") - elif k == 'output': - if v == 'text': - output='text' - elif v == 'raw': - output='raw' - elif v == 'tuple': - output='tuple' - else: - print('Warning: ignoring argument %s as it has value %s.' % (k, v)) - print("Possible values are 'tuple' (default), 'text', 'raw'.") - elif k == 'max_number' : - max_number=v - elif k == 'time_cutoff' : - time_cutoff=v - else: - print('Warning: ignoring unknown argument %s.' % (k)) - - retval=0 - - if isinstance(input, tuple): - if obey_flags: - retval=self._lookup_fd_vector(input, max_number, time_cutoff) - else: - retval=self._lookup_vector(input, max_number, time_cutoff) - elif isinstance(input, str): - if obey_flags: - retval=self._lookup_fd_string(input, max_number, time_cutoff) - else: - retval=self._lookup_string(input, max_number, time_cutoff) - else: - try: - if obey_flags: - retval=self._lookup_fd_string(str(input), max_number, time_cutoff) - else: - retval=self._lookup_string(str(input), max_number, time_cutoff) - except: - raise RuntimeError('Input argument must be string or tuple.') - - if output == 'text': - return one_level_paths_to_string(retval) - elif output == 'tuple': - return _one_level_paths_to_tuple(retval) - else: - return retval - - def extract_longest_paths(self, **kwargs): - """ - Extract longest paths of the transducer. - - Parameters - ---------- - * `kwargs` : - Possible parameters and their default values are: obey_flags=True, - output='dict' - * `obey_flags` : - Whether flag diacritics are obeyed. The default is True. - * `output` : - Possible values are 'dict', 'text' and 'raw', 'dict' being the default. - - """ - obey_flags=True - output='dict' # 'dict' (default), 'text', 'raw' - - for k,v in kwargs.items(): - if k == 'obey_flags': - if v == True: - pass - elif v == False: - obey_flags=False - else: - print('Warning: ignoring argument %s as it has value %s.' % (k, v)) - print("Possible values are True and False.") - elif k == 'output': - if v == 'text': - output == 'text' - elif v == 'raw': - output='raw' - elif v == 'dict': - output='dict' - else: - print('Warning: ignoring argument %s as it has value %s.' % (k, v)) - print("Possible values are 'dict' (default), 'text', 'raw'.") - else: - print('Warning: ignoring unknown argument %s.' % (k)) - - retval = self._extract_longest_paths(obey_flags) - - if output == 'text': - return two_level_paths_to_string(retval) - elif output == 'dict': - return _two_level_paths_to_dict(retval) - else: - return retval - - def extract_shortest_paths(self, **kwargs): - """ - Extract shortest paths of the transducer. - - Parameters - ---------- - * `kwargs` : - Possible parameters and their default values are: obey_flags=True. - * `output` : - Possible values are 'dict', 'text' and 'raw', 'dict' being the default. - - """ - output='dict' # 'dict' (default), 'text', 'raw' - - for k,v in kwargs.items(): - if k == 'output': - if v == 'text': - output == 'text' - elif v == 'raw': - output='raw' - elif v == 'dict': - output='dict' - else: - print('Warning: ignoring argument %s as it has value %s.' % (k, v)) - print("Possible values are 'dict' (default), 'text', 'raw'.") - else: - print('Warning: ignoring unknown argument %s.' % (k)) - - retval = self._extract_shortest_paths() - - if output == 'text': - return two_level_paths_to_string(retval) - elif output == 'dict': - return _two_level_paths_to_dict(retval) - else: - return retval - - def extract_paths(self, **kwargs): - """ - - Extract paths that are recognized by the transducer. - - Parameters - ---------- - * `kwargs` : - Arguments recognized are filter_flags, max_cycles, max_number, obey_flags, - output, random. - * `filter_flags` : - Whether flags diacritics are filtered out from the result (default True). - * `max_cycles` : - Indicates how many times a cycle will be followed, with negative numbers - indicating unlimited (default -1 i.e. unlimited). - * `max_number` : - The total number of resulting strings is capped at this value, with 0 or - negative indicating unlimited (default -1 i.e. unlimited). - * `obey_flags` : - Whether flag diacritics are validated (default True). - * `output` : - Output format. Values recognized: 'text' (as a string, separated by - newlines), 'raw' (a dictionary that maps each input string into a list of - tuples of an output string and a weight), 'dict' (a dictionary that maps - each input string into a tuple of tuples of an output string and a weight, - the default). - * `random` : - Whether result strings are fetched randomly (default False). - - Returns - ------- - The extracted strings. *output* controls how they are represented. - - pre: The transducer must be acyclic, if both *max_number* and *max_cycles* have - unlimited values. Else a hfst.exceptions.TransducerIsCyclicException will be - thrown. - - An example: - - >>> tr = hfst.regex('a:b+ (a:c+)') - >>> print(tr) - 0 1 a b 0.000000 - 1 1 a b 0.000000 - 1 2 a c 0.000000 - 1 0.000000 - 2 2 a c 0.000000 - 2 0.000000 - - >>> print(tr.extract_paths(max_cycles=1, output='text')) - a:b 0 - aa:bb 0 - aaa:bbc 0 - aaaa:bbcc 0 - aa:bc 0 - aaa:bcc 0 - - >>> print(tr.extract_paths(max_number=4, output='text')) - a:b 0 - aa:bc 0 - aaa:bcc 0 - aaaa:bccc 0 - - >>> print(tr.extract_paths(max_cycles=1, max_number=4, output='text')) - a:b 0 - aa:bb 0 - aa:bc 0 - aaa:bcc 0 - - Exceptions - ---------- - * `TransducerIsCyclicException` : - - See also: hfst.HfstTransducer.n_best - """ - obey_flags=True - filter_flags=True - max_cycles=-1 - max_number=-1 - random=False - output='dict' # 'dict' (default), 'text', 'raw' - - for k,v in kwargs.items(): - if k == 'obey_flags' : - if v == True: - pass - elif v == False: - obey_flags=False - else: - print('Warning: ignoring argument %s as it has value %s.' % (k, v)) - print("Possible values are True and False.") - elif k == 'filter_flags' : - if v == True: - pass - elif v == False: - filter_flags=False - else: - print('Warning: ignoring argument %s as it has value %s.' % (k, v)) - print("Possible values are True and False.") - elif k == 'max_cycles' : - max_cycles=v - elif k == 'max_number' : - max_number=v - elif k == 'random' : - if v == False: - pass - elif v == True: - random=True - else: - print('Warning: ignoring argument %s as it has value %s.' % (k, v)) - print("Possible values are True and False.") - elif k == 'output': - if v == 'text': - output = 'text' - elif v == 'raw': - output='raw' - elif v == 'dict': - output='dict' - else: - print('Warning: ignoring argument %s as it has value %s.' % (k, v)) - print("Possible values are 'dict' (default), 'text', 'raw'.") - else: - print('Warning: ignoring unknown argument %s.' % (k)) - - retval=0 - - if obey_flags : - if random : - retval=self._extract_random_paths_fd(max_number, filter_flags) - else : - retval=self._extract_paths_fd(max_number, max_cycles) - else : - if random : - retval=self._extract_random_paths(max_number) - else : - retval=self._extract_paths(max_number, max_cycles) - - if output == 'text': - return two_level_paths_to_string(retval) - elif output == 'dict': - return _two_level_paths_to_dict(retval) - else: - return retval - - def substitute(self, s, S=None, **kwargs): - """ - Substitute symbols or transitions in the transducer. - - Parameters - ---------- - * `s` : - The symbol or transition to be substituted. Can also be a dictionary of - substitutions, if S == None. - * `S` : - The symbol, transition, a tuple of transitions or a transducer - (hfst.HfstTransducer) that substitutes *s*. - * `kwargs` : - Arguments recognized are 'input' and 'output', their values can be False or - True, True being the default. These arguments are valid only if *s* and *S* - are strings, else they are ignored. - * `input` : - Whether substitution is performed on input side, defaults to True. Valid - only if *s* and *S* are strings. - * `output` : - Whether substitution is performed on output side, defaults to True. Valid - only if *s* and \\ S are strings. - - For more information, see hfst.HfstBasicTransducer.substitute. The function - works similarly, with the exception of argument *S*, which must be - hfst.HfstTransducer instead of hfst.HfstBasicTransducer. - - See also: hfst.HfstBasicTransducer.substitute - """ - if S == None: - if not isinstance(s, dict): - raise RuntimeError('Sole input argument must be a dictionary.') - - subst_type="" - - for k, v in s.items(): - if _is_string(k): - if not subst_type: - subst_type="string" - elif subst_type == "string pair": - raise RuntimeError('') - if not _is_string(v): - raise RuntimeError('') - elif _is_string_pair(k): - if not subst_type: - subst_type="string pair" - elif subst_type == "string": - raise RuntimeError('') - if not _is_string_pair(v): - raise RuntimeError('') - else: - raise RuntimeError('') - - if subst_type == "string": - return self._substitute_symbols(s) - else: - return self._substitute_symbol_pairs(s) - - if _is_string(s): - if _is_string(S): - input=True - output=True - for k,v in kwargs.items(): - if k == 'input': - if v == False: - input=False - elif k == 'output': - if v == False: - output=False - else: - raise RuntimeError('Free argument not recognized.') - return self._substitute_symbol(s, S, input, output) - else: - raise RuntimeError('...') - elif _is_string_pair(s): - if _is_string_pair(S): - return self._substitute_symbol_pair(s, S) - elif _is_string_pair_vector(S): - return self._substitute_symbol_pair_with_set(s, S) - elif isinstance(S, HfstTransducer): - return self._substitute_symbol_pair_with_transducer(s, S, True) - else: - raise RuntimeError('...') - else: - raise RuntimeError('...') - - -# Register HfstTransducer in _libhfst: -_libhfst.HfstTransducer_swigregister(HfstTransducer) - -def HfstTransducer_is_implementation_type_available(type): - r""" - - - Whether HFST is linked to the transducer library needed by implementation type - *type*. - - """ - return _libhfst.HfstTransducer_is_implementation_type_available(type) - - -def create_hfst_output_stream(filename, type, hfst_format): - return _libhfst.create_hfst_output_stream(filename, type, hfst_format) -class HfstOutputStream(object): - r""" - - - A stream for writing binary transducers. - - An example: - - res = ['foo:bar','0','0 - 0','"?":?','a* b+'] - ostr = hfst.HfstOutputStream(filename='testfile1.hfst') - for re in res: - ostr.write(hfst.regex(re)) - ostr.flush() - ostr.close() - - For more information on HFST transducer structure, see this page. - - """ - - thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") - __repr__ = _swig_repr - __swig_destroy__ = _libhfst.delete_HfstOutputStream - - def flush(self): - r""" - - - Flush the stream. - - """ - return _libhfst.HfstOutputStream_flush(self) - - def close(self): - r""" - - - Close the stream. - - If the stream points to standard output, nothing is done. - - """ - return _libhfst.HfstOutputStream_close(self) - - def redirect(self, arg2): - return _libhfst.HfstOutputStream_redirect(self, arg2) - - def __init__(self): - _libhfst.HfstOutputStream_swiginit(self, _libhfst.new_HfstOutputStream()) - - - def write(self, tr): - """ - Write one or more transducers to stream. - - Parameters - ---------- - * `tr` : - An HfstTransducer or an iterable object of several HfstTransducers. - """ - if isinstance(tr, HfstTransducer): - self.redirect(tr) - else: - for t in tr: - if isinstance(t, HfstTransducer): - self.redirect(t) - else: - raise RuntimeError('Cannot write objects that are not instances of HfstTransducer') - - def __init__(self, **kwargs): - """ - Open a stream for writing binary transducers. Note: hfst.HfstTransducer.write_to_file - is probably the easiest way to write a single binary transducer to a file. - - Parameters - ---------- - * `kwargs` : - Arguments recognized are filename, hfst_format, type. - * `filename` : - The name of the file where transducers are written. If the file exists, it - is overwritten. If *filename* is not given, transducers are written to - standard output. - * `hfst_format` : - Whether transducers are written in hfst format (default is True) or as such - in their backend format. - * `type` : - The type of the transducers that will be written to the stream. Default is - hfst.get_default_fst_type(). - - Examples: - - # a stream for writing default type transducers in hfst format to standard output - ostr = hfst.HfstOutputStream() - transducer = hfst.regex('foo:bar::0.5') - ostr.write(transducer) - ostr.flush() - - # a stream for writing native sfst type transducers to a file - ostr = hfst.HfstOutputStream(filename='transducer.sfst', hfst_format=False, type=hfst.ImplementationType.SFST_TYPE) - transducer1 = hfst.regex('foo:bar') - transducer1.convert(hfst.ImplementationType.SFST_TYPE) # if not set as the default type - transducer2 = hfst.regex('bar:baz') - transducer2.convert(hfst.ImplementationType.SFST_TYPE) # if not set as the default type - ostr.write(transducer1) - ostr.write(transducer2) - ostr.flush() - ostr.close() - """ - filename = "" - hfst_format = True - type = _libhfst.get_default_fst_type() - for k,v in kwargs.items(): - if k == 'filename': - filename = v - if k == 'hfst_format': - hfst_format = v - if k == 'type': - type = v - if not filename: - self.this = _libhfst.create_hfst_output_stream("", type, hfst_format) - else: - self.this = _libhfst.create_hfst_output_stream(filename, type, hfst_format) - - -# Register HfstOutputStream in _libhfst: -_libhfst.HfstOutputStream_swigregister(HfstOutputStream) - -class HfstInputStream(object): - r""" - - - A stream for reading HFST binary transducers. - - An example: - - istr = hfst.HfstInputStream('testfile1.hfst') - transducers = [] - while not (istr.is_eof()): - transducers.append(istr.read()) - istr.close() - print("Read %i transducers in total." % len(transducers)) - - For documentation on the HFST binary transducer format, see here. - - """ - - thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") - __repr__ = _swig_repr - - def __init__(self, *args): - _libhfst.HfstInputStream_swiginit(self, _libhfst.new_HfstInputStream(*args)) - __swig_destroy__ = _libhfst.delete_HfstInputStream - - def close(self): - r""" - - - Close the stream. - - If the stream points to standard input, nothing is done. - - """ - return _libhfst.HfstInputStream_close(self) - - def is_eof(self): - r""" - - - Whether the stream is at end. - - """ - return _libhfst.HfstInputStream_is_eof(self) - - def is_bad(self): - r""" - - - Whether badbit is set. - - """ - return _libhfst.HfstInputStream_is_bad(self) - - def is_good(self): - r""" - - - Whether the state of the stream is good for input operations. - - """ - return _libhfst.HfstInputStream_is_good(self) - - def get_type(self): - r""" - - - The type of the first transducer in the stream. - - By default, all transducers in a stream have the same type, else a - TransducerTypeMismatchException is thrown when reading the first transducer that - has a different type than the previous ones. - - """ - return _libhfst.HfstInputStream_get_type(self) - - def read(self): - r""" - - - Return next transducer. - - Exceptions - ---------- - * `EndOfStreamException` : - - """ - return _libhfst.HfstInputStream_read(self) - - - def read_all(self): - """ - Read all transducers from stream and return them in a list. - """ - retval = [] - while(not self.is_eof()): - retval.append(self.read()) - return retval - - def __iter__(self): - """ - Return *self*. Needed for 'for ... in' statement. - """ - return self - - def next(self): - """ - Read next transducer from stream and return it. Needed for 'for ... in' statement. - """ - if self.is_eof(): - raise StopIteration - else: - return self.read(); - - def __next__(self): - """ - Read next transducer from stream and return it. Needed for 'for ... in' statement. - """ - return self.next() - - - -# Register HfstInputStream in _libhfst: -_libhfst.HfstInputStream_swigregister(HfstInputStream) - -class HfstTokenizer(object): - thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") - __repr__ = _swig_repr - - def __init__(self): - _libhfst.HfstTokenizer_swiginit(self, _libhfst.new_HfstTokenizer()) - - def add_skip_symbol(self, symbol): - return _libhfst.HfstTokenizer_add_skip_symbol(self, symbol) - - def add_multichar_symbol(self, symbol): - return _libhfst.HfstTokenizer_add_multichar_symbol(self, symbol) - - def tokenize_one_level(self, input_string): - return _libhfst.HfstTokenizer_tokenize_one_level(self, input_string) - - @staticmethod - def tokenize_space_separated(str): - return _libhfst.HfstTokenizer_tokenize_space_separated(str) - - def tokenize(self, *args): - return _libhfst.HfstTokenizer_tokenize(self, *args) - - @staticmethod - def check_utf8_correctness(input_string): - return _libhfst.HfstTokenizer_check_utf8_correctness(input_string) - __swig_destroy__ = _libhfst.delete_HfstTokenizer - -# Register HfstTokenizer in _libhfst: -_libhfst.HfstTokenizer_swigregister(HfstTokenizer) - -def HfstTokenizer_tokenize_space_separated(str): - return _libhfst.HfstTokenizer_tokenize_space_separated(str) - -def HfstTokenizer_check_utf8_correctness(input_string): - return _libhfst.HfstTokenizer_check_utf8_correctness(input_string) - -class HfstBasicTransducer(object): - r""" - - - A simple transducer class with tropical weights. - - An example of creating an HfstBasicTransducer [foo:bar baz:baz] with weight 0.4 - from scratch: - - # Create an empty transducer - # The transducer has initially one start state (number zero) - # that is not final - fsm = hfst.HfstBasicTransducer() - # Add two states to the transducer - fsm.add_state(1) - fsm.add_state(2) - # Create a transition [foo:bar] leading to state 1 with weight 0.1 - tr = hfst.HfstBasicTransition(1, 'foo', 'bar', 0.1) - # and add it to state zero - fsm.add_transition(0, tr) - # Add a transition [baz:baz] with weight 0 from state 1 to state 2 - fsm.add_transition(1, hfst.HfstBasicTransition(2, 'baz', 'baz', 0.0)) - # Set state 2 as final with weight 0.3 - fsm.set_final_weight(2, 0.3) - - An example of iterating through the states and transitions of the above - transducer when printing them in AT&T format to standard output: - - # Go through all states - for state, arcs in enumerate(fsm): - for arc in arcs: - print('%i ' % (state), end='') - print(arc) - if fsm.is_final_state(state): - print('%i %f' % (state, fsm.get_final_weight(state)) ) - - See also: hfst.HfstBasicTransition - - """ - - thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") - __repr__ = _swig_repr - - def __init__(self, *args): - _libhfst.HfstBasicTransducer_swiginit(self, _libhfst.new_HfstBasicTransducer(*args)) - name = property(_libhfst.HfstBasicTransducer_name_get, _libhfst.HfstBasicTransducer_name_set) - - def add_symbol_to_alphabet(self, symbol): - return _libhfst.HfstBasicTransducer_add_symbol_to_alphabet(self, symbol) - - def remove_symbol_from_alphabet(self, symbol): - return _libhfst.HfstBasicTransducer_remove_symbol_from_alphabet(self, symbol) - - def remove_symbols_from_alphabet(self, symbols): - return _libhfst.HfstBasicTransducer_remove_symbols_from_alphabet(self, symbols) - - def add_symbols_to_alphabet(self, symbols): - return _libhfst.HfstBasicTransducer_add_symbols_to_alphabet(self, symbols) - - def symbols_used(self): - return _libhfst.HfstBasicTransducer_symbols_used(self) - - def prune_alphabet(self, force=True): - return _libhfst.HfstBasicTransducer_prune_alphabet(self, force) - - def get_alphabet(self): - return _libhfst.HfstBasicTransducer_get_alphabet(self) - - def get_input_symbols(self): - return _libhfst.HfstBasicTransducer_get_input_symbols(self) - - def get_output_symbols(self): - return _libhfst.HfstBasicTransducer_get_output_symbols(self) - - def get_transition_pairs(self): - return _libhfst.HfstBasicTransducer_get_transition_pairs(self) - - def add_state(self, *args): - return _libhfst.HfstBasicTransducer_add_state(self, *args) - - def get_max_state(self): - return _libhfst.HfstBasicTransducer_get_max_state(self) - - def states(self): - return _libhfst.HfstBasicTransducer_states(self) - - def remove_transition(self, s, transition, remove_symbols_from_alphabet=False): - return _libhfst.HfstBasicTransducer_remove_transition(self, s, transition, remove_symbols_from_alphabet) - - def is_final_state(self, s): - return _libhfst.HfstBasicTransducer_is_final_state(self, s) - - def get_final_weight(self, s): - return _libhfst.HfstBasicTransducer_get_final_weight(self, s) - - def set_final_weight(self, s, weight): - return _libhfst.HfstBasicTransducer_set_final_weight(self, s, weight) - - def remove_final_weight(self, s): - return _libhfst.HfstBasicTransducer_remove_final_weight(self, s) - - def _transitions(self, s): - return _libhfst.HfstBasicTransducer__transitions(self, s) - - def is_infinitely_ambiguous(self): - return _libhfst.HfstBasicTransducer_is_infinitely_ambiguous(self) - - def is_lookup_infinitely_ambiguous(self, s): - return _libhfst.HfstBasicTransducer_is_lookup_infinitely_ambiguous(self, s) - - def longest_path_size(self): - return _libhfst.HfstBasicTransducer_longest_path_size(self) - - def _substitute_symbol(self, old_symbol, new_symbol, input_side=True, output_side=True): - return _libhfst.HfstBasicTransducer__substitute_symbol(self, old_symbol, new_symbol, input_side, output_side) - - def _substitute_symbol_pair(self, old_symbol_pair, new_symbol_pair): - return _libhfst.HfstBasicTransducer__substitute_symbol_pair(self, old_symbol_pair, new_symbol_pair) - - def _substitute_symbol_pair_with_set(self, old_symbol_pair, new_symbol_pair_set): - return _libhfst.HfstBasicTransducer__substitute_symbol_pair_with_set(self, old_symbol_pair, new_symbol_pair_set) - - def _substitute_symbol_pair_with_transducer(self, symbol_pair, transducer): - return _libhfst.HfstBasicTransducer__substitute_symbol_pair_with_transducer(self, symbol_pair, transducer) - - def _substitute_symbols(self, substitutions): - return _libhfst.HfstBasicTransducer__substitute_symbols(self, substitutions) - - def _substitute_symbol_pairs(self, substitutions): - return _libhfst.HfstBasicTransducer__substitute_symbol_pairs(self, substitutions) - - def insert_freely(self, *args): - return _libhfst.HfstBasicTransducer_insert_freely(self, *args) - - def sort_arcs(self): - return _libhfst.HfstBasicTransducer_sort_arcs(self) - - def disjunct(self, spv, weight): - return _libhfst.HfstBasicTransducer_disjunct(self, spv, weight) - - def harmonize(self, another): - return _libhfst.HfstBasicTransducer_harmonize(self, another) - - def _lookup(self, lookup_path, infinite_cutoff, max_weight, obey_flags): - return _libhfst.HfstBasicTransducer__lookup(self, lookup_path, infinite_cutoff, max_weight, obey_flags) - - def get_prolog_string(self, write_weights): - return _libhfst.HfstBasicTransducer_get_prolog_string(self, write_weights) - - def get_xfst_string(self, write_weights): - return _libhfst.HfstBasicTransducer_get_xfst_string(self, write_weights) - - def get_att_string(self, write_weights): - return _libhfst.HfstBasicTransducer_get_att_string(self, write_weights) - - def __str__(self): - return _libhfst.HfstBasicTransducer___str__(self) - - def add_transition(self, *args): - return _libhfst.HfstBasicTransducer_add_transition(self, *args) - - def transitions(self, s): - """ - ... - """ - tr = self._transitions(s) - retval = [] - for i in range(0, len(tr)): - retval.append(tr[i]) - return retval - - def states_and_transitions(self): - """ - ... - """ - retval = [] - for s in self.states(): - retval.append(self.transitions(s)) - return retval - - def __iter__(self): - """ - Return states and transitions of the transducer. - """ - return self.states_and_transitions().__iter__() - - def __enumerate__(self): - """ - Return an enumeration of states and transitions of the transducer. - """ - return enumerate(self.states_and_transitions()) - - def write_prolog(self, f, write_weights=True): - """ - Write the transducer in prolog format with name *name* to file *f*, - *write_weights* defined whether weights are written. - - Parameters - ---------- - * `f` : - A python file where the transducer is written. - * `write_weights` : - Whether weights are written. - """ - prologstr = self.get_prolog_string(write_weights) - f.write(prologstr) - - def write_xfst(self, f, write_weights=True): - """ - Write the transducer in xfst format to file *f*, *write_weights* defined whether - weights are written. - - Parameters - ---------- - * `f` : - A python file where transducer is written. - * `write_weights` : - Whether weights are written. - """ - xfststr = self.get_xfst_string(write_weights) - f.write(xfststr) - - def write_att(self, f, write_weights=True): - """ - Write the transducer in AT&T format to file *f*, *write_weights* defined whether - weights are written. - - Parameters - ---------- - * `f` : - A python file where transducer is written. - * `write_weights` : - Whether weights are written. - """ - attstr = self.get_att_string(write_weights) - f.write(attstr) - - def lookup(self, lookup_path, **kwargs): - """ - Lookup tokenized input *input* in the transducer. - - Parameters - ---------- - * `str` : - A list/tuple of strings to look up. - * `kwargs` : - infinite_cutoff=-1, max_weight=None, obey_flags=False - * `max_epsilon_loops` : - How many times epsilon input loops are followed. Defaults to -1, i.e. infinitely. - * `max_weight` : - What is the maximum weight of a result allowed. Defaults to None, i.e. infinity. - * `obey_flags` : - Whether flag diacritic constraints are obeyed. Defaults to False. - """ - max_weight = None - max_epsilon_loops = None - obey_flags = False - output='dict' # 'dict' (default), 'text', 'raw' - - for k,v in kwargs.items(): - if k == 'max_weight' : - max_weight=v - elif k == 'max_epsilon_loops' : - infinite_cutoff=v - elif k == 'obey_flags' : - obey_flags=v - elif k == 'output': - if v == 'text': - output == 'text' - elif v == 'raw': - output='raw' - elif v == 'dict': - output='dict' - else: - print('Warning: ignoring argument %s as it has value %s.' % (k, v)) - print("Possible values are 'dict' (default), 'text', 'raw'.") - else: - print('Warning: ignoring unknown argument %s.' % (k)) - - retval = self._lookup(lookup_path, max_epsilon_loops, max_weight, obey_flags) - - if output == 'text': - return _two_level_paths_to_string(retval) - elif output == 'dict': - return _two_level_paths_to_dict(retval) - else: - return retval - - def substitute(self, s, S=None, **kwargs): - """ - - Substitute symbols or transitions in the transducer. - - Parameters - ---------- - * `s` : - The symbol or transition to be substituted. Can also be a dictionary of - substitutions, if S == None. - * `S` : - The symbol, transition, a tuple of transitions or a transducer - (hfst.HfstBasicTransducer) that substitutes *s*. - * `kwargs` : - Arguments recognized are 'input' and 'output', their values can be False or - True, True being the default. These arguments are valid only if *s* and *S* - are strings, else they are ignored. - * `input` : - Whether substitution is performed on input side, defaults to True. Valid - only if *s* and *S* are strings. - * `output` : - Whether substitution is performed on output side, defaults to True. Valid - only if *s* and *S* are strings. - - Possible combinations of arguments and their types are: - - (1) substitute(str, str, input=bool, output=bool): substitute symbol with symbol - on input, output or both sides of each transition in the transducer. (2) - substitute(strpair, strpair): substitute transition with transition (3) - substitute(strpair, strpairtuple): substitute transition with several - transitions (4) substitute(strpair, transducer): substitute transition with a - transducer (5) substitute(dict): perform several symbol-to-symbol substitutions - (6) substitute(dict): perform several transition-to-transition substitutions - - Examples: - - (1) tr.substitute('a', 'A', input=True, output=False): substitute lowercase a:s - with uppercase ones (2) tr.substitute(('a','b'),('A','B')): substitute - transitions that map lowercase a into lowercase b with transitions that map - uppercase a into uppercase b (3) tr.substitute(('a','b'), - (('A','B'),('a','B'),('A','b'))): change either or both sides of a transition - [a:b] to uppercase (4) tr.substitute(('a','b'), hfst.regex('[a:b]+')) change - [a:b] transition into one or more consecutive [a:b] transitions (5) - tr.substitute({'a':'A', 'b':'B', 'c':'C'}) change lowercase a, b and c into - their uppercase variants (6) tr.substitute( {('a','a'):('A','A'), - ('b','b'):('B','B'), ('c','c'):('C','C')} ): change lowercase a, b and c into - their uppercase variants - - In case (4), epsilon transitions are used to attach copies of transducer *S* - between the SOURCE and TARGET state of each transition that is substituted. The - transition itself is deleted, but its weight is copied to the epsilon transition - leading from SOURCE to the initial state of *S*. Each final state of *S* is made - non-final and an epsilon transition leading to TARGET is attached to it. The - final weight is copied to the epsilon transition. - """ - if S == None: - if not isinstance(s, dict): - raise RuntimeError('First input argument must be a dictionary.') - - subst_type="" - - for k, v in s.items(): - if _is_string(k): - if not subst_type: - subst_type="string" - elif subst_type == "string pair": - raise RuntimeError('') - if not _is_string(v): - raise RuntimeError('') - elif _is_string_pair(k): - if not subst_type: - subst_type="string pair" - elif subst_type == "string": - raise RuntimeError('') - if not _is_string_pair(v): - raise RuntimeError('') - else: - raise RuntimeError('') - - if subst_type == "string": - return self._substitute_symbols(s) - else: - return self._substitute_symbol_pairs(s) - - if _is_string(s): - if _is_string(S): - input=True - output=True - for k,v in kwargs.items(): - if k == 'input': - if v == False: - input=False - elif k == 'output': - if v == False: - output=False - else: - raise RuntimeError('Free argument not recognized.') - return self._substitute_symbol(s, S, input, output) - else: - raise RuntimeError('...') - elif _is_string_pair(s): - if _is_string_pair(S): - return self._substitute_symbol_pair(s, S) - elif _is_string_pair_vector(S): - return self._substitute_symbol_pair_with_set(s, S) - elif isinstance(S, HfstBasicTransducer): - return self._substitute_symbol_pair_with_transducer(s, S) - else: - raise RuntimeError('...') - else: - raise RuntimeError('...') - - - __swig_destroy__ = _libhfst.delete_HfstBasicTransducer - -# Register HfstBasicTransducer in _libhfst: -_libhfst.HfstBasicTransducer_swigregister(HfstBasicTransducer) - -class HfstBasicTransition(object): - thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") - __repr__ = _swig_repr - - def __init__(self, *args): - _libhfst.HfstBasicTransition_swiginit(self, _libhfst.new_HfstBasicTransition(*args)) - __swig_destroy__ = _libhfst.delete_HfstBasicTransition - - def get_target_state(self): - return _libhfst.HfstBasicTransition_get_target_state(self) - - def get_input_symbol(self): - return _libhfst.HfstBasicTransition_get_input_symbol(self) - - def set_input_symbol(self, symbol): - return _libhfst.HfstBasicTransition_set_input_symbol(self, symbol) - - def get_output_symbol(self): - return _libhfst.HfstBasicTransition_get_output_symbol(self) - - def set_output_symbol(self, symbol): - return _libhfst.HfstBasicTransition_set_output_symbol(self, symbol) - - def get_weight(self): - return _libhfst.HfstBasicTransition_get_weight(self) - - def set_weight(self, f): - return _libhfst.HfstBasicTransition_set_weight(self, f) - - def __str__(self): - return _libhfst.HfstBasicTransition___str__(self) - -# Register HfstBasicTransition in _libhfst: -_libhfst.HfstBasicTransition_swigregister(HfstBasicTransition) - -class XreCompiler(object): - thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") - __repr__ = _swig_repr - - def __init__(self, *args): - _libhfst.XreCompiler_swiginit(self, _libhfst.new_XreCompiler(*args)) - - def define_list(self, name, symbol_list): - return _libhfst.XreCompiler_define_list(self, name, symbol_list) - - def define_function(self, name, arguments, xre): - return _libhfst.XreCompiler_define_function(self, name, arguments, xre) - - def is_definition(self, name): - return _libhfst.XreCompiler_is_definition(self, name) - - def is_function_definition(self, name): - return _libhfst.XreCompiler_is_function_definition(self, name) - - def undefine(self, name): - return _libhfst.XreCompiler_undefine(self, name) - - def compile(self, xre): - return _libhfst.XreCompiler_compile(self, xre) - - def set_verbosity(self, verbose): - return _libhfst.XreCompiler_set_verbosity(self, verbose) - - def getOutputToConsole(self): - return _libhfst.XreCompiler_getOutputToConsole(self) - - def set_expand_definitions(self, expand): - return _libhfst.XreCompiler_set_expand_definitions(self, expand) - - def set_harmonization(self, harmonize): - return _libhfst.XreCompiler_set_harmonization(self, harmonize) - - def contained_only_comments(self): - return _libhfst.XreCompiler_contained_only_comments(self) - - def define_xre(self, name, xre): - return _libhfst.XreCompiler_define_xre(self, name, xre) - - def define_transducer(self, name, transducer): - return _libhfst.XreCompiler_define_transducer(self, name, transducer) - - def setOutputToConsole(self, value): - return _libhfst.XreCompiler_setOutputToConsole(self, value) - - def compile_first(self, xre): - return _libhfst.XreCompiler_compile_first(self, xre) - __swig_destroy__ = _libhfst.delete_XreCompiler - -# Register XreCompiler in _libhfst: -_libhfst.XreCompiler_swigregister(XreCompiler) - -class LexcCompiler(object): - thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") - __repr__ = _swig_repr - - def __init__(self, *args): - _libhfst.LexcCompiler_swiginit(self, _libhfst.new_LexcCompiler(*args)) - - def setVerbosity(self, verbose): - return _libhfst.LexcCompiler_setVerbosity(self, verbose) - - def setOutputToConsole(self, arg2): - return _libhfst.LexcCompiler_setOutputToConsole(self, arg2) - __swig_destroy__ = _libhfst.delete_LexcCompiler - -# Register LexcCompiler in _libhfst: -_libhfst.LexcCompiler_swigregister(LexcCompiler) - -class XfstCompiler(object): - thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") - __repr__ = _swig_repr - - def __init__(self, *args): - _libhfst.XfstCompiler_swiginit(self, _libhfst.new_XfstCompiler(*args)) - - def setOutputToConsole(self, value): - return _libhfst.XfstCompiler_setOutputToConsole(self, value) - - def setReadInteractiveTextFromStdin(self, Value): - return _libhfst.XfstCompiler_setReadInteractiveTextFromStdin(self, Value) - - def setReadline(self, value): - return _libhfst.XfstCompiler_setReadline(self, value) - - def setVerbosity(self, verbosity): - return _libhfst.XfstCompiler_setVerbosity(self, verbosity) - - def set(self, name, text): - return _libhfst.XfstCompiler_set(self, name, text) - - def get_prompt(self): - return _libhfst.XfstCompiler_get_prompt(self) - - def apply_up(self, indata): - return _libhfst.XfstCompiler_apply_up(self, indata) - - def apply_down(self, indata): - return _libhfst.XfstCompiler_apply_down(self, indata) - - def parse_line(self, line): - return _libhfst.XfstCompiler_parse_line(self, line) - - def quit_requested(self): - return _libhfst.XfstCompiler_quit_requested(self) - __swig_destroy__ = _libhfst.delete_XfstCompiler - -# Register XfstCompiler in _libhfst: -_libhfst.XfstCompiler_swigregister(XfstCompiler) - - -def get_hfst_regex_error_message(): - return _libhfst.get_hfst_regex_error_message() - -def hfst_regex(comp, regex_string, error_stream): - return _libhfst.hfst_regex(comp, regex_string, error_stream) - -def get_hfst_xfst_string_one(): - return _libhfst.get_hfst_xfst_string_one() - -def get_hfst_xfst_string_two(): - return _libhfst.get_hfst_xfst_string_two() - -def hfst_compile_xfst_to_string_one(comp, input): - return _libhfst.hfst_compile_xfst_to_string_one(comp, input) - -def hfst_compile_xfst(comp, input, output_stream, error_stream): - return _libhfst.hfst_compile_xfst(comp, input, output_stream, error_stream) - -def get_hfst_lexc_output(): - return _libhfst.get_hfst_lexc_output() - -def hfst_compile_lexc(comp, filename, error_stream): - return _libhfst.hfst_compile_lexc(comp, filename, error_stream) - -def get_hfst_sfst_output(): - return _libhfst.get_hfst_sfst_output() - -def hfst_compile_sfst(filename, error_stream, verbose, output_to_console): - return _libhfst.hfst_compile_sfst(filename, error_stream, verbose, output_to_console) - -def one_level_paths_to_string(arg1): - return _libhfst.one_level_paths_to_string(arg1) - -def two_level_paths_to_string(arg1): - return _libhfst.two_level_paths_to_string(arg1) - -def parse_prolog_network_line(line, graph): - return _libhfst.parse_prolog_network_line(line, graph) - -def parse_prolog_arc_line(line, graph): - return _libhfst.parse_prolog_arc_line(line, graph) - -def parse_prolog_symbol_line(line, graph): - return _libhfst.parse_prolog_symbol_line(line, graph) - -def parse_prolog_final_line(line, graph): - return _libhfst.parse_prolog_final_line(line, graph) - -def set_default_fst_type(t): - r""" - - - Set the default implementation type. - - Parameters - ---------- - * `impl` : - An hfst.ImplementationType. - - Set the implementation type (SFST_TYPE, TROPICAL_OPENFST_TYPE, FOMA_TYPE) that - is used by default by all operations that create transducers. The default value - is TROPICAL_OPENFST_TYPE - - """ - return _libhfst.set_default_fst_type(t) - -def get_default_fst_type(): - r""" - - - Get default transducer implementation type. - - If the default type is not set, it defaults to hfst.ImplementationType.TROPICAL_OPENFST_TYPE - - """ - return _libhfst.get_default_fst_type() - -def fst_type_to_string(t): - r""" - - - Get a string representation of transducer implementation type *type*. - - Parameters - ---------- - * `type` : - An hfst.ImplementationType. - - """ - return _libhfst.fst_type_to_string(t) - -def two_level_if(context, mappings, alphabet): - return _libhfst.two_level_if(context, mappings, alphabet) - -def two_level_only_if(context, mappings, alphabet): - return _libhfst.two_level_only_if(context, mappings, alphabet) - -def two_level_if_and_only_if(context, mappings, alphabet): - return _libhfst.two_level_if_and_only_if(context, mappings, alphabet) - -def replace_down_karttunen(context, mapping, optional, alphabet): - return _libhfst.replace_down_karttunen(context, mapping, optional, alphabet) - -def replace_right(context, mapping, optional, alphabet): - return _libhfst.replace_right(context, mapping, optional, alphabet) - -def replace_left(context, mapping, optional, alphabet): - return _libhfst.replace_left(context, mapping, optional, alphabet) - -def replace_up(mapping, optional, alphabet): - return _libhfst.replace_up(mapping, optional, alphabet) - -def replace_down(*args): - return _libhfst.replace_down(*args) - -def left_replace_up(*args): - return _libhfst.left_replace_up(*args) - -def left_replace_down(context, mapping, optional, alphabet): - return _libhfst.left_replace_down(context, mapping, optional, alphabet) - -def left_replace_down_karttunen(context, mapping, optional, alphabet): - return _libhfst.left_replace_down_karttunen(context, mapping, optional, alphabet) - -def left_replace_left(context, mapping, optional, alphabet): - return _libhfst.left_replace_left(context, mapping, optional, alphabet) - -def left_replace_right(context, mapping, optional, alphabet): - return _libhfst.left_replace_right(context, mapping, optional, alphabet) - -def restriction(contexts, mapping, alphabet): - return _libhfst.restriction(contexts, mapping, alphabet) - -def coercion(contexts, mapping, alphabet): - return _libhfst.coercion(contexts, mapping, alphabet) - -def restriction_and_coercion(contexts, mapping, alphabet): - return _libhfst.restriction_and_coercion(contexts, mapping, alphabet) - -def surface_restriction(contexts, mapping, alphabet): - return _libhfst.surface_restriction(contexts, mapping, alphabet) - -def surface_coercion(contexts, mapping, alphabet): - return _libhfst.surface_coercion(contexts, mapping, alphabet) - -def surface_restriction_and_coercion(contexts, mapping, alphabet): - return _libhfst.surface_restriction_and_coercion(contexts, mapping, alphabet) - -def deep_restriction(contexts, mapping, alphabet): - return _libhfst.deep_restriction(contexts, mapping, alphabet) - -def deep_coercion(contexts, mapping, alphabet): - return _libhfst.deep_coercion(contexts, mapping, alphabet) - -def deep_restriction_and_coercion(contexts, mapping, alphabet): - return _libhfst.deep_restriction_and_coercion(contexts, mapping, alphabet) -class TwolcCompiler(object): - thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") - __repr__ = _swig_repr - - @staticmethod - def compile(inputfile, outputfile, silent, verbose, resolve_left_conflicts, resolve_right_conflicts, type): - return _libhfst.TwolcCompiler_compile(inputfile, outputfile, silent, verbose, resolve_left_conflicts, resolve_right_conflicts, type) - - def __init__(self): - _libhfst.TwolcCompiler_swiginit(self, _libhfst.new_TwolcCompiler()) - __swig_destroy__ = _libhfst.delete_TwolcCompiler - -# Register TwolcCompiler in _libhfst: -_libhfst.TwolcCompiler_swigregister(TwolcCompiler) - -def TwolcCompiler_compile(inputfile, outputfile, silent, verbose, resolve_left_conflicts, resolve_right_conflicts, type): - return _libhfst.TwolcCompiler_compile(inputfile, outputfile, silent, verbose, resolve_left_conflicts, resolve_right_conflicts, type) - - -def pmatch_get_tokenized_output(cont, input_text, output_format, max_weight_classes, dedupe, print_weights, print_all, time_cutoff, verbose, beam, tokenize_multichar): - return _libhfst.pmatch_get_tokenized_output(cont, input_text, output_format, max_weight_classes, dedupe, print_weights, print_all, time_cutoff, verbose, beam, tokenize_multichar) - -def pmatch_locate(*args): - return _libhfst.pmatch_locate(*args) -class PmatchContainer(object): - r""" - - - A class for performing pattern matching. - - """ - - thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") - __repr__ = _swig_repr - __swig_destroy__ = _libhfst.delete_PmatchContainer - - def match(self, input, time_cutoff=0.0): - r""" - - - Match input *input*. - - """ - return _libhfst.PmatchContainer_match(self, input, time_cutoff) - - def get_profiling_info(self): - r""" - - - todo - - """ - return _libhfst.PmatchContainer_get_profiling_info(self) - - def set_verbose(self, b): - r""" - - - todo - - """ - return _libhfst.PmatchContainer_set_verbose(self, b) - - def set_profile(self, b): - r""" - - - todo - - """ - return _libhfst.PmatchContainer_set_profile(self, b) - - def __init__(self, *args): - _libhfst.PmatchContainer_swiginit(self, _libhfst.new_PmatchContainer(*args)) - - def locate(self, *args): - r""" - - - The locations of pmatched strings for string *input* where the results are limited - as defined by *time_cutoff* and *weight_cutoff*. - - Parameters - ---------- - * `input` : - The input string. - * `time_cutoff` : - Time cutoff, defaults to zero, i.e. no cutoff. - * `weight_cutoff` : - Weight cutoff, defaults to infinity, i.e. no cutoff. - - Returns - ------- - A tuple of tuples of Location. - - """ - return _libhfst.PmatchContainer_locate(self, *args) - - def get_tokenized_output(self, input, **kwargs): - """ - Tokenize *input* and get a string representation of the tokenization - (essentially the same that command line tool hfst-tokenize would give). - - Parameters - ---------- - * `input` : - The input string to be tokenized. - * `kwargs` : - Possible parameters are: - output_format, max_weight_classes, dedupe, print_weights, print_all, - time_cutoff, verbose, beam, tokenize_multichar. - * `output_format` : - The format of output; possible values are 'tokenize', 'xerox', 'cg', 'finnpos', - 'giellacg', 'conllu' and 'visl'; 'tokenize' being the default. - * `max_weight_classes` : - Maximum number of best weight classes to output - (where analyses with equal weight constitute a class), defaults to None i.e. no limit. - * `dedupe` : - Whether duplicate analyses are removed, defaults to False. - * `print_weights` : - Whether weights are printd, defaults to False. - * `print_all` : - Whether nonmatching text is printed, defaults to False. - * `time_cutoff` : - Maximum number of seconds used per input after limiting the search. - * `verbose` : - Whether input is processed verbosely, defaults to True. - * `beam` : - Beam within analyses must be to get printed. - * `tokenize_multichar` : - Tokenize input into multicharacter symbols present in the transducer, defaults to false. - """ - output_format='tokenize' - max_weight_classes=None - dedupe=False - print_weights=False - print_all=False - time_cutoff=0.0 - verbose=True - beam=-1.0 - tokenize_multichar=False - for k,v in kwargs.items(): - if k == 'output_format': - if v == 'tokenize' or v == 'space_separated' or v == 'xerox' or v == 'cg' or v == 'finnpos' or v == 'giellacg' or v == 'conllu': - output_format=v - else: - print('Warning: ignoring unknown value %s for argument %s.' % (v,k)) - elif k == 'max_weight_classes': - max_weight_classes=int(v) - elif k == 'dedupe': - dedupe=v - elif k == 'print_weights': - print_weights=v - elif k == 'print_all': - print_all=v - elif k == 'time_cutoff': - time_cutoff=float(v) - elif k == 'verbose': - verbose=v - elif k == 'beam': - beam=float(v) - elif k == 'tokenize_multichar': - tokenize_multichar=v - else: - print('Warning: ignoring unknown argument %s.' % (k)) - return pmatch_get_tokenized_output(self, input, output_format, max_weight_classes, dedupe, print_weights, print_all, time_cutoff, verbose, beam, tokenize_multichar) - - def tokenize(self, input): - """ - Tokenize *input* and return a list of tokens i.e. strings. - - Parameters - ---------- - * `input` : - The string to be tokenized. - """ - retval = [] - locations = self.locate(input) - for loc in locations: - if loc[0].output != "@_NONMATCHING_@": - retval.append(loc[0].input) - return retval - - - -# Register PmatchContainer in _libhfst: -_libhfst.PmatchContainer_swigregister(PmatchContainer) - - - -class ImplementationType: - """ - Back-end implementation. - - Attributes: - - SFST_TYPE: SFST type, unweighted - TROPICAL_OPENFST_TYPE: OpenFst type with tropical weights - LOG_OPENFST_TYPE: OpenFst type with logarithmic weights (limited support) - FOMA_TYPE: FOMA type, unweighted - XFSM_TYPE: XFST type, unweighted (limited support) - HFST_OL_TYPE: HFST optimized-lookup type, unweighted - HFST_OLW_TYPE: HFST optimized-lookup type, weighted - HFST2_TYPE: HFST version 2 legacy type - UNSPECIFIED_TYPE: type not specified - ERROR_TYPE: (something went wrong) - - """ - SFST_TYPE = _libhfst.SFST_TYPE - TROPICAL_OPENFST_TYPE = _libhfst.TROPICAL_OPENFST_TYPE - LOG_OPENFST_TYPE = _libhfst.LOG_OPENFST_TYPE - FOMA_TYPE = _libhfst.FOMA_TYPE - XFSM_TYPE = _libhfst.XFSM_TYPE - HFST_OL_TYPE = _libhfst.HFST_OL_TYPE - HFST_OLW_TYPE = _libhfst.HFST_OLW_TYPE - HFST2_TYPE = _libhfst.HFST2_TYPE - UNSPECIFIED_TYPE = _libhfst.UNSPECIFIED_TYPE - ERROR_TYPE = _libhfst.ERROR_TYPE - -class ReplaceType: - """ - Replace type in Xerox-type rules. - - Attributes: - - REPL_UP: Match contexts on input level - REPL_DOWN: Match contexts on output level - REPL_RIGHT: Match left contexts on input level and right contexts on output level - REPL_LEFT: Match left contexts on output level and right contexts on input level - - """ - REPL_UP = _libhfst.REPL_UP - REPL_DOWN = _libhfst.REPL_DOWN - REPL_RIGHT = _libhfst.REPL_RIGHT - REPL_LEFT = _libhfst.REPL_LEFT - - - - diff --git a/src/hfst-old-pypi/libhfst_wrap.cpp b/src/hfst-old-pypi/libhfst_wrap.cpp deleted file mode 100644 index 43d7a6d..0000000 --- a/src/hfst-old-pypi/libhfst_wrap.cpp +++ /dev/null @@ -1,55146 +0,0 @@ -/* ---------------------------------------------------------------------------- - * This file was automatically generated by SWIG (http://www.swig.org). - * Version 4.0.2 - * - * 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. - * ----------------------------------------------------------------------------- */ - - -#ifndef SWIGPYTHON -#define SWIGPYTHON -#endif - -#define SWIG_PYTHON_DIRECTOR_NO_VTABLE - - -#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 defined(__GNUC__) -# if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) -# ifndef GCC_HASCLASSVISIBILITY -# define GCC_HASCLASSVISIBILITY -# endif -# 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 - -/* Deal with Apple's deprecated 'AssertMacros.h' from Carbon-framework */ -#if defined(__APPLE__) && !defined(__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES) -# define __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES 0 -#endif - -/* Intel's compiler complains if a variable which was never initialised is - * cast to void, which is a common idiom which we use to indicate that we - * are aware a variable isn't used. So we just silence that warning. - * See: https://github.com/swig/swig/issues/192 for more discussion. - */ -#ifdef __INTEL_COMPILER -# pragma warning disable 592 -#endif - - -#if defined(__GNUC__) && defined(_WIN32) && !defined(SWIG_PYTHON_NO_HYPOT_WORKAROUND) -/* Workaround for '::hypot' has not been declared', see https://bugs.python.org/issue11566 */ -# include -#endif - -#if defined(_DEBUG) && defined(SWIG_PYTHON_INTERPRETER_NO_DEBUG) -/* Use debug wrappers with the Python release dll */ -# undef _DEBUG -# include -# define _DEBUG 1 -#else -# include -#endif - -/* ----------------------------------------------------------------------------- - * 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 -#define SWIG_POINTER_NO_NULL 0x4 - -/* 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(r) (r) -# 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 equal, -1 if nb < tb, 1 if nb > tb -*/ -SWIGRUNTIME int -SWIG_TypeCmp(const char *nb, const char *tb) { - int equiv = 1; - const char* te = tb + strlen(tb); - const char* ne = nb; - while (equiv != 0 && *ne) { - for (nb = ne; *ne; ++ne) { - if (*ne == '|') break; - } - equiv = SWIG_TypeNameComp(nb, ne, tb, te); - if (*ne) ++ne; - } - return equiv; -} - -/* - 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) { - return SWIG_TypeCmp(nb, tb) == 0 ? 1 : 0; -} - -/* - 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) { - size_t l = 0; - size_t r = iter->size - 1; - do { - /* since l+r >= 0, we can (>> 1) instead (/ 2) */ - size_t i = (l + r) >> 1; - const char *iname = iter->types[i]->name; - if (iname) { - 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 { - 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"; - const unsigned char *u = (unsigned char *) ptr; - const unsigned char *eu = u + sz; - for (; u != eu; ++u) { - 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) { - unsigned char *u = (unsigned char *) ptr; - const unsigned char *eu = u + sz; - for (; u != eu; ++u) { - char d = *(c++); - unsigned char uu; - if ((d >= '0') && (d <= '9')) - uu = (unsigned char)((d - '0') << 4); - else if ((d >= 'a') && (d <= 'f')) - uu = (unsigned char)((d - ('a'-10)) << 4); - else - return (char *) 0; - d = *(c++); - if ((d >= '0') && (d <= '9')) - uu |= (unsigned char)(d - '0'); - else if ((d >= 'a') && (d <= 'f')) - uu |= (unsigned char)(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 PyInt_FromSize_t(x) PyLong_FromSize_t(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 >= 0x03030000 - return (char *)PyUnicode_AsUTF8(str); -#elif PY_VERSION_HEX >= 0x03000000 - char *newstr = 0; - str = PyUnicode_AsUTF8String(str); - if (str) { - char *cstr; - Py_ssize_t len; - if (PyBytes_AsStringAndSize(str, &cstr, &len) != -1) { - newstr = (char *) malloc(len+1); - if (newstr) - memcpy(newstr, cstr, len+1); - } - Py_XDECREF(str); - } - return newstr; -#else - return PyString_AsString(str); -#endif -} - -#if PY_VERSION_HEX >= 0x03030000 || PY_VERSION_HEX < 0x03000000 -# define SWIG_Python_str_DelForPy3(x) -#else -# define SWIG_Python_str_DelForPy3(x) free( (void*) (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 -} - -#ifndef PyObject_DEL -# define PyObject_DEL PyObject_Del -#endif - -// SWIGPY_USE_CAPSULE is no longer used within SWIG itself, but some user -// interface files check for it. -# define SWIGPY_USE_CAPSULE -# define SWIGPY_CAPSULE_NAME ("swig_runtime_data" SWIG_RUNTIME_VERSION ".type_pointer_capsule" SWIG_TYPE_TABLE_NAME) - -#if PY_VERSION_HEX < 0x03020000 -#define PyDescr_TYPE(x) (((PyDescrObject *)(x))->d_type) -#define PyDescr_NAME(x) (((PyDescrObject *)(x))->d_name) -#define Py_hash_t long -#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) { - PyObject *old_str = PyObject_Str(value); - const char *tmp = SWIG_Python_str_AsChar(old_str); - PyErr_Clear(); - Py_XINCREF(type); - if (tmp) - PyErr_Format(type, "%s %s", tmp, mesg); - else - PyErr_Format(type, "%s", mesg); - SWIG_Python_str_DelForPy3(tmp); - Py_DECREF(old_str); - Py_DECREF(value); - } else { - PyErr_SetString(PyExc_RuntimeError, mesg); - } -} - -SWIGRUNTIME int -SWIG_Python_TypeErrorOccurred(PyObject *obj) -{ - PyObject *error; - if (obj) - return 0; - error = PyErr_Occurred(); - return error && PyErr_GivenExceptionMatches(error, PyExc_TypeError); -} - -SWIGRUNTIME void -SWIG_Python_RaiseOrModifyTypeError(const char *message) -{ - if (SWIG_Python_TypeErrorOccurred(NULL)) { - /* Use existing TypeError to preserve stacktrace and enhance with given message */ - PyObject *newvalue; - PyObject *type = NULL, *value = NULL, *traceback = NULL; - PyErr_Fetch(&type, &value, &traceback); -#if PY_VERSION_HEX >= 0x03000000 - newvalue = PyUnicode_FromFormat("%S\nAdditional information:\n%s", value, message); -#else - newvalue = PyString_FromFormat("%s\nAdditional information:\n%s", PyString_AsString(value), message); -#endif - Py_XDECREF(value); - PyErr_Restore(type, newvalue, traceback); - } else { - /* Raise TypeError using given message */ - PyErr_SetString(PyExc_TypeError, message); - } -} - -#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) -# define SWIG_PYTHON_USE_GIL -# 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; - const char *name; - long lvalue; - double dvalue; - void *pvalue; - swig_type_info **ptype; -} swig_const_info; - -#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. - * - * ----------------------------------------------------------------------------- */ - -#if PY_VERSION_HEX < 0x02070000 /* 2.7.0 */ -# error "This version of SWIG only supports Python >= 2.7" -#endif - -#if PY_VERSION_HEX >= 0x03000000 && PY_VERSION_HEX < 0x03020000 -# error "This version of SWIG only supports Python 3 >= 3.2" -#endif - -/* 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(clientdata) -#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, 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, 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, name, obj); - Py_DECREF(obj); -} - -#endif - -/* Append a value to the result obj */ - -SWIGINTERN PyObject* -SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) { - 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; -} - -/* Unpack the argument tuple */ - -SWIGINTERN Py_ssize_t -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) { - Py_ssize_t 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 { - 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 { - Py_ssize_t i; - for (i = 0; i < l; ++i) { - objs[i] = PyTuple_GET_ITEM(args, i); - } - for (; l < max; ++l) { - objs[l] = 0; - } - return i + 1; - } - } -} - -SWIGINTERN int -SWIG_Python_CheckNoKeywords(PyObject *kwargs, const char *name) { - int no_kwargs = 1; - if (kwargs) { - assert(PyDict_Check(kwargs)); - if (PyDict_Size(kwargs) > 0) { - PyErr_Format(PyExc_TypeError, "%s() does not take keyword arguments", name); - no_kwargs = 0; - } - } - return no_kwargs; -} - -/* A functor is a function object with one single object argument */ -#define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunctionObjArgs(functor, obj, NULL); - -/* - 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 - -/* 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; - int fail = data ? data->implicitconv : 0; - if (fail) - PyErr_SetString(PyExc_TypeError, "Implicit conversion is prohibited for explicit constructors."); - return fail; -} - -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 { - data->newraw = PyObject_GetAttrString(data->klass, "__new__"); - 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, "__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); - data->delargs = !(flags & (METH_O)); - } 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; - - -#ifdef SWIGPYTHON_BUILTIN - -SWIGRUNTIME PyObject * -SwigPyObject_get___dict__(PyObject *v, PyObject *SWIGUNUSEDPARM(args)) -{ - SwigPyObject *sobj = (SwigPyObject *)v; - - if (!sobj->dict) - sobj->dict = PyDict_New(); - - Py_INCREF(sobj->dict); - return sobj->dict; -} - -#endif - -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 * -SwigPyObject_repr(SwigPyObject *v) -{ - const char *name = SWIG_TypePrettyName(v->ty); - PyObject *repr = SWIG_Python_str_FromFormat("", (name ? name : "unknown"), (void *)v); - if (v->next) { - PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next); -# 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; -} - -/* We need a version taking two PyObject* parameters so it's a valid - * PyCFunction to use in swigobject_methods[]. */ -SWIGRUNTIME PyObject * -SwigPyObject_repr2(PyObject *v, PyObject *SWIGUNUSEDPARM(args)) -{ - return SwigPyObject_repr((SwigPyObject*)v); -} - -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; - - /* PyObject_CallFunction() has the potential to silently drop - the active exception. In cases of unnamed temporary - variable or where we just finished iterating over a generator - StopIteration will be active right now, and this needs to - remain true upon return from SwigPyObject_dealloc. So save - and restore. */ - - PyObject *type = NULL, *value = NULL, *traceback = NULL; - PyErr_Fetch(&type, &value, &traceback); - - 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)); - } - if (!res) - PyErr_WriteUnraisable(destroy); - - PyErr_Restore(type, value, traceback); - - 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; - if (!SwigPyObject_Check(next)) { - PyErr_SetString(PyExc_TypeError, "Attempt to append a non SwigPyObject"); - return NULL; - } - sobj->next = next; - Py_INCREF(next); - return SWIG_Py_Void(); -} - -SWIGRUNTIME PyObject* -SwigPyObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) -{ - SwigPyObject *sobj = (SwigPyObject *) v; - if (sobj->next) { - Py_INCREF(sobj->next); - return sobj->next; - } else { - return SWIG_Py_Void(); - } -} - -SWIGINTERN PyObject* -SwigPyObject_disown(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) -{ - SwigPyObject *sobj = (SwigPyObject *)v; - sobj->own = 0; - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject* -SwigPyObject_acquire(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) -{ - 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 (!PyArg_UnpackTuple(args, "own", 0, 1, &val)) { - return NULL; - } else { - SwigPyObject *sobj = (SwigPyObject *)v; - PyObject *obj = PyBool_FromLong(sobj->own); - if (val) { - if (PyObject_IsTrue(val)) { - SwigPyObject_acquire(v,args); - } else { - SwigPyObject_disown(v,args); - } - } - return obj; - } -} - -static PyMethodDef -swigobject_methods[] = { - {"disown", SwigPyObject_disown, METH_NOARGS, "releases ownership of the pointer"}, - {"acquire", SwigPyObject_acquire, METH_NOARGS, "acquires ownership of the pointer"}, - {"own", SwigPyObject_own, METH_VARARGS, "returns/sets ownership of the pointer"}, - {"append", SwigPyObject_append, METH_O, "appends another 'this' object"}, - {"next", SwigPyObject_next, METH_NOARGS, "returns the next 'this' object"}, - {"__repr__",SwigPyObject_repr2, METH_NOARGS, "returns object representation"}, - {0, 0, 0, 0} -}; - -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 >= 0x03050000 /* 3.5 */ - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_matrix_multiply */ -#elif 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 */ -#else - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index */ -#endif - }; - - static PyTypeObject swigpyobject_type; - static int type_init = 0; - if (!type_init) { - const PyTypeObject tmp = { -#if PY_VERSION_HEX >= 0x03000000 - PyVarObject_HEAD_INIT(NULL, 0) -#else - PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ -#endif - "SwigPyObject", /* tp_name */ - sizeof(SwigPyObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - (destructor)SwigPyObject_dealloc, /* tp_dealloc */ - 0, /* tp_print */ - (getattrfunc)0, /* tp_getattr */ - (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 */ - 0, /* 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 */ - 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 */ - 0, /* tp_del */ - 0, /* tp_version_tag */ -#if PY_VERSION_HEX >= 0x03040000 - 0, /* tp_finalize */ -#endif -#if PY_VERSION_HEX >= 0x03080000 - 0, /* tp_vectorcall */ -#endif -#if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) - 0, /* tp_print */ -#endif -#ifdef COUNT_ALLOCS - 0, /* tp_allocs */ - 0, /* tp_frees */ - 0, /* tp_maxalloc */ - 0, /* tp_prev */ - 0 /* tp_next */ -#endif - }; - swigpyobject_type = tmp; - type_init = 1; - if (PyType_Ready(&swigpyobject_type) < 0) - return NULL; - } - 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 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((const char *)v->pack, (const 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 = { -#if PY_VERSION_HEX>=0x03000000 - PyVarObject_HEAD_INIT(NULL, 0) -#else - PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ -#endif - "SwigPyPacked", /* tp_name */ - sizeof(SwigPyPacked), /* tp_basicsize */ - 0, /* tp_itemsize */ - (destructor)SwigPyPacked_dealloc, /* tp_dealloc */ - 0, /* 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 */ - 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 */ - 0, /* tp_del */ - 0, /* tp_version_tag */ -#if PY_VERSION_HEX >= 0x03040000 - 0, /* tp_finalize */ -#endif -#if PY_VERSION_HEX >= 0x03080000 - 0, /* tp_vectorcall */ -#endif -#if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) - 0, /* tp_print */ -#endif -#ifdef COUNT_ALLOCS - 0, /* tp_allocs */ - 0, /* tp_frees */ - 0, /* tp_maxalloc */ - 0, /* tp_prev */ - 0 /* tp_next */ -#endif - }; - swigpypacked_type = tmp; - type_init = 1; - if (PyType_Ready(&swigpypacked_type) < 0) - return NULL; - } - 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 - * ----------------------------------------------------------------------------- */ - -static PyObject *Swig_This_global = NULL; - -SWIGRUNTIME PyObject * -SWIG_This(void) -{ - if (Swig_This_global == NULL) - Swig_This_global = SWIG_Python_str_FromChar("this"); - return Swig_This_global; -} - -/* #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) - 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; - int implicit_conv = (flags & SWIG_POINTER_IMPLICIT_CONV) != 0; - - if (!obj) - return SWIG_ERROR; - if (obj == Py_None && !implicit_conv) { - if (ptr) - *ptr = 0; - return (flags & SWIG_POINTER_NO_NULL) ? SWIG_NullReferenceError : 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 (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); - } - } - } - if (!SWIG_IsOK(res) && obj == Py_None) { - if (ptr) - *ptr = 0; - if (PyErr_Occurred()) - PyErr_Clear(); - res = SWIG_OK; - } - } - } - 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; - swig_cast_info *tc; - - /* 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; - 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; - } - return SWIG_OK; - } -} - -/* Convert a packed pointer 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) -{ - 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 - if (PyObject_SetAttr(inst, SWIG_This(), swig_this) == -1) { - Py_DECREF(inst); - inst = 0; - } -#endif - } - } else { -#if PY_VERSION_HEX >= 0x03000000 - PyObject *empty_args = PyTuple_New(0); - if (empty_args) { - PyObject *empty_kwargs = PyDict_New(); - if (empty_kwargs) { - inst = ((PyTypeObject *)data->newargs)->tp_new((PyTypeObject *)data->newargs, empty_args, empty_kwargs); - Py_DECREF(empty_kwargs); - if (inst) { - if (PyObject_SetAttr(inst, SWIG_This(), swig_this) == -1) { - Py_DECREF(inst); - inst = 0; - } else { - Py_TYPE(inst)->tp_flags &= ~Py_TPFLAGS_VALID_VERSION_TAG; - } - } - } - Py_DECREF(empty_args); - } -#else - PyObject *dict = PyDict_New(); - if (dict) { - PyDict_SetItem(dict, SWIG_This(), swig_this); - inst = PyInstance_NewRaw(data->newargs, dict); - Py_DECREF(dict); - } -#endif - } - return inst; -} - -SWIGRUNTIME int -SWIG_Python_SetSwigThis(PyObject *inst, PyObject *swig_this) -{ -#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; - } - return PyDict_SetItem(dict, SWIG_This(), swig_this); - } -#endif - return PyObject_SetAttr(inst, SWIG_This(), swig_this); -} - - -SWIGINTERN PyObject * -SWIG_Python_InitShadowInstance(PyObject *args) { - PyObject *obj[2]; - if (!SWIG_Python_UnpackTuple(args, "swiginit", 2, 2, obj)) { - return NULL; - } else { - SwigPyObject *sthis = SWIG_Python_GetSwigThis(obj[0]); - if (sthis) { - SwigPyObject_append((PyObject*) sthis, obj[1]); - } else { - if (SWIG_Python_SetSwigThis(obj[0], obj[1]) != 0) - return NULL; - } - 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; -#ifdef SWIGPYTHON_BUILTIN - newobj->dict = 0; -#endif - } - } else { - newobj = PyObject_New(SwigPyObject, clientdata->pytype); -#ifdef SWIGPYTHON_BUILTIN - newobj->dict = 0; -#endif - } - if (newobj) { - newobj->ptr = ptr; - newobj->ty = type; - newobj->own = own; - newobj->next = 0; - return (PyObject*) newobj; - } - return SWIG_Py_Void(); - } - - assert(!(flags & SWIG_BUILTIN_TP_INIT)); - - robj = SwigPyObject_New(ptr, type, own); - if (robj && clientdata && !(flags & SWIG_POINTER_NOSHADOW)) { - PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj); - 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 *SWIGUNUSEDPARM(clientdata)) { - 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 - type_pointer = PyCapsule_Import(SWIGPY_CAPSULE_NAME, 0); - if (PyErr_Occurred()) { - PyErr_Clear(); - type_pointer = (void *)0; - } -#endif - } - return (swig_module_info *) type_pointer; -} - -SWIGRUNTIME void -SWIG_Python_DestroyModule(PyObject *obj) -{ - swig_module_info *swig_module = (swig_module_info *) PyCapsule_GetPointer(obj, SWIGPY_CAPSULE_NAME); - 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_global = 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("swig_runtime_data" SWIG_RUNTIME_VERSION); -#else - static PyMethodDef swig_empty_runtime_method_table[] = { {NULL, NULL, 0, NULL} }; /* Sentinel */ - PyObject *module = Py_InitModule("swig_runtime_data" SWIG_RUNTIME_VERSION, swig_empty_runtime_method_table); -#endif - PyObject *pointer = PyCapsule_New((void *) swig_module, SWIGPY_CAPSULE_NAME, SWIG_Python_DestroyModule); - if (pointer && module) { - PyModule_AddObject(module, "type_pointer_capsule" SWIG_TYPE_TABLE_NAME, pointer); - } else { - Py_XDECREF(pointer); - } -} - -/* 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) { - descriptor = (swig_type_info *) PyCapsule_GetPointer(obj, NULL); - } else { - swig_module_info *swig_module = SWIG_GetModule(0); - descriptor = SWIG_TypeQueryModule(swig_module, swig_module, type); - if (descriptor) { - obj = PyCapsule_New((void*) descriptor, NULL, NULL); - 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) { - PyObject *old_str = PyObject_Str(value); - const char *tmp = SWIG_Python_str_AsChar(old_str); - const char *errmesg = tmp ? tmp : "Invalid error message"; - Py_XINCREF(type); - PyErr_Clear(); - if (infront) { - PyErr_Format(type, "%s %s", mesg, errmesg); - } else { - PyErr_Format(type, "%s %s", errmesg, 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 : ""; -} - -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; -} - -#ifdef SWIGPYTHON_BUILTIN -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 = -1; - -# 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; - } - - 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); - if (!encoded_name) - return -1; - } - 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; -} -#endif - - -#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 - - - -#ifdef __cplusplus -extern "C" { -#endif - -/* Method creation and docstring support functions */ - -SWIGINTERN PyMethodDef *SWIG_PythonGetProxyDoc(const char *name); -SWIGINTERN PyObject *SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func); -SWIGINTERN PyObject *SWIG_PyStaticMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func); - -#ifdef __cplusplus -} -#endif - - - #define SWIG_exception(code, msg) do { SWIG_Error(code, msg); SWIG_fail;; } while(0) - - -/* -------- TYPES TABLE (BEGIN) -------- */ - -#define SWIGTYPE_p_ContextTransducersAreNotAutomataException swig_types[0] -#define SWIGTYPE_p_EmptySetOfContextsException swig_types[1] -#define SWIGTYPE_p_EmptyStringException swig_types[2] -#define SWIGTYPE_p_EndOfStreamException swig_types[3] -#define SWIGTYPE_p_FlagDiacriticsAreNotIdentitiesException swig_types[4] -#define SWIGTYPE_p_FunctionNotImplementedException swig_types[5] -#define SWIGTYPE_p_HfstException swig_types[6] -#define SWIGTYPE_p_HfstFatalException swig_types[7] -#define SWIGTYPE_p_HfstTransducerTypeMismatchException swig_types[8] -#define SWIGTYPE_p_ImplementationTypeNotAvailableException swig_types[9] -#define SWIGTYPE_p_IncorrectUtf8CodingException swig_types[10] -#define SWIGTYPE_p_MetadataException swig_types[11] -#define SWIGTYPE_p_MissingOpenFstInputSymbolTableException swig_types[12] -#define SWIGTYPE_p_NotTransducerStreamException swig_types[13] -#define SWIGTYPE_p_NotValidAttFormatException swig_types[14] -#define SWIGTYPE_p_NotValidLexcFormatException swig_types[15] -#define SWIGTYPE_p_NotValidPrologFormatException swig_types[16] -#define SWIGTYPE_p_SpecifiedTypeRequiredException swig_types[17] -#define SWIGTYPE_p_StateIndexOutOfBoundsException swig_types[18] -#define SWIGTYPE_p_StateIsNotFinalException swig_types[19] -#define SWIGTYPE_p_StreamCannotBeWrittenException swig_types[20] -#define SWIGTYPE_p_StreamIsClosedException swig_types[21] -#define SWIGTYPE_p_StreamNotReadableException swig_types[22] -#define SWIGTYPE_p_SymbolNotFoundException swig_types[23] -#define SWIGTYPE_p_TransducerHasWrongTypeException swig_types[24] -#define SWIGTYPE_p_TransducerHeaderException swig_types[25] -#define SWIGTYPE_p_TransducerIsCyclicException swig_types[26] -#define SWIGTYPE_p_TransducerTypeMismatchException swig_types[27] -#define SWIGTYPE_p_TransducersAreNotAutomataException swig_types[28] -#define SWIGTYPE_p_allocator_type swig_types[29] -#define SWIGTYPE_p_char swig_types[30] -#define SWIGTYPE_p_difference_type swig_types[31] -#define SWIGTYPE_p_first_type swig_types[32] -#define SWIGTYPE_p_float swig_types[33] -#define SWIGTYPE_p_hfst__HfstInputStream swig_types[34] -#define SWIGTYPE_p_hfst__HfstOutputStream swig_types[35] -#define SWIGTYPE_p_hfst__HfstTokenizer swig_types[36] -#define SWIGTYPE_p_hfst__HfstTransducer swig_types[37] -#define SWIGTYPE_p_hfst__implementations__HfstBasicTransducer swig_types[38] -#define SWIGTYPE_p_hfst__implementations__HfstBasicTransition swig_types[39] -#define SWIGTYPE_p_hfst__lexc__LexcCompiler swig_types[40] -#define SWIGTYPE_p_hfst__twolc__TwolcCompiler swig_types[41] -#define SWIGTYPE_p_hfst__xeroxRules__Rule swig_types[42] -#define SWIGTYPE_p_hfst__xfst__XfstCompiler swig_types[43] -#define SWIGTYPE_p_hfst__xre__XreCompiler swig_types[44] -#define SWIGTYPE_p_hfst_ol__Location swig_types[45] -#define SWIGTYPE_p_hfst_ol__PmatchContainer swig_types[46] -#define SWIGTYPE_p_int swig_types[47] -#define SWIGTYPE_p_key_type swig_types[48] -#define SWIGTYPE_p_mapped_type swig_types[49] -#define SWIGTYPE_p_p_PyObject swig_types[50] -#define SWIGTYPE_p_second_type swig_types[51] -#define SWIGTYPE_p_size_t swig_types[52] -#define SWIGTYPE_p_size_type swig_types[53] -#define SWIGTYPE_p_std__allocatorT_float_t swig_types[54] -#define SWIGTYPE_p_std__allocatorT_hfst__HfstTransducer_t swig_types[55] -#define SWIGTYPE_p_std__allocatorT_hfst__implementations__HfstBasicTransition_t swig_types[56] -#define SWIGTYPE_p_std__allocatorT_hfst__xeroxRules__Rule_t swig_types[57] -#define SWIGTYPE_p_std__allocatorT_hfst_ol__Location_t swig_types[58] -#define SWIGTYPE_p_std__allocatorT_std__pairT_hfst__HfstTransducer_hfst__HfstTransducer_t_t swig_types[59] -#define SWIGTYPE_p_std__allocatorT_std__pairT_std__pairT_std__string_std__string_t_const_std__pairT_std__string_std__string_t_t_t swig_types[60] -#define SWIGTYPE_p_std__allocatorT_std__pairT_std__string_const_std__string_t_t swig_types[61] -#define SWIGTYPE_p_std__allocatorT_std__pairT_std__string_std__string_t_t swig_types[62] -#define SWIGTYPE_p_std__allocatorT_std__string_t swig_types[63] -#define SWIGTYPE_p_std__allocatorT_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t_t swig_types[64] -#define SWIGTYPE_p_std__allocatorT_unsigned_int_t swig_types[65] -#define SWIGTYPE_p_std__invalid_argument swig_types[66] -#define SWIGTYPE_p_std__lessT_std__pairT_float_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t_t_t swig_types[67] -#define SWIGTYPE_p_std__lessT_std__pairT_float_std__vectorT_std__string_std__allocatorT_std__string_t_t_t_t swig_types[68] -#define SWIGTYPE_p_std__lessT_std__pairT_std__string_std__string_t_t swig_types[69] -#define SWIGTYPE_p_std__lessT_std__string_t swig_types[70] -#define SWIGTYPE_p_std__mapT_std__pairT_std__string_std__string_t_std__pairT_std__string_std__string_t_std__lessT_std__pairT_std__string_std__string_t_t_std__allocatorT_std__pairT_std__pairT_std__string_std__string_t_const_std__pairT_std__string_std__string_t_t_t_t swig_types[71] -#define SWIGTYPE_p_std__mapT_std__string_std__string_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_std__string_t_t_t swig_types[72] -#define SWIGTYPE_p_std__pairT_float_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t_t swig_types[73] -#define SWIGTYPE_p_std__pairT_float_std__vectorT_std__string_std__allocatorT_std__string_t_t_t swig_types[74] -#define SWIGTYPE_p_std__pairT_hfst__HfstTransducer_hfst__HfstTransducer_t swig_types[75] -#define SWIGTYPE_p_std__pairT_hfst__HfstTransducer_p_unsigned_int_t swig_types[76] -#define SWIGTYPE_p_std__pairT_std__string_std__string_t swig_types[77] -#define SWIGTYPE_p_std__setT_std__pairT_float_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t_t_std__lessT_std__pairT_float_std__vectorT_std__pairT_std__string_std__string_t_t_t_t_std__allocatorT_std__pairT_float_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t_t_t_t swig_types[78] -#define SWIGTYPE_p_std__setT_std__pairT_float_std__vectorT_std__string_std__allocatorT_std__string_t_t_t_std__lessT_std__pairT_float_std__vectorT_std__string_t_t_t_std__allocatorT_std__pairT_float_std__vectorT_std__string_std__allocatorT_std__string_t_t_t_t_t swig_types[79] -#define SWIGTYPE_p_std__setT_std__pairT_std__string_std__string_t_std__lessT_std__pairT_std__string_std__string_t_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t swig_types[80] -#define SWIGTYPE_p_std__setT_std__string_std__lessT_std__string_t_std__allocatorT_std__string_t_t swig_types[81] -#define SWIGTYPE_p_std__vectorT_float_std__allocatorT_float_t_t swig_types[82] -#define SWIGTYPE_p_std__vectorT_hfst__HfstTransducer_std__allocatorT_hfst__HfstTransducer_t_t swig_types[83] -#define SWIGTYPE_p_std__vectorT_hfst__implementations__HfstBasicTransition_std__allocatorT_hfst__implementations__HfstBasicTransition_t_t swig_types[84] -#define SWIGTYPE_p_std__vectorT_hfst__xeroxRules__Rule_std__allocatorT_hfst__xeroxRules__Rule_t_t swig_types[85] -#define SWIGTYPE_p_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t swig_types[86] -#define SWIGTYPE_p_std__vectorT_size_t_std__allocatorT_size_t_t_t swig_types[87] -#define SWIGTYPE_p_std__vectorT_std__pairT_hfst__HfstTransducer_hfst__HfstTransducer_t_std__allocatorT_std__pairT_hfst__HfstTransducer_hfst__HfstTransducer_t_t_t swig_types[88] -#define SWIGTYPE_p_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t swig_types[89] -#define SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t swig_types[90] -#define SWIGTYPE_p_std__vectorT_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t_std__allocatorT_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t_t_t swig_types[91] -#define SWIGTYPE_p_std__vectorT_unsigned_int_std__allocatorT_unsigned_int_t_t swig_types[92] -#define SWIGTYPE_p_swig__SwigPyIterator swig_types[93] -#define SWIGTYPE_p_unsigned_int swig_types[94] -#define SWIGTYPE_p_value_type swig_types[95] -static swig_type_info *swig_types[97]; -static swig_module_info swig_module = {swig_types, 96, 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) -------- */ - -#ifdef SWIG_TypeQuery -# undef SWIG_TypeQuery -#endif -#define SWIG_TypeQuery SWIG_Python_TypeQuery - -/*----------------------------------------------- - @(target):= _libhfst.so - ------------------------------------------------*/ -#if PY_VERSION_HEX >= 0x03000000 -# define SWIG_init PyInit__libhfst - -#else -# define SWIG_init init_libhfst - -#endif -#define SWIG_name "_libhfst" - -#define SWIGVERSION 0x040002 -#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) - { - SWIG_PYTHON_THREAD_BEGIN_BLOCK; - Py_XINCREF(_obj); - SWIG_PYTHON_THREAD_END_BLOCK; - } - - SwigPtr_PyObject(PyObject *obj, bool initial_ref = true) :_obj(obj) - { - if (initial_ref) { - SWIG_PYTHON_THREAD_BEGIN_BLOCK; - Py_XINCREF(_obj); - SWIG_PYTHON_THREAD_END_BLOCK; - } - } - - SwigPtr_PyObject & operator=(const SwigPtr_PyObject& item) - { - SWIG_PYTHON_THREAD_BEGIN_BLOCK; - Py_XINCREF(item._obj); - Py_XDECREF(_obj); - _obj = item._obj; - SWIG_PYTHON_THREAD_END_BLOCK; - return *this; - } - - ~SwigPtr_PyObject() - { - SWIG_PYTHON_THREAD_BEGIN_BLOCK; - Py_XDECREF(_obj); - SWIG_PYTHON_THREAD_END_BLOCK; - } - - 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; - } - }; -} - - -#include - - -#include - -#if PY_VERSION_HEX >= 0x03020000 -# define SWIGPY_SLICE_ARG(obj) ((PyObject*) (obj)) -#else -# define SWIGPY_SLICE_ARG(obj) ((PySliceObject*) (obj)) -#endif - - -#include -#include - - -#if defined(__GNUC__) -# if __GNUC__ == 2 && __GNUC_MINOR <= 96 -# define SWIG_STD_NOMODERN_STL -# endif -#endif - - -#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; -#if PY_VERSION_HEX < 0x03000000 - } else if (PyInt_Check(obj)) { - if (val) *val = (double) PyInt_AsLong(obj); - return SWIG_OK; -#endif - } 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 PY_VERSION_HEX < 0x03000000 - if (PyInt_Check(obj)) { - long v = PyInt_AsLong(obj); - if (v >= 0) { - if (val) *val = v; - return SWIG_OK; - } else { - return SWIG_OverflowError; - } - } else -#endif - if (PyLong_Check(obj)) { - unsigned long v = PyLong_AsUnsignedLong(obj); - if (!PyErr_Occurred()) { - if (val) *val = v; - return SWIG_OK; - } else { - PyErr_Clear(); - return SWIG_OverflowError; - } - } -#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; -} - - -#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 - - -#if defined(LLONG_MAX) && !defined(SWIG_LONG_LONG_AVAILABLE) -# define SWIG_LONG_LONG_AVAILABLE -#endif - - -#ifdef SWIG_LONG_LONG_AVAILABLE -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(); - res = SWIG_OverflowError; - } - } 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)) - return SWIG_OverflowError; - 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; -} -#endif - - -SWIGINTERNINLINE int -SWIG_AsVal_size_t (PyObject * obj, size_t *val) -{ - int res = SWIG_TypeError; -#ifdef SWIG_LONG_LONG_AVAILABLE - if (sizeof(size_t) <= sizeof(unsigned long)) { -#endif - unsigned long v; - res = SWIG_AsVal_unsigned_SS_long (obj, val ? &v : 0); - if (SWIG_IsOK(res) && val) *val = static_cast< size_t >(v); -#ifdef SWIG_LONG_LONG_AVAILABLE - } else if (sizeof(size_t) <= sizeof(unsigned long long)) { - unsigned long long v; - res = SWIG_AsVal_unsigned_SS_long_SS_long (obj, val ? &v : 0); - if (SWIG_IsOK(res) && val) *val = static_cast< size_t >(v); - } -#endif - return res; -} - - - #define SWIG_From_long PyInt_FromLong - - -#ifdef SWIG_LONG_LONG_AVAILABLE -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)); -} -#endif - - -SWIGINTERNINLINE PyObject * -SWIG_From_ptrdiff_t (ptrdiff_t value) -{ -#ifdef SWIG_LONG_LONG_AVAILABLE - if (sizeof(ptrdiff_t) <= sizeof(long)) { -#endif - return SWIG_From_long (static_cast< long >(value)); -#ifdef SWIG_LONG_LONG_AVAILABLE - } else { - /* assume sizeof(ptrdiff_t) <= sizeof(long long) */ - return SWIG_From_long_SS_long (static_cast< long long >(value)); - } -#endif -} - - -SWIGINTERNINLINE PyObject* - SWIG_From_bool (bool value) -{ - return PyBool_FromLong(value ? 1 : 0); -} - - -SWIGINTERN int -SWIG_AsVal_long (PyObject *obj, long* val) -{ -#if PY_VERSION_HEX < 0x03000000 - if (PyInt_Check(obj)) { - if (val) *val = PyInt_AsLong(obj); - return SWIG_OK; - } else -#endif - if (PyLong_Check(obj)) { - long v = PyLong_AsLong(obj); - if (!PyErr_Occurred()) { - if (val) *val = v; - return SWIG_OK; - } else { - PyErr_Clear(); - return SWIG_OverflowError; - } - } -#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; -} - - -#ifdef SWIG_LONG_LONG_AVAILABLE -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(); - res = SWIG_OverflowError; - } - } 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)) - return SWIG_OverflowError; - 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; -} -#endif - - -SWIGINTERNINLINE int -SWIG_AsVal_ptrdiff_t (PyObject * obj, ptrdiff_t *val) -{ - int res = SWIG_TypeError; -#ifdef SWIG_LONG_LONG_AVAILABLE - if (sizeof(ptrdiff_t) <= sizeof(long)) { -#endif - long v; - res = SWIG_AsVal_long (obj, val ? &v : 0); - if (SWIG_IsOK(res) && val) *val = static_cast< ptrdiff_t >(v); -#ifdef SWIG_LONG_LONG_AVAILABLE - } else if (sizeof(ptrdiff_t) <= sizeof(long long)) { - long long v; - res = SWIG_AsVal_long_SS_long (obj, val ? &v : 0); - if (SWIG_IsOK(res) && val) *val = static_cast< ptrdiff_t >(v); - } -#endif - return res; -} - - -#include - - -#include - - -#include - - -#include - - -#include - - -#include - - -#define HFSTIMPORT -#include "HfstDataTypes.h" -#include "HfstTransducer.h" -#include "HfstOutputStream.h" -#include "HfstInputStream.h" -#include "HfstExceptionDefs.h" -#include "HfstTokenizer.h" -#include "HfstFlagDiacritics.h" -#include "HfstXeroxRules.h" -#include "parsers/XreCompiler.h" -#include "parsers/LexcCompiler.h" -#include "parsers/XfstCompiler.h" -#include "parsers/SfstCompiler.h" -#include "implementations/HfstBasicTransition.h" -#include "implementations/HfstBasicTransducer.h" -#include "implementations/optimized-lookup/pmatch.h" -#include "implementations/optimized-lookup/pmatch_tokenize.h" -#include "parsers/TwolcCompiler.h" -namespace hfst { typedef std::vector HfstRuleVector; } -namespace hfst { typedef std::pair HfstTransducerUIntPair; } - -// Most of C++ extension code is located in separate files. -#include "hfst_regex_extensions.cpp" -#include "hfst_extensions.cpp" -#include "hfst_lexc_extensions.cpp" -#include "hfst_xfst_extensions.cpp" -#include "hfst_pmatch_extensions.cpp" -#include "hfst_pmatch_tokenize_extensions.cpp" -#include "hfst_sfst_extensions.cpp" -#include "hfst_lookup_extensions.cpp" -#include "hfst_rules_extensions.cpp" -#include "hfst_prolog_extensions.cpp" - - -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; - } - }; - - /* - Partial specialization for pointers (traits_info) - */ - 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 (traits) - */ - 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) { - int res = SWIG_ERROR; - swig_type_info *descriptor = type_info(); - if (val) { - Type *p = 0; - int newmem = 0; - res = descriptor ? SWIG_ConvertPtrAndOwn(obj, (void **)&p, descriptor, 0, &newmem) : SWIG_ERROR; - if (SWIG_IsOK(res)) { - if (newmem & SWIG_CAST_NEW_MEMORY) { - res |= SWIG_NEWOBJMASK; - } - *val = p; - } - } else { - res = descriptor ? SWIG_ConvertPtr(obj, 0, descriptor, 0) : SWIG_ERROR; - } - 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) { - Type v; - int res = asval(obj, &v); - if (!obj || !SWIG_IsOK(res)) { - if (!PyErr_Occurred()) { - ::SWIG_Error(SWIG_TypeError, swig::type_name()); - } - throw std::invalid_argument("bad type"); - } - return v; - } - }; - - template - struct traits_as { - static Type as(PyObject *obj) { - 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 { - if (!PyErr_Occurred()) { - SWIG_Error(SWIG_TypeError, swig::type_name()); - } - throw std::invalid_argument("bad type"); - } - } - }; - - template - struct traits_as { - static Type* as(PyObject *obj) { - 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()); - } - throw std::invalid_argument("bad type"); - } - } - }; - - template - inline Type as(PyObject *obj) { - return traits_as::category>::as(obj); - } - - 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 - { - 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 - { - bool - operator()(const swig::SwigPtr_PyObject& v, const swig::SwigPtr_PyObject& w) const - { - return std::less()(v, w); - } - }; - - template <> - struct less - { - 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 { - template - inline size_t - check_index(Difference 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"); - } - - template - void - slice_adjust(Difference i, Difference j, Py_ssize_t step, size_t size, Difference &ii, Difference &jj, bool insert = false) { - if (step == 0) { - throw std::invalid_argument("slice step cannot be zero"); - } else if (step > 0) { - // Required range: 0 <= i < size, 0 <= j < size, i <= j - if (i < 0) { - ii = 0; - } else if (i < (Difference)size) { - ii = i; - } else if (insert && (i >= (Difference)size)) { - ii = (Difference)size; - } - if (j < 0) { - jj = 0; - } else { - jj = (j < (Difference)size) ? j : (Difference)size; - } - if (jj < ii) - jj = ii; - } else { - // Required range: -1 <= i < size-1, -1 <= j < size-1, i >= j - if (i < -1) { - ii = -1; - } else if (i < (Difference) size) { - ii = i; - } else if (i >= (Difference)(size-1)) { - ii = (Difference)(size-1); - } - if (j < -1) { - jj = -1; - } else { - jj = (j < (Difference)size ) ? j : (Difference)(size-1); - } - if (ii < jj) - ii = jj; - } - } - - 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 void - erase(Sequence* seq, const typename Sequence::iterator& position) { - seq->erase(position); - } - - template - struct traits_reserve { - static void reserve(Sequence & /*seq*/, typename Sequence::size_type /*n*/) { - // This should be specialized for types that support reserve - } - }; - - template - inline Sequence* - getslice(const Sequence* self, Difference i, Difference j, Py_ssize_t step) { - typename Sequence::size_type size = self->size(); - Difference ii = 0; - Difference jj = 0; - swig::slice_adjust(i, j, step, size, ii, jj); - - if (step > 0) { - typename Sequence::const_iterator sb = self->begin(); - typename Sequence::const_iterator se = self->begin(); - std::advance(sb,ii); - std::advance(se,jj); - if (step == 1) { - return new Sequence(sb, se); - } else { - Sequence *sequence = new Sequence(); - swig::traits_reserve::reserve(*sequence, (jj - ii + step - 1) / step); - typename Sequence::const_iterator it = sb; - while (it!=se) { - sequence->push_back(*it); - for (Py_ssize_t c=0; c::reserve(*sequence, (ii - jj - step - 1) / -step); - typename Sequence::const_reverse_iterator sb = self->rbegin(); - typename Sequence::const_reverse_iterator se = self->rbegin(); - std::advance(sb,size-ii-1); - std::advance(se,size-jj-1); - typename Sequence::const_reverse_iterator it = sb; - while (it!=se) { - sequence->push_back(*it); - for (Py_ssize_t c=0; c<-step && it!=se; ++c) - it++; - } - return sequence; - } - } - - template - inline void - setslice(Sequence* self, Difference i, Difference j, Py_ssize_t step, const InputSeq& is = InputSeq()) { - typename Sequence::size_type size = self->size(); - Difference ii = 0; - Difference jj = 0; - swig::slice_adjust(i, j, step, size, ii, jj, true); - if (step > 0) { - if (step == 1) { - size_t ssize = jj - ii; - if (ssize <= is.size()) { - // expanding/staying the same size - swig::traits_reserve::reserve(*self, self->size() - ssize + is.size()); - typename Sequence::iterator sb = self->begin(); - typename InputSeq::const_iterator isit = is.begin(); - std::advance(sb,ii); - std::advance(isit, jj - ii); - self->insert(std::copy(is.begin(), isit, sb), isit, is.end()); - } else { - // shrinking - typename Sequence::iterator sb = self->begin(); - typename Sequence::iterator se = self->begin(); - std::advance(sb,ii); - std::advance(se,jj); - self->erase(sb,se); - sb = self->begin(); - std::advance(sb,ii); - self->insert(sb, is.begin(), is.end()); - } - } else { - size_t replacecount = (jj - ii + step - 1) / step; - if (is.size() != replacecount) { - char msg[1024]; - sprintf(msg, "attempt to assign sequence of size %lu to extended slice of size %lu", (unsigned long)is.size(), (unsigned long)replacecount); - throw std::invalid_argument(msg); - } - typename Sequence::const_iterator isit = is.begin(); - typename Sequence::iterator it = self->begin(); - std::advance(it,ii); - for (size_t rc=0; rcend(); ++rc) { - *it++ = *isit++; - for (Py_ssize_t c=0; c<(step-1) && it != self->end(); ++c) - it++; - } - } - } else { - size_t replacecount = (ii - jj - step - 1) / -step; - if (is.size() != replacecount) { - char msg[1024]; - sprintf(msg, "attempt to assign sequence of size %lu to extended slice of size %lu", (unsigned long)is.size(), (unsigned long)replacecount); - throw std::invalid_argument(msg); - } - typename Sequence::const_iterator isit = is.begin(); - typename Sequence::reverse_iterator it = self->rbegin(); - std::advance(it,size-ii-1); - for (size_t rc=0; rcrend(); ++rc) { - *it++ = *isit++; - for (Py_ssize_t c=0; c<(-step-1) && it != self->rend(); ++c) - it++; - } - } - } - - template - inline void - delslice(Sequence* self, Difference i, Difference j, Py_ssize_t step) { - typename Sequence::size_type size = self->size(); - Difference ii = 0; - Difference jj = 0; - swig::slice_adjust(i, j, step, size, ii, jj, true); - if (step > 0) { - typename Sequence::iterator sb = self->begin(); - std::advance(sb,ii); - if (step == 1) { - typename Sequence::iterator se = self->begin(); - std::advance(se,jj); - self->erase(sb,se); - } else { - typename Sequence::iterator it = sb; - size_t delcount = (jj - ii + step - 1) / step; - while (delcount) { - it = self->erase(it); - for (Py_ssize_t c=0; c<(step-1) && it != self->end(); ++c) - it++; - delcount--; - } - } - } else { - typename Sequence::reverse_iterator sb = self->rbegin(); - std::advance(sb,size-ii-1); - typename Sequence::reverse_iterator it = sb; - size_t delcount = (ii - jj - step - 1) / -step; - while (delcount) { - it = typename Sequence::reverse_iterator(self->erase((++it).base())); - for (Py_ssize_t c=0; c<(-step-1) && it != self->rend(); ++c) - it++; - delcount--; - } - } - } -} - - -#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 SwigPyForwardIteratorOpen_T : public SwigPyIterator_T - { - public: - FromOper from; - typedef OutIterator out_iterator; - typedef ValueType value_type; - typedef SwigPyIterator_T base; - typedef SwigPyForwardIteratorOpen_T self_type; - - SwigPyForwardIteratorOpen_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; - } - - }; - - template::value_type, - typename FromOper = from_oper > - class SwigPyIteratorOpen_T : public SwigPyForwardIteratorOpen_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) - : SwigPyForwardIteratorOpen_T(curr, seq) - { - } - - SwigPyIterator *decr(size_t n = 1) - { - while (n--) { - --base::current; - } - return this; - } - }; - - template::value_type, - typename FromOper = from_oper > - class SwigPyForwardIteratorClosed_T : public SwigPyIterator_T - { - public: - FromOper from; - typedef OutIterator out_iterator; - typedef ValueType value_type; - typedef SwigPyIterator_T base; - typedef SwigPyForwardIteratorClosed_T self_type; - - SwigPyForwardIteratorClosed_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; - } - - protected: - out_iterator begin; - out_iterator end; - }; - - template::value_type, - typename FromOper = from_oper > - class SwigPyIteratorClosed_T : public SwigPyForwardIteratorClosed_T - { - public: - FromOper from; - typedef OutIterator out_iterator; - typedef ValueType value_type; - typedef SwigPyIterator_T base; - typedef SwigPyForwardIteratorClosed_T base0; - typedef SwigPyIteratorClosed_T self_type; - - SwigPyIteratorClosed_T(out_iterator curr, out_iterator first, out_iterator last, PyObject *seq) - : SwigPyForwardIteratorClosed_T(curr, first, last, seq) - { - } - - SwigPyIterator *decr(size_t n = 1) - { - while (n--) { - if (base::current == base0::begin) { - throw stop_iteration(); - } else { - --base::current; - } - } - return this; - } - }; - - - template - inline SwigPyIterator* - make_output_forward_iterator(const OutIter& current, const OutIter& begin,const OutIter& end, PyObject *seq = 0) - { - return new SwigPyForwardIteratorClosed_T(current, begin, end, seq); - } - - 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_forward_iterator(const OutIter& current, PyObject *seq = 0) - { - return new SwigPyForwardIteratorOpen_T(current, 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, Py_ssize_t index) - : _seq(seq), _index(index) - { - } - - operator T () const - { - swig::SwigVar_PyObject item = PySequence_GetItem(_seq, _index); - try { - return swig::as(item); - } catch (const std::invalid_argument& e) { - char msg[1024]; - sprintf(msg, "in sequence element %d ", (int)_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; - Py_ssize_t _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 Py_ssize_t difference_type; - - SwigPySequence_InputIterator() - { - } - - SwigPySequence_InputIterator(PyObject* seq, Py_ssize_t 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; - }; - - // STL container wrapper around a Python sequence - template - struct SwigPySequence_Cont - { - typedef SwigPySequence_Ref reference; - typedef const SwigPySequence_Ref const_reference; - typedef T value_type; - typedef T* pointer; - typedef Py_ssize_t difference_type; - typedef size_t 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() const - { - Py_ssize_t s = size(); - for (Py_ssize_t i = 0; i < s; ++i) { - swig::SwigVar_PyObject item = PySequence_GetItem(_seq, i); - if (!swig::check(item)) - return false; - } - return true; - } - - private: - PyObject* _seq; - }; - -} - - -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 defined(SWIG_PYTHON_STRICT_BYTE_CHAR) - if (PyBytes_Check(obj)) -#else - if (PyUnicode_Check(obj)) -#endif -#else - if (PyString_Check(obj)) -#endif - { - char *cstr; Py_ssize_t len; - int ret = SWIG_OK; -#if PY_VERSION_HEX>=0x03000000 -#if !defined(SWIG_PYTHON_STRICT_BYTE_CHAR) - 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); - if (!obj) - return SWIG_TypeError; - if (alloc) - *alloc = SWIG_NEWOBJ; -#endif - if (PyBytes_AsStringAndSize(obj, &cstr, &len) == -1) - return SWIG_TypeError; -#else - if (PyString_AsStringAndSize(obj, &cstr, &len) == -1) - return SWIG_TypeError; -#endif - if (cptr) { - if (alloc) { - if (*alloc == SWIG_NEWOBJ) { - *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 -#if defined(SWIG_PYTHON_STRICT_BYTE_CHAR) - *cptr = PyBytes_AsString(obj); -#else - assert(0); /* Should never reach here with Unicode strings in Python 3 */ -#endif -#else - *cptr = SWIG_Python_str_AsChar(obj); - if (!*cptr) - ret = SWIG_TypeError; -#endif - } - } - if (psize) *psize = len + 1; -#if PY_VERSION_HEX>=0x03000000 && !defined(SWIG_PYTHON_STRICT_BYTE_CHAR) - Py_XDECREF(obj); -#endif - return ret; - } else { -#if defined(SWIG_PYTHON_2_UNICODE) -#if defined(SWIG_PYTHON_STRICT_BYTE_CHAR) -#error "Cannot use both SWIG_PYTHON_2_UNICODE and SWIG_PYTHON_STRICT_BYTE_CHAR at once" -#endif -#if PY_VERSION_HEX<0x03000000 - if (PyUnicode_Check(obj)) { - char *cstr; Py_ssize_t len; - if (!alloc && cptr) { - return SWIG_RuntimeError; - } - obj = PyUnicode_AsUTF8String(obj); - if (!obj) - return SWIG_TypeError; - if (PyString_AsStringAndSize(obj, &cstr, &len) != -1) { - if (cptr) { - if (alloc) *alloc = SWIG_NEWOBJ; - *cptr = reinterpret_cast< char* >(memcpy(new char[len + 1], cstr, sizeof(char)*(len + 1))); - } - if (psize) *psize = len + 1; - - Py_XDECREF(obj); - return SWIG_OK; - } else { - Py_XDECREF(obj); - } - } -#endif -#endif - - 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_std_string (PyObject * obj, std::string *val) -{ - std::string* v = (std::string *) 0; - int res = SWIG_AsPtr_std_string (obj, &v); - if (!SWIG_IsOK(res)) return res; - if (v) { - if (val) *val = *v; - if (SWIG_IsNewObj(res)) { - delete v; - res = SWIG_DelNewMask(res); - } - return res; - } - return SWIG_ERROR; -} - - -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 -#if defined(SWIG_PYTHON_STRICT_BYTE_CHAR) - return PyBytes_FromStringAndSize(carray, static_cast< Py_ssize_t >(size)); -#else - return PyUnicode_DecodeUTF8(carray, static_cast< Py_ssize_t >(size), "surrogateescape"); -#endif -#else - return PyString_FromStringAndSize(carray, static_cast< Py_ssize_t >(size)); -#endif - } - } else { - return SWIG_Py_Void(); - } -} - - -SWIGINTERNINLINE PyObject * -SWIG_From_std_string (const std::string& s) -{ - return SWIG_FromCharPtrAndSize(s.data(), s.size()); -} - - -namespace swig { - template <> struct traits< std::string > { - typedef value_category category; - static const char* type_name() { return"std::string"; } - }; - template <> struct traits_asval< std::string > { - typedef std::string value_type; - static int asval(PyObject *obj, value_type *val) { - return SWIG_AsVal_std_string (obj, val); - } - }; - template <> struct traits_from< std::string > { - typedef std::string value_type; - static PyObject *from(const value_type& val) { - return SWIG_From_std_string (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; - swig_type_info *descriptor = swig::type_info(); - if (descriptor && SWIG_IsOK(::SWIG_ConvertPtr(obj, (void **)&p, descriptor, 0))) { - 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_InternalNewPointerObj(new sequence(seq), desc, SWIG_POINTER_OWN); - } -#endif - size_type size = seq.size(); - if (size <= (size_type)INT_MAX) { - PyObject *obj = PyTuple_New((Py_ssize_t)size); - Py_ssize_t 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_reserve > { - static void reserve(std::vector &seq, typename std::vector::size_type n) { - seq.reserve(n); - } - }; - - 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<" "std::string" "," "std::allocator< std::string >" " >"; - } - }; - } - -SWIGINTERN swig::SwigPyIterator *std_vector_Sl_std_string_Sg__iterator(std::vector< std::string > *self,PyObject **PYTHON_SELF){ - return swig::make_output_iterator(self->begin(), self->begin(), self->end(), *PYTHON_SELF); - } -SWIGINTERN bool std_vector_Sl_std_string_Sg____nonzero__(std::vector< std::string > const *self){ - return !(self->empty()); - } -SWIGINTERN bool std_vector_Sl_std_string_Sg____bool__(std::vector< std::string > const *self){ - return !(self->empty()); - } -SWIGINTERN std::vector< std::string >::size_type std_vector_Sl_std_string_Sg____len__(std::vector< std::string > 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)); -} - - -#ifdef SWIG_LONG_LONG_AVAILABLE -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)); -} -#endif - - -SWIGINTERNINLINE PyObject * -SWIG_From_size_t (size_t value) -{ -#ifdef SWIG_LONG_LONG_AVAILABLE - if (sizeof(size_t) <= sizeof(unsigned long)) { -#endif - return SWIG_From_unsigned_SS_long (static_cast< unsigned long >(value)); -#ifdef SWIG_LONG_LONG_AVAILABLE - } else { - /* assume sizeof(size_t) <= sizeof(unsigned long long) */ - return SWIG_From_unsigned_SS_long_SS_long (static_cast< unsigned long long >(value)); - } -#endif -} - -SWIGINTERN std::vector< std::string,std::allocator< std::string > > *std_vector_Sl_std_string_Sg____getslice__(std::vector< std::string > *self,std::vector< std::string >::difference_type i,std::vector< std::string >::difference_type j){ - return swig::getslice(self, i, j, 1); - } -SWIGINTERN void std_vector_Sl_std_string_Sg____setslice____SWIG_0(std::vector< std::string > *self,std::vector< std::string >::difference_type i,std::vector< std::string >::difference_type j){ - swig::setslice(self, i, j, 1, std::vector< std::string,std::allocator< std::string > >()); - } -SWIGINTERN void std_vector_Sl_std_string_Sg____setslice____SWIG_1(std::vector< std::string > *self,std::vector< std::string >::difference_type i,std::vector< std::string >::difference_type j,std::vector< std::string,std::allocator< std::string > > const &v){ - swig::setslice(self, i, j, 1, v); - } -SWIGINTERN void std_vector_Sl_std_string_Sg____delslice__(std::vector< std::string > *self,std::vector< std::string >::difference_type i,std::vector< std::string >::difference_type j){ - swig::delslice(self, i, j, 1); - } -SWIGINTERN void std_vector_Sl_std_string_Sg____delitem____SWIG_0(std::vector< std::string > *self,std::vector< std::string >::difference_type i){ - swig::erase(self, swig::getpos(self, i)); - } -SWIGINTERN std::vector< std::string,std::allocator< std::string > > *std_vector_Sl_std_string_Sg____getitem____SWIG_0(std::vector< std::string > *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), (Py_ssize_t)self->size(), &i, &j, &step); - std::vector< std::string,std::allocator< std::string > >::difference_type id = i; - std::vector< std::string,std::allocator< std::string > >::difference_type jd = j; - return swig::getslice(self, id, jd, step); - } -SWIGINTERN void std_vector_Sl_std_string_Sg____setitem____SWIG_0(std::vector< std::string > *self,PySliceObject *slice,std::vector< std::string,std::allocator< std::string > > 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), (Py_ssize_t)self->size(), &i, &j, &step); - std::vector< std::string,std::allocator< std::string > >::difference_type id = i; - std::vector< std::string,std::allocator< std::string > >::difference_type jd = j; - swig::setslice(self, id, jd, step, v); - } -SWIGINTERN void std_vector_Sl_std_string_Sg____setitem____SWIG_1(std::vector< std::string > *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), (Py_ssize_t)self->size(), &i, &j, &step); - std::vector< std::string,std::allocator< std::string > >::difference_type id = i; - std::vector< std::string,std::allocator< std::string > >::difference_type jd = j; - swig::delslice(self, id, jd, step); - } -SWIGINTERN void std_vector_Sl_std_string_Sg____delitem____SWIG_1(std::vector< std::string > *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), (Py_ssize_t)self->size(), &i, &j, &step); - std::vector< std::string,std::allocator< std::string > >::difference_type id = i; - std::vector< std::string,std::allocator< std::string > >::difference_type jd = j; - swig::delslice(self, id, jd, step); - } -SWIGINTERN std::vector< std::string >::value_type const &std_vector_Sl_std_string_Sg____getitem____SWIG_1(std::vector< std::string > const *self,std::vector< std::string >::difference_type i){ - return *(swig::cgetpos(self, i)); - } - -namespace swig { - static PyObject* container_owner_attribute() { - static PyObject* attr = SWIG_Python_str_FromChar("__swig_container"); - return attr; - } - - template - struct container_owner { - // By default, do not add the back-reference (for value types) - // Specialization below will check the reference for pointer types. - static bool back_reference(PyObject* /*child*/, PyObject* /*owner*/) { - return false; - } - }; - - template <> - struct container_owner { - /* - * Call to add a back-reference to the owning object when returning a - * reference from a container. Will only set the reference if child - * is a SWIG wrapper object that does not own the pointer. - * - * returns whether the reference was set or not - */ - static bool back_reference(PyObject* child, PyObject* owner) { - SwigPyObject* swigThis = SWIG_Python_GetSwigThis(child); - if (swigThis && (swigThis->own & SWIG_POINTER_OWN) != SWIG_POINTER_OWN) { - return PyObject_SetAttr(child, container_owner_attribute(), owner) != -1; - } - return false; - } - }; -} - -SWIGINTERN void std_vector_Sl_std_string_Sg____setitem____SWIG_2(std::vector< std::string > *self,std::vector< std::string >::difference_type i,std::vector< std::string >::value_type const &x){ - *(swig::getpos(self,i)) = x; - } -SWIGINTERN std::vector< std::string >::value_type std_vector_Sl_std_string_Sg__pop(std::vector< std::string > *self){ - if (self->size() == 0) - throw std::out_of_range("pop from empty container"); - std::vector< std::string,std::allocator< std::string > >::value_type x = self->back(); - self->pop_back(); - return x; - } -SWIGINTERN void std_vector_Sl_std_string_Sg__append(std::vector< std::string > *self,std::vector< std::string >::value_type const &x){ - self->push_back(x); - } -SWIGINTERN std::vector< std::string >::iterator std_vector_Sl_std_string_Sg__erase__SWIG_0(std::vector< std::string > *self,std::vector< std::string >::iterator pos){ return self->erase(pos); } -SWIGINTERN std::vector< std::string >::iterator std_vector_Sl_std_string_Sg__erase__SWIG_1(std::vector< std::string > *self,std::vector< std::string >::iterator first,std::vector< std::string >::iterator last){ return self->erase(first, last); } -SWIGINTERN std::vector< std::string >::iterator std_vector_Sl_std_string_Sg__insert__SWIG_0(std::vector< std::string > *self,std::vector< std::string >::iterator pos,std::vector< std::string >::value_type const &x){ return self->insert(pos, x); } -SWIGINTERN void std_vector_Sl_std_string_Sg__insert__SWIG_1(std::vector< std::string > *self,std::vector< std::string >::iterator pos,std::vector< std::string >::size_type n,std::vector< std::string >::value_type const &x){ self->insert(pos, n, x); } - - namespace swig { - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - template - struct traits_asptr > { - typedef std::pair value_type; - - static int get_pair(PyObject* first, PyObject* second, - std::pair **val) - { - if (val) { - value_type *vp = (new std::pair()); - T *pfirst = &(vp->first); - int res1 = swig::asval((PyObject*)first, pfirst); - if (!SWIG_IsOK(res1)) { - delete vp; - return res1; - } - U *psecond = &(vp->second); - int res2 = swig::asval((PyObject*)second, psecond); - if (!SWIG_IsOK(res2)) { - delete vp; - return res2; - } - *val = vp; - return SWIG_AddNewMask(res1 > res2 ? res1 : res2); - } else { - T *pfirst = 0; - int res1 = swig::asval((PyObject*)first, pfirst); - if (!SWIG_IsOK(res1)) return res1; - U *psecond = 0; - int res2 = swig::asval((PyObject*)second, psecond); - if (!SWIG_IsOK(res2)) return res2; - return res1 > res2 ? res1 : res2; - } - } - - static int asptr(PyObject *obj, std::pair **val) { - int res = SWIG_ERROR; - if (PyTuple_Check(obj)) { - if (PyTuple_GET_SIZE(obj) == 2) { - res = get_pair(PyTuple_GET_ITEM(obj,0),PyTuple_GET_ITEM(obj,1), val); - } - } else if (PySequence_Check(obj)) { - if (PySequence_Size(obj) == 2) { - swig::SwigVar_PyObject first = PySequence_GetItem(obj,0); - swig::SwigVar_PyObject second = PySequence_GetItem(obj,1); - res = get_pair(first, second, val); - } - } else { - value_type *p = 0; - swig_type_info *descriptor = swig::type_info(); - res = descriptor ? SWIG_ConvertPtr(obj, (void **)&p, descriptor, 0) : SWIG_ERROR; - if (SWIG_IsOK(res) && val) *val = p; - } - return res; - } - }; - - - template - struct traits_from > { - static PyObject *from(const std::pair& val) { - PyObject* obj = PyTuple_New(2); - PyTuple_SetItem(obj,0,swig::from(val.first)); - PyTuple_SetItem(obj,1,swig::from(val.second)); - return obj; - } - }; - } - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - namespace swig { - template <> struct traits > { - typedef pointer_category category; - static const char* type_name() { - return "std::pair<" "std::string" "," "std::string" " >"; - } - }; - } - - - namespace swig { - template <> struct traits, std::allocator< std::pair< std::string,std::string > > > > { - typedef pointer_category category; - static const char* type_name() { - return "std::vector<" "std::pair< std::string,std::string >" "," "std::allocator< std::pair< std::string,std::string > >" " >"; - } - }; - } - -SWIGINTERN swig::SwigPyIterator *std_vector_Sl_std_pair_Sl_std_string_Sc_std_string_Sg__Sg__iterator(std::vector< std::pair< std::string,std::string > > *self,PyObject **PYTHON_SELF){ - return swig::make_output_iterator(self->begin(), self->begin(), self->end(), *PYTHON_SELF); - } -SWIGINTERN bool std_vector_Sl_std_pair_Sl_std_string_Sc_std_string_Sg__Sg____nonzero__(std::vector< std::pair< std::string,std::string > > const *self){ - return !(self->empty()); - } -SWIGINTERN bool std_vector_Sl_std_pair_Sl_std_string_Sc_std_string_Sg__Sg____bool__(std::vector< std::pair< std::string,std::string > > const *self){ - return !(self->empty()); - } -SWIGINTERN std::vector< std::pair< std::string,std::string > >::size_type std_vector_Sl_std_pair_Sl_std_string_Sc_std_string_Sg__Sg____len__(std::vector< std::pair< std::string,std::string > > const *self){ - return self->size(); - } -SWIGINTERN std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > > *std_vector_Sl_std_pair_Sl_std_string_Sc_std_string_Sg__Sg____getslice__(std::vector< std::pair< std::string,std::string > > *self,std::vector< std::pair< std::string,std::string > >::difference_type i,std::vector< std::pair< std::string,std::string > >::difference_type j){ - return swig::getslice(self, i, j, 1); - } -SWIGINTERN void std_vector_Sl_std_pair_Sl_std_string_Sc_std_string_Sg__Sg____setslice____SWIG_0(std::vector< std::pair< std::string,std::string > > *self,std::vector< std::pair< std::string,std::string > >::difference_type i,std::vector< std::pair< std::string,std::string > >::difference_type j){ - swig::setslice(self, i, j, 1, std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > >()); - } -SWIGINTERN void std_vector_Sl_std_pair_Sl_std_string_Sc_std_string_Sg__Sg____setslice____SWIG_1(std::vector< std::pair< std::string,std::string > > *self,std::vector< std::pair< std::string,std::string > >::difference_type i,std::vector< std::pair< std::string,std::string > >::difference_type j,std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > > const &v){ - swig::setslice(self, i, j, 1, v); - } -SWIGINTERN void std_vector_Sl_std_pair_Sl_std_string_Sc_std_string_Sg__Sg____delslice__(std::vector< std::pair< std::string,std::string > > *self,std::vector< std::pair< std::string,std::string > >::difference_type i,std::vector< std::pair< std::string,std::string > >::difference_type j){ - swig::delslice(self, i, j, 1); - } -SWIGINTERN void std_vector_Sl_std_pair_Sl_std_string_Sc_std_string_Sg__Sg____delitem____SWIG_0(std::vector< std::pair< std::string,std::string > > *self,std::vector< std::pair< std::string,std::string > >::difference_type i){ - swig::erase(self, swig::getpos(self, i)); - } -SWIGINTERN std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > > *std_vector_Sl_std_pair_Sl_std_string_Sc_std_string_Sg__Sg____getitem____SWIG_0(std::vector< std::pair< std::string,std::string > > *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), (Py_ssize_t)self->size(), &i, &j, &step); - std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > >::difference_type id = i; - std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > >::difference_type jd = j; - return swig::getslice(self, id, jd, step); - } -SWIGINTERN void std_vector_Sl_std_pair_Sl_std_string_Sc_std_string_Sg__Sg____setitem____SWIG_0(std::vector< std::pair< std::string,std::string > > *self,PySliceObject *slice,std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > > 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), (Py_ssize_t)self->size(), &i, &j, &step); - std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > >::difference_type id = i; - std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > >::difference_type jd = j; - swig::setslice(self, id, jd, step, v); - } -SWIGINTERN void std_vector_Sl_std_pair_Sl_std_string_Sc_std_string_Sg__Sg____setitem____SWIG_1(std::vector< std::pair< std::string,std::string > > *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), (Py_ssize_t)self->size(), &i, &j, &step); - std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > >::difference_type id = i; - std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > >::difference_type jd = j; - swig::delslice(self, id, jd, step); - } -SWIGINTERN void std_vector_Sl_std_pair_Sl_std_string_Sc_std_string_Sg__Sg____delitem____SWIG_1(std::vector< std::pair< std::string,std::string > > *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), (Py_ssize_t)self->size(), &i, &j, &step); - std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > >::difference_type id = i; - std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > >::difference_type jd = j; - swig::delslice(self, id, jd, step); - } -SWIGINTERN std::vector< std::pair< std::string,std::string > >::value_type const &std_vector_Sl_std_pair_Sl_std_string_Sc_std_string_Sg__Sg____getitem____SWIG_1(std::vector< std::pair< std::string,std::string > > const *self,std::vector< std::pair< std::string,std::string > >::difference_type i){ - return *(swig::cgetpos(self, i)); - } -SWIGINTERN void std_vector_Sl_std_pair_Sl_std_string_Sc_std_string_Sg__Sg____setitem____SWIG_2(std::vector< std::pair< std::string,std::string > > *self,std::vector< std::pair< std::string,std::string > >::difference_type i,std::vector< std::pair< std::string,std::string > >::value_type const &x){ - *(swig::getpos(self,i)) = x; - } -SWIGINTERN std::vector< std::pair< std::string,std::string > >::value_type std_vector_Sl_std_pair_Sl_std_string_Sc_std_string_Sg__Sg__pop(std::vector< std::pair< std::string,std::string > > *self){ - if (self->size() == 0) - throw std::out_of_range("pop from empty container"); - std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > >::value_type x = self->back(); - self->pop_back(); - return x; - } -SWIGINTERN void std_vector_Sl_std_pair_Sl_std_string_Sc_std_string_Sg__Sg__append(std::vector< std::pair< std::string,std::string > > *self,std::vector< std::pair< std::string,std::string > >::value_type const &x){ - self->push_back(x); - } -SWIGINTERN std::vector< std::pair< std::string,std::string > >::iterator std_vector_Sl_std_pair_Sl_std_string_Sc_std_string_Sg__Sg__erase__SWIG_0(std::vector< std::pair< std::string,std::string > > *self,std::vector< std::pair< std::string,std::string > >::iterator pos){ return self->erase(pos); } -SWIGINTERN std::vector< std::pair< std::string,std::string > >::iterator std_vector_Sl_std_pair_Sl_std_string_Sc_std_string_Sg__Sg__erase__SWIG_1(std::vector< std::pair< std::string,std::string > > *self,std::vector< std::pair< std::string,std::string > >::iterator first,std::vector< std::pair< std::string,std::string > >::iterator last){ return self->erase(first, last); } -SWIGINTERN std::vector< std::pair< std::string,std::string > >::iterator std_vector_Sl_std_pair_Sl_std_string_Sc_std_string_Sg__Sg__insert__SWIG_0(std::vector< std::pair< std::string,std::string > > *self,std::vector< std::pair< std::string,std::string > >::iterator pos,std::vector< std::pair< std::string,std::string > >::value_type const &x){ return self->insert(pos, x); } -SWIGINTERN void std_vector_Sl_std_pair_Sl_std_string_Sc_std_string_Sg__Sg__insert__SWIG_1(std::vector< std::pair< std::string,std::string > > *self,std::vector< std::pair< std::string,std::string > >::iterator pos,std::vector< std::pair< std::string,std::string > >::size_type n,std::vector< std::pair< std::string,std::string > >::value_type const &x){ self->insert(pos, n, x); } - -/* Getting isfinite working pre C99 across multiple platforms is non-trivial. Users can provide SWIG_isfinite on older platforms. */ -#ifndef SWIG_isfinite -/* isfinite() is a macro for C99 */ -# if defined(isfinite) -# define SWIG_isfinite(X) (isfinite(X)) -# elif defined(__cplusplus) && __cplusplus >= 201103L -/* Use a template so that this works whether isfinite() is std::isfinite() or - * in the global namespace. The reality seems to vary between compiler - * versions. - * - * Make sure namespace std exists to avoid compiler warnings. - * - * extern "C++" is required as this fragment can end up inside an extern "C" { } block - */ -namespace std { } -extern "C++" template -inline int SWIG_isfinite_func(T x) { - using namespace std; - return isfinite(x); -} -# define SWIG_isfinite(X) (SWIG_isfinite_func(X)) -# elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 2)) -# define SWIG_isfinite(X) (__builtin_isfinite(X)) -# elif defined(__clang__) && defined(__has_builtin) -# if __has_builtin(__builtin_isfinite) -# define SWIG_isfinite(X) (__builtin_isfinite(X)) -# endif -# elif defined(_MSC_VER) -# define SWIG_isfinite(X) (_finite(X)) -# elif defined(__sun) && defined(__SVR4) -# include -# define SWIG_isfinite(X) (finite(X)) -# endif -#endif - - -/* Accept infinite as a valid float value unless we are unable to check if a value is finite */ -#ifdef SWIG_isfinite -# define SWIG_Float_Overflow_Check(X) ((X < -FLT_MAX || X > FLT_MAX) && SWIG_isfinite(X)) -#else -# define SWIG_Float_Overflow_Check(X) ((X < -FLT_MAX || X > FLT_MAX)) -#endif - - -SWIGINTERN int -SWIG_AsVal_float (PyObject * obj, float *val) -{ - double v; - int res = SWIG_AsVal_double (obj, &v); - if (SWIG_IsOK(res)) { - if (SWIG_Float_Overflow_Check(v)) { - 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< float > { - typedef value_category category; - static const char* type_name() { return"float"; } - }; - template <> struct traits_asval< float > { - typedef float value_type; - static int asval(PyObject *obj, value_type *val) { - return SWIG_AsVal_float (obj, val); - } - }; - template <> struct traits_from< float > { - 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,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, 1); - } -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){ - swig::setslice(self, i, j, 1, std::vector< float,std::allocator< float > >()); - } -SWIGINTERN void std_vector_Sl_float_Sg____setslice____SWIG_1(std::vector< float > *self,std::vector< float >::difference_type i,std::vector< float >::difference_type j,std::vector< float,std::allocator< float > > const &v){ - swig::setslice(self, i, j, 1, 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, 1); - } -SWIGINTERN void std_vector_Sl_float_Sg____delitem____SWIG_0(std::vector< float > *self,std::vector< float >::difference_type i){ - swig::erase(self, 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), (Py_ssize_t)self->size(), &i, &j, &step); - std::vector< float,std::allocator< float > >::difference_type id = i; - std::vector< float,std::allocator< float > >::difference_type jd = j; - return swig::getslice(self, id, jd, step); - } -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), (Py_ssize_t)self->size(), &i, &j, &step); - std::vector< float,std::allocator< float > >::difference_type id = i; - std::vector< float,std::allocator< float > >::difference_type jd = j; - swig::setslice(self, id, jd, step, 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), (Py_ssize_t)self->size(), &i, &j, &step); - std::vector< float,std::allocator< float > >::difference_type id = i; - std::vector< float,std::allocator< float > >::difference_type jd = j; - swig::delslice(self, id, jd, step); - } -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), (Py_ssize_t)self->size(), &i, &j, &step); - std::vector< float,std::allocator< float > >::difference_type id = i; - std::vector< float,std::allocator< float > >::difference_type jd = j; - swig::delslice(self, id, jd, step); - } -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 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< float,std::allocator< float > >::value_type x = self->back(); - self->pop_back(); - return x; - } -SWIGINTERN void std_vector_Sl_float_Sg__append(std::vector< float > *self,std::vector< float >::value_type const &x){ - self->push_back(x); - } -SWIGINTERN std::vector< float >::iterator std_vector_Sl_float_Sg__erase__SWIG_0(std::vector< float > *self,std::vector< float >::iterator pos){ return self->erase(pos); } -SWIGINTERN std::vector< float >::iterator std_vector_Sl_float_Sg__erase__SWIG_1(std::vector< float > *self,std::vector< float >::iterator first,std::vector< float >::iterator last){ return self->erase(first, last); } -SWIGINTERN std::vector< float >::iterator std_vector_Sl_float_Sg__insert__SWIG_0(std::vector< float > *self,std::vector< float >::iterator pos,std::vector< float >::value_type const &x){ return self->insert(pos, x); } -SWIGINTERN void std_vector_Sl_float_Sg__insert__SWIG_1(std::vector< float > *self,std::vector< float >::iterator pos,std::vector< float >::size_type n,std::vector< float >::value_type const &x){ self->insert(pos, n, x); } - - namespace swig { - template - inline void - assign(const SwigPySeq& swigpyseq, std::set* seq) { - // seq->insert(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 > { - static int asptr(PyObject *obj, std::set **s) { - return traits_asptr_stdseq >::asptr(obj, s); - } - }; - - template - struct traits_from > { - static PyObject *from(const std::set& vec) { - return traits_from_stdseq >::from(vec); - } - }; - } - - - namespace swig { - template <> struct traits, std::allocator< std::string > > > { - typedef pointer_category category; - static const char* type_name() { - return "std::set<" "std::string" "," "std::less< std::string >" "," "std::allocator< std::string >" " >"; - } - }; - } - -SWIGINTERN swig::SwigPyIterator *std_set_Sl_std_string_Sg__iterator(std::set< std::string > *self,PyObject **PYTHON_SELF){ - return swig::make_output_iterator(self->begin(), self->begin(), self->end(), *PYTHON_SELF); - } -SWIGINTERN bool std_set_Sl_std_string_Sg____nonzero__(std::set< std::string > const *self){ - return !(self->empty()); - } -SWIGINTERN bool std_set_Sl_std_string_Sg____bool__(std::set< std::string > const *self){ - return !(self->empty()); - } -SWIGINTERN std::set< std::string >::size_type std_set_Sl_std_string_Sg____len__(std::set< std::string > const *self){ - return self->size(); - } -SWIGINTERN void std_set_Sl_std_string_Sg__append(std::set< std::string > *self,std::set< std::string >::value_type x){ - self->insert(x); - } -SWIGINTERN bool std_set_Sl_std_string_Sg____contains__(std::set< std::string > *self,std::set< std::string >::value_type x){ - return self->find(x) != self->end(); - } -SWIGINTERN std::set< std::string >::value_type std_set_Sl_std_string_Sg____getitem__(std::set< std::string > const *self,std::set< std::string >::difference_type i){ - return *(swig::cgetpos(self, i)); - } -SWIGINTERN void std_set_Sl_std_string_Sg__add(std::set< std::string > *self,std::set< std::string >::value_type x){ - self->insert(x); - } -SWIGINTERN void std_set_Sl_std_string_Sg__discard(std::set< std::string > *self,std::set< std::string >::value_type x){ - self->erase(x); - } -SWIGINTERN void std_set_Sl_std_string_Sg__erase__SWIG_1(std::set< std::string > *self,std::set< std::string >::iterator pos){ self->erase(pos); } -SWIGINTERN void std_set_Sl_std_string_Sg__erase__SWIG_2(std::set< std::string > *self,std::set< std::string >::iterator first,std::set< std::string >::iterator last){ self->erase(first, last); } - - - namespace swig { - template <> struct traits, std::less< std::pair< std::string,std::string > >, std::allocator< std::pair< std::string,std::string > > > > { - typedef pointer_category category; - static const char* type_name() { - return "std::set<" "std::pair< std::string,std::string >" "," "std::less< std::pair< std::string,std::string > >" "," "std::allocator< std::pair< std::string,std::string > >" " >"; - } - }; - } - -SWIGINTERN swig::SwigPyIterator *std_set_Sl_std_pair_Sl_std_string_Sc_std_string_Sg__Sg__iterator(std::set< std::pair< std::string,std::string > > *self,PyObject **PYTHON_SELF){ - return swig::make_output_iterator(self->begin(), self->begin(), self->end(), *PYTHON_SELF); - } -SWIGINTERN bool std_set_Sl_std_pair_Sl_std_string_Sc_std_string_Sg__Sg____nonzero__(std::set< std::pair< std::string,std::string > > const *self){ - return !(self->empty()); - } -SWIGINTERN bool std_set_Sl_std_pair_Sl_std_string_Sc_std_string_Sg__Sg____bool__(std::set< std::pair< std::string,std::string > > const *self){ - return !(self->empty()); - } -SWIGINTERN std::set< std::pair< std::string,std::string > >::size_type std_set_Sl_std_pair_Sl_std_string_Sc_std_string_Sg__Sg____len__(std::set< std::pair< std::string,std::string > > const *self){ - return self->size(); - } -SWIGINTERN void std_set_Sl_std_pair_Sl_std_string_Sc_std_string_Sg__Sg__append(std::set< std::pair< std::string,std::string > > *self,std::set< std::pair< std::string,std::string > >::value_type x){ - self->insert(x); - } -SWIGINTERN bool std_set_Sl_std_pair_Sl_std_string_Sc_std_string_Sg__Sg____contains__(std::set< std::pair< std::string,std::string > > *self,std::set< std::pair< std::string,std::string > >::value_type x){ - return self->find(x) != self->end(); - } -SWIGINTERN std::set< std::pair< std::string,std::string > >::value_type std_set_Sl_std_pair_Sl_std_string_Sc_std_string_Sg__Sg____getitem__(std::set< std::pair< std::string,std::string > > const *self,std::set< std::pair< std::string,std::string > >::difference_type i){ - return *(swig::cgetpos(self, i)); - } -SWIGINTERN void std_set_Sl_std_pair_Sl_std_string_Sc_std_string_Sg__Sg__add(std::set< std::pair< std::string,std::string > > *self,std::set< std::pair< std::string,std::string > >::value_type x){ - self->insert(x); - } -SWIGINTERN void std_set_Sl_std_pair_Sl_std_string_Sc_std_string_Sg__Sg__discard(std::set< std::pair< std::string,std::string > > *self,std::set< std::pair< std::string,std::string > >::value_type x){ - self->erase(x); - } -SWIGINTERN void std_set_Sl_std_pair_Sl_std_string_Sc_std_string_Sg__Sg__erase__SWIG_1(std::set< std::pair< std::string,std::string > > *self,std::set< std::pair< std::string,std::string > >::iterator pos){ self->erase(pos); } -SWIGINTERN void std_set_Sl_std_pair_Sl_std_string_Sc_std_string_Sg__Sg__erase__SWIG_2(std::set< std::pair< std::string,std::string > > *self,std::set< std::pair< std::string,std::string > >::iterator first,std::set< std::pair< std::string,std::string > >::iterator last){ self->erase(first, last); } - - namespace swig { - template <> struct traits< hfst::HfstTransducer > { - typedef pointer_category category; - static const char* type_name() { return"hfst::HfstTransducer"; } - }; - } - - - namespace swig { - template <> struct traits > > { - typedef pointer_category category; - static const char* type_name() { - return "std::vector<" "hfst::HfstTransducer" "," "std::allocator< hfst::HfstTransducer >" " >"; - } - }; - } - -SWIGINTERN swig::SwigPyIterator *std_vector_Sl_hfst_HfstTransducer_Sg__iterator(std::vector< hfst::HfstTransducer > *self,PyObject **PYTHON_SELF){ - return swig::make_output_iterator(self->begin(), self->begin(), self->end(), *PYTHON_SELF); - } -SWIGINTERN bool std_vector_Sl_hfst_HfstTransducer_Sg____nonzero__(std::vector< hfst::HfstTransducer > const *self){ - return !(self->empty()); - } -SWIGINTERN bool std_vector_Sl_hfst_HfstTransducer_Sg____bool__(std::vector< hfst::HfstTransducer > const *self){ - return !(self->empty()); - } -SWIGINTERN std::vector< hfst::HfstTransducer >::size_type std_vector_Sl_hfst_HfstTransducer_Sg____len__(std::vector< hfst::HfstTransducer > const *self){ - return self->size(); - } -SWIGINTERN std::vector< hfst::HfstTransducer,std::allocator< hfst::HfstTransducer > > *std_vector_Sl_hfst_HfstTransducer_Sg____getslice__(std::vector< hfst::HfstTransducer > *self,std::vector< hfst::HfstTransducer >::difference_type i,std::vector< hfst::HfstTransducer >::difference_type j){ - return swig::getslice(self, i, j, 1); - } -SWIGINTERN void std_vector_Sl_hfst_HfstTransducer_Sg____setslice____SWIG_0(std::vector< hfst::HfstTransducer > *self,std::vector< hfst::HfstTransducer >::difference_type i,std::vector< hfst::HfstTransducer >::difference_type j){ - swig::setslice(self, i, j, 1, std::vector< hfst::HfstTransducer,std::allocator< hfst::HfstTransducer > >()); - } -SWIGINTERN void std_vector_Sl_hfst_HfstTransducer_Sg____setslice____SWIG_1(std::vector< hfst::HfstTransducer > *self,std::vector< hfst::HfstTransducer >::difference_type i,std::vector< hfst::HfstTransducer >::difference_type j,std::vector< hfst::HfstTransducer,std::allocator< hfst::HfstTransducer > > const &v){ - swig::setslice(self, i, j, 1, v); - } -SWIGINTERN void std_vector_Sl_hfst_HfstTransducer_Sg____delslice__(std::vector< hfst::HfstTransducer > *self,std::vector< hfst::HfstTransducer >::difference_type i,std::vector< hfst::HfstTransducer >::difference_type j){ - swig::delslice(self, i, j, 1); - } -SWIGINTERN void std_vector_Sl_hfst_HfstTransducer_Sg____delitem____SWIG_0(std::vector< hfst::HfstTransducer > *self,std::vector< hfst::HfstTransducer >::difference_type i){ - swig::erase(self, swig::getpos(self, i)); - } -SWIGINTERN std::vector< hfst::HfstTransducer,std::allocator< hfst::HfstTransducer > > *std_vector_Sl_hfst_HfstTransducer_Sg____getitem____SWIG_0(std::vector< hfst::HfstTransducer > *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), (Py_ssize_t)self->size(), &i, &j, &step); - std::vector< hfst::HfstTransducer,std::allocator< hfst::HfstTransducer > >::difference_type id = i; - std::vector< hfst::HfstTransducer,std::allocator< hfst::HfstTransducer > >::difference_type jd = j; - return swig::getslice(self, id, jd, step); - } -SWIGINTERN void std_vector_Sl_hfst_HfstTransducer_Sg____setitem____SWIG_0(std::vector< hfst::HfstTransducer > *self,PySliceObject *slice,std::vector< hfst::HfstTransducer,std::allocator< hfst::HfstTransducer > > 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), (Py_ssize_t)self->size(), &i, &j, &step); - std::vector< hfst::HfstTransducer,std::allocator< hfst::HfstTransducer > >::difference_type id = i; - std::vector< hfst::HfstTransducer,std::allocator< hfst::HfstTransducer > >::difference_type jd = j; - swig::setslice(self, id, jd, step, v); - } -SWIGINTERN void std_vector_Sl_hfst_HfstTransducer_Sg____setitem____SWIG_1(std::vector< hfst::HfstTransducer > *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), (Py_ssize_t)self->size(), &i, &j, &step); - std::vector< hfst::HfstTransducer,std::allocator< hfst::HfstTransducer > >::difference_type id = i; - std::vector< hfst::HfstTransducer,std::allocator< hfst::HfstTransducer > >::difference_type jd = j; - swig::delslice(self, id, jd, step); - } -SWIGINTERN void std_vector_Sl_hfst_HfstTransducer_Sg____delitem____SWIG_1(std::vector< hfst::HfstTransducer > *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), (Py_ssize_t)self->size(), &i, &j, &step); - std::vector< hfst::HfstTransducer,std::allocator< hfst::HfstTransducer > >::difference_type id = i; - std::vector< hfst::HfstTransducer,std::allocator< hfst::HfstTransducer > >::difference_type jd = j; - swig::delslice(self, id, jd, step); - } -SWIGINTERN std::vector< hfst::HfstTransducer >::value_type const &std_vector_Sl_hfst_HfstTransducer_Sg____getitem____SWIG_1(std::vector< hfst::HfstTransducer > const *self,std::vector< hfst::HfstTransducer >::difference_type i){ - return *(swig::cgetpos(self, i)); - } -SWIGINTERN void std_vector_Sl_hfst_HfstTransducer_Sg____setitem____SWIG_2(std::vector< hfst::HfstTransducer > *self,std::vector< hfst::HfstTransducer >::difference_type i,std::vector< hfst::HfstTransducer >::value_type const &x){ - *(swig::getpos(self,i)) = x; - } -SWIGINTERN std::vector< hfst::HfstTransducer >::value_type std_vector_Sl_hfst_HfstTransducer_Sg__pop(std::vector< hfst::HfstTransducer > *self){ - if (self->size() == 0) - throw std::out_of_range("pop from empty container"); - std::vector< hfst::HfstTransducer,std::allocator< hfst::HfstTransducer > >::value_type x = self->back(); - self->pop_back(); - return x; - } -SWIGINTERN void std_vector_Sl_hfst_HfstTransducer_Sg__append(std::vector< hfst::HfstTransducer > *self,std::vector< hfst::HfstTransducer >::value_type const &x){ - self->push_back(x); - } -SWIGINTERN std::vector< hfst::HfstTransducer >::iterator std_vector_Sl_hfst_HfstTransducer_Sg__erase__SWIG_0(std::vector< hfst::HfstTransducer > *self,std::vector< hfst::HfstTransducer >::iterator pos){ return self->erase(pos); } -SWIGINTERN std::vector< hfst::HfstTransducer >::iterator std_vector_Sl_hfst_HfstTransducer_Sg__erase__SWIG_1(std::vector< hfst::HfstTransducer > *self,std::vector< hfst::HfstTransducer >::iterator first,std::vector< hfst::HfstTransducer >::iterator last){ return self->erase(first, last); } -SWIGINTERN std::vector< hfst::HfstTransducer >::iterator std_vector_Sl_hfst_HfstTransducer_Sg__insert__SWIG_0(std::vector< hfst::HfstTransducer > *self,std::vector< hfst::HfstTransducer >::iterator pos,std::vector< hfst::HfstTransducer >::value_type const &x){ return self->insert(pos, x); } -SWIGINTERN void std_vector_Sl_hfst_HfstTransducer_Sg__insert__SWIG_1(std::vector< hfst::HfstTransducer > *self,std::vector< hfst::HfstTransducer >::iterator pos,std::vector< hfst::HfstTransducer >::size_type n,std::vector< hfst::HfstTransducer >::value_type const &x){ self->insert(pos, n, x); } - - namespace swig { - template - struct from_key_oper - { - typedef const ValueType& argument_type; - typedef PyObject *result_type; - result_type operator()(argument_type v) const - { - return swig::from(v.first); - } - }; - - template - struct from_value_oper - { - typedef const ValueType& argument_type; - typedef PyObject *result_type; - result_type operator()(argument_type v) const - { - return swig::from(v.second); - } - }; - - template - struct SwigPyMapIterator_T : SwigPyIteratorClosed_T - { - SwigPyMapIterator_T(OutIterator curr, OutIterator first, OutIterator last, PyObject *seq) - : SwigPyIteratorClosed_T(curr, first, last, seq) - { - } - }; - - - template > - struct SwigPyMapKeyIterator_T : SwigPyMapIterator_T - { - SwigPyMapKeyIterator_T(OutIterator curr, OutIterator first, OutIterator last, PyObject *seq) - : SwigPyMapIterator_T(curr, first, last, seq) - { - } - }; - - template - inline SwigPyIterator* - make_output_key_iterator(const OutIter& current, const OutIter& begin, const OutIter& end, PyObject *seq = 0) - { - return new SwigPyMapKeyIterator_T(current, begin, end, seq); - } - - template > - struct SwigPyMapValueIterator_T : SwigPyMapIterator_T - { - SwigPyMapValueIterator_T(OutIterator curr, OutIterator first, OutIterator last, PyObject *seq) - : SwigPyMapIterator_T(curr, first, last, seq) - { - } - }; - - - template - inline SwigPyIterator* - make_output_value_iterator(const OutIter& current, const OutIter& begin, const OutIter& end, PyObject *seq = 0) - { - return new SwigPyMapValueIterator_T(current, begin, end, seq); - } - } - - - namespace swig { - template - inline void - assign(const SwigPySeq& swigpyseq, std::map *map) { - typedef typename std::map::value_type value_type; - typename SwigPySeq::const_iterator it = swigpyseq.begin(); - for (;it != swigpyseq.end(); ++it) { - map->insert(value_type(it->first, it->second)); - } - } - - template - struct traits_asptr > { - typedef std::map map_type; - static int asptr(PyObject *obj, map_type **val) { - int res = SWIG_ERROR; - SWIG_PYTHON_THREAD_BEGIN_BLOCK; - if (PyDict_Check(obj)) { - SwigVar_PyObject items = PyObject_CallMethod(obj,(char *)"items",NULL); -#if PY_VERSION_HEX >= 0x03000000 - /* In Python 3.x the ".items()" method returns a dict_items object */ - items = PySequence_Fast(items, ".items() didn't return a sequence!"); -#endif - res = traits_asptr_stdseq >::asptr(items, val); - } else { - map_type *p = 0; - swig_type_info *descriptor = swig::type_info(); - res = descriptor ? SWIG_ConvertPtr(obj, (void **)&p, descriptor, 0) : SWIG_ERROR; - if (SWIG_IsOK(res) && val) *val = p; - } - SWIG_PYTHON_THREAD_END_BLOCK; - return res; - } - }; - - template - struct traits_from > { - typedef std::map map_type; - typedef typename map_type::const_iterator const_iterator; - typedef typename map_type::size_type size_type; - - static PyObject *asdict(const map_type& map) { - SWIG_PYTHON_THREAD_BEGIN_BLOCK; - size_type size = map.size(); - Py_ssize_t pysize = (size <= (size_type) INT_MAX) ? (Py_ssize_t) size : -1; - if (pysize < 0) { - PyErr_SetString(PyExc_OverflowError, "map size not valid in python"); - SWIG_PYTHON_THREAD_END_BLOCK; - return NULL; - } - PyObject *obj = PyDict_New(); - for (const_iterator i= map.begin(); i!= map.end(); ++i) { - swig::SwigVar_PyObject key = swig::from(i->first); - swig::SwigVar_PyObject val = swig::from(i->second); - PyDict_SetItem(obj, key, val); - } - SWIG_PYTHON_THREAD_END_BLOCK; - return obj; - } - - static PyObject *from(const map_type& map) { - swig_type_info *desc = swig::type_info(); - if (desc && desc->clientdata) { - return SWIG_InternalNewPointerObj(new map_type(map), desc, SWIG_POINTER_OWN); - } else { - return asdict(map); - } - } - }; - } - - - namespace swig { - template <> struct traits, std::allocator< std::pair< std::string const,std::string > > > > { - typedef pointer_category category; - static const char* type_name() { - return "std::map<" "std::string" "," "std::string" "," "std::less< std::string >" "," "std::allocator< std::pair< std::string const,std::string > >" " >"; - } - }; - } - -SWIGINTERN swig::SwigPyIterator *std_map_Sl_std_string_Sc_std_string_Sg__iterator(std::map< std::string,std::string > *self,PyObject **PYTHON_SELF){ - return swig::make_output_iterator(self->begin(), self->begin(), self->end(), *PYTHON_SELF); - } -SWIGINTERN bool std_map_Sl_std_string_Sc_std_string_Sg____nonzero__(std::map< std::string,std::string > const *self){ - return !(self->empty()); - } -SWIGINTERN bool std_map_Sl_std_string_Sc_std_string_Sg____bool__(std::map< std::string,std::string > const *self){ - return !(self->empty()); - } -SWIGINTERN std::map< std::string,std::string >::size_type std_map_Sl_std_string_Sc_std_string_Sg____len__(std::map< std::string,std::string > const *self){ - return self->size(); - } -SWIGINTERN std::map< std::string,std::string >::mapped_type const &std_map_Sl_std_string_Sc_std_string_Sg____getitem__(std::map< std::string,std::string > *self,std::map< std::string,std::string >::key_type const &key){ - std::map< std::string,std::string,std::less< std::string >,std::allocator< std::pair< std::string const,std::string > > >::const_iterator i = self->find(key); - if (i != self->end()) - return i->second; - else - throw std::out_of_range("key not found"); - } -SWIGINTERN void std_map_Sl_std_string_Sc_std_string_Sg____delitem__(std::map< std::string,std::string > *self,std::map< std::string,std::string >::key_type const &key){ - std::map< std::string,std::string,std::less< std::string >,std::allocator< std::pair< std::string const,std::string > > >::iterator i = self->find(key); - if (i != self->end()) - self->erase(i); - else - throw std::out_of_range("key not found"); - } -SWIGINTERN bool std_map_Sl_std_string_Sc_std_string_Sg__has_key(std::map< std::string,std::string > const *self,std::map< std::string,std::string >::key_type const &key){ - std::map< std::string,std::string,std::less< std::string >,std::allocator< std::pair< std::string const,std::string > > >::const_iterator i = self->find(key); - return i != self->end(); - } -SWIGINTERN PyObject *std_map_Sl_std_string_Sc_std_string_Sg__keys(std::map< std::string,std::string > *self){ - std::map< std::string,std::string,std::less< std::string >,std::allocator< std::pair< std::string const,std::string > > >::size_type size = self->size(); - Py_ssize_t pysize = (size <= (std::map< std::string,std::string,std::less< std::string >,std::allocator< std::pair< std::string const,std::string > > >::size_type) INT_MAX) ? (Py_ssize_t) size : -1; - SWIG_PYTHON_THREAD_BEGIN_BLOCK; - if (pysize < 0) { - PyErr_SetString(PyExc_OverflowError, "map size not valid in python"); - SWIG_PYTHON_THREAD_END_BLOCK; - return NULL; - } - PyObject* keyList = PyList_New(pysize); - std::map< std::string,std::string,std::less< std::string >,std::allocator< std::pair< std::string const,std::string > > >::const_iterator i = self->begin(); - for (Py_ssize_t j = 0; j < pysize; ++i, ++j) { - PyList_SET_ITEM(keyList, j, swig::from(i->first)); - } - SWIG_PYTHON_THREAD_END_BLOCK; - return keyList; - } -SWIGINTERN PyObject *std_map_Sl_std_string_Sc_std_string_Sg__values(std::map< std::string,std::string > *self){ - std::map< std::string,std::string,std::less< std::string >,std::allocator< std::pair< std::string const,std::string > > >::size_type size = self->size(); - Py_ssize_t pysize = (size <= (std::map< std::string,std::string,std::less< std::string >,std::allocator< std::pair< std::string const,std::string > > >::size_type) INT_MAX) ? (Py_ssize_t) size : -1; - SWIG_PYTHON_THREAD_BEGIN_BLOCK; - if (pysize < 0) { - PyErr_SetString(PyExc_OverflowError, "map size not valid in python"); - SWIG_PYTHON_THREAD_END_BLOCK; - return NULL; - } - PyObject* valList = PyList_New(pysize); - std::map< std::string,std::string,std::less< std::string >,std::allocator< std::pair< std::string const,std::string > > >::const_iterator i = self->begin(); - for (Py_ssize_t j = 0; j < pysize; ++i, ++j) { - PyList_SET_ITEM(valList, j, swig::from(i->second)); - } - SWIG_PYTHON_THREAD_END_BLOCK; - return valList; - } -SWIGINTERN PyObject *std_map_Sl_std_string_Sc_std_string_Sg__items(std::map< std::string,std::string > *self){ - std::map< std::string,std::string,std::less< std::string >,std::allocator< std::pair< std::string const,std::string > > >::size_type size = self->size(); - Py_ssize_t pysize = (size <= (std::map< std::string,std::string,std::less< std::string >,std::allocator< std::pair< std::string const,std::string > > >::size_type) INT_MAX) ? (Py_ssize_t) size : -1; - SWIG_PYTHON_THREAD_BEGIN_BLOCK; - if (pysize < 0) { - PyErr_SetString(PyExc_OverflowError, "map size not valid in python"); - SWIG_PYTHON_THREAD_END_BLOCK; - return NULL; - } - PyObject* itemList = PyList_New(pysize); - std::map< std::string,std::string,std::less< std::string >,std::allocator< std::pair< std::string const,std::string > > >::const_iterator i = self->begin(); - for (Py_ssize_t j = 0; j < pysize; ++i, ++j) { - PyList_SET_ITEM(itemList, j, swig::from(*i)); - } - SWIG_PYTHON_THREAD_END_BLOCK; - return itemList; - } -SWIGINTERN bool std_map_Sl_std_string_Sc_std_string_Sg____contains__(std::map< std::string,std::string > *self,std::map< std::string,std::string >::key_type const &key){ - return self->find(key) != self->end(); - } -SWIGINTERN swig::SwigPyIterator *std_map_Sl_std_string_Sc_std_string_Sg__key_iterator(std::map< std::string,std::string > *self,PyObject **PYTHON_SELF){ - return swig::make_output_key_iterator(self->begin(), self->begin(), self->end(), *PYTHON_SELF); - } -SWIGINTERN swig::SwigPyIterator *std_map_Sl_std_string_Sc_std_string_Sg__value_iterator(std::map< std::string,std::string > *self,PyObject **PYTHON_SELF){ - return swig::make_output_value_iterator(self->begin(), self->begin(), self->end(), *PYTHON_SELF); - } -SWIGINTERN void std_map_Sl_std_string_Sc_std_string_Sg____setitem____SWIG_0(std::map< std::string,std::string > *self,std::map< std::string,std::string >::key_type const &key){ - self->erase(key); - } -SWIGINTERN void std_map_Sl_std_string_Sc_std_string_Sg____setitem____SWIG_1(std::map< std::string,std::string > *self,std::map< std::string,std::string >::key_type const &key,std::map< std::string,std::string >::mapped_type const &x){ - (*self)[key] = x; - } -SWIGINTERN PyObject *std_map_Sl_std_string_Sc_std_string_Sg__asdict(std::map< std::string,std::string > *self){ - return swig::traits_from< std::map< std::string,std::string,std::less< std::string >,std::allocator< std::pair< std::string const,std::string > > > >::asdict(*self); - } -SWIGINTERN void std_map_Sl_std_string_Sc_std_string_Sg__erase__SWIG_1(std::map< std::string,std::string > *self,std::map< std::string,std::string >::iterator position){ self->erase(position); } -SWIGINTERN void std_map_Sl_std_string_Sc_std_string_Sg__erase__SWIG_2(std::map< std::string,std::string > *self,std::map< std::string,std::string >::iterator first,std::map< std::string,std::string >::iterator last){ self->erase(first, last); } - - namespace swig { - template <> struct traits, std::pair< std::string,std::string > > > { - typedef pointer_category category; - static const char* type_name() { - return "std::pair<" "std::pair< std::string,std::string >" "," "std::pair< std::string,std::string >" " >"; - } - }; - } - - - namespace swig { - template <> struct traits, std::pair< std::string,std::string >, std::less< std::pair< std::string,std::string > >, std::allocator< std::pair< std::pair< std::string,std::string > const,std::pair< std::string,std::string > > > > > { - typedef pointer_category category; - static const char* type_name() { - return "std::map<" "std::pair< std::string,std::string >" "," "std::pair< std::string,std::string >" "," "std::less< std::pair< std::string,std::string > >" "," "std::allocator< std::pair< std::pair< std::string,std::string > const,std::pair< std::string,std::string > > >" " >"; - } - }; - } - -SWIGINTERN swig::SwigPyIterator *std_map_Sl_std_pair_Sl_std_string_Sc_std_string_Sg__Sc_std_pair_Sl_std_string_Sc_std_string_Sg__Sg__iterator(std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > *self,PyObject **PYTHON_SELF){ - return swig::make_output_iterator(self->begin(), self->begin(), self->end(), *PYTHON_SELF); - } -SWIGINTERN bool std_map_Sl_std_pair_Sl_std_string_Sc_std_string_Sg__Sc_std_pair_Sl_std_string_Sc_std_string_Sg__Sg____nonzero__(std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > const *self){ - return !(self->empty()); - } -SWIGINTERN bool std_map_Sl_std_pair_Sl_std_string_Sc_std_string_Sg__Sc_std_pair_Sl_std_string_Sc_std_string_Sg__Sg____bool__(std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > const *self){ - return !(self->empty()); - } -SWIGINTERN std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > >::size_type std_map_Sl_std_pair_Sl_std_string_Sc_std_string_Sg__Sc_std_pair_Sl_std_string_Sc_std_string_Sg__Sg____len__(std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > const *self){ - return self->size(); - } -SWIGINTERN std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > >::mapped_type const &std_map_Sl_std_pair_Sl_std_string_Sc_std_string_Sg__Sc_std_pair_Sl_std_string_Sc_std_string_Sg__Sg____getitem__(std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > *self,std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > >::key_type const &key){ - std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string >,std::less< std::pair< std::string,std::string > >,std::allocator< std::pair< std::pair< std::string,std::string > const,std::pair< std::string,std::string > > > >::const_iterator i = self->find(key); - if (i != self->end()) - return i->second; - else - throw std::out_of_range("key not found"); - } -SWIGINTERN void std_map_Sl_std_pair_Sl_std_string_Sc_std_string_Sg__Sc_std_pair_Sl_std_string_Sc_std_string_Sg__Sg____delitem__(std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > *self,std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > >::key_type const &key){ - std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string >,std::less< std::pair< std::string,std::string > >,std::allocator< std::pair< std::pair< std::string,std::string > const,std::pair< std::string,std::string > > > >::iterator i = self->find(key); - if (i != self->end()) - self->erase(i); - else - throw std::out_of_range("key not found"); - } -SWIGINTERN bool std_map_Sl_std_pair_Sl_std_string_Sc_std_string_Sg__Sc_std_pair_Sl_std_string_Sc_std_string_Sg__Sg__has_key(std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > const *self,std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > >::key_type const &key){ - std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string >,std::less< std::pair< std::string,std::string > >,std::allocator< std::pair< std::pair< std::string,std::string > const,std::pair< std::string,std::string > > > >::const_iterator i = self->find(key); - return i != self->end(); - } -SWIGINTERN PyObject *std_map_Sl_std_pair_Sl_std_string_Sc_std_string_Sg__Sc_std_pair_Sl_std_string_Sc_std_string_Sg__Sg__keys(std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > *self){ - std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string >,std::less< std::pair< std::string,std::string > >,std::allocator< std::pair< std::pair< std::string,std::string > const,std::pair< std::string,std::string > > > >::size_type size = self->size(); - Py_ssize_t pysize = (size <= (std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string >,std::less< std::pair< std::string,std::string > >,std::allocator< std::pair< std::pair< std::string,std::string > const,std::pair< std::string,std::string > > > >::size_type) INT_MAX) ? (Py_ssize_t) size : -1; - SWIG_PYTHON_THREAD_BEGIN_BLOCK; - if (pysize < 0) { - PyErr_SetString(PyExc_OverflowError, "map size not valid in python"); - SWIG_PYTHON_THREAD_END_BLOCK; - return NULL; - } - PyObject* keyList = PyList_New(pysize); - std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string >,std::less< std::pair< std::string,std::string > >,std::allocator< std::pair< std::pair< std::string,std::string > const,std::pair< std::string,std::string > > > >::const_iterator i = self->begin(); - for (Py_ssize_t j = 0; j < pysize; ++i, ++j) { - PyList_SET_ITEM(keyList, j, swig::from(i->first)); - } - SWIG_PYTHON_THREAD_END_BLOCK; - return keyList; - } -SWIGINTERN PyObject *std_map_Sl_std_pair_Sl_std_string_Sc_std_string_Sg__Sc_std_pair_Sl_std_string_Sc_std_string_Sg__Sg__values(std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > *self){ - std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string >,std::less< std::pair< std::string,std::string > >,std::allocator< std::pair< std::pair< std::string,std::string > const,std::pair< std::string,std::string > > > >::size_type size = self->size(); - Py_ssize_t pysize = (size <= (std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string >,std::less< std::pair< std::string,std::string > >,std::allocator< std::pair< std::pair< std::string,std::string > const,std::pair< std::string,std::string > > > >::size_type) INT_MAX) ? (Py_ssize_t) size : -1; - SWIG_PYTHON_THREAD_BEGIN_BLOCK; - if (pysize < 0) { - PyErr_SetString(PyExc_OverflowError, "map size not valid in python"); - SWIG_PYTHON_THREAD_END_BLOCK; - return NULL; - } - PyObject* valList = PyList_New(pysize); - std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string >,std::less< std::pair< std::string,std::string > >,std::allocator< std::pair< std::pair< std::string,std::string > const,std::pair< std::string,std::string > > > >::const_iterator i = self->begin(); - for (Py_ssize_t j = 0; j < pysize; ++i, ++j) { - PyList_SET_ITEM(valList, j, swig::from(i->second)); - } - SWIG_PYTHON_THREAD_END_BLOCK; - return valList; - } -SWIGINTERN PyObject *std_map_Sl_std_pair_Sl_std_string_Sc_std_string_Sg__Sc_std_pair_Sl_std_string_Sc_std_string_Sg__Sg__items(std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > *self){ - std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string >,std::less< std::pair< std::string,std::string > >,std::allocator< std::pair< std::pair< std::string,std::string > const,std::pair< std::string,std::string > > > >::size_type size = self->size(); - Py_ssize_t pysize = (size <= (std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string >,std::less< std::pair< std::string,std::string > >,std::allocator< std::pair< std::pair< std::string,std::string > const,std::pair< std::string,std::string > > > >::size_type) INT_MAX) ? (Py_ssize_t) size : -1; - SWIG_PYTHON_THREAD_BEGIN_BLOCK; - if (pysize < 0) { - PyErr_SetString(PyExc_OverflowError, "map size not valid in python"); - SWIG_PYTHON_THREAD_END_BLOCK; - return NULL; - } - PyObject* itemList = PyList_New(pysize); - std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string >,std::less< std::pair< std::string,std::string > >,std::allocator< std::pair< std::pair< std::string,std::string > const,std::pair< std::string,std::string > > > >::const_iterator i = self->begin(); - for (Py_ssize_t j = 0; j < pysize; ++i, ++j) { - PyList_SET_ITEM(itemList, j, swig::from(*i)); - } - SWIG_PYTHON_THREAD_END_BLOCK; - return itemList; - } -SWIGINTERN bool std_map_Sl_std_pair_Sl_std_string_Sc_std_string_Sg__Sc_std_pair_Sl_std_string_Sc_std_string_Sg__Sg____contains__(std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > *self,std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > >::key_type const &key){ - return self->find(key) != self->end(); - } -SWIGINTERN swig::SwigPyIterator *std_map_Sl_std_pair_Sl_std_string_Sc_std_string_Sg__Sc_std_pair_Sl_std_string_Sc_std_string_Sg__Sg__key_iterator(std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > *self,PyObject **PYTHON_SELF){ - return swig::make_output_key_iterator(self->begin(), self->begin(), self->end(), *PYTHON_SELF); - } -SWIGINTERN swig::SwigPyIterator *std_map_Sl_std_pair_Sl_std_string_Sc_std_string_Sg__Sc_std_pair_Sl_std_string_Sc_std_string_Sg__Sg__value_iterator(std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > *self,PyObject **PYTHON_SELF){ - return swig::make_output_value_iterator(self->begin(), self->begin(), self->end(), *PYTHON_SELF); - } -SWIGINTERN void std_map_Sl_std_pair_Sl_std_string_Sc_std_string_Sg__Sc_std_pair_Sl_std_string_Sc_std_string_Sg__Sg____setitem____SWIG_0(std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > *self,std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > >::key_type const &key){ - self->erase(key); - } -SWIGINTERN void std_map_Sl_std_pair_Sl_std_string_Sc_std_string_Sg__Sc_std_pair_Sl_std_string_Sc_std_string_Sg__Sg____setitem____SWIG_1(std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > *self,std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > >::key_type const &key,std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > >::mapped_type const &x){ - (*self)[key] = x; - } -SWIGINTERN PyObject *std_map_Sl_std_pair_Sl_std_string_Sc_std_string_Sg__Sc_std_pair_Sl_std_string_Sc_std_string_Sg__Sg__asdict(std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > *self){ - return swig::traits_from< std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string >,std::less< std::pair< std::string,std::string > >,std::allocator< std::pair< std::pair< std::string,std::string > const,std::pair< std::string,std::string > > > > >::asdict(*self); - } -SWIGINTERN void std_map_Sl_std_pair_Sl_std_string_Sc_std_string_Sg__Sc_std_pair_Sl_std_string_Sc_std_string_Sg__Sg__erase__SWIG_1(std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > *self,std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > >::iterator position){ self->erase(position); } -SWIGINTERN void std_map_Sl_std_pair_Sl_std_string_Sc_std_string_Sg__Sc_std_pair_Sl_std_string_Sc_std_string_Sg__Sg__erase__SWIG_2(std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > *self,std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > >::iterator first,std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > >::iterator last){ self->erase(first, last); } - -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; -} - - -SWIGINTERNINLINE PyObject* - SWIG_From_unsigned_SS_int (unsigned int value) -{ - return PyInt_FromSize_t((size_t) value); -} - - -namespace swig { - template <> struct traits< unsigned int > { - typedef value_category category; - static const char* type_name() { return"unsigned int"; } - }; - template <> struct traits_asval< unsigned int > { - typedef unsigned int value_type; - static int asval(PyObject *obj, value_type *val) { - return SWIG_AsVal_unsigned_SS_int (obj, val); - } - }; - template <> struct traits_from< unsigned int > { - typedef unsigned int value_type; - static PyObject *from(const value_type& val) { - return SWIG_From_unsigned_SS_int (val); - } - }; -} - - - namespace swig { - template <> struct traits > > { - typedef pointer_category category; - static const char* type_name() { - return "std::vector<" "unsigned int" "," "std::allocator< unsigned int >" " >"; - } - }; - } - -SWIGINTERN swig::SwigPyIterator *std_vector_Sl_unsigned_SS_int_Sg__iterator(std::vector< unsigned int > *self,PyObject **PYTHON_SELF){ - return swig::make_output_iterator(self->begin(), self->begin(), self->end(), *PYTHON_SELF); - } -SWIGINTERN bool std_vector_Sl_unsigned_SS_int_Sg____nonzero__(std::vector< unsigned int > const *self){ - return !(self->empty()); - } -SWIGINTERN bool std_vector_Sl_unsigned_SS_int_Sg____bool__(std::vector< unsigned int > const *self){ - return !(self->empty()); - } -SWIGINTERN std::vector< unsigned int >::size_type std_vector_Sl_unsigned_SS_int_Sg____len__(std::vector< unsigned int > const *self){ - return self->size(); - } -SWIGINTERN std::vector< unsigned int,std::allocator< unsigned int > > *std_vector_Sl_unsigned_SS_int_Sg____getslice__(std::vector< unsigned int > *self,std::vector< unsigned int >::difference_type i,std::vector< unsigned int >::difference_type j){ - return swig::getslice(self, i, j, 1); - } -SWIGINTERN void std_vector_Sl_unsigned_SS_int_Sg____setslice____SWIG_0(std::vector< unsigned int > *self,std::vector< unsigned int >::difference_type i,std::vector< unsigned int >::difference_type j){ - swig::setslice(self, i, j, 1, std::vector< unsigned int,std::allocator< unsigned int > >()); - } -SWIGINTERN void std_vector_Sl_unsigned_SS_int_Sg____setslice____SWIG_1(std::vector< unsigned int > *self,std::vector< unsigned int >::difference_type i,std::vector< unsigned int >::difference_type j,std::vector< unsigned int,std::allocator< unsigned int > > const &v){ - swig::setslice(self, i, j, 1, v); - } -SWIGINTERN void std_vector_Sl_unsigned_SS_int_Sg____delslice__(std::vector< unsigned int > *self,std::vector< unsigned int >::difference_type i,std::vector< unsigned int >::difference_type j){ - swig::delslice(self, i, j, 1); - } -SWIGINTERN void std_vector_Sl_unsigned_SS_int_Sg____delitem____SWIG_0(std::vector< unsigned int > *self,std::vector< unsigned int >::difference_type i){ - swig::erase(self, swig::getpos(self, i)); - } -SWIGINTERN std::vector< unsigned int,std::allocator< unsigned int > > *std_vector_Sl_unsigned_SS_int_Sg____getitem____SWIG_0(std::vector< unsigned 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), (Py_ssize_t)self->size(), &i, &j, &step); - std::vector< unsigned int,std::allocator< unsigned int > >::difference_type id = i; - std::vector< unsigned int,std::allocator< unsigned int > >::difference_type jd = j; - return swig::getslice(self, id, jd, step); - } -SWIGINTERN void std_vector_Sl_unsigned_SS_int_Sg____setitem____SWIG_0(std::vector< unsigned int > *self,PySliceObject *slice,std::vector< unsigned int,std::allocator< unsigned 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), (Py_ssize_t)self->size(), &i, &j, &step); - std::vector< unsigned int,std::allocator< unsigned int > >::difference_type id = i; - std::vector< unsigned int,std::allocator< unsigned int > >::difference_type jd = j; - swig::setslice(self, id, jd, step, v); - } -SWIGINTERN void std_vector_Sl_unsigned_SS_int_Sg____setitem____SWIG_1(std::vector< unsigned 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), (Py_ssize_t)self->size(), &i, &j, &step); - std::vector< unsigned int,std::allocator< unsigned int > >::difference_type id = i; - std::vector< unsigned int,std::allocator< unsigned int > >::difference_type jd = j; - swig::delslice(self, id, jd, step); - } -SWIGINTERN void std_vector_Sl_unsigned_SS_int_Sg____delitem____SWIG_1(std::vector< unsigned 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), (Py_ssize_t)self->size(), &i, &j, &step); - std::vector< unsigned int,std::allocator< unsigned int > >::difference_type id = i; - std::vector< unsigned int,std::allocator< unsigned int > >::difference_type jd = j; - swig::delslice(self, id, jd, step); - } -SWIGINTERN std::vector< unsigned int >::value_type const &std_vector_Sl_unsigned_SS_int_Sg____getitem____SWIG_1(std::vector< unsigned int > const *self,std::vector< unsigned int >::difference_type i){ - return *(swig::cgetpos(self, i)); - } -SWIGINTERN void std_vector_Sl_unsigned_SS_int_Sg____setitem____SWIG_2(std::vector< unsigned int > *self,std::vector< unsigned int >::difference_type i,std::vector< unsigned int >::value_type const &x){ - *(swig::getpos(self,i)) = x; - } -SWIGINTERN std::vector< unsigned int >::value_type std_vector_Sl_unsigned_SS_int_Sg__pop(std::vector< unsigned int > *self){ - if (self->size() == 0) - throw std::out_of_range("pop from empty container"); - std::vector< unsigned int,std::allocator< unsigned int > >::value_type x = self->back(); - self->pop_back(); - return x; - } -SWIGINTERN void std_vector_Sl_unsigned_SS_int_Sg__append(std::vector< unsigned int > *self,std::vector< unsigned int >::value_type const &x){ - self->push_back(x); - } -SWIGINTERN std::vector< unsigned int >::iterator std_vector_Sl_unsigned_SS_int_Sg__erase__SWIG_0(std::vector< unsigned int > *self,std::vector< unsigned int >::iterator pos){ return self->erase(pos); } -SWIGINTERN std::vector< unsigned int >::iterator std_vector_Sl_unsigned_SS_int_Sg__erase__SWIG_1(std::vector< unsigned int > *self,std::vector< unsigned int >::iterator first,std::vector< unsigned int >::iterator last){ return self->erase(first, last); } -SWIGINTERN std::vector< unsigned int >::iterator std_vector_Sl_unsigned_SS_int_Sg__insert__SWIG_0(std::vector< unsigned int > *self,std::vector< unsigned int >::iterator pos,std::vector< unsigned int >::value_type const &x){ return self->insert(pos, x); } -SWIGINTERN void std_vector_Sl_unsigned_SS_int_Sg__insert__SWIG_1(std::vector< unsigned int > *self,std::vector< unsigned int >::iterator pos,std::vector< unsigned int >::size_type n,std::vector< unsigned int >::value_type const &x){ self->insert(pos, n, x); } - - namespace swig { - template <> struct traits< hfst::implementations::HfstBasicTransition > { - typedef pointer_category category; - static const char* type_name() { return"hfst::implementations::HfstBasicTransition"; } - }; - } - - - namespace swig { - template <> struct traits > > { - typedef pointer_category category; - static const char* type_name() { - return "std::vector<" "hfst::implementations::HfstBasicTransition" "," "std::allocator< hfst::implementations::HfstBasicTransition >" " >"; - } - }; - } - -SWIGINTERN swig::SwigPyIterator *std_vector_Sl_hfst_implementations_HfstBasicTransition_Sg__iterator(std::vector< hfst::implementations::HfstBasicTransition > *self,PyObject **PYTHON_SELF){ - return swig::make_output_iterator(self->begin(), self->begin(), self->end(), *PYTHON_SELF); - } -SWIGINTERN bool std_vector_Sl_hfst_implementations_HfstBasicTransition_Sg____nonzero__(std::vector< hfst::implementations::HfstBasicTransition > const *self){ - return !(self->empty()); - } -SWIGINTERN bool std_vector_Sl_hfst_implementations_HfstBasicTransition_Sg____bool__(std::vector< hfst::implementations::HfstBasicTransition > const *self){ - return !(self->empty()); - } -SWIGINTERN std::vector< hfst::implementations::HfstBasicTransition >::size_type std_vector_Sl_hfst_implementations_HfstBasicTransition_Sg____len__(std::vector< hfst::implementations::HfstBasicTransition > const *self){ - return self->size(); - } -SWIGINTERN std::vector< hfst::implementations::HfstBasicTransition,std::allocator< hfst::implementations::HfstBasicTransition > > *std_vector_Sl_hfst_implementations_HfstBasicTransition_Sg____getslice__(std::vector< hfst::implementations::HfstBasicTransition > *self,std::vector< hfst::implementations::HfstBasicTransition >::difference_type i,std::vector< hfst::implementations::HfstBasicTransition >::difference_type j){ - return swig::getslice(self, i, j, 1); - } -SWIGINTERN void std_vector_Sl_hfst_implementations_HfstBasicTransition_Sg____setslice____SWIG_0(std::vector< hfst::implementations::HfstBasicTransition > *self,std::vector< hfst::implementations::HfstBasicTransition >::difference_type i,std::vector< hfst::implementations::HfstBasicTransition >::difference_type j){ - swig::setslice(self, i, j, 1, std::vector< hfst::implementations::HfstBasicTransition,std::allocator< hfst::implementations::HfstBasicTransition > >()); - } -SWIGINTERN void std_vector_Sl_hfst_implementations_HfstBasicTransition_Sg____setslice____SWIG_1(std::vector< hfst::implementations::HfstBasicTransition > *self,std::vector< hfst::implementations::HfstBasicTransition >::difference_type i,std::vector< hfst::implementations::HfstBasicTransition >::difference_type j,std::vector< hfst::implementations::HfstBasicTransition,std::allocator< hfst::implementations::HfstBasicTransition > > const &v){ - swig::setslice(self, i, j, 1, v); - } -SWIGINTERN void std_vector_Sl_hfst_implementations_HfstBasicTransition_Sg____delslice__(std::vector< hfst::implementations::HfstBasicTransition > *self,std::vector< hfst::implementations::HfstBasicTransition >::difference_type i,std::vector< hfst::implementations::HfstBasicTransition >::difference_type j){ - swig::delslice(self, i, j, 1); - } -SWIGINTERN void std_vector_Sl_hfst_implementations_HfstBasicTransition_Sg____delitem____SWIG_0(std::vector< hfst::implementations::HfstBasicTransition > *self,std::vector< hfst::implementations::HfstBasicTransition >::difference_type i){ - swig::erase(self, swig::getpos(self, i)); - } -SWIGINTERN std::vector< hfst::implementations::HfstBasicTransition,std::allocator< hfst::implementations::HfstBasicTransition > > *std_vector_Sl_hfst_implementations_HfstBasicTransition_Sg____getitem____SWIG_0(std::vector< hfst::implementations::HfstBasicTransition > *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), (Py_ssize_t)self->size(), &i, &j, &step); - std::vector< hfst::implementations::HfstBasicTransition,std::allocator< hfst::implementations::HfstBasicTransition > >::difference_type id = i; - std::vector< hfst::implementations::HfstBasicTransition,std::allocator< hfst::implementations::HfstBasicTransition > >::difference_type jd = j; - return swig::getslice(self, id, jd, step); - } -SWIGINTERN void std_vector_Sl_hfst_implementations_HfstBasicTransition_Sg____setitem____SWIG_0(std::vector< hfst::implementations::HfstBasicTransition > *self,PySliceObject *slice,std::vector< hfst::implementations::HfstBasicTransition,std::allocator< hfst::implementations::HfstBasicTransition > > 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), (Py_ssize_t)self->size(), &i, &j, &step); - std::vector< hfst::implementations::HfstBasicTransition,std::allocator< hfst::implementations::HfstBasicTransition > >::difference_type id = i; - std::vector< hfst::implementations::HfstBasicTransition,std::allocator< hfst::implementations::HfstBasicTransition > >::difference_type jd = j; - swig::setslice(self, id, jd, step, v); - } -SWIGINTERN void std_vector_Sl_hfst_implementations_HfstBasicTransition_Sg____setitem____SWIG_1(std::vector< hfst::implementations::HfstBasicTransition > *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), (Py_ssize_t)self->size(), &i, &j, &step); - std::vector< hfst::implementations::HfstBasicTransition,std::allocator< hfst::implementations::HfstBasicTransition > >::difference_type id = i; - std::vector< hfst::implementations::HfstBasicTransition,std::allocator< hfst::implementations::HfstBasicTransition > >::difference_type jd = j; - swig::delslice(self, id, jd, step); - } -SWIGINTERN void std_vector_Sl_hfst_implementations_HfstBasicTransition_Sg____delitem____SWIG_1(std::vector< hfst::implementations::HfstBasicTransition > *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), (Py_ssize_t)self->size(), &i, &j, &step); - std::vector< hfst::implementations::HfstBasicTransition,std::allocator< hfst::implementations::HfstBasicTransition > >::difference_type id = i; - std::vector< hfst::implementations::HfstBasicTransition,std::allocator< hfst::implementations::HfstBasicTransition > >::difference_type jd = j; - swig::delslice(self, id, jd, step); - } -SWIGINTERN std::vector< hfst::implementations::HfstBasicTransition >::value_type const &std_vector_Sl_hfst_implementations_HfstBasicTransition_Sg____getitem____SWIG_1(std::vector< hfst::implementations::HfstBasicTransition > const *self,std::vector< hfst::implementations::HfstBasicTransition >::difference_type i){ - return *(swig::cgetpos(self, i)); - } -SWIGINTERN void std_vector_Sl_hfst_implementations_HfstBasicTransition_Sg____setitem____SWIG_2(std::vector< hfst::implementations::HfstBasicTransition > *self,std::vector< hfst::implementations::HfstBasicTransition >::difference_type i,std::vector< hfst::implementations::HfstBasicTransition >::value_type const &x){ - *(swig::getpos(self,i)) = x; - } -SWIGINTERN std::vector< hfst::implementations::HfstBasicTransition >::value_type std_vector_Sl_hfst_implementations_HfstBasicTransition_Sg__pop(std::vector< hfst::implementations::HfstBasicTransition > *self){ - if (self->size() == 0) - throw std::out_of_range("pop from empty container"); - std::vector< hfst::implementations::HfstBasicTransition,std::allocator< hfst::implementations::HfstBasicTransition > >::value_type x = self->back(); - self->pop_back(); - return x; - } -SWIGINTERN void std_vector_Sl_hfst_implementations_HfstBasicTransition_Sg__append(std::vector< hfst::implementations::HfstBasicTransition > *self,std::vector< hfst::implementations::HfstBasicTransition >::value_type const &x){ - self->push_back(x); - } -SWIGINTERN std::vector< hfst::implementations::HfstBasicTransition >::iterator std_vector_Sl_hfst_implementations_HfstBasicTransition_Sg__erase__SWIG_0(std::vector< hfst::implementations::HfstBasicTransition > *self,std::vector< hfst::implementations::HfstBasicTransition >::iterator pos){ return self->erase(pos); } -SWIGINTERN std::vector< hfst::implementations::HfstBasicTransition >::iterator std_vector_Sl_hfst_implementations_HfstBasicTransition_Sg__erase__SWIG_1(std::vector< hfst::implementations::HfstBasicTransition > *self,std::vector< hfst::implementations::HfstBasicTransition >::iterator first,std::vector< hfst::implementations::HfstBasicTransition >::iterator last){ return self->erase(first, last); } -SWIGINTERN std::vector< hfst::implementations::HfstBasicTransition >::iterator std_vector_Sl_hfst_implementations_HfstBasicTransition_Sg__insert__SWIG_0(std::vector< hfst::implementations::HfstBasicTransition > *self,std::vector< hfst::implementations::HfstBasicTransition >::iterator pos,std::vector< hfst::implementations::HfstBasicTransition >::value_type const &x){ return self->insert(pos, x); } -SWIGINTERN void std_vector_Sl_hfst_implementations_HfstBasicTransition_Sg__insert__SWIG_1(std::vector< hfst::implementations::HfstBasicTransition > *self,std::vector< hfst::implementations::HfstBasicTransition >::iterator pos,std::vector< hfst::implementations::HfstBasicTransition >::size_type n,std::vector< hfst::implementations::HfstBasicTransition >::value_type const &x){ self->insert(pos, n, x); } - - namespace swig { - template <> struct traits > > > { - typedef pointer_category category; - static const char* type_name() { - return "std::pair<" "float" "," "std::vector< std::string,std::allocator< std::string > >" " >"; - } - }; - } - - - namespace swig { - template <> struct traits > >, std::less< std::pair< float,std::vector< std::string > > >, std::allocator< std::pair< float,std::vector< std::string,std::allocator< std::string > > > > > > { - typedef pointer_category category; - static const char* type_name() { - return "std::set<" "std::pair< float,std::vector< std::string,std::allocator< std::string > > >" "," "std::less< std::pair< float,std::vector< std::string > > >" "," "std::allocator< std::pair< float,std::vector< std::string,std::allocator< std::string > > > >" " >"; - } - }; - } - -SWIGINTERN swig::SwigPyIterator *std_set_Sl_std_pair_Sl_float_Sc_std_vector_Sl_std_string_Sg__Sg__Sg__iterator(std::set< std::pair< float,std::vector< std::string > > > *self,PyObject **PYTHON_SELF){ - return swig::make_output_iterator(self->begin(), self->begin(), self->end(), *PYTHON_SELF); - } -SWIGINTERN bool std_set_Sl_std_pair_Sl_float_Sc_std_vector_Sl_std_string_Sg__Sg__Sg____nonzero__(std::set< std::pair< float,std::vector< std::string > > > const *self){ - return !(self->empty()); - } -SWIGINTERN bool std_set_Sl_std_pair_Sl_float_Sc_std_vector_Sl_std_string_Sg__Sg__Sg____bool__(std::set< std::pair< float,std::vector< std::string > > > const *self){ - return !(self->empty()); - } -SWIGINTERN std::set< std::pair< float,std::vector< std::string > > >::size_type std_set_Sl_std_pair_Sl_float_Sc_std_vector_Sl_std_string_Sg__Sg__Sg____len__(std::set< std::pair< float,std::vector< std::string > > > const *self){ - return self->size(); - } -SWIGINTERN void std_set_Sl_std_pair_Sl_float_Sc_std_vector_Sl_std_string_Sg__Sg__Sg__append(std::set< std::pair< float,std::vector< std::string > > > *self,std::set< std::pair< float,std::vector< std::string > > >::value_type x){ - self->insert(x); - } -SWIGINTERN bool std_set_Sl_std_pair_Sl_float_Sc_std_vector_Sl_std_string_Sg__Sg__Sg____contains__(std::set< std::pair< float,std::vector< std::string > > > *self,std::set< std::pair< float,std::vector< std::string > > >::value_type x){ - return self->find(x) != self->end(); - } -SWIGINTERN std::set< std::pair< float,std::vector< std::string > > >::value_type std_set_Sl_std_pair_Sl_float_Sc_std_vector_Sl_std_string_Sg__Sg__Sg____getitem__(std::set< std::pair< float,std::vector< std::string > > > const *self,std::set< std::pair< float,std::vector< std::string > > >::difference_type i){ - return *(swig::cgetpos(self, i)); - } -SWIGINTERN void std_set_Sl_std_pair_Sl_float_Sc_std_vector_Sl_std_string_Sg__Sg__Sg__add(std::set< std::pair< float,std::vector< std::string > > > *self,std::set< std::pair< float,std::vector< std::string > > >::value_type x){ - self->insert(x); - } -SWIGINTERN void std_set_Sl_std_pair_Sl_float_Sc_std_vector_Sl_std_string_Sg__Sg__Sg__discard(std::set< std::pair< float,std::vector< std::string > > > *self,std::set< std::pair< float,std::vector< std::string > > >::value_type x){ - self->erase(x); - } -SWIGINTERN void std_set_Sl_std_pair_Sl_float_Sc_std_vector_Sl_std_string_Sg__Sg__Sg__erase__SWIG_1(std::set< std::pair< float,std::vector< std::string > > > *self,std::set< std::pair< float,std::vector< std::string > > >::iterator pos){ self->erase(pos); } -SWIGINTERN void std_set_Sl_std_pair_Sl_float_Sc_std_vector_Sl_std_string_Sg__Sg__Sg__erase__SWIG_2(std::set< std::pair< float,std::vector< std::string > > > *self,std::set< std::pair< float,std::vector< std::string > > >::iterator first,std::set< std::pair< float,std::vector< std::string > > >::iterator last){ self->erase(first, last); } - - namespace swig { - template <> struct traits,std::allocator< std::pair< std::string,std::string > > > > > { - typedef pointer_category category; - static const char* type_name() { - return "std::pair<" "float" "," "std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > >" " >"; - } - }; - } - - - namespace swig { - template <> struct traits,std::allocator< std::pair< std::string,std::string > > > >, std::less< std::pair< float,std::vector< std::pair< std::string,std::string > > > >, std::allocator< std::pair< float,std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > > > > > > { - typedef pointer_category category; - static const char* type_name() { - return "std::set<" "std::pair< float,std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > > >" "," "std::less< std::pair< float,std::vector< std::pair< std::string,std::string > > > >" "," "std::allocator< std::pair< float,std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > > > >" " >"; - } - }; - } - -SWIGINTERN swig::SwigPyIterator *std_set_Sl_std_pair_Sl_float_Sc_std_vector_Sl_std_pair_Sl_std_string_Sc_std_string_Sg__Sg__Sg__Sg__iterator(std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > > *self,PyObject **PYTHON_SELF){ - return swig::make_output_iterator(self->begin(), self->begin(), self->end(), *PYTHON_SELF); - } -SWIGINTERN bool std_set_Sl_std_pair_Sl_float_Sc_std_vector_Sl_std_pair_Sl_std_string_Sc_std_string_Sg__Sg__Sg__Sg____nonzero__(std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > > const *self){ - return !(self->empty()); - } -SWIGINTERN bool std_set_Sl_std_pair_Sl_float_Sc_std_vector_Sl_std_pair_Sl_std_string_Sc_std_string_Sg__Sg__Sg__Sg____bool__(std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > > const *self){ - return !(self->empty()); - } -SWIGINTERN std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > >::size_type std_set_Sl_std_pair_Sl_float_Sc_std_vector_Sl_std_pair_Sl_std_string_Sc_std_string_Sg__Sg__Sg__Sg____len__(std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > > const *self){ - return self->size(); - } -SWIGINTERN void std_set_Sl_std_pair_Sl_float_Sc_std_vector_Sl_std_pair_Sl_std_string_Sc_std_string_Sg__Sg__Sg__Sg__append(std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > > *self,std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > >::value_type x){ - self->insert(x); - } -SWIGINTERN bool std_set_Sl_std_pair_Sl_float_Sc_std_vector_Sl_std_pair_Sl_std_string_Sc_std_string_Sg__Sg__Sg__Sg____contains__(std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > > *self,std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > >::value_type x){ - return self->find(x) != self->end(); - } -SWIGINTERN std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > >::value_type std_set_Sl_std_pair_Sl_float_Sc_std_vector_Sl_std_pair_Sl_std_string_Sc_std_string_Sg__Sg__Sg__Sg____getitem__(std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > > const *self,std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > >::difference_type i){ - return *(swig::cgetpos(self, i)); - } -SWIGINTERN void std_set_Sl_std_pair_Sl_float_Sc_std_vector_Sl_std_pair_Sl_std_string_Sc_std_string_Sg__Sg__Sg__Sg__add(std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > > *self,std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > >::value_type x){ - self->insert(x); - } -SWIGINTERN void std_set_Sl_std_pair_Sl_float_Sc_std_vector_Sl_std_pair_Sl_std_string_Sc_std_string_Sg__Sg__Sg__Sg__discard(std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > > *self,std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > >::value_type x){ - self->erase(x); - } -SWIGINTERN void std_set_Sl_std_pair_Sl_float_Sc_std_vector_Sl_std_pair_Sl_std_string_Sc_std_string_Sg__Sg__Sg__Sg__erase__SWIG_1(std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > > *self,std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > >::iterator pos){ self->erase(pos); } -SWIGINTERN void std_set_Sl_std_pair_Sl_float_Sc_std_vector_Sl_std_pair_Sl_std_string_Sc_std_string_Sg__Sg__Sg__Sg__erase__SWIG_2(std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > > *self,std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > >::iterator first,std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > >::iterator last){ self->erase(first, last); } - - namespace swig { - template <> struct traits > { - typedef pointer_category category; - static const char* type_name() { - return "std::pair<" "hfst::HfstTransducer" "," "hfst::HfstTransducer" " >"; - } - }; - } - - - namespace swig { - template <> struct traits, std::allocator< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > > > { - typedef pointer_category category; - static const char* type_name() { - return "std::vector<" "std::pair< hfst::HfstTransducer,hfst::HfstTransducer >" "," "std::allocator< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >" " >"; - } - }; - } - -SWIGINTERN swig::SwigPyIterator *std_vector_Sl_std_pair_Sl_hfst_HfstTransducer_Sc_hfst_HfstTransducer_Sg__Sg__iterator(std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > *self,PyObject **PYTHON_SELF){ - return swig::make_output_iterator(self->begin(), self->begin(), self->end(), *PYTHON_SELF); - } -SWIGINTERN bool std_vector_Sl_std_pair_Sl_hfst_HfstTransducer_Sc_hfst_HfstTransducer_Sg__Sg____nonzero__(std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > const *self){ - return !(self->empty()); - } -SWIGINTERN bool std_vector_Sl_std_pair_Sl_hfst_HfstTransducer_Sc_hfst_HfstTransducer_Sg__Sg____bool__(std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > const *self){ - return !(self->empty()); - } -SWIGINTERN std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::size_type std_vector_Sl_std_pair_Sl_hfst_HfstTransducer_Sc_hfst_HfstTransducer_Sg__Sg____len__(std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > const *self){ - return self->size(); - } -SWIGINTERN std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer >,std::allocator< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > > *std_vector_Sl_std_pair_Sl_hfst_HfstTransducer_Sc_hfst_HfstTransducer_Sg__Sg____getslice__(std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > *self,std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::difference_type i,std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::difference_type j){ - return swig::getslice(self, i, j, 1); - } -SWIGINTERN void std_vector_Sl_std_pair_Sl_hfst_HfstTransducer_Sc_hfst_HfstTransducer_Sg__Sg____setslice____SWIG_0(std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > *self,std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::difference_type i,std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::difference_type j){ - swig::setslice(self, i, j, 1, std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer >,std::allocator< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > >()); - } -SWIGINTERN void std_vector_Sl_std_pair_Sl_hfst_HfstTransducer_Sc_hfst_HfstTransducer_Sg__Sg____setslice____SWIG_1(std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > *self,std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::difference_type i,std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::difference_type j,std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer >,std::allocator< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > > const &v){ - swig::setslice(self, i, j, 1, v); - } -SWIGINTERN void std_vector_Sl_std_pair_Sl_hfst_HfstTransducer_Sc_hfst_HfstTransducer_Sg__Sg____delslice__(std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > *self,std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::difference_type i,std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::difference_type j){ - swig::delslice(self, i, j, 1); - } -SWIGINTERN void std_vector_Sl_std_pair_Sl_hfst_HfstTransducer_Sc_hfst_HfstTransducer_Sg__Sg____delitem____SWIG_0(std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > *self,std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::difference_type i){ - swig::erase(self, swig::getpos(self, i)); - } -SWIGINTERN std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer >,std::allocator< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > > *std_vector_Sl_std_pair_Sl_hfst_HfstTransducer_Sc_hfst_HfstTransducer_Sg__Sg____getitem____SWIG_0(std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > *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), (Py_ssize_t)self->size(), &i, &j, &step); - std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer >,std::allocator< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > >::difference_type id = i; - std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer >,std::allocator< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > >::difference_type jd = j; - return swig::getslice(self, id, jd, step); - } -SWIGINTERN void std_vector_Sl_std_pair_Sl_hfst_HfstTransducer_Sc_hfst_HfstTransducer_Sg__Sg____setitem____SWIG_0(std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > *self,PySliceObject *slice,std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer >,std::allocator< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > > 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), (Py_ssize_t)self->size(), &i, &j, &step); - std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer >,std::allocator< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > >::difference_type id = i; - std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer >,std::allocator< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > >::difference_type jd = j; - swig::setslice(self, id, jd, step, v); - } -SWIGINTERN void std_vector_Sl_std_pair_Sl_hfst_HfstTransducer_Sc_hfst_HfstTransducer_Sg__Sg____setitem____SWIG_1(std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > *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), (Py_ssize_t)self->size(), &i, &j, &step); - std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer >,std::allocator< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > >::difference_type id = i; - std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer >,std::allocator< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > >::difference_type jd = j; - swig::delslice(self, id, jd, step); - } -SWIGINTERN void std_vector_Sl_std_pair_Sl_hfst_HfstTransducer_Sc_hfst_HfstTransducer_Sg__Sg____delitem____SWIG_1(std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > *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), (Py_ssize_t)self->size(), &i, &j, &step); - std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer >,std::allocator< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > >::difference_type id = i; - std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer >,std::allocator< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > >::difference_type jd = j; - swig::delslice(self, id, jd, step); - } -SWIGINTERN std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::value_type const &std_vector_Sl_std_pair_Sl_hfst_HfstTransducer_Sc_hfst_HfstTransducer_Sg__Sg____getitem____SWIG_1(std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > const *self,std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::difference_type i){ - return *(swig::cgetpos(self, i)); - } -SWIGINTERN void std_vector_Sl_std_pair_Sl_hfst_HfstTransducer_Sc_hfst_HfstTransducer_Sg__Sg____setitem____SWIG_2(std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > *self,std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::difference_type i,std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::value_type const &x){ - *(swig::getpos(self,i)) = x; - } -SWIGINTERN std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::value_type std_vector_Sl_std_pair_Sl_hfst_HfstTransducer_Sc_hfst_HfstTransducer_Sg__Sg__pop(std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > *self){ - if (self->size() == 0) - throw std::out_of_range("pop from empty container"); - std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer >,std::allocator< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > >::value_type x = self->back(); - self->pop_back(); - return x; - } -SWIGINTERN void std_vector_Sl_std_pair_Sl_hfst_HfstTransducer_Sc_hfst_HfstTransducer_Sg__Sg__append(std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > *self,std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::value_type const &x){ - self->push_back(x); - } -SWIGINTERN std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::iterator std_vector_Sl_std_pair_Sl_hfst_HfstTransducer_Sc_hfst_HfstTransducer_Sg__Sg__erase__SWIG_0(std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > *self,std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::iterator pos){ return self->erase(pos); } -SWIGINTERN std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::iterator std_vector_Sl_std_pair_Sl_hfst_HfstTransducer_Sc_hfst_HfstTransducer_Sg__Sg__erase__SWIG_1(std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > *self,std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::iterator first,std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::iterator last){ return self->erase(first, last); } -SWIGINTERN std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::iterator std_vector_Sl_std_pair_Sl_hfst_HfstTransducer_Sc_hfst_HfstTransducer_Sg__Sg__insert__SWIG_0(std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > *self,std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::iterator pos,std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::value_type const &x){ return self->insert(pos, x); } -SWIGINTERN void std_vector_Sl_std_pair_Sl_hfst_HfstTransducer_Sc_hfst_HfstTransducer_Sg__Sg__insert__SWIG_1(std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > *self,std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::iterator pos,std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::size_type n,std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::value_type const &x){ self->insert(pos, n, x); } - - namespace swig { - template <> struct traits< hfst::xeroxRules::Rule > { - typedef pointer_category category; - static const char* type_name() { return"hfst::xeroxRules::Rule"; } - }; - } - - - namespace swig { - template <> struct traits > > { - typedef pointer_category category; - static const char* type_name() { - return "std::vector<" "hfst::xeroxRules::Rule" "," "std::allocator< hfst::xeroxRules::Rule >" " >"; - } - }; - } - -SWIGINTERN swig::SwigPyIterator *std_vector_Sl_hfst_xeroxRules_Rule_Sg__iterator(std::vector< hfst::xeroxRules::Rule > *self,PyObject **PYTHON_SELF){ - return swig::make_output_iterator(self->begin(), self->begin(), self->end(), *PYTHON_SELF); - } -SWIGINTERN bool std_vector_Sl_hfst_xeroxRules_Rule_Sg____nonzero__(std::vector< hfst::xeroxRules::Rule > const *self){ - return !(self->empty()); - } -SWIGINTERN bool std_vector_Sl_hfst_xeroxRules_Rule_Sg____bool__(std::vector< hfst::xeroxRules::Rule > const *self){ - return !(self->empty()); - } -SWIGINTERN std::vector< hfst::xeroxRules::Rule >::size_type std_vector_Sl_hfst_xeroxRules_Rule_Sg____len__(std::vector< hfst::xeroxRules::Rule > const *self){ - return self->size(); - } -SWIGINTERN std::vector< hfst::xeroxRules::Rule,std::allocator< hfst::xeroxRules::Rule > > *std_vector_Sl_hfst_xeroxRules_Rule_Sg____getslice__(std::vector< hfst::xeroxRules::Rule > *self,std::vector< hfst::xeroxRules::Rule >::difference_type i,std::vector< hfst::xeroxRules::Rule >::difference_type j){ - return swig::getslice(self, i, j, 1); - } -SWIGINTERN void std_vector_Sl_hfst_xeroxRules_Rule_Sg____setslice____SWIG_0(std::vector< hfst::xeroxRules::Rule > *self,std::vector< hfst::xeroxRules::Rule >::difference_type i,std::vector< hfst::xeroxRules::Rule >::difference_type j){ - swig::setslice(self, i, j, 1, std::vector< hfst::xeroxRules::Rule,std::allocator< hfst::xeroxRules::Rule > >()); - } -SWIGINTERN void std_vector_Sl_hfst_xeroxRules_Rule_Sg____setslice____SWIG_1(std::vector< hfst::xeroxRules::Rule > *self,std::vector< hfst::xeroxRules::Rule >::difference_type i,std::vector< hfst::xeroxRules::Rule >::difference_type j,std::vector< hfst::xeroxRules::Rule,std::allocator< hfst::xeroxRules::Rule > > const &v){ - swig::setslice(self, i, j, 1, v); - } -SWIGINTERN void std_vector_Sl_hfst_xeroxRules_Rule_Sg____delslice__(std::vector< hfst::xeroxRules::Rule > *self,std::vector< hfst::xeroxRules::Rule >::difference_type i,std::vector< hfst::xeroxRules::Rule >::difference_type j){ - swig::delslice(self, i, j, 1); - } -SWIGINTERN void std_vector_Sl_hfst_xeroxRules_Rule_Sg____delitem____SWIG_0(std::vector< hfst::xeroxRules::Rule > *self,std::vector< hfst::xeroxRules::Rule >::difference_type i){ - swig::erase(self, swig::getpos(self, i)); - } -SWIGINTERN std::vector< hfst::xeroxRules::Rule,std::allocator< hfst::xeroxRules::Rule > > *std_vector_Sl_hfst_xeroxRules_Rule_Sg____getitem____SWIG_0(std::vector< hfst::xeroxRules::Rule > *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), (Py_ssize_t)self->size(), &i, &j, &step); - std::vector< hfst::xeroxRules::Rule,std::allocator< hfst::xeroxRules::Rule > >::difference_type id = i; - std::vector< hfst::xeroxRules::Rule,std::allocator< hfst::xeroxRules::Rule > >::difference_type jd = j; - return swig::getslice(self, id, jd, step); - } -SWIGINTERN void std_vector_Sl_hfst_xeroxRules_Rule_Sg____setitem____SWIG_0(std::vector< hfst::xeroxRules::Rule > *self,PySliceObject *slice,std::vector< hfst::xeroxRules::Rule,std::allocator< hfst::xeroxRules::Rule > > 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), (Py_ssize_t)self->size(), &i, &j, &step); - std::vector< hfst::xeroxRules::Rule,std::allocator< hfst::xeroxRules::Rule > >::difference_type id = i; - std::vector< hfst::xeroxRules::Rule,std::allocator< hfst::xeroxRules::Rule > >::difference_type jd = j; - swig::setslice(self, id, jd, step, v); - } -SWIGINTERN void std_vector_Sl_hfst_xeroxRules_Rule_Sg____setitem____SWIG_1(std::vector< hfst::xeroxRules::Rule > *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), (Py_ssize_t)self->size(), &i, &j, &step); - std::vector< hfst::xeroxRules::Rule,std::allocator< hfst::xeroxRules::Rule > >::difference_type id = i; - std::vector< hfst::xeroxRules::Rule,std::allocator< hfst::xeroxRules::Rule > >::difference_type jd = j; - swig::delslice(self, id, jd, step); - } -SWIGINTERN void std_vector_Sl_hfst_xeroxRules_Rule_Sg____delitem____SWIG_1(std::vector< hfst::xeroxRules::Rule > *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), (Py_ssize_t)self->size(), &i, &j, &step); - std::vector< hfst::xeroxRules::Rule,std::allocator< hfst::xeroxRules::Rule > >::difference_type id = i; - std::vector< hfst::xeroxRules::Rule,std::allocator< hfst::xeroxRules::Rule > >::difference_type jd = j; - swig::delslice(self, id, jd, step); - } -SWIGINTERN std::vector< hfst::xeroxRules::Rule >::value_type const &std_vector_Sl_hfst_xeroxRules_Rule_Sg____getitem____SWIG_1(std::vector< hfst::xeroxRules::Rule > const *self,std::vector< hfst::xeroxRules::Rule >::difference_type i){ - return *(swig::cgetpos(self, i)); - } -SWIGINTERN void std_vector_Sl_hfst_xeroxRules_Rule_Sg____setitem____SWIG_2(std::vector< hfst::xeroxRules::Rule > *self,std::vector< hfst::xeroxRules::Rule >::difference_type i,std::vector< hfst::xeroxRules::Rule >::value_type const &x){ - *(swig::getpos(self,i)) = x; - } -SWIGINTERN std::vector< hfst::xeroxRules::Rule >::value_type std_vector_Sl_hfst_xeroxRules_Rule_Sg__pop(std::vector< hfst::xeroxRules::Rule > *self){ - if (self->size() == 0) - throw std::out_of_range("pop from empty container"); - std::vector< hfst::xeroxRules::Rule,std::allocator< hfst::xeroxRules::Rule > >::value_type x = self->back(); - self->pop_back(); - return x; - } -SWIGINTERN void std_vector_Sl_hfst_xeroxRules_Rule_Sg__append(std::vector< hfst::xeroxRules::Rule > *self,std::vector< hfst::xeroxRules::Rule >::value_type const &x){ - self->push_back(x); - } -SWIGINTERN std::vector< hfst::xeroxRules::Rule >::iterator std_vector_Sl_hfst_xeroxRules_Rule_Sg__erase__SWIG_0(std::vector< hfst::xeroxRules::Rule > *self,std::vector< hfst::xeroxRules::Rule >::iterator pos){ return self->erase(pos); } -SWIGINTERN std::vector< hfst::xeroxRules::Rule >::iterator std_vector_Sl_hfst_xeroxRules_Rule_Sg__erase__SWIG_1(std::vector< hfst::xeroxRules::Rule > *self,std::vector< hfst::xeroxRules::Rule >::iterator first,std::vector< hfst::xeroxRules::Rule >::iterator last){ return self->erase(first, last); } -SWIGINTERN std::vector< hfst::xeroxRules::Rule >::iterator std_vector_Sl_hfst_xeroxRules_Rule_Sg__insert__SWIG_0(std::vector< hfst::xeroxRules::Rule > *self,std::vector< hfst::xeroxRules::Rule >::iterator pos,std::vector< hfst::xeroxRules::Rule >::value_type const &x){ return self->insert(pos, x); } -SWIGINTERN void std_vector_Sl_hfst_xeroxRules_Rule_Sg__insert__SWIG_1(std::vector< hfst::xeroxRules::Rule > *self,std::vector< hfst::xeroxRules::Rule >::iterator pos,std::vector< hfst::xeroxRules::Rule >::size_type n,std::vector< hfst::xeroxRules::Rule >::value_type const &x){ self->insert(pos, n, x); } - - namespace swig { - template <> struct traits > { - typedef pointer_category category; - static const char* type_name() { - return "std::pair<" "hfst::HfstTransducer" " *," "unsigned int" " >"; - } - }; - } - - - namespace swig { - template <> struct traits< hfst_ol::Location > { - typedef pointer_category category; - static const char* type_name() { return"hfst_ol::Location"; } - }; - } - - - namespace swig { - template <> struct traits > > { - typedef pointer_category category; - static const char* type_name() { - return "std::vector<" "hfst_ol::Location" "," "std::allocator< hfst_ol::Location >" " >"; - } - }; - } - -SWIGINTERN swig::SwigPyIterator *std_vector_Sl_hfst_ol_Location_Sg__iterator(std::vector< hfst_ol::Location > *self,PyObject **PYTHON_SELF){ - return swig::make_output_iterator(self->begin(), self->begin(), self->end(), *PYTHON_SELF); - } -SWIGINTERN bool std_vector_Sl_hfst_ol_Location_Sg____nonzero__(std::vector< hfst_ol::Location > const *self){ - return !(self->empty()); - } -SWIGINTERN bool std_vector_Sl_hfst_ol_Location_Sg____bool__(std::vector< hfst_ol::Location > const *self){ - return !(self->empty()); - } -SWIGINTERN std::vector< hfst_ol::Location >::size_type std_vector_Sl_hfst_ol_Location_Sg____len__(std::vector< hfst_ol::Location > const *self){ - return self->size(); - } -SWIGINTERN std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > > *std_vector_Sl_hfst_ol_Location_Sg____getslice__(std::vector< hfst_ol::Location > *self,std::vector< hfst_ol::Location >::difference_type i,std::vector< hfst_ol::Location >::difference_type j){ - return swig::getslice(self, i, j, 1); - } -SWIGINTERN void std_vector_Sl_hfst_ol_Location_Sg____setslice____SWIG_0(std::vector< hfst_ol::Location > *self,std::vector< hfst_ol::Location >::difference_type i,std::vector< hfst_ol::Location >::difference_type j){ - swig::setslice(self, i, j, 1, std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > >()); - } -SWIGINTERN void std_vector_Sl_hfst_ol_Location_Sg____setslice____SWIG_1(std::vector< hfst_ol::Location > *self,std::vector< hfst_ol::Location >::difference_type i,std::vector< hfst_ol::Location >::difference_type j,std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > > const &v){ - swig::setslice(self, i, j, 1, v); - } -SWIGINTERN void std_vector_Sl_hfst_ol_Location_Sg____delslice__(std::vector< hfst_ol::Location > *self,std::vector< hfst_ol::Location >::difference_type i,std::vector< hfst_ol::Location >::difference_type j){ - swig::delslice(self, i, j, 1); - } -SWIGINTERN void std_vector_Sl_hfst_ol_Location_Sg____delitem____SWIG_0(std::vector< hfst_ol::Location > *self,std::vector< hfst_ol::Location >::difference_type i){ - swig::erase(self, swig::getpos(self, i)); - } -SWIGINTERN std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > > *std_vector_Sl_hfst_ol_Location_Sg____getitem____SWIG_0(std::vector< hfst_ol::Location > *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), (Py_ssize_t)self->size(), &i, &j, &step); - std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > >::difference_type id = i; - std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > >::difference_type jd = j; - return swig::getslice(self, id, jd, step); - } -SWIGINTERN void std_vector_Sl_hfst_ol_Location_Sg____setitem____SWIG_0(std::vector< hfst_ol::Location > *self,PySliceObject *slice,std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > > 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), (Py_ssize_t)self->size(), &i, &j, &step); - std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > >::difference_type id = i; - std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > >::difference_type jd = j; - swig::setslice(self, id, jd, step, v); - } -SWIGINTERN void std_vector_Sl_hfst_ol_Location_Sg____setitem____SWIG_1(std::vector< hfst_ol::Location > *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), (Py_ssize_t)self->size(), &i, &j, &step); - std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > >::difference_type id = i; - std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > >::difference_type jd = j; - swig::delslice(self, id, jd, step); - } -SWIGINTERN void std_vector_Sl_hfst_ol_Location_Sg____delitem____SWIG_1(std::vector< hfst_ol::Location > *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), (Py_ssize_t)self->size(), &i, &j, &step); - std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > >::difference_type id = i; - std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > >::difference_type jd = j; - swig::delslice(self, id, jd, step); - } -SWIGINTERN std::vector< hfst_ol::Location >::value_type const &std_vector_Sl_hfst_ol_Location_Sg____getitem____SWIG_1(std::vector< hfst_ol::Location > const *self,std::vector< hfst_ol::Location >::difference_type i){ - return *(swig::cgetpos(self, i)); - } -SWIGINTERN void std_vector_Sl_hfst_ol_Location_Sg____setitem____SWIG_2(std::vector< hfst_ol::Location > *self,std::vector< hfst_ol::Location >::difference_type i,std::vector< hfst_ol::Location >::value_type const &x){ - *(swig::getpos(self,i)) = x; - } -SWIGINTERN std::vector< hfst_ol::Location >::value_type std_vector_Sl_hfst_ol_Location_Sg__pop(std::vector< hfst_ol::Location > *self){ - if (self->size() == 0) - throw std::out_of_range("pop from empty container"); - std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > >::value_type x = self->back(); - self->pop_back(); - return x; - } -SWIGINTERN void std_vector_Sl_hfst_ol_Location_Sg__append(std::vector< hfst_ol::Location > *self,std::vector< hfst_ol::Location >::value_type const &x){ - self->push_back(x); - } -SWIGINTERN std::vector< hfst_ol::Location >::iterator std_vector_Sl_hfst_ol_Location_Sg__erase__SWIG_0(std::vector< hfst_ol::Location > *self,std::vector< hfst_ol::Location >::iterator pos){ return self->erase(pos); } -SWIGINTERN std::vector< hfst_ol::Location >::iterator std_vector_Sl_hfst_ol_Location_Sg__erase__SWIG_1(std::vector< hfst_ol::Location > *self,std::vector< hfst_ol::Location >::iterator first,std::vector< hfst_ol::Location >::iterator last){ return self->erase(first, last); } -SWIGINTERN std::vector< hfst_ol::Location >::iterator std_vector_Sl_hfst_ol_Location_Sg__insert__SWIG_0(std::vector< hfst_ol::Location > *self,std::vector< hfst_ol::Location >::iterator pos,std::vector< hfst_ol::Location >::value_type const &x){ return self->insert(pos, x); } -SWIGINTERN void std_vector_Sl_hfst_ol_Location_Sg__insert__SWIG_1(std::vector< hfst_ol::Location > *self,std::vector< hfst_ol::Location >::iterator pos,std::vector< hfst_ol::Location >::size_type n,std::vector< hfst_ol::Location >::value_type const &x){ self->insert(pos, n, x); } - - namespace swig { - template <> struct traits >, std::allocator< std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > > > > > { - typedef pointer_category category; - static const char* type_name() { - return "std::vector<" "std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > >" "," "std::allocator< std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > > >" " >"; - } - }; - } - -SWIGINTERN swig::SwigPyIterator *std_vector_Sl_std_vector_Sl_hfst_ol_Location_Sg__Sg__iterator(std::vector< std::vector< hfst_ol::Location > > *self,PyObject **PYTHON_SELF){ - return swig::make_output_iterator(self->begin(), self->begin(), self->end(), *PYTHON_SELF); - } -SWIGINTERN bool std_vector_Sl_std_vector_Sl_hfst_ol_Location_Sg__Sg____nonzero__(std::vector< std::vector< hfst_ol::Location > > const *self){ - return !(self->empty()); - } -SWIGINTERN bool std_vector_Sl_std_vector_Sl_hfst_ol_Location_Sg__Sg____bool__(std::vector< std::vector< hfst_ol::Location > > const *self){ - return !(self->empty()); - } -SWIGINTERN std::vector< std::vector< hfst_ol::Location > >::size_type std_vector_Sl_std_vector_Sl_hfst_ol_Location_Sg__Sg____len__(std::vector< std::vector< hfst_ol::Location > > const *self){ - return self->size(); - } -SWIGINTERN std::vector< std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > >,std::allocator< std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > > > > *std_vector_Sl_std_vector_Sl_hfst_ol_Location_Sg__Sg____getslice__(std::vector< std::vector< hfst_ol::Location > > *self,std::vector< std::vector< hfst_ol::Location > >::difference_type i,std::vector< std::vector< hfst_ol::Location > >::difference_type j){ - return swig::getslice(self, i, j, 1); - } -SWIGINTERN void std_vector_Sl_std_vector_Sl_hfst_ol_Location_Sg__Sg____setslice____SWIG_0(std::vector< std::vector< hfst_ol::Location > > *self,std::vector< std::vector< hfst_ol::Location > >::difference_type i,std::vector< std::vector< hfst_ol::Location > >::difference_type j){ - swig::setslice(self, i, j, 1, std::vector< std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > >,std::allocator< std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > > > >()); - } -SWIGINTERN void std_vector_Sl_std_vector_Sl_hfst_ol_Location_Sg__Sg____setslice____SWIG_1(std::vector< std::vector< hfst_ol::Location > > *self,std::vector< std::vector< hfst_ol::Location > >::difference_type i,std::vector< std::vector< hfst_ol::Location > >::difference_type j,std::vector< std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > >,std::allocator< std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > > > > const &v){ - swig::setslice(self, i, j, 1, v); - } -SWIGINTERN void std_vector_Sl_std_vector_Sl_hfst_ol_Location_Sg__Sg____delslice__(std::vector< std::vector< hfst_ol::Location > > *self,std::vector< std::vector< hfst_ol::Location > >::difference_type i,std::vector< std::vector< hfst_ol::Location > >::difference_type j){ - swig::delslice(self, i, j, 1); - } -SWIGINTERN void std_vector_Sl_std_vector_Sl_hfst_ol_Location_Sg__Sg____delitem____SWIG_0(std::vector< std::vector< hfst_ol::Location > > *self,std::vector< std::vector< hfst_ol::Location > >::difference_type i){ - swig::erase(self, swig::getpos(self, i)); - } -SWIGINTERN std::vector< std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > >,std::allocator< std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > > > > *std_vector_Sl_std_vector_Sl_hfst_ol_Location_Sg__Sg____getitem____SWIG_0(std::vector< std::vector< hfst_ol::Location > > *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), (Py_ssize_t)self->size(), &i, &j, &step); - std::vector< std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > >,std::allocator< std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > > > >::difference_type id = i; - std::vector< std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > >,std::allocator< std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > > > >::difference_type jd = j; - return swig::getslice(self, id, jd, step); - } -SWIGINTERN void std_vector_Sl_std_vector_Sl_hfst_ol_Location_Sg__Sg____setitem____SWIG_0(std::vector< std::vector< hfst_ol::Location > > *self,PySliceObject *slice,std::vector< std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > >,std::allocator< std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > > > > 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), (Py_ssize_t)self->size(), &i, &j, &step); - std::vector< std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > >,std::allocator< std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > > > >::difference_type id = i; - std::vector< std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > >,std::allocator< std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > > > >::difference_type jd = j; - swig::setslice(self, id, jd, step, v); - } -SWIGINTERN void std_vector_Sl_std_vector_Sl_hfst_ol_Location_Sg__Sg____setitem____SWIG_1(std::vector< std::vector< hfst_ol::Location > > *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), (Py_ssize_t)self->size(), &i, &j, &step); - std::vector< std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > >,std::allocator< std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > > > >::difference_type id = i; - std::vector< std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > >,std::allocator< std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > > > >::difference_type jd = j; - swig::delslice(self, id, jd, step); - } -SWIGINTERN void std_vector_Sl_std_vector_Sl_hfst_ol_Location_Sg__Sg____delitem____SWIG_1(std::vector< std::vector< hfst_ol::Location > > *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), (Py_ssize_t)self->size(), &i, &j, &step); - std::vector< std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > >,std::allocator< std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > > > >::difference_type id = i; - std::vector< std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > >,std::allocator< std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > > > >::difference_type jd = j; - swig::delslice(self, id, jd, step); - } -SWIGINTERN std::vector< std::vector< hfst_ol::Location > >::value_type const &std_vector_Sl_std_vector_Sl_hfst_ol_Location_Sg__Sg____getitem____SWIG_1(std::vector< std::vector< hfst_ol::Location > > const *self,std::vector< std::vector< hfst_ol::Location > >::difference_type i){ - return *(swig::cgetpos(self, i)); - } -SWIGINTERN void std_vector_Sl_std_vector_Sl_hfst_ol_Location_Sg__Sg____setitem____SWIG_2(std::vector< std::vector< hfst_ol::Location > > *self,std::vector< std::vector< hfst_ol::Location > >::difference_type i,std::vector< std::vector< hfst_ol::Location > >::value_type const &x){ - *(swig::getpos(self,i)) = x; - } -SWIGINTERN std::vector< std::vector< hfst_ol::Location > >::value_type std_vector_Sl_std_vector_Sl_hfst_ol_Location_Sg__Sg__pop(std::vector< std::vector< hfst_ol::Location > > *self){ - if (self->size() == 0) - throw std::out_of_range("pop from empty container"); - std::vector< std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > >,std::allocator< std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > > > >::value_type x = self->back(); - self->pop_back(); - return x; - } -SWIGINTERN void std_vector_Sl_std_vector_Sl_hfst_ol_Location_Sg__Sg__append(std::vector< std::vector< hfst_ol::Location > > *self,std::vector< std::vector< hfst_ol::Location > >::value_type const &x){ - self->push_back(x); - } -SWIGINTERN std::vector< std::vector< hfst_ol::Location > >::iterator std_vector_Sl_std_vector_Sl_hfst_ol_Location_Sg__Sg__erase__SWIG_0(std::vector< std::vector< hfst_ol::Location > > *self,std::vector< std::vector< hfst_ol::Location > >::iterator pos){ return self->erase(pos); } -SWIGINTERN std::vector< std::vector< hfst_ol::Location > >::iterator std_vector_Sl_std_vector_Sl_hfst_ol_Location_Sg__Sg__erase__SWIG_1(std::vector< std::vector< hfst_ol::Location > > *self,std::vector< std::vector< hfst_ol::Location > >::iterator first,std::vector< std::vector< hfst_ol::Location > >::iterator last){ return self->erase(first, last); } -SWIGINTERN std::vector< std::vector< hfst_ol::Location > >::iterator std_vector_Sl_std_vector_Sl_hfst_ol_Location_Sg__Sg__insert__SWIG_0(std::vector< std::vector< hfst_ol::Location > > *self,std::vector< std::vector< hfst_ol::Location > >::iterator pos,std::vector< std::vector< hfst_ol::Location > >::value_type const &x){ return self->insert(pos, x); } -SWIGINTERN void std_vector_Sl_std_vector_Sl_hfst_ol_Location_Sg__Sg__insert__SWIG_1(std::vector< std::vector< hfst_ol::Location > > *self,std::vector< std::vector< hfst_ol::Location > >::iterator pos,std::vector< std::vector< hfst_ol::Location > >::size_type n,std::vector< std::vector< hfst_ol::Location > >::value_type const &x){ self->insert(pos, n, x); } - -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 PyInt_FromLong((long) value); -} - - -SWIGINTERN int -SWIG_AsVal_bool (PyObject *obj, bool *val) -{ - int r; - if (!PyBool_Check(obj)) - return SWIG_ERROR; - r = PyObject_IsTrue(obj); - if (r == -1) - return SWIG_ERROR; - if (val) *val = r ? true : false; - return SWIG_OK; -} - -SWIGINTERN void hfst_HfstTransducer_concatenate__SWIG_0(hfst::HfstTransducer *self,hfst::HfstTransducer const &tr,bool harmonize=true){ self->concatenate(tr, harmonize); } -SWIGINTERN void hfst_HfstTransducer_disjunct__SWIG_0(hfst::HfstTransducer *self,hfst::HfstTransducer const &tr,bool harmonize=true){ self->disjunct(tr, harmonize); } -SWIGINTERN void hfst_HfstTransducer_subtract__SWIG_0(hfst::HfstTransducer *self,hfst::HfstTransducer const &tr,bool harmonize=true){ self->subtract(tr, harmonize); } -SWIGINTERN void hfst_HfstTransducer_intersect__SWIG_0(hfst::HfstTransducer *self,hfst::HfstTransducer const &tr,bool harmonize=true){ self->intersect(tr, harmonize); } -SWIGINTERN void hfst_HfstTransducer_compose__SWIG_0(hfst::HfstTransducer *self,hfst::HfstTransducer const &tr,bool harmonize=true){ self->compose(tr, harmonize); } -SWIGINTERN void hfst_HfstTransducer_compose_intersect__SWIG_0(hfst::HfstTransducer *self,hfst::HfstTransducerVector const &v,bool invert=false,bool harmonize=true){ self->compose_intersect(v, invert, harmonize); } -SWIGINTERN void hfst_HfstTransducer_priority_union(hfst::HfstTransducer *self,hfst::HfstTransducer const &another){ self->priority_union(another); } -SWIGINTERN void hfst_HfstTransducer_lenient_composition__SWIG_0(hfst::HfstTransducer *self,hfst::HfstTransducer const &another,bool harmonize=true){ self->lenient_composition(another, harmonize); } -SWIGINTERN void hfst_HfstTransducer_cross_product__SWIG_0(hfst::HfstTransducer *self,hfst::HfstTransducer const &another,bool harmonize=true){ self->cross_product(another, harmonize); } -SWIGINTERN void hfst_HfstTransducer_shuffle__SWIG_0(hfst::HfstTransducer *self,hfst::HfstTransducer const &another,bool harmonize=true){ self->shuffle(another, harmonize); } -SWIGINTERN void hfst_HfstTransducer_remove_epsilons(hfst::HfstTransducer *self){ self->remove_epsilons(); } -SWIGINTERN void hfst_HfstTransducer_determinize(hfst::HfstTransducer *self){ self->determinize(); } -SWIGINTERN void hfst_HfstTransducer_minimize(hfst::HfstTransducer *self){ self->minimize(); } -SWIGINTERN void hfst_HfstTransducer_prune(hfst::HfstTransducer *self){ self->prune(); } -SWIGINTERN void hfst_HfstTransducer_eliminate_flags(hfst::HfstTransducer *self){ self->eliminate_flags(); } -SWIGINTERN void hfst_HfstTransducer_eliminate_flag(hfst::HfstTransducer *self,std::string const &f){ self->eliminate_flag(f); } -SWIGINTERN void hfst_HfstTransducer_n_best(hfst::HfstTransducer *self,unsigned int n){ self->n_best(n); } -SWIGINTERN void hfst_HfstTransducer_convert(hfst::HfstTransducer *self,hfst::ImplementationType impl){ self->convert(impl); } -SWIGINTERN void hfst_HfstTransducer_repeat_star(hfst::HfstTransducer *self){ self->repeat_star(); } -SWIGINTERN void hfst_HfstTransducer_repeat_plus(hfst::HfstTransducer *self){ self->repeat_plus(); } -SWIGINTERN void hfst_HfstTransducer_repeat_n(hfst::HfstTransducer *self,unsigned int n){ self->repeat_n(n); } -SWIGINTERN void hfst_HfstTransducer_repeat_n_to_k(hfst::HfstTransducer *self,unsigned int n,unsigned int k){ self->repeat_n_to_k(n, k); } -SWIGINTERN void hfst_HfstTransducer_repeat_n_minus(hfst::HfstTransducer *self,unsigned int n){ self->repeat_n_minus(n); } -SWIGINTERN void hfst_HfstTransducer_repeat_n_plus(hfst::HfstTransducer *self,unsigned int n){ self->repeat_n_plus(n); } -SWIGINTERN void hfst_HfstTransducer_invert(hfst::HfstTransducer *self){ self->invert(); } -SWIGINTERN void hfst_HfstTransducer_reverse(hfst::HfstTransducer *self){ self->reverse(); } -SWIGINTERN void hfst_HfstTransducer_input_project(hfst::HfstTransducer *self){ self->input_project(); } -SWIGINTERN void hfst_HfstTransducer_output_project(hfst::HfstTransducer *self){ self->output_project(); } -SWIGINTERN void hfst_HfstTransducer_optionalize(hfst::HfstTransducer *self){ self->optionalize(); } -SWIGINTERN void hfst_HfstTransducer_insert_freely__SWIG_0(hfst::HfstTransducer *self,hfst::StringPair const &symbol_pair,bool harmonize=true){ self->insert_freely(symbol_pair, harmonize); } -SWIGINTERN void hfst_HfstTransducer_insert_freely__SWIG_2(hfst::HfstTransducer *self,hfst::HfstTransducer const &tr,bool harmonize=true){ self->insert_freely(tr, harmonize); } -SWIGINTERN void hfst_HfstTransducer__substitute_symbol__SWIG_0(hfst::HfstTransducer *self,std::string const &old_symbol,std::string const &new_symbol,bool input_side=true,bool output_side=true){ self->substitute_symbol(old_symbol, new_symbol, input_side, output_side); } -SWIGINTERN void hfst_HfstTransducer__substitute_symbol_pair(hfst::HfstTransducer *self,hfst::StringPair const &old_symbol_pair,hfst::StringPair const &new_symbol_pair){ self->substitute_symbol_pair(old_symbol_pair, new_symbol_pair); } -SWIGINTERN void hfst_HfstTransducer__substitute_symbol_pair_with_set(hfst::HfstTransducer *self,hfst::StringPair const &old_symbol_pair,hfst::StringPairSet const &new_symbol_pair_set){ self->substitute_symbol_pair_with_set(old_symbol_pair, new_symbol_pair_set); } -SWIGINTERN void hfst_HfstTransducer__substitute_symbol_pair_with_transducer__SWIG_0(hfst::HfstTransducer *self,hfst::StringPair const &symbol_pair,hfst::HfstTransducer &transducer,bool harmonize=true){ self->substitute_symbol_pair_with_transducer(symbol_pair, transducer, harmonize); } -SWIGINTERN void hfst_HfstTransducer__substitute_symbols(hfst::HfstTransducer *self,hfst::HfstSymbolSubstitutions const &substitutions){ self->substitute_symbols(substitutions); } -SWIGINTERN void hfst_HfstTransducer__substitute_symbol_pairs(hfst::HfstTransducer *self,hfst::HfstSymbolPairSubstitutions const &substitutions){ self->substitute_symbol_pairs(substitutions); } -SWIGINTERN void hfst_HfstTransducer_set_final_weights__SWIG_0(hfst::HfstTransducer *self,float weight,bool increment=false){ self->set_final_weights(weight, increment); } -SWIGINTERN void hfst_HfstTransducer_push_weights_to_start(hfst::HfstTransducer *self){ self->push_weights(hfst::TO_INITIAL_STATE); } -SWIGINTERN void hfst_HfstTransducer_push_weights_to_end(hfst::HfstTransducer *self){ self->push_weights(hfst::TO_FINAL_STATE); } -SWIGINTERN void hfst_HfstTransducer_minus__SWIG_0(hfst::HfstTransducer *self,hfst::HfstTransducer const &t,bool harmonize=true){ self->subtract(t, harmonize); } -SWIGINTERN void hfst_HfstTransducer_conjunct__SWIG_0(hfst::HfstTransducer *self,hfst::HfstTransducer const &t,bool harmonize=true){ self->intersect(t, harmonize); } -SWIGINTERN void hfst_HfstTransducer_lookup_optimize(hfst::HfstTransducer *self){ self->convert(hfst::HFST_OLW_TYPE); } -SWIGINTERN void hfst_HfstTransducer_remove_optimization(hfst::HfstTransducer *self){ self->convert(hfst::get_default_fst_type()); } -SWIGINTERN hfst::HfstTransducer *new_hfst_HfstTransducer__SWIG_0(){ return hfst::empty_transducer(); } -SWIGINTERN hfst::HfstTransducer *new_hfst_HfstTransducer__SWIG_1(hfst::HfstTransducer const &t){ return hfst::copy_hfst_transducer(t); } -SWIGINTERN hfst::HfstTransducer *new_hfst_HfstTransducer__SWIG_2(hfst::implementations::HfstBasicTransducer const &t){ return hfst::copy_hfst_transducer_from_basic_transducer(t); } -SWIGINTERN hfst::HfstTransducer *new_hfst_HfstTransducer__SWIG_3(hfst::implementations::HfstBasicTransducer const &t,hfst::ImplementationType impl){ return hfst::copy_hfst_transducer_from_basic_transducer(t, impl); } -SWIGINTERN void delete_hfst_HfstTransducer(hfst::HfstTransducer *self){ - if (self->get_type() == hfst::UNSPECIFIED_TYPE || self->get_type() == hfst::ERROR_TYPE) - { - return; - } - delete self; - } -SWIGINTERN char *hfst_HfstTransducer___str__(hfst::HfstTransducer *self){ - std::ostringstream oss; - hfst::implementations::HfstBasicTransducer fsm(*self); - fsm.write_in_att_format(oss,true); - return strdup(oss.str().c_str()); - } - -SWIGINTERNINLINE PyObject * -SWIG_FromCharPtr(const char *cptr) -{ - return SWIG_FromCharPtrAndSize(cptr, (cptr ? strlen(cptr) : 0)); -} - -SWIGINTERN void hfst_HfstTransducer_write(hfst::HfstTransducer *self,hfst::HfstOutputStream &os){ (void) os.redirect(*self); } -SWIGINTERN hfst::HfstTwoLevelPaths hfst_HfstTransducer__extract_shortest_paths(hfst::HfstTransducer *self){ - hfst::HfstTwoLevelPaths results; - self->extract_shortest_paths(results); - return results; - } -SWIGINTERN hfst::HfstTwoLevelPaths hfst_HfstTransducer__extract_longest_paths(hfst::HfstTransducer *self,bool obey_flags){ - hfst::HfstTwoLevelPaths results; - self->extract_longest_paths(results, obey_flags); - return results; - } -SWIGINTERN hfst::HfstTwoLevelPaths hfst_HfstTransducer__extract_paths__SWIG_0(hfst::HfstTransducer const *self,int max_num=-1,int cycles=-1){ - hfst::HfstTwoLevelPaths results; - self->extract_paths(results, max_num, cycles); - return results; - } -SWIGINTERN hfst::HfstTwoLevelPaths hfst_HfstTransducer__extract_paths_fd__SWIG_0(hfst::HfstTransducer const *self,int max_num=-1,int cycles=-1,bool filter_fd=true){ - hfst::HfstTwoLevelPaths results; - self->extract_paths_fd(results, max_num, cycles, filter_fd); - return results; - } -SWIGINTERN hfst::HfstTwoLevelPaths hfst_HfstTransducer__extract_random_paths(hfst::HfstTransducer const *self,int max_num){ - hfst::HfstTwoLevelPaths results; - self->extract_random_paths(results, max_num); - return results; - } -SWIGINTERN hfst::HfstTwoLevelPaths hfst_HfstTransducer__extract_random_paths_fd(hfst::HfstTransducer const *self,int max_num,bool filter_fd){ - hfst::HfstTwoLevelPaths results; - self->extract_random_paths_fd(results, max_num, filter_fd); - return results; - } -SWIGINTERN hfst::HfstOneLevelPaths hfst_HfstTransducer__lookup_vector__SWIG_0(hfst::HfstTransducer const *self,hfst::StringVector const &s,int limit=-1,double time_cutoff=0.0){ - return hfst::lookup_vector(self, false /*fd*/, s, limit, time_cutoff); - } -SWIGINTERN hfst::HfstOneLevelPaths hfst_HfstTransducer__lookup_fd_vector__SWIG_0(hfst::HfstTransducer const *self,hfst::StringVector const &s,int limit=-1,double time_cutoff=0.0){ - return hfst::lookup_vector(self, true /*fd*/, s, limit, time_cutoff); - } -SWIGINTERN hfst::HfstOneLevelPaths hfst_HfstTransducer__lookup_fd_string__SWIG_0(hfst::HfstTransducer const *self,std::string const &s,int limit=-1,double time_cutoff=0.0){ - return hfst::lookup_string(self, true /*fd*/, s, limit, time_cutoff); - } -SWIGINTERN hfst::HfstOneLevelPaths hfst_HfstTransducer__lookup_string__SWIG_0(hfst::HfstTransducer const *self,std::string const &s,int limit=-1,double time_cutoff=0.0){ - return hfst::lookup_string(self, false /*fd*/, s, limit, time_cutoff); - } -SWIGINTERN hfst::HfstOutputStream *new_hfst_HfstOutputStream(){ return new hfst::HfstOutputStream(hfst::get_default_fst_type()); } -SWIGINTERN hfst::HfstTransducer *hfst_HfstInputStream_read(hfst::HfstInputStream *self){ return new hfst::HfstTransducer(*(self)); } -SWIGINTERN void hfst_implementations_HfstBasicTransducer__substitute_symbol__SWIG_0(hfst::implementations::HfstBasicTransducer *self,std::string const &old_symbol,std::string const &new_symbol,bool input_side=true,bool output_side=true){ self->substitute_symbol(old_symbol, new_symbol, input_side, output_side); } -SWIGINTERN void hfst_implementations_HfstBasicTransducer__substitute_symbol_pair(hfst::implementations::HfstBasicTransducer *self,hfst::StringPair const &old_symbol_pair,hfst::StringPair const &new_symbol_pair){ self->substitute_symbol_pair(old_symbol_pair, new_symbol_pair); } -SWIGINTERN void hfst_implementations_HfstBasicTransducer__substitute_symbol_pair_with_set(hfst::implementations::HfstBasicTransducer *self,hfst::StringPair const &old_symbol_pair,hfst::StringPairSet const &new_symbol_pair_set){ self->substitute_symbol_pair_with_set(old_symbol_pair, new_symbol_pair_set); } -SWIGINTERN void hfst_implementations_HfstBasicTransducer__substitute_symbol_pair_with_transducer(hfst::implementations::HfstBasicTransducer *self,hfst::StringPair const &symbol_pair,hfst::implementations::HfstBasicTransducer &transducer){ self->substitute_symbol_pair_with_transducer(symbol_pair, transducer); } -SWIGINTERN void hfst_implementations_HfstBasicTransducer__substitute_symbols(hfst::implementations::HfstBasicTransducer *self,hfst::HfstSymbolSubstitutions const &substitutions){ self->substitute_symbols(substitutions); } -SWIGINTERN void hfst_implementations_HfstBasicTransducer__substitute_symbol_pairs(hfst::implementations::HfstBasicTransducer *self,hfst::HfstSymbolPairSubstitutions const &substitutions){ self->substitute_symbol_pairs(substitutions); } -SWIGINTERN void hfst_implementations_HfstBasicTransducer_insert_freely__SWIG_0(hfst::implementations::HfstBasicTransducer *self,hfst::StringPair const &symbol_pair,float weight){ self->insert_freely(symbol_pair, weight); } -SWIGINTERN void hfst_implementations_HfstBasicTransducer_insert_freely__SWIG_1(hfst::implementations::HfstBasicTransducer *self,hfst::implementations::HfstBasicTransducer const &tr){ self->insert_freely(tr); } -SWIGINTERN void hfst_implementations_HfstBasicTransducer_sort_arcs(hfst::implementations::HfstBasicTransducer *self){ self->sort_arcs(); } -SWIGINTERN void hfst_implementations_HfstBasicTransducer_disjunct(hfst::implementations::HfstBasicTransducer *self,hfst::StringPairVector const &spv,float weight){ self->disjunct(spv, weight); } -SWIGINTERN void hfst_implementations_HfstBasicTransducer_harmonize(hfst::implementations::HfstBasicTransducer *self,hfst::implementations::HfstBasicTransducer &another){ self->harmonize(another); } -SWIGINTERN hfst::HfstTwoLevelPaths hfst_implementations_HfstBasicTransducer__lookup(hfst::implementations::HfstBasicTransducer *self,hfst::StringVector const &lookup_path,size_t *infinite_cutoff,float *max_weight,bool obey_flags){ - hfst::HfstTwoLevelPaths results; - self->lookup(lookup_path, results, infinite_cutoff, max_weight, -1, obey_flags); - return results; - } -SWIGINTERN std::string hfst_implementations_HfstBasicTransducer_get_prolog_string(hfst::implementations::HfstBasicTransducer *self,bool write_weights){ - std::ostringstream oss; - self->write_in_prolog_format(oss, self->name, write_weights); - return oss.str(); - } -SWIGINTERN std::string hfst_implementations_HfstBasicTransducer_get_xfst_string(hfst::implementations::HfstBasicTransducer *self,bool write_weights){ - std::ostringstream oss; - self->write_in_xfst_format(oss, write_weights); - return oss.str(); - } -SWIGINTERN std::string hfst_implementations_HfstBasicTransducer_get_att_string(hfst::implementations::HfstBasicTransducer *self,bool write_weights){ - std::ostringstream oss; - self->write_in_att_format(oss, write_weights); - std::string retval = oss.str(); - if (retval.empty()) // empty transducer must be represented as empty line in python, else read_att fails... - retval = std::string("\n"); - return retval; - } -SWIGINTERN char *hfst_implementations_HfstBasicTransducer___str__(hfst::implementations::HfstBasicTransducer *self){ - std::ostringstream oss; - self->write_in_att_format(oss, true); - return strdup(oss.str().c_str()); - } -SWIGINTERN void hfst_implementations_HfstBasicTransducer_add_transition__SWIG_2(hfst::implementations::HfstBasicTransducer *self,hfst::implementations::HfstState source,hfst::implementations::HfstState target,std::string input,std::string output,float weight=0){ - hfst::implementations::HfstBasicTransition tr(target, input, output, weight); - self->add_transition(source, tr); - } -SWIGINTERN char *hfst_implementations_HfstBasicTransition___str__(hfst::implementations::HfstBasicTransition *self){ - static char str[1024]; - sprintf(str, "%u %s %s %f", self->get_target_state(), self->get_input_symbol().c_str(), self->get_output_symbol().c_str(), self->get_weight()); - return str; - } -SWIGINTERN void hfst_xre_XreCompiler_define_xre(hfst::xre::XreCompiler *self,std::string const &name,std::string const &xre){ - self->set_expand_definitions(true); - self->define(name, xre); - } -SWIGINTERN void hfst_xre_XreCompiler_define_transducer(hfst::xre::XreCompiler *self,std::string const &name,hfst::HfstTransducer const &transducer){ - self->set_expand_definitions(true); - self->define(name, transducer); - } -SWIGINTERN void hfst_xre_XreCompiler_setOutputToConsole(hfst::xre::XreCompiler *self,bool value){ - (void)self->setOutputToConsole(value); - } -SWIGINTERN hfst::HfstTransducerUIntPair hfst_xre_XreCompiler_compile_first(hfst::xre::XreCompiler *self,std::string const &xre){ - unsigned int c=0; - hfst::HfstTransducer * result = self->compile_first(xre, c); - return std::pair(result, c); - } - - - -SWIGINTERN hfst_ol::PmatchContainer *new_hfst_ol_PmatchContainer__SWIG_2(std::string const &filename){ - std::ifstream ifs(filename.c_str()); - hfst_ol::PmatchContainer * retval = new hfst_ol::PmatchContainer(ifs); - ifs.close(); - return retval; - } -SWIGINTERN hfst_ol::LocationVectorVector hfst_ol_PmatchContainer_locate__SWIG_0(hfst_ol::PmatchContainer *self,std::string const &input,double time_cutoff=0.0){ - return hfst::pmatch_locate(self, input, time_cutoff); - } -SWIGINTERN hfst_ol::LocationVectorVector hfst_ol_PmatchContainer_locate__SWIG_2(hfst_ol::PmatchContainer *self,std::string const &input,double time_cutoff,float weight_cutoff){ - return hfst::pmatch_locate(self, input, time_cutoff, weight_cutoff); - } -#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 *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &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 *swig_obj[1] ; - PyObject *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &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), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; - size_t arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - size_t val2 ; - int ecode2 = 0 ; - swig::SwigPyIterator *result = 0 ; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &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(swig_obj[1], &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), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - swig::SwigPyIterator *result = 0 ; - - if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &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) { - Py_ssize_t argc; - PyObject *argv[3] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "SwigPyIterator_incr", 0, 2, argv))) SWIG_fail; - --argc; - 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, argc, argv); - } - } - 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, argc, argv); - } - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("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), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; - size_t arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - size_t val2 ; - int ecode2 = 0 ; - swig::SwigPyIterator *result = 0 ; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &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(swig_obj[1], &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), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - swig::SwigPyIterator *result = 0 ; - - if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &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) { - Py_ssize_t argc; - PyObject *argv[3] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "SwigPyIterator_decr", 0, 2, argv))) SWIG_fail; - --argc; - 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, argc, argv); - } - } - 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, argc, argv); - } - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("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 *swig_obj[2] ; - ptrdiff_t result; - - if (!SWIG_Python_UnpackTuple(args, "SwigPyIterator_distance", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &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(swig_obj[1], &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 *swig_obj[2] ; - bool result; - - if (!SWIG_Python_UnpackTuple(args, "SwigPyIterator_equal", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &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(swig_obj[1], &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 *swig_obj[1] ; - swig::SwigPyIterator *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &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 *swig_obj[1] ; - PyObject *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &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 *swig_obj[1] ; - PyObject *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &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 *swig_obj[1] ; - PyObject *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &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 *swig_obj[2] ; - swig::SwigPyIterator *result = 0 ; - - if (!SWIG_Python_UnpackTuple(args, "SwigPyIterator_advance", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &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(swig_obj[1], &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 *swig_obj[2] ; - bool result; - - if (!SWIG_Python_UnpackTuple(args, "SwigPyIterator___eq__", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &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(swig_obj[1], &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: - PyErr_Clear(); - Py_INCREF(Py_NotImplemented); - return Py_NotImplemented; -} - - -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 *swig_obj[2] ; - bool result; - - if (!SWIG_Python_UnpackTuple(args, "SwigPyIterator___ne__", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &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(swig_obj[1], &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: - PyErr_Clear(); - Py_INCREF(Py_NotImplemented); - return Py_NotImplemented; -} - - -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 *swig_obj[2] ; - swig::SwigPyIterator *result = 0 ; - - if (!SWIG_Python_UnpackTuple(args, "SwigPyIterator___iadd__", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &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(swig_obj[1], &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 *swig_obj[2] ; - swig::SwigPyIterator *result = 0 ; - - if (!SWIG_Python_UnpackTuple(args, "SwigPyIterator___isub__", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &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(swig_obj[1], &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 *swig_obj[2] ; - swig::SwigPyIterator *result = 0 ; - - if (!SWIG_Python_UnpackTuple(args, "SwigPyIterator___add__", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &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(swig_obj[1], &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: - PyErr_Clear(); - Py_INCREF(Py_NotImplemented); - return Py_NotImplemented; -} - - -SWIGINTERN PyObject *_wrap_SwigPyIterator___sub____SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; - ptrdiff_t arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - ptrdiff_t val2 ; - int ecode2 = 0 ; - swig::SwigPyIterator *result = 0 ; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &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(swig_obj[1], &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: - PyErr_Clear(); - Py_INCREF(Py_NotImplemented); - return Py_NotImplemented; -} - - -SWIGINTERN PyObject *_wrap_SwigPyIterator___sub____SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - 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 ; - ptrdiff_t result; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &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(swig_obj[1], &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: - PyErr_Clear(); - Py_INCREF(Py_NotImplemented); - return Py_NotImplemented; -} - - -SWIGINTERN PyObject *_wrap_SwigPyIterator___sub__(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[3] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "SwigPyIterator___sub__", 0, 2, argv))) SWIG_fail; - --argc; - 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, SWIG_POINTER_NO_NULL | 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_SwigPyIterator___sub____SWIG_1(self, argc, argv); - } - } - } - 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, argc, argv); - } - } - } - -fail: - Py_INCREF(Py_NotImplemented); - return Py_NotImplemented; -} - - -SWIGINTERN PyObject *SwigPyIterator_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_swig__SwigPyIterator, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *_wrap_StringVector_iterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ; - PyObject **arg2 = (PyObject **) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - swig::SwigPyIterator *result = 0 ; - - arg2 = &swig_obj[0]; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringVector_iterator" "', argument " "1"" of type '" "std::vector< std::string > *""'"); - } - arg1 = reinterpret_cast< std::vector< std::string > * >(argp1); - result = (swig::SwigPyIterator *)std_vector_Sl_std_string_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_StringVector___nonzero__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - bool result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringVector___nonzero__" "', argument " "1"" of type '" "std::vector< std::string > const *""'"); - } - arg1 = reinterpret_cast< std::vector< std::string > * >(argp1); - result = (bool)std_vector_Sl_std_string_Sg____nonzero__((std::vector< std::string > const *)arg1); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_StringVector___bool__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - bool result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringVector___bool__" "', argument " "1"" of type '" "std::vector< std::string > const *""'"); - } - arg1 = reinterpret_cast< std::vector< std::string > * >(argp1); - result = (bool)std_vector_Sl_std_string_Sg____bool__((std::vector< std::string > const *)arg1); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_StringVector___len__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::vector< std::string >::size_type result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringVector___len__" "', argument " "1"" of type '" "std::vector< std::string > const *""'"); - } - arg1 = reinterpret_cast< std::vector< std::string > * >(argp1); - result = std_vector_Sl_std_string_Sg____len__((std::vector< std::string > const *)arg1); - resultobj = SWIG_From_size_t(static_cast< size_t >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_StringVector___getslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ; - std::vector< std::string >::difference_type arg2 ; - std::vector< std::string >::difference_type arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - ptrdiff_t val2 ; - int ecode2 = 0 ; - ptrdiff_t val3 ; - int ecode3 = 0 ; - PyObject *swig_obj[3] ; - std::vector< std::string,std::allocator< std::string > > *result = 0 ; - - if (!SWIG_Python_UnpackTuple(args, "StringVector___getslice__", 3, 3, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringVector___getslice__" "', argument " "1"" of type '" "std::vector< std::string > *""'"); - } - arg1 = reinterpret_cast< std::vector< std::string > * >(argp1); - ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "StringVector___getslice__" "', argument " "2"" of type '" "std::vector< std::string >::difference_type""'"); - } - arg2 = static_cast< std::vector< std::string >::difference_type >(val2); - ecode3 = SWIG_AsVal_ptrdiff_t(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "StringVector___getslice__" "', argument " "3"" of type '" "std::vector< std::string >::difference_type""'"); - } - arg3 = static_cast< std::vector< std::string >::difference_type >(val3); - try { - result = (std::vector< std::string,std::allocator< std::string > > *)std_vector_Sl_std_string_Sg____getslice__(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_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_StringVector___setslice____SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ; - std::vector< std::string >::difference_type arg2 ; - std::vector< std::string >::difference_type arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - ptrdiff_t val2 ; - int ecode2 = 0 ; - ptrdiff_t val3 ; - int ecode3 = 0 ; - - if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringVector___setslice__" "', argument " "1"" of type '" "std::vector< std::string > *""'"); - } - arg1 = reinterpret_cast< std::vector< std::string > * >(argp1); - ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "StringVector___setslice__" "', argument " "2"" of type '" "std::vector< std::string >::difference_type""'"); - } - arg2 = static_cast< std::vector< std::string >::difference_type >(val2); - ecode3 = SWIG_AsVal_ptrdiff_t(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "StringVector___setslice__" "', argument " "3"" of type '" "std::vector< std::string >::difference_type""'"); - } - arg3 = static_cast< std::vector< std::string >::difference_type >(val3); - try { - std_vector_Sl_std_string_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_StringVector___setslice____SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ; - std::vector< std::string >::difference_type arg2 ; - std::vector< std::string >::difference_type arg3 ; - std::vector< std::string,std::allocator< std::string > > *arg4 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - ptrdiff_t val2 ; - int ecode2 = 0 ; - ptrdiff_t val3 ; - int ecode3 = 0 ; - int res4 = SWIG_OLDOBJ ; - - if ((nobjs < 4) || (nobjs > 4)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringVector___setslice__" "', argument " "1"" of type '" "std::vector< std::string > *""'"); - } - arg1 = reinterpret_cast< std::vector< std::string > * >(argp1); - ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "StringVector___setslice__" "', argument " "2"" of type '" "std::vector< std::string >::difference_type""'"); - } - arg2 = static_cast< std::vector< std::string >::difference_type >(val2); - ecode3 = SWIG_AsVal_ptrdiff_t(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "StringVector___setslice__" "', argument " "3"" of type '" "std::vector< std::string >::difference_type""'"); - } - arg3 = static_cast< std::vector< std::string >::difference_type >(val3); - { - std::vector< std::string,std::allocator< std::string > > *ptr = (std::vector< std::string,std::allocator< std::string > > *)0; - res4 = swig::asptr(swig_obj[3], &ptr); - if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "StringVector___setslice__" "', argument " "4"" of type '" "std::vector< std::string,std::allocator< std::string > > const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "StringVector___setslice__" "', argument " "4"" of type '" "std::vector< std::string,std::allocator< std::string > > const &""'"); - } - arg4 = ptr; - } - try { - std_vector_Sl_std_string_Sg____setslice____SWIG_1(arg1,arg2,arg3,(std::vector< std::string,std::allocator< std::string > > 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_StringVector___setslice__(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[5] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "StringVector___setslice__", 0, 4, argv))) SWIG_fail; - --argc; - if (argc == 3) { - int _v; - int res = swig::asptr(argv[0], (std::vector< std::string,std::allocator< std::string > >**)(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_StringVector___setslice____SWIG_0(self, argc, argv); - } - } - } - } - if (argc == 4) { - int _v; - int res = swig::asptr(argv[0], (std::vector< std::string,std::allocator< std::string > >**)(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< std::string,std::allocator< std::string > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_StringVector___setslice____SWIG_1(self, argc, argv); - } - } - } - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'StringVector___setslice__'.\n" - " Possible C/C++ prototypes are:\n" - " std::vector< std::string >::__setslice__(std::vector< std::string >::difference_type,std::vector< std::string >::difference_type)\n" - " std::vector< std::string >::__setslice__(std::vector< std::string >::difference_type,std::vector< std::string >::difference_type,std::vector< std::string,std::allocator< std::string > > const &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_StringVector___delslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ; - std::vector< std::string >::difference_type arg2 ; - std::vector< std::string >::difference_type arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - ptrdiff_t val2 ; - int ecode2 = 0 ; - ptrdiff_t val3 ; - int ecode3 = 0 ; - PyObject *swig_obj[3] ; - - if (!SWIG_Python_UnpackTuple(args, "StringVector___delslice__", 3, 3, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringVector___delslice__" "', argument " "1"" of type '" "std::vector< std::string > *""'"); - } - arg1 = reinterpret_cast< std::vector< std::string > * >(argp1); - ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "StringVector___delslice__" "', argument " "2"" of type '" "std::vector< std::string >::difference_type""'"); - } - arg2 = static_cast< std::vector< std::string >::difference_type >(val2); - ecode3 = SWIG_AsVal_ptrdiff_t(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "StringVector___delslice__" "', argument " "3"" of type '" "std::vector< std::string >::difference_type""'"); - } - arg3 = static_cast< std::vector< std::string >::difference_type >(val3); - try { - std_vector_Sl_std_string_Sg____delslice__(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_StringVector___delitem____SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ; - std::vector< std::string >::difference_type arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - ptrdiff_t val2 ; - int ecode2 = 0 ; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringVector___delitem__" "', argument " "1"" of type '" "std::vector< std::string > *""'"); - } - arg1 = reinterpret_cast< std::vector< std::string > * >(argp1); - ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "StringVector___delitem__" "', argument " "2"" of type '" "std::vector< std::string >::difference_type""'"); - } - arg2 = static_cast< std::vector< std::string >::difference_type >(val2); - try { - std_vector_Sl_std_string_Sg____delitem____SWIG_0(arg1,arg2); - } 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_StringVector___getitem____SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ; - PySliceObject *arg2 = (PySliceObject *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::vector< std::string,std::allocator< std::string > > *result = 0 ; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringVector___getitem__" "', argument " "1"" of type '" "std::vector< std::string > *""'"); - } - arg1 = reinterpret_cast< std::vector< std::string > * >(argp1); - { - if (!PySlice_Check(swig_obj[1])) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "StringVector___getitem__" "', argument " "2"" of type '" "PySliceObject *""'"); - } - arg2 = (PySliceObject *) swig_obj[1]; - } - try { - result = (std::vector< std::string,std::allocator< std::string > > *)std_vector_Sl_std_string_Sg____getitem____SWIG_0(arg1,arg2); - } 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_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_StringVector___setitem____SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ; - PySliceObject *arg2 = (PySliceObject *) 0 ; - std::vector< std::string,std::allocator< std::string > > *arg3 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res3 = SWIG_OLDOBJ ; - - if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringVector___setitem__" "', argument " "1"" of type '" "std::vector< std::string > *""'"); - } - arg1 = reinterpret_cast< std::vector< std::string > * >(argp1); - { - if (!PySlice_Check(swig_obj[1])) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "StringVector___setitem__" "', argument " "2"" of type '" "PySliceObject *""'"); - } - arg2 = (PySliceObject *) swig_obj[1]; - } - { - std::vector< std::string,std::allocator< std::string > > *ptr = (std::vector< std::string,std::allocator< std::string > > *)0; - res3 = swig::asptr(swig_obj[2], &ptr); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "StringVector___setitem__" "', argument " "3"" of type '" "std::vector< std::string,std::allocator< std::string > > const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "StringVector___setitem__" "', argument " "3"" of type '" "std::vector< std::string,std::allocator< std::string > > const &""'"); - } - arg3 = ptr; - } - try { - std_vector_Sl_std_string_Sg____setitem____SWIG_0(arg1,arg2,(std::vector< std::string,std::allocator< std::string > > 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_StringVector___setitem____SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ; - PySliceObject *arg2 = (PySliceObject *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringVector___setitem__" "', argument " "1"" of type '" "std::vector< std::string > *""'"); - } - arg1 = reinterpret_cast< std::vector< std::string > * >(argp1); - { - if (!PySlice_Check(swig_obj[1])) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "StringVector___setitem__" "', argument " "2"" of type '" "PySliceObject *""'"); - } - arg2 = (PySliceObject *) swig_obj[1]; - } - try { - std_vector_Sl_std_string_Sg____setitem____SWIG_1(arg1,arg2); - } 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_StringVector___delitem____SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ; - PySliceObject *arg2 = (PySliceObject *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringVector___delitem__" "', argument " "1"" of type '" "std::vector< std::string > *""'"); - } - arg1 = reinterpret_cast< std::vector< std::string > * >(argp1); - { - if (!PySlice_Check(swig_obj[1])) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "StringVector___delitem__" "', argument " "2"" of type '" "PySliceObject *""'"); - } - arg2 = (PySliceObject *) swig_obj[1]; - } - try { - std_vector_Sl_std_string_Sg____delitem____SWIG_1(arg1,arg2); - } 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_StringVector___delitem__(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[3] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "StringVector___delitem__", 0, 2, argv))) SWIG_fail; - --argc; - if (argc == 2) { - int _v; - int res = swig::asptr(argv[0], (std::vector< std::string,std::allocator< std::string > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - { - _v = PySlice_Check(argv[1]); - } - if (_v) { - return _wrap_StringVector___delitem____SWIG_1(self, argc, argv); - } - } - } - if (argc == 2) { - int _v; - int res = swig::asptr(argv[0], (std::vector< std::string,std::allocator< std::string > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_StringVector___delitem____SWIG_0(self, argc, argv); - } - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'StringVector___delitem__'.\n" - " Possible C/C++ prototypes are:\n" - " std::vector< std::string >::__delitem__(std::vector< std::string >::difference_type)\n" - " std::vector< std::string >::__delitem__(PySliceObject *)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_StringVector___getitem____SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ; - std::vector< std::string >::difference_type arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - ptrdiff_t val2 ; - int ecode2 = 0 ; - std::vector< std::string >::value_type *result = 0 ; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringVector___getitem__" "', argument " "1"" of type '" "std::vector< std::string > const *""'"); - } - arg1 = reinterpret_cast< std::vector< std::string > * >(argp1); - ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "StringVector___getitem__" "', argument " "2"" of type '" "std::vector< std::string >::difference_type""'"); - } - arg2 = static_cast< std::vector< std::string >::difference_type >(val2); - try { - result = (std::vector< std::string >::value_type *) &std_vector_Sl_std_string_Sg____getitem____SWIG_1((std::vector< std::string > const *)arg1,arg2); - } catch(std::out_of_range &_e) { - SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); - } - resultobj = SWIG_From_std_string(static_cast< std::string >(*result)); - (void)swig::container_owner::value_type>::category>::back_reference(resultobj, swig_obj[0]); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_StringVector___getitem__(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[3] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "StringVector___getitem__", 0, 2, argv))) SWIG_fail; - --argc; - if (argc == 2) { - int _v; - int res = swig::asptr(argv[0], (std::vector< std::string,std::allocator< std::string > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - { - _v = PySlice_Check(argv[1]); - } - if (_v) { - return _wrap_StringVector___getitem____SWIG_0(self, argc, argv); - } - } - } - if (argc == 2) { - int _v; - int res = swig::asptr(argv[0], (std::vector< std::string,std::allocator< std::string > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_StringVector___getitem____SWIG_1(self, argc, argv); - } - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'StringVector___getitem__'.\n" - " Possible C/C++ prototypes are:\n" - " std::vector< std::string >::__getitem__(PySliceObject *)\n" - " std::vector< std::string >::__getitem__(std::vector< std::string >::difference_type) const\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_StringVector___setitem____SWIG_2(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ; - std::vector< std::string >::difference_type arg2 ; - std::vector< std::string >::value_type *arg3 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - ptrdiff_t val2 ; - int ecode2 = 0 ; - int res3 = SWIG_OLDOBJ ; - - if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringVector___setitem__" "', argument " "1"" of type '" "std::vector< std::string > *""'"); - } - arg1 = reinterpret_cast< std::vector< std::string > * >(argp1); - ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "StringVector___setitem__" "', argument " "2"" of type '" "std::vector< std::string >::difference_type""'"); - } - arg2 = static_cast< std::vector< std::string >::difference_type >(val2); - { - std::string *ptr = (std::string *)0; - res3 = SWIG_AsPtr_std_string(swig_obj[2], &ptr); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "StringVector___setitem__" "', argument " "3"" of type '" "std::vector< std::string >::value_type const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "StringVector___setitem__" "', argument " "3"" of type '" "std::vector< std::string >::value_type const &""'"); - } - arg3 = ptr; - } - try { - std_vector_Sl_std_string_Sg____setitem____SWIG_2(arg1,arg2,(std::string const &)*arg3); - } catch(std::out_of_range &_e) { - SWIG_exception_fail(SWIG_IndexError, (&_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_StringVector___setitem__(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[4] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "StringVector___setitem__", 0, 3, argv))) SWIG_fail; - --argc; - if (argc == 2) { - int _v; - int res = swig::asptr(argv[0], (std::vector< std::string,std::allocator< std::string > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - { - _v = PySlice_Check(argv[1]); - } - if (_v) { - return _wrap_StringVector___setitem____SWIG_1(self, argc, argv); - } - } - } - if (argc == 3) { - int _v; - int res = swig::asptr(argv[0], (std::vector< std::string,std::allocator< std::string > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - { - _v = PySlice_Check(argv[1]); - } - if (_v) { - int res = swig::asptr(argv[2], (std::vector< std::string,std::allocator< std::string > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_StringVector___setitem____SWIG_0(self, argc, argv); - } - } - } - } - if (argc == 3) { - int _v; - int res = swig::asptr(argv[0], (std::vector< std::string,std::allocator< std::string > >**)(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_AsPtr_std_string(argv[2], (std::string**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_StringVector___setitem____SWIG_2(self, argc, argv); - } - } - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'StringVector___setitem__'.\n" - " Possible C/C++ prototypes are:\n" - " std::vector< std::string >::__setitem__(PySliceObject *,std::vector< std::string,std::allocator< std::string > > const &)\n" - " std::vector< std::string >::__setitem__(PySliceObject *)\n" - " std::vector< std::string >::__setitem__(std::vector< std::string >::difference_type,std::vector< std::string >::value_type const &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_StringVector_pop(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::vector< std::string >::value_type result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringVector_pop" "', argument " "1"" of type '" "std::vector< std::string > *""'"); - } - arg1 = reinterpret_cast< std::vector< std::string > * >(argp1); - try { - result = std_vector_Sl_std_string_Sg__pop(arg1); - } catch(std::out_of_range &_e) { - SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); - } - resultobj = SWIG_From_std_string(static_cast< std::string >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_StringVector_append(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ; - std::vector< std::string >::value_type *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 = SWIG_OLDOBJ ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args, "StringVector_append", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringVector_append" "', argument " "1"" of type '" "std::vector< std::string > *""'"); - } - arg1 = reinterpret_cast< std::vector< std::string > * >(argp1); - { - std::string *ptr = (std::string *)0; - res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "StringVector_append" "', argument " "2"" of type '" "std::vector< std::string >::value_type const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "StringVector_append" "', argument " "2"" of type '" "std::vector< std::string >::value_type const &""'"); - } - arg2 = ptr; - } - std_vector_Sl_std_string_Sg__append(arg1,(std::string const &)*arg2); - resultobj = SWIG_Py_Void(); - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_StringVector__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **SWIGUNUSEDPARM(swig_obj)) { - PyObject *resultobj = 0; - std::vector< std::string > *result = 0 ; - - if ((nobjs < 0) || (nobjs > 0)) SWIG_fail; - result = (std::vector< std::string > *)new std::vector< std::string >(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_StringVector__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< std::string > *arg1 = 0 ; - int res1 = SWIG_OLDOBJ ; - std::vector< std::string > *result = 0 ; - - if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; - { - std::vector< std::string,std::allocator< std::string > > *ptr = (std::vector< std::string,std::allocator< std::string > > *)0; - res1 = swig::asptr(swig_obj[0], &ptr); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_StringVector" "', argument " "1"" of type '" "std::vector< std::string > const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_StringVector" "', argument " "1"" of type '" "std::vector< std::string > const &""'"); - } - arg1 = ptr; - } - result = (std::vector< std::string > *)new std::vector< std::string >((std::vector< std::string > const &)*arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_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_StringVector_empty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - bool result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringVector_empty" "', argument " "1"" of type '" "std::vector< std::string > const *""'"); - } - arg1 = reinterpret_cast< std::vector< std::string > * >(argp1); - result = (bool)((std::vector< std::string > const *)arg1)->empty(); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_StringVector_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::vector< std::string >::size_type result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringVector_size" "', argument " "1"" of type '" "std::vector< std::string > const *""'"); - } - arg1 = reinterpret_cast< std::vector< std::string > * >(argp1); - result = ((std::vector< std::string > const *)arg1)->size(); - resultobj = SWIG_From_size_t(static_cast< size_t >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_StringVector_swap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ; - std::vector< std::string > *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args, "StringVector_swap", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringVector_swap" "', argument " "1"" of type '" "std::vector< std::string > *""'"); - } - arg1 = reinterpret_cast< std::vector< std::string > * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "StringVector_swap" "', argument " "2"" of type '" "std::vector< std::string > &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "StringVector_swap" "', argument " "2"" of type '" "std::vector< std::string > &""'"); - } - arg2 = reinterpret_cast< std::vector< std::string > * >(argp2); - (arg1)->swap(*arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_StringVector_begin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::vector< std::string >::iterator result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringVector_begin" "', argument " "1"" of type '" "std::vector< std::string > *""'"); - } - arg1 = reinterpret_cast< std::vector< std::string > * >(argp1); - result = (arg1)->begin(); - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< std::string >::iterator & >(result)), - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_StringVector_end(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::vector< std::string >::iterator result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringVector_end" "', argument " "1"" of type '" "std::vector< std::string > *""'"); - } - arg1 = reinterpret_cast< std::vector< std::string > * >(argp1); - result = (arg1)->end(); - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< std::string >::iterator & >(result)), - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_StringVector_rbegin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::vector< std::string >::reverse_iterator result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringVector_rbegin" "', argument " "1"" of type '" "std::vector< std::string > *""'"); - } - arg1 = reinterpret_cast< std::vector< std::string > * >(argp1); - result = (arg1)->rbegin(); - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< std::string >::reverse_iterator & >(result)), - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_StringVector_rend(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::vector< std::string >::reverse_iterator result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringVector_rend" "', argument " "1"" of type '" "std::vector< std::string > *""'"); - } - arg1 = reinterpret_cast< std::vector< std::string > * >(argp1); - result = (arg1)->rend(); - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< std::string >::reverse_iterator & >(result)), - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_StringVector_clear(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringVector_clear" "', argument " "1"" of type '" "std::vector< std::string > *""'"); - } - arg1 = reinterpret_cast< std::vector< std::string > * >(argp1); - (arg1)->clear(); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_StringVector_get_allocator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - SwigValueWrapper< std::allocator< std::string > > result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringVector_get_allocator" "', argument " "1"" of type '" "std::vector< std::string > const *""'"); - } - arg1 = reinterpret_cast< std::vector< std::string > * >(argp1); - result = ((std::vector< std::string > const *)arg1)->get_allocator(); - resultobj = SWIG_NewPointerObj((new std::vector< std::string >::allocator_type(static_cast< const std::vector< std::string >::allocator_type& >(result))), SWIGTYPE_p_std__allocatorT_std__string_t, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_StringVector__SWIG_2(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< std::string >::size_type arg1 ; - size_t val1 ; - int ecode1 = 0 ; - std::vector< std::string > *result = 0 ; - - if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; - ecode1 = SWIG_AsVal_size_t(swig_obj[0], &val1); - if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_StringVector" "', argument " "1"" of type '" "std::vector< std::string >::size_type""'"); - } - arg1 = static_cast< std::vector< std::string >::size_type >(val1); - result = (std::vector< std::string > *)new std::vector< std::string >(arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_StringVector_pop_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringVector_pop_back" "', argument " "1"" of type '" "std::vector< std::string > *""'"); - } - arg1 = reinterpret_cast< std::vector< std::string > * >(argp1); - (arg1)->pop_back(); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_StringVector_resize__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ; - std::vector< std::string >::size_type arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - size_t val2 ; - int ecode2 = 0 ; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringVector_resize" "', argument " "1"" of type '" "std::vector< std::string > *""'"); - } - arg1 = reinterpret_cast< std::vector< std::string > * >(argp1); - ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "StringVector_resize" "', argument " "2"" of type '" "std::vector< std::string >::size_type""'"); - } - arg2 = static_cast< std::vector< std::string >::size_type >(val2); - (arg1)->resize(arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_StringVector_erase__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ; - std::vector< std::string >::iterator arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - swig::SwigPyIterator *iter2 = 0 ; - int res2 ; - std::vector< std::string >::iterator result; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringVector_erase" "', argument " "1"" of type '" "std::vector< std::string > *""'"); - } - arg1 = reinterpret_cast< std::vector< std::string > * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0); - if (!SWIG_IsOK(res2) || !iter2) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "StringVector_erase" "', argument " "2"" of type '" "std::vector< std::string >::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 '" "StringVector_erase" "', argument " "2"" of type '" "std::vector< std::string >::iterator""'"); - } - } - result = std_vector_Sl_std_string_Sg__erase__SWIG_0(arg1,arg2); - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< std::string >::iterator & >(result)), - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_StringVector_erase__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ; - std::vector< std::string >::iterator arg2 ; - std::vector< std::string >::iterator arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - swig::SwigPyIterator *iter2 = 0 ; - int res2 ; - swig::SwigPyIterator *iter3 = 0 ; - int res3 ; - std::vector< std::string >::iterator result; - - if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringVector_erase" "', argument " "1"" of type '" "std::vector< std::string > *""'"); - } - arg1 = reinterpret_cast< std::vector< std::string > * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0); - if (!SWIG_IsOK(res2) || !iter2) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "StringVector_erase" "', argument " "2"" of type '" "std::vector< std::string >::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 '" "StringVector_erase" "', argument " "2"" of type '" "std::vector< std::string >::iterator""'"); - } - } - res3 = SWIG_ConvertPtr(swig_obj[2], SWIG_as_voidptrptr(&iter3), swig::SwigPyIterator::descriptor(), 0); - if (!SWIG_IsOK(res3) || !iter3) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "StringVector_erase" "', argument " "3"" of type '" "std::vector< std::string >::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 '" "StringVector_erase" "', argument " "3"" of type '" "std::vector< std::string >::iterator""'"); - } - } - result = std_vector_Sl_std_string_Sg__erase__SWIG_1(arg1,arg2,arg3); - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< std::string >::iterator & >(result)), - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_StringVector_erase(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[4] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "StringVector_erase", 0, 3, argv))) SWIG_fail; - --argc; - if (argc == 2) { - int _v; - int res = swig::asptr(argv[0], (std::vector< std::string,std::allocator< std::string > >**)(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_StringVector_erase__SWIG_0(self, argc, argv); - } - } - } - if (argc == 3) { - int _v; - int res = swig::asptr(argv[0], (std::vector< std::string,std::allocator< std::string > >**)(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_StringVector_erase__SWIG_1(self, argc, argv); - } - } - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'StringVector_erase'.\n" - " Possible C/C++ prototypes are:\n" - " std::vector< std::string >::erase(std::vector< std::string >::iterator)\n" - " std::vector< std::string >::erase(std::vector< std::string >::iterator,std::vector< std::string >::iterator)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_new_StringVector__SWIG_3(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< std::string >::size_type arg1 ; - std::vector< std::string >::value_type *arg2 = 0 ; - size_t val1 ; - int ecode1 = 0 ; - int res2 = SWIG_OLDOBJ ; - std::vector< std::string > *result = 0 ; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - ecode1 = SWIG_AsVal_size_t(swig_obj[0], &val1); - if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_StringVector" "', argument " "1"" of type '" "std::vector< std::string >::size_type""'"); - } - arg1 = static_cast< std::vector< std::string >::size_type >(val1); - { - std::string *ptr = (std::string *)0; - res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_StringVector" "', argument " "2"" of type '" "std::vector< std::string >::value_type const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_StringVector" "', argument " "2"" of type '" "std::vector< std::string >::value_type const &""'"); - } - arg2 = ptr; - } - result = (std::vector< std::string > *)new std::vector< std::string >(arg1,(std::vector< std::string >::value_type const &)*arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, SWIG_POINTER_NEW | 0 ); - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_StringVector(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[3] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "new_StringVector", 0, 2, argv))) SWIG_fail; - --argc; - if (argc == 0) { - return _wrap_new_StringVector__SWIG_0(self, argc, argv); - } - if (argc == 1) { - int _v; - { - int res = SWIG_AsVal_size_t(argv[0], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_new_StringVector__SWIG_2(self, argc, argv); - } - } - if (argc == 1) { - int _v; - int res = swig::asptr(argv[0], (std::vector< std::string,std::allocator< std::string > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_new_StringVector__SWIG_1(self, argc, argv); - } - } - if (argc == 2) { - int _v; - { - int res = SWIG_AsVal_size_t(argv[0], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - int res = SWIG_AsPtr_std_string(argv[1], (std::string**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_new_StringVector__SWIG_3(self, argc, argv); - } - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'new_StringVector'.\n" - " Possible C/C++ prototypes are:\n" - " std::vector< std::string >::vector()\n" - " std::vector< std::string >::vector(std::vector< std::string > const &)\n" - " std::vector< std::string >::vector(std::vector< std::string >::size_type)\n" - " std::vector< std::string >::vector(std::vector< std::string >::size_type,std::vector< std::string >::value_type const &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_StringVector_push_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ; - std::vector< std::string >::value_type *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 = SWIG_OLDOBJ ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args, "StringVector_push_back", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringVector_push_back" "', argument " "1"" of type '" "std::vector< std::string > *""'"); - } - arg1 = reinterpret_cast< std::vector< std::string > * >(argp1); - { - std::string *ptr = (std::string *)0; - res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "StringVector_push_back" "', argument " "2"" of type '" "std::vector< std::string >::value_type const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "StringVector_push_back" "', argument " "2"" of type '" "std::vector< std::string >::value_type const &""'"); - } - arg2 = ptr; - } - (arg1)->push_back((std::vector< std::string >::value_type const &)*arg2); - resultobj = SWIG_Py_Void(); - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_StringVector_front(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::vector< std::string >::value_type *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringVector_front" "', argument " "1"" of type '" "std::vector< std::string > const *""'"); - } - arg1 = reinterpret_cast< std::vector< std::string > * >(argp1); - result = (std::vector< std::string >::value_type *) &((std::vector< std::string > const *)arg1)->front(); - resultobj = SWIG_From_std_string(static_cast< std::string >(*result)); - (void)swig::container_owner::value_type>::category>::back_reference(resultobj, swig_obj[0]); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_StringVector_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::vector< std::string >::value_type *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringVector_back" "', argument " "1"" of type '" "std::vector< std::string > const *""'"); - } - arg1 = reinterpret_cast< std::vector< std::string > * >(argp1); - result = (std::vector< std::string >::value_type *) &((std::vector< std::string > const *)arg1)->back(); - resultobj = SWIG_From_std_string(static_cast< std::string >(*result)); - (void)swig::container_owner::value_type>::category>::back_reference(resultobj, swig_obj[0]); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_StringVector_assign(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ; - std::vector< std::string >::size_type arg2 ; - std::vector< std::string >::value_type *arg3 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - size_t val2 ; - int ecode2 = 0 ; - int res3 = SWIG_OLDOBJ ; - PyObject *swig_obj[3] ; - - if (!SWIG_Python_UnpackTuple(args, "StringVector_assign", 3, 3, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringVector_assign" "', argument " "1"" of type '" "std::vector< std::string > *""'"); - } - arg1 = reinterpret_cast< std::vector< std::string > * >(argp1); - ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "StringVector_assign" "', argument " "2"" of type '" "std::vector< std::string >::size_type""'"); - } - arg2 = static_cast< std::vector< std::string >::size_type >(val2); - { - std::string *ptr = (std::string *)0; - res3 = SWIG_AsPtr_std_string(swig_obj[2], &ptr); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "StringVector_assign" "', argument " "3"" of type '" "std::vector< std::string >::value_type const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "StringVector_assign" "', argument " "3"" of type '" "std::vector< std::string >::value_type const &""'"); - } - arg3 = ptr; - } - (arg1)->assign(arg2,(std::vector< std::string >::value_type const &)*arg3); - resultobj = SWIG_Py_Void(); - if (SWIG_IsNewObj(res3)) delete arg3; - return resultobj; -fail: - if (SWIG_IsNewObj(res3)) delete arg3; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_StringVector_resize__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ; - std::vector< std::string >::size_type arg2 ; - std::vector< std::string >::value_type *arg3 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - size_t val2 ; - int ecode2 = 0 ; - int res3 = SWIG_OLDOBJ ; - - if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringVector_resize" "', argument " "1"" of type '" "std::vector< std::string > *""'"); - } - arg1 = reinterpret_cast< std::vector< std::string > * >(argp1); - ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "StringVector_resize" "', argument " "2"" of type '" "std::vector< std::string >::size_type""'"); - } - arg2 = static_cast< std::vector< std::string >::size_type >(val2); - { - std::string *ptr = (std::string *)0; - res3 = SWIG_AsPtr_std_string(swig_obj[2], &ptr); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "StringVector_resize" "', argument " "3"" of type '" "std::vector< std::string >::value_type const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "StringVector_resize" "', argument " "3"" of type '" "std::vector< std::string >::value_type const &""'"); - } - arg3 = ptr; - } - (arg1)->resize(arg2,(std::vector< std::string >::value_type const &)*arg3); - resultobj = SWIG_Py_Void(); - if (SWIG_IsNewObj(res3)) delete arg3; - return resultobj; -fail: - if (SWIG_IsNewObj(res3)) delete arg3; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_StringVector_resize(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[4] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "StringVector_resize", 0, 3, argv))) SWIG_fail; - --argc; - if (argc == 2) { - int _v; - int res = swig::asptr(argv[0], (std::vector< std::string,std::allocator< std::string > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_size_t(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_StringVector_resize__SWIG_0(self, argc, argv); - } - } - } - if (argc == 3) { - int _v; - int res = swig::asptr(argv[0], (std::vector< std::string,std::allocator< std::string > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_size_t(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - int res = SWIG_AsPtr_std_string(argv[2], (std::string**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_StringVector_resize__SWIG_1(self, argc, argv); - } - } - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'StringVector_resize'.\n" - " Possible C/C++ prototypes are:\n" - " std::vector< std::string >::resize(std::vector< std::string >::size_type)\n" - " std::vector< std::string >::resize(std::vector< std::string >::size_type,std::vector< std::string >::value_type const &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_StringVector_insert__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ; - std::vector< std::string >::iterator arg2 ; - std::vector< std::string >::value_type *arg3 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - swig::SwigPyIterator *iter2 = 0 ; - int res2 ; - int res3 = SWIG_OLDOBJ ; - std::vector< std::string >::iterator result; - - if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringVector_insert" "', argument " "1"" of type '" "std::vector< std::string > *""'"); - } - arg1 = reinterpret_cast< std::vector< std::string > * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0); - if (!SWIG_IsOK(res2) || !iter2) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "StringVector_insert" "', argument " "2"" of type '" "std::vector< std::string >::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 '" "StringVector_insert" "', argument " "2"" of type '" "std::vector< std::string >::iterator""'"); - } - } - { - std::string *ptr = (std::string *)0; - res3 = SWIG_AsPtr_std_string(swig_obj[2], &ptr); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "StringVector_insert" "', argument " "3"" of type '" "std::vector< std::string >::value_type const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "StringVector_insert" "', argument " "3"" of type '" "std::vector< std::string >::value_type const &""'"); - } - arg3 = ptr; - } - result = std_vector_Sl_std_string_Sg__insert__SWIG_0(arg1,arg2,(std::string const &)*arg3); - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< std::string >::iterator & >(result)), - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); - if (SWIG_IsNewObj(res3)) delete arg3; - return resultobj; -fail: - if (SWIG_IsNewObj(res3)) delete arg3; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_StringVector_insert__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ; - std::vector< std::string >::iterator arg2 ; - std::vector< std::string >::size_type arg3 ; - std::vector< std::string >::value_type *arg4 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - swig::SwigPyIterator *iter2 = 0 ; - int res2 ; - size_t val3 ; - int ecode3 = 0 ; - int res4 = SWIG_OLDOBJ ; - - if ((nobjs < 4) || (nobjs > 4)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringVector_insert" "', argument " "1"" of type '" "std::vector< std::string > *""'"); - } - arg1 = reinterpret_cast< std::vector< std::string > * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0); - if (!SWIG_IsOK(res2) || !iter2) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "StringVector_insert" "', argument " "2"" of type '" "std::vector< std::string >::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 '" "StringVector_insert" "', argument " "2"" of type '" "std::vector< std::string >::iterator""'"); - } - } - ecode3 = SWIG_AsVal_size_t(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "StringVector_insert" "', argument " "3"" of type '" "std::vector< std::string >::size_type""'"); - } - arg3 = static_cast< std::vector< std::string >::size_type >(val3); - { - std::string *ptr = (std::string *)0; - res4 = SWIG_AsPtr_std_string(swig_obj[3], &ptr); - if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "StringVector_insert" "', argument " "4"" of type '" "std::vector< std::string >::value_type const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "StringVector_insert" "', argument " "4"" of type '" "std::vector< std::string >::value_type const &""'"); - } - arg4 = ptr; - } - std_vector_Sl_std_string_Sg__insert__SWIG_1(arg1,arg2,arg3,(std::string const &)*arg4); - resultobj = SWIG_Py_Void(); - if (SWIG_IsNewObj(res4)) delete arg4; - return resultobj; -fail: - if (SWIG_IsNewObj(res4)) delete arg4; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_StringVector_insert(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[5] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "StringVector_insert", 0, 4, argv))) SWIG_fail; - --argc; - if (argc == 3) { - int _v; - int res = swig::asptr(argv[0], (std::vector< std::string,std::allocator< std::string > >**)(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_AsPtr_std_string(argv[2], (std::string**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_StringVector_insert__SWIG_0(self, argc, argv); - } - } - } - } - if (argc == 4) { - int _v; - int res = swig::asptr(argv[0], (std::vector< std::string,std::allocator< std::string > >**)(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_size_t(argv[2], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - int res = SWIG_AsPtr_std_string(argv[3], (std::string**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_StringVector_insert__SWIG_1(self, argc, argv); - } - } - } - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'StringVector_insert'.\n" - " Possible C/C++ prototypes are:\n" - " std::vector< std::string >::insert(std::vector< std::string >::iterator,std::vector< std::string >::value_type const &)\n" - " std::vector< std::string >::insert(std::vector< std::string >::iterator,std::vector< std::string >::size_type,std::vector< std::string >::value_type const &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_StringVector_reserve(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ; - std::vector< std::string >::size_type arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - size_t val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args, "StringVector_reserve", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringVector_reserve" "', argument " "1"" of type '" "std::vector< std::string > *""'"); - } - arg1 = reinterpret_cast< std::vector< std::string > * >(argp1); - ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "StringVector_reserve" "', argument " "2"" of type '" "std::vector< std::string >::size_type""'"); - } - arg2 = static_cast< std::vector< std::string >::size_type >(val2); - (arg1)->reserve(arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_StringVector_capacity(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::vector< std::string >::size_type result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringVector_capacity" "', argument " "1"" of type '" "std::vector< std::string > const *""'"); - } - arg1 = reinterpret_cast< std::vector< std::string > * >(argp1); - result = ((std::vector< std::string > const *)arg1)->capacity(); - resultobj = SWIG_From_size_t(static_cast< size_t >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_StringVector(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_StringVector" "', argument " "1"" of type '" "std::vector< std::string > *""'"); - } - arg1 = reinterpret_cast< std::vector< std::string > * >(argp1); - delete arg1; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *StringVector_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *StringVector_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_new_StringPair__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **SWIGUNUSEDPARM(swig_obj)) { - PyObject *resultobj = 0; - std::pair< std::string,std::string > *result = 0 ; - - if ((nobjs < 0) || (nobjs > 0)) SWIG_fail; - result = (std::pair< std::string,std::string > *)new std::pair< std::string,std::string >(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__pairT_std__string_std__string_t, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_StringPair__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::string arg1 ; - std::string arg2 ; - std::pair< std::string,std::string > *result = 0 ; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - { - std::string *ptr = (std::string *)0; - int res = SWIG_AsPtr_std_string(swig_obj[0], &ptr); - if (!SWIG_IsOK(res) || !ptr) { - SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "new_StringPair" "', argument " "1"" of type '" "std::string""'"); - } - arg1 = *ptr; - if (SWIG_IsNewObj(res)) delete ptr; - } - { - std::string *ptr = (std::string *)0; - int res = SWIG_AsPtr_std_string(swig_obj[1], &ptr); - if (!SWIG_IsOK(res) || !ptr) { - SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "new_StringPair" "', argument " "2"" of type '" "std::string""'"); - } - arg2 = *ptr; - if (SWIG_IsNewObj(res)) delete ptr; - } - result = (std::pair< std::string,std::string > *)new std::pair< std::string,std::string >(arg1,arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__pairT_std__string_std__string_t, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_StringPair__SWIG_2(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::pair< std::string,std::string > *arg1 = 0 ; - int res1 = SWIG_OLDOBJ ; - std::pair< std::string,std::string > *result = 0 ; - - if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; - { - std::pair< std::string,std::string > *ptr = (std::pair< std::string,std::string > *)0; - res1 = swig::asptr(swig_obj[0], &ptr); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_StringPair" "', argument " "1"" of type '" "std::pair< std::string,std::string > const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_StringPair" "', argument " "1"" of type '" "std::pair< std::string,std::string > const &""'"); - } - arg1 = ptr; - } - result = (std::pair< std::string,std::string > *)new std::pair< std::string,std::string >((std::pair< std::string,std::string > const &)*arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__pairT_std__string_std__string_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_new_StringPair(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[3] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "new_StringPair", 0, 2, argv))) SWIG_fail; - --argc; - if (argc == 0) { - return _wrap_new_StringPair__SWIG_0(self, argc, argv); - } - if (argc == 1) { - int _v; - int res = swig::asptr(argv[0], (std::pair< std::string,std::string >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_new_StringPair__SWIG_2(self, argc, argv); - } - } - if (argc == 2) { - int _v; - int res = SWIG_AsPtr_std_string(argv[0], (std::string**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_AsPtr_std_string(argv[1], (std::string**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_new_StringPair__SWIG_1(self, argc, argv); - } - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'new_StringPair'.\n" - " Possible C/C++ prototypes are:\n" - " std::pair< std::string,std::string >::pair()\n" - " std::pair< std::string,std::string >::pair(std::string,std::string)\n" - " std::pair< std::string,std::string >::pair(std::pair< std::string,std::string > const &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_StringPair_first_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::pair< std::string,std::string > *arg1 = (std::pair< std::string,std::string > *) 0 ; - std::string *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 = SWIG_OLDOBJ ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args, "StringPair_first_set", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__pairT_std__string_std__string_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringPair_first_set" "', argument " "1"" of type '" "std::pair< std::string,std::string > *""'"); - } - arg1 = reinterpret_cast< std::pair< std::string,std::string > * >(argp1); - { - std::string *ptr = (std::string *)0; - res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "StringPair_first_set" "', argument " "2"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "StringPair_first_set" "', argument " "2"" of type '" "std::string const &""'"); - } - arg2 = ptr; - } - if (arg1) (arg1)->first = *arg2; - resultobj = SWIG_Py_Void(); - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_StringPair_first_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::pair< std::string,std::string > *arg1 = (std::pair< std::string,std::string > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::string *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__pairT_std__string_std__string_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringPair_first_get" "', argument " "1"" of type '" "std::pair< std::string,std::string > *""'"); - } - arg1 = reinterpret_cast< std::pair< std::string,std::string > * >(argp1); - result = (std::string *) & ((arg1)->first); - resultobj = SWIG_From_std_string(static_cast< std::string >(*result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_StringPair_second_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::pair< std::string,std::string > *arg1 = (std::pair< std::string,std::string > *) 0 ; - std::string *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 = SWIG_OLDOBJ ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args, "StringPair_second_set", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__pairT_std__string_std__string_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringPair_second_set" "', argument " "1"" of type '" "std::pair< std::string,std::string > *""'"); - } - arg1 = reinterpret_cast< std::pair< std::string,std::string > * >(argp1); - { - std::string *ptr = (std::string *)0; - res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "StringPair_second_set" "', argument " "2"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "StringPair_second_set" "', argument " "2"" of type '" "std::string const &""'"); - } - arg2 = ptr; - } - if (arg1) (arg1)->second = *arg2; - resultobj = SWIG_Py_Void(); - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_StringPair_second_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::pair< std::string,std::string > *arg1 = (std::pair< std::string,std::string > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::string *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__pairT_std__string_std__string_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringPair_second_get" "', argument " "1"" of type '" "std::pair< std::string,std::string > *""'"); - } - arg1 = reinterpret_cast< std::pair< std::string,std::string > * >(argp1); - result = (std::string *) & ((arg1)->second); - resultobj = SWIG_From_std_string(static_cast< std::string >(*result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_StringPair(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::pair< std::string,std::string > *arg1 = (std::pair< std::string,std::string > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__pairT_std__string_std__string_t, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_StringPair" "', argument " "1"" of type '" "std::pair< std::string,std::string > *""'"); - } - arg1 = reinterpret_cast< std::pair< std::string,std::string > * >(argp1); - delete arg1; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *StringPair_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_std__pairT_std__string_std__string_t, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *StringPair_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_StringPairVector_iterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< std::pair< std::string,std::string > > *arg1 = (std::vector< std::pair< std::string,std::string > > *) 0 ; - PyObject **arg2 = (PyObject **) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - swig::SwigPyIterator *result = 0 ; - - arg2 = &swig_obj[0]; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringPairVector_iterator" "', argument " "1"" of type '" "std::vector< std::pair< std::string,std::string > > *""'"); - } - arg1 = reinterpret_cast< std::vector< std::pair< std::string,std::string > > * >(argp1); - result = (swig::SwigPyIterator *)std_vector_Sl_std_pair_Sl_std_string_Sc_std_string_Sg__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_StringPairVector___nonzero__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< std::pair< std::string,std::string > > *arg1 = (std::vector< std::pair< std::string,std::string > > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - bool result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringPairVector___nonzero__" "', argument " "1"" of type '" "std::vector< std::pair< std::string,std::string > > const *""'"); - } - arg1 = reinterpret_cast< std::vector< std::pair< std::string,std::string > > * >(argp1); - result = (bool)std_vector_Sl_std_pair_Sl_std_string_Sc_std_string_Sg__Sg____nonzero__((std::vector< std::pair< std::string,std::string > > const *)arg1); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_StringPairVector___bool__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< std::pair< std::string,std::string > > *arg1 = (std::vector< std::pair< std::string,std::string > > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - bool result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringPairVector___bool__" "', argument " "1"" of type '" "std::vector< std::pair< std::string,std::string > > const *""'"); - } - arg1 = reinterpret_cast< std::vector< std::pair< std::string,std::string > > * >(argp1); - result = (bool)std_vector_Sl_std_pair_Sl_std_string_Sc_std_string_Sg__Sg____bool__((std::vector< std::pair< std::string,std::string > > const *)arg1); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_StringPairVector___len__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< std::pair< std::string,std::string > > *arg1 = (std::vector< std::pair< std::string,std::string > > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::vector< std::pair< std::string,std::string > >::size_type result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringPairVector___len__" "', argument " "1"" of type '" "std::vector< std::pair< std::string,std::string > > const *""'"); - } - arg1 = reinterpret_cast< std::vector< std::pair< std::string,std::string > > * >(argp1); - result = std_vector_Sl_std_pair_Sl_std_string_Sc_std_string_Sg__Sg____len__((std::vector< std::pair< std::string,std::string > > const *)arg1); - resultobj = SWIG_From_size_t(static_cast< size_t >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_StringPairVector___getslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< std::pair< std::string,std::string > > *arg1 = (std::vector< std::pair< std::string,std::string > > *) 0 ; - std::vector< std::pair< std::string,std::string > >::difference_type arg2 ; - std::vector< std::pair< std::string,std::string > >::difference_type arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - ptrdiff_t val2 ; - int ecode2 = 0 ; - ptrdiff_t val3 ; - int ecode3 = 0 ; - PyObject *swig_obj[3] ; - std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > > *result = 0 ; - - if (!SWIG_Python_UnpackTuple(args, "StringPairVector___getslice__", 3, 3, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringPairVector___getslice__" "', argument " "1"" of type '" "std::vector< std::pair< std::string,std::string > > *""'"); - } - arg1 = reinterpret_cast< std::vector< std::pair< std::string,std::string > > * >(argp1); - ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "StringPairVector___getslice__" "', argument " "2"" of type '" "std::vector< std::pair< std::string,std::string > >::difference_type""'"); - } - arg2 = static_cast< std::vector< std::pair< std::string,std::string > >::difference_type >(val2); - ecode3 = SWIG_AsVal_ptrdiff_t(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "StringPairVector___getslice__" "', argument " "3"" of type '" "std::vector< std::pair< std::string,std::string > >::difference_type""'"); - } - arg3 = static_cast< std::vector< std::pair< std::string,std::string > >::difference_type >(val3); - try { - result = (std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > > *)std_vector_Sl_std_pair_Sl_std_string_Sc_std_string_Sg__Sg____getslice__(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_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_StringPairVector___setslice____SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< std::pair< std::string,std::string > > *arg1 = (std::vector< std::pair< std::string,std::string > > *) 0 ; - std::vector< std::pair< std::string,std::string > >::difference_type arg2 ; - std::vector< std::pair< std::string,std::string > >::difference_type arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - ptrdiff_t val2 ; - int ecode2 = 0 ; - ptrdiff_t val3 ; - int ecode3 = 0 ; - - if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringPairVector___setslice__" "', argument " "1"" of type '" "std::vector< std::pair< std::string,std::string > > *""'"); - } - arg1 = reinterpret_cast< std::vector< std::pair< std::string,std::string > > * >(argp1); - ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "StringPairVector___setslice__" "', argument " "2"" of type '" "std::vector< std::pair< std::string,std::string > >::difference_type""'"); - } - arg2 = static_cast< std::vector< std::pair< std::string,std::string > >::difference_type >(val2); - ecode3 = SWIG_AsVal_ptrdiff_t(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "StringPairVector___setslice__" "', argument " "3"" of type '" "std::vector< std::pair< std::string,std::string > >::difference_type""'"); - } - arg3 = static_cast< std::vector< std::pair< std::string,std::string > >::difference_type >(val3); - try { - std_vector_Sl_std_pair_Sl_std_string_Sc_std_string_Sg__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_StringPairVector___setslice____SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< std::pair< std::string,std::string > > *arg1 = (std::vector< std::pair< std::string,std::string > > *) 0 ; - std::vector< std::pair< std::string,std::string > >::difference_type arg2 ; - std::vector< std::pair< std::string,std::string > >::difference_type arg3 ; - std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > > *arg4 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - ptrdiff_t val2 ; - int ecode2 = 0 ; - ptrdiff_t val3 ; - int ecode3 = 0 ; - int res4 = SWIG_OLDOBJ ; - - if ((nobjs < 4) || (nobjs > 4)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringPairVector___setslice__" "', argument " "1"" of type '" "std::vector< std::pair< std::string,std::string > > *""'"); - } - arg1 = reinterpret_cast< std::vector< std::pair< std::string,std::string > > * >(argp1); - ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "StringPairVector___setslice__" "', argument " "2"" of type '" "std::vector< std::pair< std::string,std::string > >::difference_type""'"); - } - arg2 = static_cast< std::vector< std::pair< std::string,std::string > >::difference_type >(val2); - ecode3 = SWIG_AsVal_ptrdiff_t(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "StringPairVector___setslice__" "', argument " "3"" of type '" "std::vector< std::pair< std::string,std::string > >::difference_type""'"); - } - arg3 = static_cast< std::vector< std::pair< std::string,std::string > >::difference_type >(val3); - { - std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > > *ptr = (std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > > *)0; - res4 = swig::asptr(swig_obj[3], &ptr); - if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "StringPairVector___setslice__" "', argument " "4"" of type '" "std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > > const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "StringPairVector___setslice__" "', argument " "4"" of type '" "std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > > const &""'"); - } - arg4 = ptr; - } - try { - std_vector_Sl_std_pair_Sl_std_string_Sc_std_string_Sg__Sg____setslice____SWIG_1(arg1,arg2,arg3,(std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > > 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_StringPairVector___setslice__(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[5] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "StringPairVector___setslice__", 0, 4, argv))) SWIG_fail; - --argc; - if (argc == 3) { - int _v; - int res = swig::asptr(argv[0], (std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > >**)(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_StringPairVector___setslice____SWIG_0(self, argc, argv); - } - } - } - } - if (argc == 4) { - int _v; - int res = swig::asptr(argv[0], (std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > >**)(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< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_StringPairVector___setslice____SWIG_1(self, argc, argv); - } - } - } - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'StringPairVector___setslice__'.\n" - " Possible C/C++ prototypes are:\n" - " std::vector< std::pair< std::string,std::string > >::__setslice__(std::vector< std::pair< std::string,std::string > >::difference_type,std::vector< std::pair< std::string,std::string > >::difference_type)\n" - " std::vector< std::pair< std::string,std::string > >::__setslice__(std::vector< std::pair< std::string,std::string > >::difference_type,std::vector< std::pair< std::string,std::string > >::difference_type,std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > > const &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_StringPairVector___delslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< std::pair< std::string,std::string > > *arg1 = (std::vector< std::pair< std::string,std::string > > *) 0 ; - std::vector< std::pair< std::string,std::string > >::difference_type arg2 ; - std::vector< std::pair< std::string,std::string > >::difference_type arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - ptrdiff_t val2 ; - int ecode2 = 0 ; - ptrdiff_t val3 ; - int ecode3 = 0 ; - PyObject *swig_obj[3] ; - - if (!SWIG_Python_UnpackTuple(args, "StringPairVector___delslice__", 3, 3, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringPairVector___delslice__" "', argument " "1"" of type '" "std::vector< std::pair< std::string,std::string > > *""'"); - } - arg1 = reinterpret_cast< std::vector< std::pair< std::string,std::string > > * >(argp1); - ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "StringPairVector___delslice__" "', argument " "2"" of type '" "std::vector< std::pair< std::string,std::string > >::difference_type""'"); - } - arg2 = static_cast< std::vector< std::pair< std::string,std::string > >::difference_type >(val2); - ecode3 = SWIG_AsVal_ptrdiff_t(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "StringPairVector___delslice__" "', argument " "3"" of type '" "std::vector< std::pair< std::string,std::string > >::difference_type""'"); - } - arg3 = static_cast< std::vector< std::pair< std::string,std::string > >::difference_type >(val3); - try { - std_vector_Sl_std_pair_Sl_std_string_Sc_std_string_Sg__Sg____delslice__(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_StringPairVector___delitem____SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< std::pair< std::string,std::string > > *arg1 = (std::vector< std::pair< std::string,std::string > > *) 0 ; - std::vector< std::pair< std::string,std::string > >::difference_type arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - ptrdiff_t val2 ; - int ecode2 = 0 ; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringPairVector___delitem__" "', argument " "1"" of type '" "std::vector< std::pair< std::string,std::string > > *""'"); - } - arg1 = reinterpret_cast< std::vector< std::pair< std::string,std::string > > * >(argp1); - ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "StringPairVector___delitem__" "', argument " "2"" of type '" "std::vector< std::pair< std::string,std::string > >::difference_type""'"); - } - arg2 = static_cast< std::vector< std::pair< std::string,std::string > >::difference_type >(val2); - try { - std_vector_Sl_std_pair_Sl_std_string_Sc_std_string_Sg__Sg____delitem____SWIG_0(arg1,arg2); - } 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_StringPairVector___getitem____SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< std::pair< std::string,std::string > > *arg1 = (std::vector< std::pair< std::string,std::string > > *) 0 ; - PySliceObject *arg2 = (PySliceObject *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > > *result = 0 ; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringPairVector___getitem__" "', argument " "1"" of type '" "std::vector< std::pair< std::string,std::string > > *""'"); - } - arg1 = reinterpret_cast< std::vector< std::pair< std::string,std::string > > * >(argp1); - { - if (!PySlice_Check(swig_obj[1])) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "StringPairVector___getitem__" "', argument " "2"" of type '" "PySliceObject *""'"); - } - arg2 = (PySliceObject *) swig_obj[1]; - } - try { - result = (std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > > *)std_vector_Sl_std_pair_Sl_std_string_Sc_std_string_Sg__Sg____getitem____SWIG_0(arg1,arg2); - } 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_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_StringPairVector___setitem____SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< std::pair< std::string,std::string > > *arg1 = (std::vector< std::pair< std::string,std::string > > *) 0 ; - PySliceObject *arg2 = (PySliceObject *) 0 ; - std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > > *arg3 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res3 = SWIG_OLDOBJ ; - - if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringPairVector___setitem__" "', argument " "1"" of type '" "std::vector< std::pair< std::string,std::string > > *""'"); - } - arg1 = reinterpret_cast< std::vector< std::pair< std::string,std::string > > * >(argp1); - { - if (!PySlice_Check(swig_obj[1])) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "StringPairVector___setitem__" "', argument " "2"" of type '" "PySliceObject *""'"); - } - arg2 = (PySliceObject *) swig_obj[1]; - } - { - std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > > *ptr = (std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > > *)0; - res3 = swig::asptr(swig_obj[2], &ptr); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "StringPairVector___setitem__" "', argument " "3"" of type '" "std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > > const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "StringPairVector___setitem__" "', argument " "3"" of type '" "std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > > const &""'"); - } - arg3 = ptr; - } - try { - std_vector_Sl_std_pair_Sl_std_string_Sc_std_string_Sg__Sg____setitem____SWIG_0(arg1,arg2,(std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > > 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_StringPairVector___setitem____SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< std::pair< std::string,std::string > > *arg1 = (std::vector< std::pair< std::string,std::string > > *) 0 ; - PySliceObject *arg2 = (PySliceObject *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringPairVector___setitem__" "', argument " "1"" of type '" "std::vector< std::pair< std::string,std::string > > *""'"); - } - arg1 = reinterpret_cast< std::vector< std::pair< std::string,std::string > > * >(argp1); - { - if (!PySlice_Check(swig_obj[1])) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "StringPairVector___setitem__" "', argument " "2"" of type '" "PySliceObject *""'"); - } - arg2 = (PySliceObject *) swig_obj[1]; - } - try { - std_vector_Sl_std_pair_Sl_std_string_Sc_std_string_Sg__Sg____setitem____SWIG_1(arg1,arg2); - } 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_StringPairVector___delitem____SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< std::pair< std::string,std::string > > *arg1 = (std::vector< std::pair< std::string,std::string > > *) 0 ; - PySliceObject *arg2 = (PySliceObject *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringPairVector___delitem__" "', argument " "1"" of type '" "std::vector< std::pair< std::string,std::string > > *""'"); - } - arg1 = reinterpret_cast< std::vector< std::pair< std::string,std::string > > * >(argp1); - { - if (!PySlice_Check(swig_obj[1])) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "StringPairVector___delitem__" "', argument " "2"" of type '" "PySliceObject *""'"); - } - arg2 = (PySliceObject *) swig_obj[1]; - } - try { - std_vector_Sl_std_pair_Sl_std_string_Sc_std_string_Sg__Sg____delitem____SWIG_1(arg1,arg2); - } 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_StringPairVector___delitem__(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[3] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "StringPairVector___delitem__", 0, 2, argv))) SWIG_fail; - --argc; - if (argc == 2) { - int _v; - int res = swig::asptr(argv[0], (std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - { - _v = PySlice_Check(argv[1]); - } - if (_v) { - return _wrap_StringPairVector___delitem____SWIG_1(self, argc, argv); - } - } - } - if (argc == 2) { - int _v; - int res = swig::asptr(argv[0], (std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_StringPairVector___delitem____SWIG_0(self, argc, argv); - } - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'StringPairVector___delitem__'.\n" - " Possible C/C++ prototypes are:\n" - " std::vector< std::pair< std::string,std::string > >::__delitem__(std::vector< std::pair< std::string,std::string > >::difference_type)\n" - " std::vector< std::pair< std::string,std::string > >::__delitem__(PySliceObject *)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_StringPairVector___getitem____SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< std::pair< std::string,std::string > > *arg1 = (std::vector< std::pair< std::string,std::string > > *) 0 ; - std::vector< std::pair< std::string,std::string > >::difference_type arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - ptrdiff_t val2 ; - int ecode2 = 0 ; - std::vector< std::pair< std::string,std::string > >::value_type *result = 0 ; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringPairVector___getitem__" "', argument " "1"" of type '" "std::vector< std::pair< std::string,std::string > > const *""'"); - } - arg1 = reinterpret_cast< std::vector< std::pair< std::string,std::string > > * >(argp1); - ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "StringPairVector___getitem__" "', argument " "2"" of type '" "std::vector< std::pair< std::string,std::string > >::difference_type""'"); - } - arg2 = static_cast< std::vector< std::pair< std::string,std::string > >::difference_type >(val2); - try { - result = (std::vector< std::pair< std::string,std::string > >::value_type *) &std_vector_Sl_std_pair_Sl_std_string_Sc_std_string_Sg__Sg____getitem____SWIG_1((std::vector< std::pair< std::string,std::string > > const *)arg1,arg2); - } catch(std::out_of_range &_e) { - SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); - } - resultobj = swig::from(static_cast< std::pair< std::string,std::string > >(*result)); - (void)swig::container_owner >::value_type>::category>::back_reference(resultobj, swig_obj[0]); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_StringPairVector___getitem__(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[3] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "StringPairVector___getitem__", 0, 2, argv))) SWIG_fail; - --argc; - if (argc == 2) { - int _v; - int res = swig::asptr(argv[0], (std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - { - _v = PySlice_Check(argv[1]); - } - if (_v) { - return _wrap_StringPairVector___getitem____SWIG_0(self, argc, argv); - } - } - } - if (argc == 2) { - int _v; - int res = swig::asptr(argv[0], (std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_StringPairVector___getitem____SWIG_1(self, argc, argv); - } - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'StringPairVector___getitem__'.\n" - " Possible C/C++ prototypes are:\n" - " std::vector< std::pair< std::string,std::string > >::__getitem__(PySliceObject *)\n" - " std::vector< std::pair< std::string,std::string > >::__getitem__(std::vector< std::pair< std::string,std::string > >::difference_type) const\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_StringPairVector___setitem____SWIG_2(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< std::pair< std::string,std::string > > *arg1 = (std::vector< std::pair< std::string,std::string > > *) 0 ; - std::vector< std::pair< std::string,std::string > >::difference_type arg2 ; - std::vector< std::pair< std::string,std::string > >::value_type *arg3 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - ptrdiff_t val2 ; - int ecode2 = 0 ; - int res3 = SWIG_OLDOBJ ; - - if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringPairVector___setitem__" "', argument " "1"" of type '" "std::vector< std::pair< std::string,std::string > > *""'"); - } - arg1 = reinterpret_cast< std::vector< std::pair< std::string,std::string > > * >(argp1); - ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "StringPairVector___setitem__" "', argument " "2"" of type '" "std::vector< std::pair< std::string,std::string > >::difference_type""'"); - } - arg2 = static_cast< std::vector< std::pair< std::string,std::string > >::difference_type >(val2); - { - std::pair< std::string,std::string > *ptr = (std::pair< std::string,std::string > *)0; - res3 = swig::asptr(swig_obj[2], &ptr); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "StringPairVector___setitem__" "', argument " "3"" of type '" "std::vector< std::pair< std::string,std::string > >::value_type const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "StringPairVector___setitem__" "', argument " "3"" of type '" "std::vector< std::pair< std::string,std::string > >::value_type const &""'"); - } - arg3 = ptr; - } - try { - std_vector_Sl_std_pair_Sl_std_string_Sc_std_string_Sg__Sg____setitem____SWIG_2(arg1,arg2,(std::pair< std::string,std::string > const &)*arg3); - } catch(std::out_of_range &_e) { - SWIG_exception_fail(SWIG_IndexError, (&_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_StringPairVector___setitem__(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[4] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "StringPairVector___setitem__", 0, 3, argv))) SWIG_fail; - --argc; - if (argc == 2) { - int _v; - int res = swig::asptr(argv[0], (std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - { - _v = PySlice_Check(argv[1]); - } - if (_v) { - return _wrap_StringPairVector___setitem____SWIG_1(self, argc, argv); - } - } - } - if (argc == 3) { - int _v; - int res = swig::asptr(argv[0], (std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - { - _v = PySlice_Check(argv[1]); - } - if (_v) { - int res = swig::asptr(argv[2], (std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_StringPairVector___setitem____SWIG_0(self, argc, argv); - } - } - } - } - if (argc == 3) { - int _v; - int res = swig::asptr(argv[0], (std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > >**)(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::asptr(argv[2], (std::pair< std::string,std::string >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_StringPairVector___setitem____SWIG_2(self, argc, argv); - } - } - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'StringPairVector___setitem__'.\n" - " Possible C/C++ prototypes are:\n" - " std::vector< std::pair< std::string,std::string > >::__setitem__(PySliceObject *,std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > > const &)\n" - " std::vector< std::pair< std::string,std::string > >::__setitem__(PySliceObject *)\n" - " std::vector< std::pair< std::string,std::string > >::__setitem__(std::vector< std::pair< std::string,std::string > >::difference_type,std::vector< std::pair< std::string,std::string > >::value_type const &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_StringPairVector_pop(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< std::pair< std::string,std::string > > *arg1 = (std::vector< std::pair< std::string,std::string > > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::vector< std::pair< std::string,std::string > >::value_type result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringPairVector_pop" "', argument " "1"" of type '" "std::vector< std::pair< std::string,std::string > > *""'"); - } - arg1 = reinterpret_cast< std::vector< std::pair< std::string,std::string > > * >(argp1); - try { - result = std_vector_Sl_std_pair_Sl_std_string_Sc_std_string_Sg__Sg__pop(arg1); - } catch(std::out_of_range &_e) { - SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); - } - resultobj = swig::from(static_cast< std::pair< std::string,std::string > >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_StringPairVector_append(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< std::pair< std::string,std::string > > *arg1 = (std::vector< std::pair< std::string,std::string > > *) 0 ; - std::vector< std::pair< std::string,std::string > >::value_type *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 = SWIG_OLDOBJ ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args, "StringPairVector_append", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringPairVector_append" "', argument " "1"" of type '" "std::vector< std::pair< std::string,std::string > > *""'"); - } - arg1 = reinterpret_cast< std::vector< std::pair< std::string,std::string > > * >(argp1); - { - std::pair< std::string,std::string > *ptr = (std::pair< std::string,std::string > *)0; - res2 = swig::asptr(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "StringPairVector_append" "', argument " "2"" of type '" "std::vector< std::pair< std::string,std::string > >::value_type const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "StringPairVector_append" "', argument " "2"" of type '" "std::vector< std::pair< std::string,std::string > >::value_type const &""'"); - } - arg2 = ptr; - } - std_vector_Sl_std_pair_Sl_std_string_Sc_std_string_Sg__Sg__append(arg1,(std::pair< std::string,std::string > const &)*arg2); - resultobj = SWIG_Py_Void(); - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_StringPairVector__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **SWIGUNUSEDPARM(swig_obj)) { - PyObject *resultobj = 0; - std::vector< std::pair< std::string,std::string > > *result = 0 ; - - if ((nobjs < 0) || (nobjs > 0)) SWIG_fail; - result = (std::vector< std::pair< std::string,std::string > > *)new std::vector< std::pair< std::string,std::string > >(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_StringPairVector__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< std::pair< std::string,std::string > > *arg1 = 0 ; - int res1 = SWIG_OLDOBJ ; - std::vector< std::pair< std::string,std::string > > *result = 0 ; - - if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; - { - std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > > *ptr = (std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > > *)0; - res1 = swig::asptr(swig_obj[0], &ptr); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_StringPairVector" "', argument " "1"" of type '" "std::vector< std::pair< std::string,std::string > > const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_StringPairVector" "', argument " "1"" of type '" "std::vector< std::pair< std::string,std::string > > const &""'"); - } - arg1 = ptr; - } - result = (std::vector< std::pair< std::string,std::string > > *)new std::vector< std::pair< std::string,std::string > >((std::vector< std::pair< std::string,std::string > > const &)*arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_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_StringPairVector_empty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< std::pair< std::string,std::string > > *arg1 = (std::vector< std::pair< std::string,std::string > > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - bool result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringPairVector_empty" "', argument " "1"" of type '" "std::vector< std::pair< std::string,std::string > > const *""'"); - } - arg1 = reinterpret_cast< std::vector< std::pair< std::string,std::string > > * >(argp1); - result = (bool)((std::vector< std::pair< std::string,std::string > > const *)arg1)->empty(); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_StringPairVector_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< std::pair< std::string,std::string > > *arg1 = (std::vector< std::pair< std::string,std::string > > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::vector< std::pair< std::string,std::string > >::size_type result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringPairVector_size" "', argument " "1"" of type '" "std::vector< std::pair< std::string,std::string > > const *""'"); - } - arg1 = reinterpret_cast< std::vector< std::pair< std::string,std::string > > * >(argp1); - result = ((std::vector< std::pair< std::string,std::string > > const *)arg1)->size(); - resultobj = SWIG_From_size_t(static_cast< size_t >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_StringPairVector_swap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< std::pair< std::string,std::string > > *arg1 = (std::vector< std::pair< std::string,std::string > > *) 0 ; - std::vector< std::pair< std::string,std::string > > *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args, "StringPairVector_swap", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringPairVector_swap" "', argument " "1"" of type '" "std::vector< std::pair< std::string,std::string > > *""'"); - } - arg1 = reinterpret_cast< std::vector< std::pair< std::string,std::string > > * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t, 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "StringPairVector_swap" "', argument " "2"" of type '" "std::vector< std::pair< std::string,std::string > > &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "StringPairVector_swap" "', argument " "2"" of type '" "std::vector< std::pair< std::string,std::string > > &""'"); - } - arg2 = reinterpret_cast< std::vector< std::pair< std::string,std::string > > * >(argp2); - (arg1)->swap(*arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_StringPairVector_begin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< std::pair< std::string,std::string > > *arg1 = (std::vector< std::pair< std::string,std::string > > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::vector< std::pair< std::string,std::string > >::iterator result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringPairVector_begin" "', argument " "1"" of type '" "std::vector< std::pair< std::string,std::string > > *""'"); - } - arg1 = reinterpret_cast< std::vector< std::pair< std::string,std::string > > * >(argp1); - result = (arg1)->begin(); - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< std::pair< std::string,std::string > >::iterator & >(result)), - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_StringPairVector_end(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< std::pair< std::string,std::string > > *arg1 = (std::vector< std::pair< std::string,std::string > > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::vector< std::pair< std::string,std::string > >::iterator result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringPairVector_end" "', argument " "1"" of type '" "std::vector< std::pair< std::string,std::string > > *""'"); - } - arg1 = reinterpret_cast< std::vector< std::pair< std::string,std::string > > * >(argp1); - result = (arg1)->end(); - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< std::pair< std::string,std::string > >::iterator & >(result)), - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_StringPairVector_rbegin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< std::pair< std::string,std::string > > *arg1 = (std::vector< std::pair< std::string,std::string > > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::vector< std::pair< std::string,std::string > >::reverse_iterator result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringPairVector_rbegin" "', argument " "1"" of type '" "std::vector< std::pair< std::string,std::string > > *""'"); - } - arg1 = reinterpret_cast< std::vector< std::pair< std::string,std::string > > * >(argp1); - result = (arg1)->rbegin(); - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< std::pair< std::string,std::string > >::reverse_iterator & >(result)), - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_StringPairVector_rend(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< std::pair< std::string,std::string > > *arg1 = (std::vector< std::pair< std::string,std::string > > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::vector< std::pair< std::string,std::string > >::reverse_iterator result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringPairVector_rend" "', argument " "1"" of type '" "std::vector< std::pair< std::string,std::string > > *""'"); - } - arg1 = reinterpret_cast< std::vector< std::pair< std::string,std::string > > * >(argp1); - result = (arg1)->rend(); - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< std::pair< std::string,std::string > >::reverse_iterator & >(result)), - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_StringPairVector_clear(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< std::pair< std::string,std::string > > *arg1 = (std::vector< std::pair< std::string,std::string > > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringPairVector_clear" "', argument " "1"" of type '" "std::vector< std::pair< std::string,std::string > > *""'"); - } - arg1 = reinterpret_cast< std::vector< std::pair< std::string,std::string > > * >(argp1); - (arg1)->clear(); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_StringPairVector_get_allocator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< std::pair< std::string,std::string > > *arg1 = (std::vector< std::pair< std::string,std::string > > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - SwigValueWrapper< std::allocator< std::pair< std::string,std::string > > > result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringPairVector_get_allocator" "', argument " "1"" of type '" "std::vector< std::pair< std::string,std::string > > const *""'"); - } - arg1 = reinterpret_cast< std::vector< std::pair< std::string,std::string > > * >(argp1); - result = ((std::vector< std::pair< std::string,std::string > > const *)arg1)->get_allocator(); - resultobj = SWIG_NewPointerObj((new std::vector< std::pair< std::string,std::string > >::allocator_type(static_cast< const std::vector< std::pair< std::string,std::string > >::allocator_type& >(result))), SWIGTYPE_p_std__allocatorT_std__pairT_std__string_std__string_t_t, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_StringPairVector__SWIG_2(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< std::pair< std::string,std::string > >::size_type arg1 ; - size_t val1 ; - int ecode1 = 0 ; - std::vector< std::pair< std::string,std::string > > *result = 0 ; - - if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; - ecode1 = SWIG_AsVal_size_t(swig_obj[0], &val1); - if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_StringPairVector" "', argument " "1"" of type '" "std::vector< std::pair< std::string,std::string > >::size_type""'"); - } - arg1 = static_cast< std::vector< std::pair< std::string,std::string > >::size_type >(val1); - result = (std::vector< std::pair< std::string,std::string > > *)new std::vector< std::pair< std::string,std::string > >(arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_StringPairVector_pop_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< std::pair< std::string,std::string > > *arg1 = (std::vector< std::pair< std::string,std::string > > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringPairVector_pop_back" "', argument " "1"" of type '" "std::vector< std::pair< std::string,std::string > > *""'"); - } - arg1 = reinterpret_cast< std::vector< std::pair< std::string,std::string > > * >(argp1); - (arg1)->pop_back(); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_StringPairVector_resize__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< std::pair< std::string,std::string > > *arg1 = (std::vector< std::pair< std::string,std::string > > *) 0 ; - std::vector< std::pair< std::string,std::string > >::size_type arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - size_t val2 ; - int ecode2 = 0 ; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringPairVector_resize" "', argument " "1"" of type '" "std::vector< std::pair< std::string,std::string > > *""'"); - } - arg1 = reinterpret_cast< std::vector< std::pair< std::string,std::string > > * >(argp1); - ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "StringPairVector_resize" "', argument " "2"" of type '" "std::vector< std::pair< std::string,std::string > >::size_type""'"); - } - arg2 = static_cast< std::vector< std::pair< std::string,std::string > >::size_type >(val2); - (arg1)->resize(arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_StringPairVector_erase__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< std::pair< std::string,std::string > > *arg1 = (std::vector< std::pair< std::string,std::string > > *) 0 ; - std::vector< std::pair< std::string,std::string > >::iterator arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - swig::SwigPyIterator *iter2 = 0 ; - int res2 ; - std::vector< std::pair< std::string,std::string > >::iterator result; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringPairVector_erase" "', argument " "1"" of type '" "std::vector< std::pair< std::string,std::string > > *""'"); - } - arg1 = reinterpret_cast< std::vector< std::pair< std::string,std::string > > * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0); - if (!SWIG_IsOK(res2) || !iter2) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "StringPairVector_erase" "', argument " "2"" of type '" "std::vector< std::pair< std::string,std::string > >::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 '" "StringPairVector_erase" "', argument " "2"" of type '" "std::vector< std::pair< std::string,std::string > >::iterator""'"); - } - } - result = std_vector_Sl_std_pair_Sl_std_string_Sc_std_string_Sg__Sg__erase__SWIG_0(arg1,arg2); - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< std::pair< std::string,std::string > >::iterator & >(result)), - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_StringPairVector_erase__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< std::pair< std::string,std::string > > *arg1 = (std::vector< std::pair< std::string,std::string > > *) 0 ; - std::vector< std::pair< std::string,std::string > >::iterator arg2 ; - std::vector< std::pair< std::string,std::string > >::iterator arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - swig::SwigPyIterator *iter2 = 0 ; - int res2 ; - swig::SwigPyIterator *iter3 = 0 ; - int res3 ; - std::vector< std::pair< std::string,std::string > >::iterator result; - - if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringPairVector_erase" "', argument " "1"" of type '" "std::vector< std::pair< std::string,std::string > > *""'"); - } - arg1 = reinterpret_cast< std::vector< std::pair< std::string,std::string > > * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0); - if (!SWIG_IsOK(res2) || !iter2) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "StringPairVector_erase" "', argument " "2"" of type '" "std::vector< std::pair< std::string,std::string > >::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 '" "StringPairVector_erase" "', argument " "2"" of type '" "std::vector< std::pair< std::string,std::string > >::iterator""'"); - } - } - res3 = SWIG_ConvertPtr(swig_obj[2], SWIG_as_voidptrptr(&iter3), swig::SwigPyIterator::descriptor(), 0); - if (!SWIG_IsOK(res3) || !iter3) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "StringPairVector_erase" "', argument " "3"" of type '" "std::vector< std::pair< std::string,std::string > >::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 '" "StringPairVector_erase" "', argument " "3"" of type '" "std::vector< std::pair< std::string,std::string > >::iterator""'"); - } - } - result = std_vector_Sl_std_pair_Sl_std_string_Sc_std_string_Sg__Sg__erase__SWIG_1(arg1,arg2,arg3); - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< std::pair< std::string,std::string > >::iterator & >(result)), - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_StringPairVector_erase(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[4] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "StringPairVector_erase", 0, 3, argv))) SWIG_fail; - --argc; - if (argc == 2) { - int _v; - int res = swig::asptr(argv[0], (std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > >**)(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_StringPairVector_erase__SWIG_0(self, argc, argv); - } - } - } - if (argc == 3) { - int _v; - int res = swig::asptr(argv[0], (std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > >**)(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_StringPairVector_erase__SWIG_1(self, argc, argv); - } - } - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'StringPairVector_erase'.\n" - " Possible C/C++ prototypes are:\n" - " std::vector< std::pair< std::string,std::string > >::erase(std::vector< std::pair< std::string,std::string > >::iterator)\n" - " std::vector< std::pair< std::string,std::string > >::erase(std::vector< std::pair< std::string,std::string > >::iterator,std::vector< std::pair< std::string,std::string > >::iterator)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_new_StringPairVector__SWIG_3(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< std::pair< std::string,std::string > >::size_type arg1 ; - std::vector< std::pair< std::string,std::string > >::value_type *arg2 = 0 ; - size_t val1 ; - int ecode1 = 0 ; - int res2 = SWIG_OLDOBJ ; - std::vector< std::pair< std::string,std::string > > *result = 0 ; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - ecode1 = SWIG_AsVal_size_t(swig_obj[0], &val1); - if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_StringPairVector" "', argument " "1"" of type '" "std::vector< std::pair< std::string,std::string > >::size_type""'"); - } - arg1 = static_cast< std::vector< std::pair< std::string,std::string > >::size_type >(val1); - { - std::pair< std::string,std::string > *ptr = (std::pair< std::string,std::string > *)0; - res2 = swig::asptr(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_StringPairVector" "', argument " "2"" of type '" "std::vector< std::pair< std::string,std::string > >::value_type const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_StringPairVector" "', argument " "2"" of type '" "std::vector< std::pair< std::string,std::string > >::value_type const &""'"); - } - arg2 = ptr; - } - result = (std::vector< std::pair< std::string,std::string > > *)new std::vector< std::pair< std::string,std::string > >(arg1,(std::vector< std::pair< std::string,std::string > >::value_type const &)*arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t, SWIG_POINTER_NEW | 0 ); - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_StringPairVector(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[3] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "new_StringPairVector", 0, 2, argv))) SWIG_fail; - --argc; - if (argc == 0) { - return _wrap_new_StringPairVector__SWIG_0(self, argc, argv); - } - if (argc == 1) { - int _v; - { - int res = SWIG_AsVal_size_t(argv[0], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_new_StringPairVector__SWIG_2(self, argc, argv); - } - } - if (argc == 1) { - int _v; - int res = swig::asptr(argv[0], (std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_new_StringPairVector__SWIG_1(self, argc, argv); - } - } - if (argc == 2) { - int _v; - { - int res = SWIG_AsVal_size_t(argv[0], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - int res = swig::asptr(argv[1], (std::pair< std::string,std::string >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_new_StringPairVector__SWIG_3(self, argc, argv); - } - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'new_StringPairVector'.\n" - " Possible C/C++ prototypes are:\n" - " std::vector< std::pair< std::string,std::string > >::vector()\n" - " std::vector< std::pair< std::string,std::string > >::vector(std::vector< std::pair< std::string,std::string > > const &)\n" - " std::vector< std::pair< std::string,std::string > >::vector(std::vector< std::pair< std::string,std::string > >::size_type)\n" - " std::vector< std::pair< std::string,std::string > >::vector(std::vector< std::pair< std::string,std::string > >::size_type,std::vector< std::pair< std::string,std::string > >::value_type const &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_StringPairVector_push_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< std::pair< std::string,std::string > > *arg1 = (std::vector< std::pair< std::string,std::string > > *) 0 ; - std::vector< std::pair< std::string,std::string > >::value_type *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 = SWIG_OLDOBJ ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args, "StringPairVector_push_back", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringPairVector_push_back" "', argument " "1"" of type '" "std::vector< std::pair< std::string,std::string > > *""'"); - } - arg1 = reinterpret_cast< std::vector< std::pair< std::string,std::string > > * >(argp1); - { - std::pair< std::string,std::string > *ptr = (std::pair< std::string,std::string > *)0; - res2 = swig::asptr(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "StringPairVector_push_back" "', argument " "2"" of type '" "std::vector< std::pair< std::string,std::string > >::value_type const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "StringPairVector_push_back" "', argument " "2"" of type '" "std::vector< std::pair< std::string,std::string > >::value_type const &""'"); - } - arg2 = ptr; - } - (arg1)->push_back((std::vector< std::pair< std::string,std::string > >::value_type const &)*arg2); - resultobj = SWIG_Py_Void(); - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_StringPairVector_front(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< std::pair< std::string,std::string > > *arg1 = (std::vector< std::pair< std::string,std::string > > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::vector< std::pair< std::string,std::string > >::value_type *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringPairVector_front" "', argument " "1"" of type '" "std::vector< std::pair< std::string,std::string > > const *""'"); - } - arg1 = reinterpret_cast< std::vector< std::pair< std::string,std::string > > * >(argp1); - result = (std::vector< std::pair< std::string,std::string > >::value_type *) &((std::vector< std::pair< std::string,std::string > > const *)arg1)->front(); - resultobj = swig::from(static_cast< std::pair< std::string,std::string > >(*result)); - (void)swig::container_owner >::value_type>::category>::back_reference(resultobj, swig_obj[0]); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_StringPairVector_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< std::pair< std::string,std::string > > *arg1 = (std::vector< std::pair< std::string,std::string > > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::vector< std::pair< std::string,std::string > >::value_type *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringPairVector_back" "', argument " "1"" of type '" "std::vector< std::pair< std::string,std::string > > const *""'"); - } - arg1 = reinterpret_cast< std::vector< std::pair< std::string,std::string > > * >(argp1); - result = (std::vector< std::pair< std::string,std::string > >::value_type *) &((std::vector< std::pair< std::string,std::string > > const *)arg1)->back(); - resultobj = swig::from(static_cast< std::pair< std::string,std::string > >(*result)); - (void)swig::container_owner >::value_type>::category>::back_reference(resultobj, swig_obj[0]); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_StringPairVector_assign(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< std::pair< std::string,std::string > > *arg1 = (std::vector< std::pair< std::string,std::string > > *) 0 ; - std::vector< std::pair< std::string,std::string > >::size_type arg2 ; - std::vector< std::pair< std::string,std::string > >::value_type *arg3 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - size_t val2 ; - int ecode2 = 0 ; - int res3 = SWIG_OLDOBJ ; - PyObject *swig_obj[3] ; - - if (!SWIG_Python_UnpackTuple(args, "StringPairVector_assign", 3, 3, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringPairVector_assign" "', argument " "1"" of type '" "std::vector< std::pair< std::string,std::string > > *""'"); - } - arg1 = reinterpret_cast< std::vector< std::pair< std::string,std::string > > * >(argp1); - ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "StringPairVector_assign" "', argument " "2"" of type '" "std::vector< std::pair< std::string,std::string > >::size_type""'"); - } - arg2 = static_cast< std::vector< std::pair< std::string,std::string > >::size_type >(val2); - { - std::pair< std::string,std::string > *ptr = (std::pair< std::string,std::string > *)0; - res3 = swig::asptr(swig_obj[2], &ptr); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "StringPairVector_assign" "', argument " "3"" of type '" "std::vector< std::pair< std::string,std::string > >::value_type const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "StringPairVector_assign" "', argument " "3"" of type '" "std::vector< std::pair< std::string,std::string > >::value_type const &""'"); - } - arg3 = ptr; - } - (arg1)->assign(arg2,(std::vector< std::pair< std::string,std::string > >::value_type const &)*arg3); - resultobj = SWIG_Py_Void(); - if (SWIG_IsNewObj(res3)) delete arg3; - return resultobj; -fail: - if (SWIG_IsNewObj(res3)) delete arg3; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_StringPairVector_resize__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< std::pair< std::string,std::string > > *arg1 = (std::vector< std::pair< std::string,std::string > > *) 0 ; - std::vector< std::pair< std::string,std::string > >::size_type arg2 ; - std::vector< std::pair< std::string,std::string > >::value_type *arg3 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - size_t val2 ; - int ecode2 = 0 ; - int res3 = SWIG_OLDOBJ ; - - if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringPairVector_resize" "', argument " "1"" of type '" "std::vector< std::pair< std::string,std::string > > *""'"); - } - arg1 = reinterpret_cast< std::vector< std::pair< std::string,std::string > > * >(argp1); - ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "StringPairVector_resize" "', argument " "2"" of type '" "std::vector< std::pair< std::string,std::string > >::size_type""'"); - } - arg2 = static_cast< std::vector< std::pair< std::string,std::string > >::size_type >(val2); - { - std::pair< std::string,std::string > *ptr = (std::pair< std::string,std::string > *)0; - res3 = swig::asptr(swig_obj[2], &ptr); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "StringPairVector_resize" "', argument " "3"" of type '" "std::vector< std::pair< std::string,std::string > >::value_type const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "StringPairVector_resize" "', argument " "3"" of type '" "std::vector< std::pair< std::string,std::string > >::value_type const &""'"); - } - arg3 = ptr; - } - (arg1)->resize(arg2,(std::vector< std::pair< std::string,std::string > >::value_type const &)*arg3); - resultobj = SWIG_Py_Void(); - if (SWIG_IsNewObj(res3)) delete arg3; - return resultobj; -fail: - if (SWIG_IsNewObj(res3)) delete arg3; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_StringPairVector_resize(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[4] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "StringPairVector_resize", 0, 3, argv))) SWIG_fail; - --argc; - if (argc == 2) { - int _v; - int res = swig::asptr(argv[0], (std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_size_t(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_StringPairVector_resize__SWIG_0(self, argc, argv); - } - } - } - if (argc == 3) { - int _v; - int res = swig::asptr(argv[0], (std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_size_t(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - int res = swig::asptr(argv[2], (std::pair< std::string,std::string >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_StringPairVector_resize__SWIG_1(self, argc, argv); - } - } - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'StringPairVector_resize'.\n" - " Possible C/C++ prototypes are:\n" - " std::vector< std::pair< std::string,std::string > >::resize(std::vector< std::pair< std::string,std::string > >::size_type)\n" - " std::vector< std::pair< std::string,std::string > >::resize(std::vector< std::pair< std::string,std::string > >::size_type,std::vector< std::pair< std::string,std::string > >::value_type const &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_StringPairVector_insert__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< std::pair< std::string,std::string > > *arg1 = (std::vector< std::pair< std::string,std::string > > *) 0 ; - std::vector< std::pair< std::string,std::string > >::iterator arg2 ; - std::vector< std::pair< std::string,std::string > >::value_type *arg3 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - swig::SwigPyIterator *iter2 = 0 ; - int res2 ; - int res3 = SWIG_OLDOBJ ; - std::vector< std::pair< std::string,std::string > >::iterator result; - - if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringPairVector_insert" "', argument " "1"" of type '" "std::vector< std::pair< std::string,std::string > > *""'"); - } - arg1 = reinterpret_cast< std::vector< std::pair< std::string,std::string > > * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0); - if (!SWIG_IsOK(res2) || !iter2) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "StringPairVector_insert" "', argument " "2"" of type '" "std::vector< std::pair< std::string,std::string > >::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 '" "StringPairVector_insert" "', argument " "2"" of type '" "std::vector< std::pair< std::string,std::string > >::iterator""'"); - } - } - { - std::pair< std::string,std::string > *ptr = (std::pair< std::string,std::string > *)0; - res3 = swig::asptr(swig_obj[2], &ptr); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "StringPairVector_insert" "', argument " "3"" of type '" "std::vector< std::pair< std::string,std::string > >::value_type const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "StringPairVector_insert" "', argument " "3"" of type '" "std::vector< std::pair< std::string,std::string > >::value_type const &""'"); - } - arg3 = ptr; - } - result = std_vector_Sl_std_pair_Sl_std_string_Sc_std_string_Sg__Sg__insert__SWIG_0(arg1,arg2,(std::pair< std::string,std::string > const &)*arg3); - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< std::pair< std::string,std::string > >::iterator & >(result)), - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); - if (SWIG_IsNewObj(res3)) delete arg3; - return resultobj; -fail: - if (SWIG_IsNewObj(res3)) delete arg3; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_StringPairVector_insert__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< std::pair< std::string,std::string > > *arg1 = (std::vector< std::pair< std::string,std::string > > *) 0 ; - std::vector< std::pair< std::string,std::string > >::iterator arg2 ; - std::vector< std::pair< std::string,std::string > >::size_type arg3 ; - std::vector< std::pair< std::string,std::string > >::value_type *arg4 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - swig::SwigPyIterator *iter2 = 0 ; - int res2 ; - size_t val3 ; - int ecode3 = 0 ; - int res4 = SWIG_OLDOBJ ; - - if ((nobjs < 4) || (nobjs > 4)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringPairVector_insert" "', argument " "1"" of type '" "std::vector< std::pair< std::string,std::string > > *""'"); - } - arg1 = reinterpret_cast< std::vector< std::pair< std::string,std::string > > * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0); - if (!SWIG_IsOK(res2) || !iter2) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "StringPairVector_insert" "', argument " "2"" of type '" "std::vector< std::pair< std::string,std::string > >::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 '" "StringPairVector_insert" "', argument " "2"" of type '" "std::vector< std::pair< std::string,std::string > >::iterator""'"); - } - } - ecode3 = SWIG_AsVal_size_t(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "StringPairVector_insert" "', argument " "3"" of type '" "std::vector< std::pair< std::string,std::string > >::size_type""'"); - } - arg3 = static_cast< std::vector< std::pair< std::string,std::string > >::size_type >(val3); - { - std::pair< std::string,std::string > *ptr = (std::pair< std::string,std::string > *)0; - res4 = swig::asptr(swig_obj[3], &ptr); - if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "StringPairVector_insert" "', argument " "4"" of type '" "std::vector< std::pair< std::string,std::string > >::value_type const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "StringPairVector_insert" "', argument " "4"" of type '" "std::vector< std::pair< std::string,std::string > >::value_type const &""'"); - } - arg4 = ptr; - } - std_vector_Sl_std_pair_Sl_std_string_Sc_std_string_Sg__Sg__insert__SWIG_1(arg1,arg2,arg3,(std::pair< std::string,std::string > const &)*arg4); - resultobj = SWIG_Py_Void(); - if (SWIG_IsNewObj(res4)) delete arg4; - return resultobj; -fail: - if (SWIG_IsNewObj(res4)) delete arg4; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_StringPairVector_insert(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[5] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "StringPairVector_insert", 0, 4, argv))) SWIG_fail; - --argc; - if (argc == 3) { - int _v; - int res = swig::asptr(argv[0], (std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > >**)(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::asptr(argv[2], (std::pair< std::string,std::string >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_StringPairVector_insert__SWIG_0(self, argc, argv); - } - } - } - } - if (argc == 4) { - int _v; - int res = swig::asptr(argv[0], (std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > >**)(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_size_t(argv[2], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - int res = swig::asptr(argv[3], (std::pair< std::string,std::string >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_StringPairVector_insert__SWIG_1(self, argc, argv); - } - } - } - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'StringPairVector_insert'.\n" - " Possible C/C++ prototypes are:\n" - " std::vector< std::pair< std::string,std::string > >::insert(std::vector< std::pair< std::string,std::string > >::iterator,std::vector< std::pair< std::string,std::string > >::value_type const &)\n" - " std::vector< std::pair< std::string,std::string > >::insert(std::vector< std::pair< std::string,std::string > >::iterator,std::vector< std::pair< std::string,std::string > >::size_type,std::vector< std::pair< std::string,std::string > >::value_type const &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_StringPairVector_reserve(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< std::pair< std::string,std::string > > *arg1 = (std::vector< std::pair< std::string,std::string > > *) 0 ; - std::vector< std::pair< std::string,std::string > >::size_type arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - size_t val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args, "StringPairVector_reserve", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringPairVector_reserve" "', argument " "1"" of type '" "std::vector< std::pair< std::string,std::string > > *""'"); - } - arg1 = reinterpret_cast< std::vector< std::pair< std::string,std::string > > * >(argp1); - ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "StringPairVector_reserve" "', argument " "2"" of type '" "std::vector< std::pair< std::string,std::string > >::size_type""'"); - } - arg2 = static_cast< std::vector< std::pair< std::string,std::string > >::size_type >(val2); - (arg1)->reserve(arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_StringPairVector_capacity(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< std::pair< std::string,std::string > > *arg1 = (std::vector< std::pair< std::string,std::string > > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::vector< std::pair< std::string,std::string > >::size_type result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringPairVector_capacity" "', argument " "1"" of type '" "std::vector< std::pair< std::string,std::string > > const *""'"); - } - arg1 = reinterpret_cast< std::vector< std::pair< std::string,std::string > > * >(argp1); - result = ((std::vector< std::pair< std::string,std::string > > const *)arg1)->capacity(); - resultobj = SWIG_From_size_t(static_cast< size_t >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_StringPairVector(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< std::pair< std::string,std::string > > *arg1 = (std::vector< std::pair< std::string,std::string > > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_StringPairVector" "', argument " "1"" of type '" "std::vector< std::pair< std::string,std::string > > *""'"); - } - arg1 = reinterpret_cast< std::vector< std::pair< std::string,std::string > > * >(argp1); - delete arg1; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *StringPairVector_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *StringPairVector_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_FloatVector_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 *swig_obj[1] ; - swig::SwigPyIterator *result = 0 ; - - arg2 = &swig_obj[0]; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &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 '" "FloatVector_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_FloatVector___nonzero__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< float > *arg1 = (std::vector< float > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - bool result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &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 '" "FloatVector___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_FloatVector___bool__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< float > *arg1 = (std::vector< float > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - bool result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &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 '" "FloatVector___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_FloatVector___len__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< float > *arg1 = (std::vector< float > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::vector< float >::size_type result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &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 '" "FloatVector___len__" "', argument " "1"" of type '" "std::vector< float > const *""'"); - } - arg1 = reinterpret_cast< std::vector< float > * >(argp1); - result = std_vector_Sl_float_Sg____len__((std::vector< float > const *)arg1); - resultobj = SWIG_From_size_t(static_cast< size_t >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FloatVector___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 *swig_obj[3] ; - std::vector< float,std::allocator< float > > *result = 0 ; - - if (!SWIG_Python_UnpackTuple(args, "FloatVector___getslice__", 3, 3, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &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 '" "FloatVector___getslice__" "', argument " "1"" of type '" "std::vector< float > *""'"); - } - arg1 = reinterpret_cast< std::vector< float > * >(argp1); - ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FloatVector___getslice__" "', argument " "2"" of type '" "std::vector< float >::difference_type""'"); - } - arg2 = static_cast< std::vector< float >::difference_type >(val2); - ecode3 = SWIG_AsVal_ptrdiff_t(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "FloatVector___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()); - } catch(std::invalid_argument &_e) { - SWIG_exception_fail(SWIG_ValueError, (&_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_FloatVector___setslice____SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - 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 ; - - if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &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 '" "FloatVector___setslice__" "', argument " "1"" of type '" "std::vector< float > *""'"); - } - arg1 = reinterpret_cast< std::vector< float > * >(argp1); - ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FloatVector___setslice__" "', argument " "2"" of type '" "std::vector< float >::difference_type""'"); - } - arg2 = static_cast< std::vector< float >::difference_type >(val2); - ecode3 = SWIG_AsVal_ptrdiff_t(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "FloatVector___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_FloatVector___setslice____SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - 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 ; - - if ((nobjs < 4) || (nobjs > 4)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &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 '" "FloatVector___setslice__" "', argument " "1"" of type '" "std::vector< float > *""'"); - } - arg1 = reinterpret_cast< std::vector< float > * >(argp1); - ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FloatVector___setslice__" "', argument " "2"" of type '" "std::vector< float >::difference_type""'"); - } - arg2 = static_cast< std::vector< float >::difference_type >(val2); - ecode3 = SWIG_AsVal_ptrdiff_t(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "FloatVector___setslice__" "', argument " "3"" of type '" "std::vector< float >::difference_type""'"); - } - arg3 = static_cast< std::vector< float >::difference_type >(val3); - { - std::vector< float,std::allocator< float > > *ptr = (std::vector< float,std::allocator< float > > *)0; - res4 = swig::asptr(swig_obj[3], &ptr); - if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "FloatVector___setslice__" "', argument " "4"" of type '" "std::vector< float,std::allocator< float > > const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FloatVector___setslice__" "', argument " "4"" of type '" "std::vector< float,std::allocator< float > > const &""'"); - } - arg4 = ptr; - } - try { - std_vector_Sl_float_Sg____setslice____SWIG_1(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_FloatVector___setslice__(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[5] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "FloatVector___setslice__", 0, 4, argv))) SWIG_fail; - --argc; - if (argc == 3) { - int _v; - int res = swig::asptr(argv[0], (std::vector< float,std::allocator< float > >**)(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_FloatVector___setslice____SWIG_0(self, argc, argv); - } - } - } - } - if (argc == 4) { - int _v; - int res = swig::asptr(argv[0], (std::vector< float,std::allocator< float > >**)(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< float,std::allocator< float > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_FloatVector___setslice____SWIG_1(self, argc, argv); - } - } - } - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'FloatVector___setslice__'.\n" - " Possible C/C++ prototypes are:\n" - " std::vector< float >::__setslice__(std::vector< float >::difference_type,std::vector< float >::difference_type)\n" - " std::vector< float >::__setslice__(std::vector< float >::difference_type,std::vector< float >::difference_type,std::vector< float,std::allocator< float > > const &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_FloatVector___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 *swig_obj[3] ; - - if (!SWIG_Python_UnpackTuple(args, "FloatVector___delslice__", 3, 3, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &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 '" "FloatVector___delslice__" "', argument " "1"" of type '" "std::vector< float > *""'"); - } - arg1 = reinterpret_cast< std::vector< float > * >(argp1); - ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FloatVector___delslice__" "', argument " "2"" of type '" "std::vector< float >::difference_type""'"); - } - arg2 = static_cast< std::vector< float >::difference_type >(val2); - ecode3 = SWIG_AsVal_ptrdiff_t(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "FloatVector___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()); - } catch(std::invalid_argument &_e) { - SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FloatVector___delitem____SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - 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 ; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &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 '" "FloatVector___delitem__" "', argument " "1"" of type '" "std::vector< float > *""'"); - } - arg1 = reinterpret_cast< std::vector< float > * >(argp1); - ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FloatVector___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()); - } catch(std::invalid_argument &_e) { - SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FloatVector___getitem____SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< float > *arg1 = (std::vector< float > *) 0 ; - PySliceObject *arg2 = (PySliceObject *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::vector< float,std::allocator< float > > *result = 0 ; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &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 '" "FloatVector___getitem__" "', argument " "1"" of type '" "std::vector< float > *""'"); - } - arg1 = reinterpret_cast< std::vector< float > * >(argp1); - { - if (!PySlice_Check(swig_obj[1])) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "FloatVector___getitem__" "', argument " "2"" of type '" "PySliceObject *""'"); - } - arg2 = (PySliceObject *) swig_obj[1]; - } - 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()); - } catch(std::invalid_argument &_e) { - SWIG_exception_fail(SWIG_ValueError, (&_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_FloatVector___setitem____SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - 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 ; - - if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &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 '" "FloatVector___setitem__" "', argument " "1"" of type '" "std::vector< float > *""'"); - } - arg1 = reinterpret_cast< std::vector< float > * >(argp1); - { - if (!PySlice_Check(swig_obj[1])) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "FloatVector___setitem__" "', argument " "2"" of type '" "PySliceObject *""'"); - } - arg2 = (PySliceObject *) swig_obj[1]; - } - { - std::vector< float,std::allocator< float > > *ptr = (std::vector< float,std::allocator< float > > *)0; - res3 = swig::asptr(swig_obj[2], &ptr); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "FloatVector___setitem__" "', argument " "3"" of type '" "std::vector< float,std::allocator< float > > const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FloatVector___setitem__" "', argument " "3"" of type '" "std::vector< float,std::allocator< float > > const &""'"); - } - arg3 = ptr; - } - try { - std_vector_Sl_float_Sg____setitem____SWIG_0(arg1,arg2,(std::vector< float,std::allocator< float > > 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_FloatVector___setitem____SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< float > *arg1 = (std::vector< float > *) 0 ; - PySliceObject *arg2 = (PySliceObject *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &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 '" "FloatVector___setitem__" "', argument " "1"" of type '" "std::vector< float > *""'"); - } - arg1 = reinterpret_cast< std::vector< float > * >(argp1); - { - if (!PySlice_Check(swig_obj[1])) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "FloatVector___setitem__" "', argument " "2"" of type '" "PySliceObject *""'"); - } - arg2 = (PySliceObject *) swig_obj[1]; - } - try { - std_vector_Sl_float_Sg____setitem____SWIG_1(arg1,arg2); - } 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_FloatVector___delitem____SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< float > *arg1 = (std::vector< float > *) 0 ; - PySliceObject *arg2 = (PySliceObject *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &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 '" "FloatVector___delitem__" "', argument " "1"" of type '" "std::vector< float > *""'"); - } - arg1 = reinterpret_cast< std::vector< float > * >(argp1); - { - if (!PySlice_Check(swig_obj[1])) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "FloatVector___delitem__" "', argument " "2"" of type '" "PySliceObject *""'"); - } - arg2 = (PySliceObject *) swig_obj[1]; - } - try { - std_vector_Sl_float_Sg____delitem____SWIG_1(arg1,arg2); - } 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_FloatVector___delitem__(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[3] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "FloatVector___delitem__", 0, 2, argv))) SWIG_fail; - --argc; - if (argc == 2) { - int _v; - int res = swig::asptr(argv[0], (std::vector< float,std::allocator< float > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - { - _v = PySlice_Check(argv[1]); - } - if (_v) { - return _wrap_FloatVector___delitem____SWIG_1(self, argc, argv); - } - } - } - if (argc == 2) { - int _v; - int res = swig::asptr(argv[0], (std::vector< float,std::allocator< float > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_FloatVector___delitem____SWIG_0(self, argc, argv); - } - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'FloatVector___delitem__'.\n" - " Possible C/C++ prototypes are:\n" - " std::vector< float >::__delitem__(std::vector< float >::difference_type)\n" - " std::vector< float >::__delitem__(PySliceObject *)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_FloatVector___getitem____SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - 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 ; - std::vector< float >::value_type *result = 0 ; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &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 '" "FloatVector___getitem__" "', argument " "1"" of type '" "std::vector< float > const *""'"); - } - arg1 = reinterpret_cast< std::vector< float > * >(argp1); - ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FloatVector___getitem__" "', argument " "2"" of type '" "std::vector< float >::difference_type""'"); - } - arg2 = static_cast< std::vector< float >::difference_type >(val2); - try { - result = (std::vector< float >::value_type *) &std_vector_Sl_float_Sg____getitem____SWIG_1((std::vector< float > const *)arg1,arg2); - } catch(std::out_of_range &_e) { - SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); - } - resultobj = SWIG_From_float(static_cast< float >(*result)); - (void)swig::container_owner::value_type>::category>::back_reference(resultobj, swig_obj[0]); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FloatVector___getitem__(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[3] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "FloatVector___getitem__", 0, 2, argv))) SWIG_fail; - --argc; - if (argc == 2) { - int _v; - int res = swig::asptr(argv[0], (std::vector< float,std::allocator< float > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - { - _v = PySlice_Check(argv[1]); - } - if (_v) { - return _wrap_FloatVector___getitem____SWIG_0(self, argc, argv); - } - } - } - if (argc == 2) { - int _v; - int res = swig::asptr(argv[0], (std::vector< float,std::allocator< float > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_FloatVector___getitem____SWIG_1(self, argc, argv); - } - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'FloatVector___getitem__'.\n" - " Possible C/C++ prototypes are:\n" - " std::vector< float >::__getitem__(PySliceObject *)\n" - " std::vector< float >::__getitem__(std::vector< float >::difference_type) const\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_FloatVector___setitem____SWIG_2(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< float > *arg1 = (std::vector< float > *) 0 ; - std::vector< float >::difference_type arg2 ; - std::vector< float >::value_type *arg3 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - ptrdiff_t val2 ; - int ecode2 = 0 ; - std::vector< float >::value_type temp3 ; - float val3 ; - int ecode3 = 0 ; - - if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &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 '" "FloatVector___setitem__" "', argument " "1"" of type '" "std::vector< float > *""'"); - } - arg1 = reinterpret_cast< std::vector< float > * >(argp1); - ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FloatVector___setitem__" "', argument " "2"" of type '" "std::vector< float >::difference_type""'"); - } - arg2 = static_cast< std::vector< float >::difference_type >(val2); - ecode3 = SWIG_AsVal_float(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "FloatVector___setitem__" "', argument " "3"" of type '" "std::vector< float >::value_type""'"); - } - temp3 = static_cast< std::vector< float >::value_type >(val3); - arg3 = &temp3; - try { - std_vector_Sl_float_Sg____setitem____SWIG_2(arg1,arg2,(float 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_FloatVector___setitem__(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[4] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "FloatVector___setitem__", 0, 3, argv))) SWIG_fail; - --argc; - if (argc == 2) { - int _v; - int res = swig::asptr(argv[0], (std::vector< float,std::allocator< float > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - { - _v = PySlice_Check(argv[1]); - } - if (_v) { - return _wrap_FloatVector___setitem____SWIG_1(self, argc, argv); - } - } - } - if (argc == 3) { - int _v; - int res = swig::asptr(argv[0], (std::vector< float,std::allocator< float > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - { - _v = PySlice_Check(argv[1]); - } - if (_v) { - int res = swig::asptr(argv[2], (std::vector< float,std::allocator< float > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_FloatVector___setitem____SWIG_0(self, argc, argv); - } - } - } - } - if (argc == 3) { - int _v; - int res = swig::asptr(argv[0], (std::vector< float,std::allocator< float > >**)(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_float(argv[2], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_FloatVector___setitem____SWIG_2(self, argc, argv); - } - } - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'FloatVector___setitem__'.\n" - " Possible C/C++ prototypes are:\n" - " std::vector< float >::__setitem__(PySliceObject *,std::vector< float,std::allocator< float > > const &)\n" - " std::vector< float >::__setitem__(PySliceObject *)\n" - " std::vector< float >::__setitem__(std::vector< float >::difference_type,std::vector< float >::value_type const &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_FloatVector_pop(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< float > *arg1 = (std::vector< float > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::vector< float >::value_type result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &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 '" "FloatVector_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_FloatVector_append(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< float > *arg1 = (std::vector< float > *) 0 ; - std::vector< float >::value_type *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::vector< float >::value_type temp2 ; - float val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args, "FloatVector_append", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &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 '" "FloatVector_append" "', argument " "1"" of type '" "std::vector< float > *""'"); - } - arg1 = reinterpret_cast< std::vector< float > * >(argp1); - ecode2 = SWIG_AsVal_float(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FloatVector_append" "', argument " "2"" of type '" "std::vector< float >::value_type""'"); - } - temp2 = static_cast< std::vector< float >::value_type >(val2); - arg2 = &temp2; - std_vector_Sl_float_Sg__append(arg1,(float const &)*arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_FloatVector__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **SWIGUNUSEDPARM(swig_obj)) { - PyObject *resultobj = 0; - std::vector< float > *result = 0 ; - - if ((nobjs < 0) || (nobjs > 0)) SWIG_fail; - result = (std::vector< float > *)new std::vector< float >(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_float_std__allocatorT_float_t_t, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_FloatVector__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< float > *arg1 = 0 ; - int res1 = SWIG_OLDOBJ ; - std::vector< float > *result = 0 ; - - if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; - { - std::vector< float,std::allocator< float > > *ptr = (std::vector< float,std::allocator< float > > *)0; - res1 = swig::asptr(swig_obj[0], &ptr); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FloatVector" "', argument " "1"" of type '" "std::vector< float > const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FloatVector" "', argument " "1"" of type '" "std::vector< float > const &""'"); - } - arg1 = ptr; - } - result = (std::vector< float > *)new std::vector< float >((std::vector< float > const &)*arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_float_std__allocatorT_float_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_FloatVector_empty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< float > *arg1 = (std::vector< float > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - bool result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &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 '" "FloatVector_empty" "', argument " "1"" of type '" "std::vector< float > const *""'"); - } - arg1 = reinterpret_cast< std::vector< float > * >(argp1); - result = (bool)((std::vector< float > const *)arg1)->empty(); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FloatVector_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< float > *arg1 = (std::vector< float > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::vector< float >::size_type result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &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 '" "FloatVector_size" "', argument " "1"" of type '" "std::vector< float > const *""'"); - } - arg1 = reinterpret_cast< std::vector< float > * >(argp1); - result = ((std::vector< float > const *)arg1)->size(); - resultobj = SWIG_From_size_t(static_cast< size_t >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FloatVector_swap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< float > *arg1 = (std::vector< float > *) 0 ; - std::vector< float > *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args, "FloatVector_swap", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &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 '" "FloatVector_swap" "', argument " "1"" of type '" "std::vector< float > *""'"); - } - arg1 = reinterpret_cast< std::vector< float > * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_std__vectorT_float_std__allocatorT_float_t_t, 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FloatVector_swap" "', argument " "2"" of type '" "std::vector< float > &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FloatVector_swap" "', argument " "2"" of type '" "std::vector< float > &""'"); - } - arg2 = reinterpret_cast< std::vector< float > * >(argp2); - (arg1)->swap(*arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FloatVector_begin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< float > *arg1 = (std::vector< float > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::vector< float >::iterator result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &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 '" "FloatVector_begin" "', argument " "1"" of type '" "std::vector< float > *""'"); - } - arg1 = reinterpret_cast< std::vector< float > * >(argp1); - result = (arg1)->begin(); - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< float >::iterator & >(result)), - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FloatVector_end(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< float > *arg1 = (std::vector< float > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::vector< float >::iterator result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &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 '" "FloatVector_end" "', argument " "1"" of type '" "std::vector< float > *""'"); - } - arg1 = reinterpret_cast< std::vector< float > * >(argp1); - result = (arg1)->end(); - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< float >::iterator & >(result)), - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FloatVector_rbegin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< float > *arg1 = (std::vector< float > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::vector< float >::reverse_iterator result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &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 '" "FloatVector_rbegin" "', argument " "1"" of type '" "std::vector< float > *""'"); - } - arg1 = reinterpret_cast< std::vector< float > * >(argp1); - result = (arg1)->rbegin(); - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< float >::reverse_iterator & >(result)), - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FloatVector_rend(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< float > *arg1 = (std::vector< float > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::vector< float >::reverse_iterator result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &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 '" "FloatVector_rend" "', argument " "1"" of type '" "std::vector< float > *""'"); - } - arg1 = reinterpret_cast< std::vector< float > * >(argp1); - result = (arg1)->rend(); - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< float >::reverse_iterator & >(result)), - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FloatVector_clear(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< float > *arg1 = (std::vector< float > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &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 '" "FloatVector_clear" "', argument " "1"" of type '" "std::vector< float > *""'"); - } - arg1 = reinterpret_cast< std::vector< float > * >(argp1); - (arg1)->clear(); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FloatVector_get_allocator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< float > *arg1 = (std::vector< float > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - SwigValueWrapper< std::allocator< float > > result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &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 '" "FloatVector_get_allocator" "', argument " "1"" of type '" "std::vector< float > const *""'"); - } - arg1 = reinterpret_cast< std::vector< float > * >(argp1); - result = ((std::vector< float > const *)arg1)->get_allocator(); - resultobj = SWIG_NewPointerObj((new std::vector< float >::allocator_type(static_cast< const std::vector< float >::allocator_type& >(result))), SWIGTYPE_p_std__allocatorT_float_t, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_FloatVector__SWIG_2(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< float >::size_type arg1 ; - size_t val1 ; - int ecode1 = 0 ; - std::vector< float > *result = 0 ; - - if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; - ecode1 = SWIG_AsVal_size_t(swig_obj[0], &val1); - if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_FloatVector" "', argument " "1"" of type '" "std::vector< float >::size_type""'"); - } - arg1 = static_cast< std::vector< float >::size_type >(val1); - result = (std::vector< float > *)new std::vector< float >(arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_float_std__allocatorT_float_t_t, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FloatVector_pop_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< float > *arg1 = (std::vector< float > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &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 '" "FloatVector_pop_back" "', argument " "1"" of type '" "std::vector< float > *""'"); - } - arg1 = reinterpret_cast< std::vector< float > * >(argp1); - (arg1)->pop_back(); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FloatVector_resize__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< float > *arg1 = (std::vector< float > *) 0 ; - std::vector< float >::size_type arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - size_t val2 ; - int ecode2 = 0 ; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &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 '" "FloatVector_resize" "', argument " "1"" of type '" "std::vector< float > *""'"); - } - arg1 = reinterpret_cast< std::vector< float > * >(argp1); - ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FloatVector_resize" "', argument " "2"" of type '" "std::vector< float >::size_type""'"); - } - arg2 = static_cast< std::vector< float >::size_type >(val2); - (arg1)->resize(arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FloatVector_erase__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< float > *arg1 = (std::vector< float > *) 0 ; - std::vector< float >::iterator arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - swig::SwigPyIterator *iter2 = 0 ; - int res2 ; - std::vector< float >::iterator result; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &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 '" "FloatVector_erase" "', argument " "1"" of type '" "std::vector< float > *""'"); - } - arg1 = reinterpret_cast< std::vector< float > * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0); - if (!SWIG_IsOK(res2) || !iter2) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "FloatVector_erase" "', argument " "2"" of type '" "std::vector< float >::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 '" "FloatVector_erase" "', argument " "2"" of type '" "std::vector< float >::iterator""'"); - } - } - result = std_vector_Sl_float_Sg__erase__SWIG_0(arg1,arg2); - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< float >::iterator & >(result)), - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FloatVector_erase__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< float > *arg1 = (std::vector< float > *) 0 ; - std::vector< float >::iterator arg2 ; - std::vector< float >::iterator arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - swig::SwigPyIterator *iter2 = 0 ; - int res2 ; - swig::SwigPyIterator *iter3 = 0 ; - int res3 ; - std::vector< float >::iterator result; - - if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &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 '" "FloatVector_erase" "', argument " "1"" of type '" "std::vector< float > *""'"); - } - arg1 = reinterpret_cast< std::vector< float > * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0); - if (!SWIG_IsOK(res2) || !iter2) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "FloatVector_erase" "', argument " "2"" of type '" "std::vector< float >::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 '" "FloatVector_erase" "', argument " "2"" of type '" "std::vector< float >::iterator""'"); - } - } - res3 = SWIG_ConvertPtr(swig_obj[2], SWIG_as_voidptrptr(&iter3), swig::SwigPyIterator::descriptor(), 0); - if (!SWIG_IsOK(res3) || !iter3) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "FloatVector_erase" "', argument " "3"" of type '" "std::vector< float >::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 '" "FloatVector_erase" "', argument " "3"" of type '" "std::vector< float >::iterator""'"); - } - } - result = std_vector_Sl_float_Sg__erase__SWIG_1(arg1,arg2,arg3); - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< float >::iterator & >(result)), - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FloatVector_erase(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[4] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "FloatVector_erase", 0, 3, argv))) SWIG_fail; - --argc; - if (argc == 2) { - int _v; - int res = swig::asptr(argv[0], (std::vector< float,std::allocator< float > >**)(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_FloatVector_erase__SWIG_0(self, argc, argv); - } - } - } - if (argc == 3) { - int _v; - int res = swig::asptr(argv[0], (std::vector< float,std::allocator< float > >**)(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_FloatVector_erase__SWIG_1(self, argc, argv); - } - } - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'FloatVector_erase'.\n" - " Possible C/C++ prototypes are:\n" - " std::vector< float >::erase(std::vector< float >::iterator)\n" - " std::vector< float >::erase(std::vector< float >::iterator,std::vector< float >::iterator)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_new_FloatVector__SWIG_3(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< float >::size_type arg1 ; - std::vector< float >::value_type *arg2 = 0 ; - size_t val1 ; - int ecode1 = 0 ; - std::vector< float >::value_type temp2 ; - float val2 ; - int ecode2 = 0 ; - std::vector< float > *result = 0 ; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - ecode1 = SWIG_AsVal_size_t(swig_obj[0], &val1); - if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_FloatVector" "', argument " "1"" of type '" "std::vector< float >::size_type""'"); - } - arg1 = static_cast< std::vector< float >::size_type >(val1); - ecode2 = SWIG_AsVal_float(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_FloatVector" "', argument " "2"" of type '" "std::vector< float >::value_type""'"); - } - temp2 = static_cast< std::vector< float >::value_type >(val2); - arg2 = &temp2; - result = (std::vector< float > *)new std::vector< float >(arg1,(std::vector< float >::value_type const &)*arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_float_std__allocatorT_float_t_t, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_FloatVector(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[3] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "new_FloatVector", 0, 2, argv))) SWIG_fail; - --argc; - if (argc == 0) { - return _wrap_new_FloatVector__SWIG_0(self, argc, argv); - } - if (argc == 1) { - int _v; - { - int res = SWIG_AsVal_size_t(argv[0], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_new_FloatVector__SWIG_2(self, argc, argv); - } - } - if (argc == 1) { - int _v; - int res = swig::asptr(argv[0], (std::vector< float,std::allocator< float > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_new_FloatVector__SWIG_1(self, argc, argv); - } - } - if (argc == 2) { - int _v; - { - int res = SWIG_AsVal_size_t(argv[0], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - { - int res = SWIG_AsVal_float(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_new_FloatVector__SWIG_3(self, argc, argv); - } - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'new_FloatVector'.\n" - " Possible C/C++ prototypes are:\n" - " std::vector< float >::vector()\n" - " std::vector< float >::vector(std::vector< float > const &)\n" - " std::vector< float >::vector(std::vector< float >::size_type)\n" - " std::vector< float >::vector(std::vector< float >::size_type,std::vector< float >::value_type const &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_FloatVector_push_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< float > *arg1 = (std::vector< float > *) 0 ; - std::vector< float >::value_type *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::vector< float >::value_type temp2 ; - float val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args, "FloatVector_push_back", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &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 '" "FloatVector_push_back" "', argument " "1"" of type '" "std::vector< float > *""'"); - } - arg1 = reinterpret_cast< std::vector< float > * >(argp1); - ecode2 = SWIG_AsVal_float(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FloatVector_push_back" "', argument " "2"" of type '" "std::vector< float >::value_type""'"); - } - temp2 = static_cast< std::vector< float >::value_type >(val2); - arg2 = &temp2; - (arg1)->push_back((std::vector< float >::value_type const &)*arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FloatVector_front(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< float > *arg1 = (std::vector< float > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::vector< float >::value_type *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &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 '" "FloatVector_front" "', argument " "1"" of type '" "std::vector< float > const *""'"); - } - arg1 = reinterpret_cast< std::vector< float > * >(argp1); - result = (std::vector< float >::value_type *) &((std::vector< float > const *)arg1)->front(); - resultobj = SWIG_From_float(static_cast< float >(*result)); - (void)swig::container_owner::value_type>::category>::back_reference(resultobj, swig_obj[0]); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FloatVector_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< float > *arg1 = (std::vector< float > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::vector< float >::value_type *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &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 '" "FloatVector_back" "', argument " "1"" of type '" "std::vector< float > const *""'"); - } - arg1 = reinterpret_cast< std::vector< float > * >(argp1); - result = (std::vector< float >::value_type *) &((std::vector< float > const *)arg1)->back(); - resultobj = SWIG_From_float(static_cast< float >(*result)); - (void)swig::container_owner::value_type>::category>::back_reference(resultobj, swig_obj[0]); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FloatVector_assign(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< float > *arg1 = (std::vector< float > *) 0 ; - std::vector< float >::size_type arg2 ; - std::vector< float >::value_type *arg3 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - size_t val2 ; - int ecode2 = 0 ; - std::vector< float >::value_type temp3 ; - float val3 ; - int ecode3 = 0 ; - PyObject *swig_obj[3] ; - - if (!SWIG_Python_UnpackTuple(args, "FloatVector_assign", 3, 3, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &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 '" "FloatVector_assign" "', argument " "1"" of type '" "std::vector< float > *""'"); - } - arg1 = reinterpret_cast< std::vector< float > * >(argp1); - ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FloatVector_assign" "', argument " "2"" of type '" "std::vector< float >::size_type""'"); - } - arg2 = static_cast< std::vector< float >::size_type >(val2); - ecode3 = SWIG_AsVal_float(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "FloatVector_assign" "', argument " "3"" of type '" "std::vector< float >::value_type""'"); - } - temp3 = static_cast< std::vector< float >::value_type >(val3); - arg3 = &temp3; - (arg1)->assign(arg2,(std::vector< float >::value_type const &)*arg3); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FloatVector_resize__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< float > *arg1 = (std::vector< float > *) 0 ; - std::vector< float >::size_type arg2 ; - std::vector< float >::value_type *arg3 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - size_t val2 ; - int ecode2 = 0 ; - std::vector< float >::value_type temp3 ; - float val3 ; - int ecode3 = 0 ; - - if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &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 '" "FloatVector_resize" "', argument " "1"" of type '" "std::vector< float > *""'"); - } - arg1 = reinterpret_cast< std::vector< float > * >(argp1); - ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FloatVector_resize" "', argument " "2"" of type '" "std::vector< float >::size_type""'"); - } - arg2 = static_cast< std::vector< float >::size_type >(val2); - ecode3 = SWIG_AsVal_float(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "FloatVector_resize" "', argument " "3"" of type '" "std::vector< float >::value_type""'"); - } - temp3 = static_cast< std::vector< float >::value_type >(val3); - arg3 = &temp3; - (arg1)->resize(arg2,(std::vector< float >::value_type const &)*arg3); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FloatVector_resize(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[4] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "FloatVector_resize", 0, 3, argv))) SWIG_fail; - --argc; - if (argc == 2) { - int _v; - int res = swig::asptr(argv[0], (std::vector< float,std::allocator< float > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_size_t(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_FloatVector_resize__SWIG_0(self, argc, argv); - } - } - } - if (argc == 3) { - int _v; - int res = swig::asptr(argv[0], (std::vector< float,std::allocator< float > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_size_t(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - { - int res = SWIG_AsVal_float(argv[2], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_FloatVector_resize__SWIG_1(self, argc, argv); - } - } - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'FloatVector_resize'.\n" - " Possible C/C++ prototypes are:\n" - " std::vector< float >::resize(std::vector< float >::size_type)\n" - " std::vector< float >::resize(std::vector< float >::size_type,std::vector< float >::value_type const &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_FloatVector_insert__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< float > *arg1 = (std::vector< float > *) 0 ; - std::vector< float >::iterator arg2 ; - std::vector< float >::value_type *arg3 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - swig::SwigPyIterator *iter2 = 0 ; - int res2 ; - std::vector< float >::value_type temp3 ; - float val3 ; - int ecode3 = 0 ; - std::vector< float >::iterator result; - - if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &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 '" "FloatVector_insert" "', argument " "1"" of type '" "std::vector< float > *""'"); - } - arg1 = reinterpret_cast< std::vector< float > * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0); - if (!SWIG_IsOK(res2) || !iter2) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "FloatVector_insert" "', argument " "2"" of type '" "std::vector< float >::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 '" "FloatVector_insert" "', argument " "2"" of type '" "std::vector< float >::iterator""'"); - } - } - ecode3 = SWIG_AsVal_float(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "FloatVector_insert" "', argument " "3"" of type '" "std::vector< float >::value_type""'"); - } - temp3 = static_cast< std::vector< float >::value_type >(val3); - arg3 = &temp3; - result = std_vector_Sl_float_Sg__insert__SWIG_0(arg1,arg2,(float const &)*arg3); - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< float >::iterator & >(result)), - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FloatVector_insert__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< float > *arg1 = (std::vector< float > *) 0 ; - std::vector< float >::iterator arg2 ; - std::vector< float >::size_type arg3 ; - std::vector< float >::value_type *arg4 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - swig::SwigPyIterator *iter2 = 0 ; - int res2 ; - size_t val3 ; - int ecode3 = 0 ; - std::vector< float >::value_type temp4 ; - float val4 ; - int ecode4 = 0 ; - - if ((nobjs < 4) || (nobjs > 4)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &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 '" "FloatVector_insert" "', argument " "1"" of type '" "std::vector< float > *""'"); - } - arg1 = reinterpret_cast< std::vector< float > * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0); - if (!SWIG_IsOK(res2) || !iter2) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "FloatVector_insert" "', argument " "2"" of type '" "std::vector< float >::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 '" "FloatVector_insert" "', argument " "2"" of type '" "std::vector< float >::iterator""'"); - } - } - ecode3 = SWIG_AsVal_size_t(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "FloatVector_insert" "', argument " "3"" of type '" "std::vector< float >::size_type""'"); - } - arg3 = static_cast< std::vector< float >::size_type >(val3); - ecode4 = SWIG_AsVal_float(swig_obj[3], &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "FloatVector_insert" "', argument " "4"" of type '" "std::vector< float >::value_type""'"); - } - temp4 = static_cast< std::vector< float >::value_type >(val4); - arg4 = &temp4; - std_vector_Sl_float_Sg__insert__SWIG_1(arg1,arg2,arg3,(float const &)*arg4); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FloatVector_insert(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[5] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "FloatVector_insert", 0, 4, argv))) SWIG_fail; - --argc; - if (argc == 3) { - int _v; - int res = swig::asptr(argv[0], (std::vector< float,std::allocator< float > >**)(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_float(argv[2], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_FloatVector_insert__SWIG_0(self, argc, argv); - } - } - } - } - if (argc == 4) { - int _v; - int res = swig::asptr(argv[0], (std::vector< float,std::allocator< float > >**)(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_size_t(argv[2], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - { - int res = SWIG_AsVal_float(argv[3], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_FloatVector_insert__SWIG_1(self, argc, argv); - } - } - } - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'FloatVector_insert'.\n" - " Possible C/C++ prototypes are:\n" - " std::vector< float >::insert(std::vector< float >::iterator,std::vector< float >::value_type const &)\n" - " std::vector< float >::insert(std::vector< float >::iterator,std::vector< float >::size_type,std::vector< float >::value_type const &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_FloatVector_reserve(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< float > *arg1 = (std::vector< float > *) 0 ; - std::vector< float >::size_type arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - size_t val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args, "FloatVector_reserve", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &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 '" "FloatVector_reserve" "', argument " "1"" of type '" "std::vector< float > *""'"); - } - arg1 = reinterpret_cast< std::vector< float > * >(argp1); - ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FloatVector_reserve" "', argument " "2"" of type '" "std::vector< float >::size_type""'"); - } - arg2 = static_cast< std::vector< float >::size_type >(val2); - (arg1)->reserve(arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FloatVector_capacity(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< float > *arg1 = (std::vector< float > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::vector< float >::size_type result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &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 '" "FloatVector_capacity" "', argument " "1"" of type '" "std::vector< float > const *""'"); - } - arg1 = reinterpret_cast< std::vector< float > * >(argp1); - result = ((std::vector< float > const *)arg1)->capacity(); - resultobj = SWIG_From_size_t(static_cast< size_t >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_FloatVector(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< float > *arg1 = (std::vector< float > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_float_std__allocatorT_float_t_t, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_FloatVector" "', argument " "1"" of type '" "std::vector< float > *""'"); - } - arg1 = reinterpret_cast< std::vector< float > * >(argp1); - delete arg1; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *FloatVector_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_std__vectorT_float_std__allocatorT_float_t_t, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *FloatVector_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_new_StringSet__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::less< std::string > *arg1 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::set< std::string > *result = 0 ; - - if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_std__lessT_std__string_t, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_StringSet" "', argument " "1"" of type '" "std::less< std::string > const &""'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_StringSet" "', argument " "1"" of type '" "std::less< std::string > const &""'"); - } - arg1 = reinterpret_cast< std::less< std::string > * >(argp1); - result = (std::set< std::string > *)new std::set< std::string >((std::less< std::string > const &)*arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__setT_std__string_std__lessT_std__string_t_std__allocatorT_std__string_t_t, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_StringSet_iterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::set< std::string > *arg1 = (std::set< std::string > *) 0 ; - PyObject **arg2 = (PyObject **) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - swig::SwigPyIterator *result = 0 ; - - arg2 = &swig_obj[0]; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__setT_std__string_std__lessT_std__string_t_std__allocatorT_std__string_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringSet_iterator" "', argument " "1"" of type '" "std::set< std::string > *""'"); - } - arg1 = reinterpret_cast< std::set< std::string > * >(argp1); - result = (swig::SwigPyIterator *)std_set_Sl_std_string_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_StringSet___nonzero__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::set< std::string > *arg1 = (std::set< std::string > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - bool result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__setT_std__string_std__lessT_std__string_t_std__allocatorT_std__string_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringSet___nonzero__" "', argument " "1"" of type '" "std::set< std::string > const *""'"); - } - arg1 = reinterpret_cast< std::set< std::string > * >(argp1); - result = (bool)std_set_Sl_std_string_Sg____nonzero__((std::set< std::string > const *)arg1); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_StringSet___bool__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::set< std::string > *arg1 = (std::set< std::string > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - bool result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__setT_std__string_std__lessT_std__string_t_std__allocatorT_std__string_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringSet___bool__" "', argument " "1"" of type '" "std::set< std::string > const *""'"); - } - arg1 = reinterpret_cast< std::set< std::string > * >(argp1); - result = (bool)std_set_Sl_std_string_Sg____bool__((std::set< std::string > const *)arg1); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_StringSet___len__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::set< std::string > *arg1 = (std::set< std::string > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::set< std::string >::size_type result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__setT_std__string_std__lessT_std__string_t_std__allocatorT_std__string_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringSet___len__" "', argument " "1"" of type '" "std::set< std::string > const *""'"); - } - arg1 = reinterpret_cast< std::set< std::string > * >(argp1); - result = std_set_Sl_std_string_Sg____len__((std::set< std::string > const *)arg1); - resultobj = SWIG_From_size_t(static_cast< size_t >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_StringSet_append(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::set< std::string > *arg1 = (std::set< std::string > *) 0 ; - std::set< std::string >::value_type arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args, "StringSet_append", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__setT_std__string_std__lessT_std__string_t_std__allocatorT_std__string_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringSet_append" "', argument " "1"" of type '" "std::set< std::string > *""'"); - } - arg1 = reinterpret_cast< std::set< std::string > * >(argp1); - { - std::string *ptr = (std::string *)0; - int res = SWIG_AsPtr_std_string(swig_obj[1], &ptr); - if (!SWIG_IsOK(res) || !ptr) { - SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "StringSet_append" "', argument " "2"" of type '" "std::set< std::string >::value_type""'"); - } - arg2 = *ptr; - if (SWIG_IsNewObj(res)) delete ptr; - } - std_set_Sl_std_string_Sg__append(arg1,arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_StringSet___contains__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::set< std::string > *arg1 = (std::set< std::string > *) 0 ; - std::set< std::string >::value_type arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[2] ; - bool result; - - if (!SWIG_Python_UnpackTuple(args, "StringSet___contains__", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__setT_std__string_std__lessT_std__string_t_std__allocatorT_std__string_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringSet___contains__" "', argument " "1"" of type '" "std::set< std::string > *""'"); - } - arg1 = reinterpret_cast< std::set< std::string > * >(argp1); - { - std::string *ptr = (std::string *)0; - int res = SWIG_AsPtr_std_string(swig_obj[1], &ptr); - if (!SWIG_IsOK(res) || !ptr) { - SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "StringSet___contains__" "', argument " "2"" of type '" "std::set< std::string >::value_type""'"); - } - arg2 = *ptr; - if (SWIG_IsNewObj(res)) delete ptr; - } - result = (bool)std_set_Sl_std_string_Sg____contains__(arg1,arg2); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_StringSet___getitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::set< std::string > *arg1 = (std::set< std::string > *) 0 ; - std::set< std::string >::difference_type arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - ptrdiff_t val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - std::set< std::string >::value_type result; - - if (!SWIG_Python_UnpackTuple(args, "StringSet___getitem__", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__setT_std__string_std__lessT_std__string_t_std__allocatorT_std__string_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringSet___getitem__" "', argument " "1"" of type '" "std::set< std::string > const *""'"); - } - arg1 = reinterpret_cast< std::set< std::string > * >(argp1); - ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "StringSet___getitem__" "', argument " "2"" of type '" "std::set< std::string >::difference_type""'"); - } - arg2 = static_cast< std::set< std::string >::difference_type >(val2); - try { - result = std_set_Sl_std_string_Sg____getitem__((std::set< std::string > const *)arg1,arg2); - } catch(std::out_of_range &_e) { - SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); - } - resultobj = SWIG_From_std_string(static_cast< std::string >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_StringSet_add(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::set< std::string > *arg1 = (std::set< std::string > *) 0 ; - std::set< std::string >::value_type arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args, "StringSet_add", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__setT_std__string_std__lessT_std__string_t_std__allocatorT_std__string_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringSet_add" "', argument " "1"" of type '" "std::set< std::string > *""'"); - } - arg1 = reinterpret_cast< std::set< std::string > * >(argp1); - { - std::string *ptr = (std::string *)0; - int res = SWIG_AsPtr_std_string(swig_obj[1], &ptr); - if (!SWIG_IsOK(res) || !ptr) { - SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "StringSet_add" "', argument " "2"" of type '" "std::set< std::string >::value_type""'"); - } - arg2 = *ptr; - if (SWIG_IsNewObj(res)) delete ptr; - } - std_set_Sl_std_string_Sg__add(arg1,arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_StringSet_discard(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::set< std::string > *arg1 = (std::set< std::string > *) 0 ; - std::set< std::string >::value_type arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args, "StringSet_discard", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__setT_std__string_std__lessT_std__string_t_std__allocatorT_std__string_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringSet_discard" "', argument " "1"" of type '" "std::set< std::string > *""'"); - } - arg1 = reinterpret_cast< std::set< std::string > * >(argp1); - { - std::string *ptr = (std::string *)0; - int res = SWIG_AsPtr_std_string(swig_obj[1], &ptr); - if (!SWIG_IsOK(res) || !ptr) { - SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "StringSet_discard" "', argument " "2"" of type '" "std::set< std::string >::value_type""'"); - } - arg2 = *ptr; - if (SWIG_IsNewObj(res)) delete ptr; - } - std_set_Sl_std_string_Sg__discard(arg1,arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_StringSet__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **SWIGUNUSEDPARM(swig_obj)) { - PyObject *resultobj = 0; - std::set< std::string > *result = 0 ; - - if ((nobjs < 0) || (nobjs > 0)) SWIG_fail; - result = (std::set< std::string > *)new std::set< std::string >(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__setT_std__string_std__lessT_std__string_t_std__allocatorT_std__string_t_t, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_StringSet__SWIG_2(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::set< std::string > *arg1 = 0 ; - int res1 = SWIG_OLDOBJ ; - std::set< std::string > *result = 0 ; - - if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; - { - std::set< std::string,std::less< std::string >,std::allocator< std::string > > *ptr = (std::set< std::string,std::less< std::string >,std::allocator< std::string > > *)0; - res1 = swig::asptr(swig_obj[0], &ptr); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_StringSet" "', argument " "1"" of type '" "std::set< std::string > const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_StringSet" "', argument " "1"" of type '" "std::set< std::string > const &""'"); - } - arg1 = ptr; - } - result = (std::set< std::string > *)new std::set< std::string >((std::set< std::string > const &)*arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__setT_std__string_std__lessT_std__string_t_std__allocatorT_std__string_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_new_StringSet(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[2] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "new_StringSet", 0, 1, argv))) SWIG_fail; - --argc; - if (argc == 0) { - return _wrap_new_StringSet__SWIG_1(self, argc, argv); - } - if (argc == 1) { - int _v; - int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_std__lessT_std__string_t, SWIG_POINTER_NO_NULL | 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_new_StringSet__SWIG_0(self, argc, argv); - } - } - if (argc == 1) { - int _v; - int res = swig::asptr(argv[0], (std::set< std::string,std::less< std::string >,std::allocator< std::string > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_new_StringSet__SWIG_2(self, argc, argv); - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'new_StringSet'.\n" - " Possible C/C++ prototypes are:\n" - " std::set< std::string >::set(std::less< std::string > const &)\n" - " std::set< std::string >::set()\n" - " std::set< std::string >::set(std::set< std::string > const &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_StringSet_empty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::set< std::string > *arg1 = (std::set< std::string > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - bool result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__setT_std__string_std__lessT_std__string_t_std__allocatorT_std__string_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringSet_empty" "', argument " "1"" of type '" "std::set< std::string > const *""'"); - } - arg1 = reinterpret_cast< std::set< std::string > * >(argp1); - result = (bool)((std::set< std::string > const *)arg1)->empty(); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_StringSet_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::set< std::string > *arg1 = (std::set< std::string > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::set< std::string >::size_type result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__setT_std__string_std__lessT_std__string_t_std__allocatorT_std__string_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringSet_size" "', argument " "1"" of type '" "std::set< std::string > const *""'"); - } - arg1 = reinterpret_cast< std::set< std::string > * >(argp1); - result = ((std::set< std::string > const *)arg1)->size(); - resultobj = SWIG_From_size_t(static_cast< size_t >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_StringSet_clear(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::set< std::string > *arg1 = (std::set< std::string > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__setT_std__string_std__lessT_std__string_t_std__allocatorT_std__string_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringSet_clear" "', argument " "1"" of type '" "std::set< std::string > *""'"); - } - arg1 = reinterpret_cast< std::set< std::string > * >(argp1); - (arg1)->clear(); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_StringSet_swap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::set< std::string > *arg1 = (std::set< std::string > *) 0 ; - std::set< std::string > *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args, "StringSet_swap", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__setT_std__string_std__lessT_std__string_t_std__allocatorT_std__string_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringSet_swap" "', argument " "1"" of type '" "std::set< std::string > *""'"); - } - arg1 = reinterpret_cast< std::set< std::string > * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_std__setT_std__string_std__lessT_std__string_t_std__allocatorT_std__string_t_t, 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "StringSet_swap" "', argument " "2"" of type '" "std::set< std::string > &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "StringSet_swap" "', argument " "2"" of type '" "std::set< std::string > &""'"); - } - arg2 = reinterpret_cast< std::set< std::string > * >(argp2); - (arg1)->swap(*arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_StringSet_erase__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::set< std::string > *arg1 = (std::set< std::string > *) 0 ; - std::set< std::string >::key_type *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 = SWIG_OLDOBJ ; - std::set< std::string >::size_type result; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__setT_std__string_std__lessT_std__string_t_std__allocatorT_std__string_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringSet_erase" "', argument " "1"" of type '" "std::set< std::string > *""'"); - } - arg1 = reinterpret_cast< std::set< std::string > * >(argp1); - { - std::string *ptr = (std::string *)0; - res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "StringSet_erase" "', argument " "2"" of type '" "std::set< std::string >::key_type const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "StringSet_erase" "', argument " "2"" of type '" "std::set< std::string >::key_type const &""'"); - } - arg2 = ptr; - } - result = (arg1)->erase((std::set< std::string >::key_type const &)*arg2); - resultobj = SWIG_From_size_t(static_cast< size_t >(result)); - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_StringSet_count(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::set< std::string > *arg1 = (std::set< std::string > *) 0 ; - std::set< std::string >::key_type *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 = SWIG_OLDOBJ ; - PyObject *swig_obj[2] ; - std::set< std::string >::size_type result; - - if (!SWIG_Python_UnpackTuple(args, "StringSet_count", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__setT_std__string_std__lessT_std__string_t_std__allocatorT_std__string_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringSet_count" "', argument " "1"" of type '" "std::set< std::string > const *""'"); - } - arg1 = reinterpret_cast< std::set< std::string > * >(argp1); - { - std::string *ptr = (std::string *)0; - res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "StringSet_count" "', argument " "2"" of type '" "std::set< std::string >::key_type const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "StringSet_count" "', argument " "2"" of type '" "std::set< std::string >::key_type const &""'"); - } - arg2 = ptr; - } - result = ((std::set< std::string > const *)arg1)->count((std::set< std::string >::key_type const &)*arg2); - resultobj = SWIG_From_size_t(static_cast< size_t >(result)); - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_StringSet_begin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::set< std::string > *arg1 = (std::set< std::string > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::set< std::string >::iterator result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__setT_std__string_std__lessT_std__string_t_std__allocatorT_std__string_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringSet_begin" "', argument " "1"" of type '" "std::set< std::string > *""'"); - } - arg1 = reinterpret_cast< std::set< std::string > * >(argp1); - result = (arg1)->begin(); - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::set< std::string >::iterator & >(result)), - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_StringSet_end(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::set< std::string > *arg1 = (std::set< std::string > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::set< std::string >::iterator result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__setT_std__string_std__lessT_std__string_t_std__allocatorT_std__string_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringSet_end" "', argument " "1"" of type '" "std::set< std::string > *""'"); - } - arg1 = reinterpret_cast< std::set< std::string > * >(argp1); - result = (arg1)->end(); - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::set< std::string >::iterator & >(result)), - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_StringSet_rbegin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::set< std::string > *arg1 = (std::set< std::string > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::set< std::string >::reverse_iterator result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__setT_std__string_std__lessT_std__string_t_std__allocatorT_std__string_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringSet_rbegin" "', argument " "1"" of type '" "std::set< std::string > *""'"); - } - arg1 = reinterpret_cast< std::set< std::string > * >(argp1); - result = (arg1)->rbegin(); - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::set< std::string >::reverse_iterator & >(result)), - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_StringSet_rend(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::set< std::string > *arg1 = (std::set< std::string > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::set< std::string >::reverse_iterator result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__setT_std__string_std__lessT_std__string_t_std__allocatorT_std__string_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringSet_rend" "', argument " "1"" of type '" "std::set< std::string > *""'"); - } - arg1 = reinterpret_cast< std::set< std::string > * >(argp1); - result = (arg1)->rend(); - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::set< std::string >::reverse_iterator & >(result)), - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_StringSet_erase__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::set< std::string > *arg1 = (std::set< std::string > *) 0 ; - std::set< std::string >::iterator arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - swig::SwigPyIterator *iter2 = 0 ; - int res2 ; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__setT_std__string_std__lessT_std__string_t_std__allocatorT_std__string_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringSet_erase" "', argument " "1"" of type '" "std::set< std::string > *""'"); - } - arg1 = reinterpret_cast< std::set< std::string > * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0); - if (!SWIG_IsOK(res2) || !iter2) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "StringSet_erase" "', argument " "2"" of type '" "std::set< std::string >::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 '" "StringSet_erase" "', argument " "2"" of type '" "std::set< std::string >::iterator""'"); - } - } - std_set_Sl_std_string_Sg__erase__SWIG_1(arg1,arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_StringSet_erase__SWIG_2(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::set< std::string > *arg1 = (std::set< std::string > *) 0 ; - std::set< std::string >::iterator arg2 ; - std::set< std::string >::iterator arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - swig::SwigPyIterator *iter2 = 0 ; - int res2 ; - swig::SwigPyIterator *iter3 = 0 ; - int res3 ; - - if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__setT_std__string_std__lessT_std__string_t_std__allocatorT_std__string_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringSet_erase" "', argument " "1"" of type '" "std::set< std::string > *""'"); - } - arg1 = reinterpret_cast< std::set< std::string > * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0); - if (!SWIG_IsOK(res2) || !iter2) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "StringSet_erase" "', argument " "2"" of type '" "std::set< std::string >::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 '" "StringSet_erase" "', argument " "2"" of type '" "std::set< std::string >::iterator""'"); - } - } - res3 = SWIG_ConvertPtr(swig_obj[2], SWIG_as_voidptrptr(&iter3), swig::SwigPyIterator::descriptor(), 0); - if (!SWIG_IsOK(res3) || !iter3) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "StringSet_erase" "', argument " "3"" of type '" "std::set< std::string >::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 '" "StringSet_erase" "', argument " "3"" of type '" "std::set< std::string >::iterator""'"); - } - } - std_set_Sl_std_string_Sg__erase__SWIG_2(arg1,arg2,arg3); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_StringSet_erase(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[4] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "StringSet_erase", 0, 3, argv))) SWIG_fail; - --argc; - if (argc == 2) { - int _v; - int res = swig::asptr(argv[0], (std::set< std::string,std::less< std::string >,std::allocator< std::string > >**)(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_StringSet_erase__SWIG_1(self, argc, argv); - } - } - } - if (argc == 2) { - int _v; - int res = swig::asptr(argv[0], (std::set< std::string,std::less< std::string >,std::allocator< std::string > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_AsPtr_std_string(argv[1], (std::string**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_StringSet_erase__SWIG_0(self, argc, argv); - } - } - } - if (argc == 3) { - int _v; - int res = swig::asptr(argv[0], (std::set< std::string,std::less< std::string >,std::allocator< std::string > >**)(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_StringSet_erase__SWIG_2(self, argc, argv); - } - } - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'StringSet_erase'.\n" - " Possible C/C++ prototypes are:\n" - " std::set< std::string >::erase(std::set< std::string >::key_type const &)\n" - " std::set< std::string >::erase(std::set< std::string >::iterator)\n" - " std::set< std::string >::erase(std::set< std::string >::iterator,std::set< std::string >::iterator)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_StringSet_find(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::set< std::string > *arg1 = (std::set< std::string > *) 0 ; - std::set< std::string >::key_type *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 = SWIG_OLDOBJ ; - PyObject *swig_obj[2] ; - std::set< std::string >::iterator result; - - if (!SWIG_Python_UnpackTuple(args, "StringSet_find", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__setT_std__string_std__lessT_std__string_t_std__allocatorT_std__string_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringSet_find" "', argument " "1"" of type '" "std::set< std::string > *""'"); - } - arg1 = reinterpret_cast< std::set< std::string > * >(argp1); - { - std::string *ptr = (std::string *)0; - res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "StringSet_find" "', argument " "2"" of type '" "std::set< std::string >::key_type const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "StringSet_find" "', argument " "2"" of type '" "std::set< std::string >::key_type const &""'"); - } - arg2 = ptr; - } - result = (arg1)->find((std::set< std::string >::key_type const &)*arg2); - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::set< std::string >::iterator & >(result)), - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_StringSet_lower_bound(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::set< std::string > *arg1 = (std::set< std::string > *) 0 ; - std::set< std::string >::key_type *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 = SWIG_OLDOBJ ; - PyObject *swig_obj[2] ; - std::set< std::string >::iterator result; - - if (!SWIG_Python_UnpackTuple(args, "StringSet_lower_bound", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__setT_std__string_std__lessT_std__string_t_std__allocatorT_std__string_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringSet_lower_bound" "', argument " "1"" of type '" "std::set< std::string > *""'"); - } - arg1 = reinterpret_cast< std::set< std::string > * >(argp1); - { - std::string *ptr = (std::string *)0; - res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "StringSet_lower_bound" "', argument " "2"" of type '" "std::set< std::string >::key_type const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "StringSet_lower_bound" "', argument " "2"" of type '" "std::set< std::string >::key_type const &""'"); - } - arg2 = ptr; - } - result = (arg1)->lower_bound((std::set< std::string >::key_type const &)*arg2); - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::set< std::string >::iterator & >(result)), - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_StringSet_upper_bound(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::set< std::string > *arg1 = (std::set< std::string > *) 0 ; - std::set< std::string >::key_type *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 = SWIG_OLDOBJ ; - PyObject *swig_obj[2] ; - std::set< std::string >::iterator result; - - if (!SWIG_Python_UnpackTuple(args, "StringSet_upper_bound", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__setT_std__string_std__lessT_std__string_t_std__allocatorT_std__string_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringSet_upper_bound" "', argument " "1"" of type '" "std::set< std::string > *""'"); - } - arg1 = reinterpret_cast< std::set< std::string > * >(argp1); - { - std::string *ptr = (std::string *)0; - res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "StringSet_upper_bound" "', argument " "2"" of type '" "std::set< std::string >::key_type const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "StringSet_upper_bound" "', argument " "2"" of type '" "std::set< std::string >::key_type const &""'"); - } - arg2 = ptr; - } - result = (arg1)->upper_bound((std::set< std::string >::key_type const &)*arg2); - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::set< std::string >::iterator & >(result)), - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_StringSet_equal_range(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::set< std::string > *arg1 = (std::set< std::string > *) 0 ; - std::set< std::string >::key_type *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 = SWIG_OLDOBJ ; - PyObject *swig_obj[2] ; - SwigValueWrapper< std::pair< std::set< std::string >::iterator,std::set< std::string >::iterator > > result; - - if (!SWIG_Python_UnpackTuple(args, "StringSet_equal_range", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__setT_std__string_std__lessT_std__string_t_std__allocatorT_std__string_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringSet_equal_range" "', argument " "1"" of type '" "std::set< std::string > *""'"); - } - arg1 = reinterpret_cast< std::set< std::string > * >(argp1); - { - std::string *ptr = (std::string *)0; - res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "StringSet_equal_range" "', argument " "2"" of type '" "std::set< std::string >::key_type const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "StringSet_equal_range" "', argument " "2"" of type '" "std::set< std::string >::key_type const &""'"); - } - arg2 = ptr; - } - result = (arg1)->equal_range((std::set< std::string >::key_type const &)*arg2); - resultobj = PyTuple_New(2); - PyTuple_SetItem(resultobj,0,SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::pair< std::set< std::string >::iterator,std::set< std::string >::iterator > & >(result).first), - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN)); - PyTuple_SetItem(resultobj,1,SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::pair< std::set< std::string >::iterator,std::set< std::string >::iterator > & >(result).second), - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN)); - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_StringSet_insert(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::set< std::string > *arg1 = (std::set< std::string > *) 0 ; - std::set< std::string >::value_type *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 = SWIG_OLDOBJ ; - PyObject *swig_obj[2] ; - SwigValueWrapper< std::pair< std::set< std::string >::iterator,bool > > result; - - if (!SWIG_Python_UnpackTuple(args, "StringSet_insert", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__setT_std__string_std__lessT_std__string_t_std__allocatorT_std__string_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringSet_insert" "', argument " "1"" of type '" "std::set< std::string > *""'"); - } - arg1 = reinterpret_cast< std::set< std::string > * >(argp1); - { - std::string *ptr = (std::string *)0; - res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "StringSet_insert" "', argument " "2"" of type '" "std::set< std::string >::value_type const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "StringSet_insert" "', argument " "2"" of type '" "std::set< std::string >::value_type const &""'"); - } - arg2 = ptr; - } - result = (arg1)->insert((std::set< std::string >::value_type const &)*arg2); - resultobj = PyTuple_New(2); - PyTuple_SetItem(resultobj,0,SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::pair< std::set< std::string >::iterator,bool > & >(result).first), - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN)); - PyTuple_SetItem(resultobj,1,SWIG_From_bool (static_cast< const std::pair< std::set< std::string >::iterator,bool > & >(result).second)); - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_StringSet(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::set< std::string > *arg1 = (std::set< std::string > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__setT_std__string_std__lessT_std__string_t_std__allocatorT_std__string_t_t, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_StringSet" "', argument " "1"" of type '" "std::set< std::string > *""'"); - } - arg1 = reinterpret_cast< std::set< std::string > * >(argp1); - delete arg1; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *StringSet_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_std__setT_std__string_std__lessT_std__string_t_std__allocatorT_std__string_t_t, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *StringSet_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_new_StringPairSet__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::less< std::pair< std::string,std::string > > *arg1 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::set< std::pair< std::string,std::string > > *result = 0 ; - - if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_std__lessT_std__pairT_std__string_std__string_t_t, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_StringPairSet" "', argument " "1"" of type '" "std::less< std::pair< std::string,std::string > > const &""'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_StringPairSet" "', argument " "1"" of type '" "std::less< std::pair< std::string,std::string > > const &""'"); - } - arg1 = reinterpret_cast< std::less< std::pair< std::string,std::string > > * >(argp1); - result = (std::set< std::pair< std::string,std::string > > *)new std::set< std::pair< std::string,std::string > >((std::less< std::pair< std::string,std::string > > const &)*arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__setT_std__pairT_std__string_std__string_t_std__lessT_std__pairT_std__string_std__string_t_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_StringPairSet_iterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::set< std::pair< std::string,std::string > > *arg1 = (std::set< std::pair< std::string,std::string > > *) 0 ; - PyObject **arg2 = (PyObject **) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - swig::SwigPyIterator *result = 0 ; - - arg2 = &swig_obj[0]; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__setT_std__pairT_std__string_std__string_t_std__lessT_std__pairT_std__string_std__string_t_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringPairSet_iterator" "', argument " "1"" of type '" "std::set< std::pair< std::string,std::string > > *""'"); - } - arg1 = reinterpret_cast< std::set< std::pair< std::string,std::string > > * >(argp1); - result = (swig::SwigPyIterator *)std_set_Sl_std_pair_Sl_std_string_Sc_std_string_Sg__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_StringPairSet___nonzero__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::set< std::pair< std::string,std::string > > *arg1 = (std::set< std::pair< std::string,std::string > > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - bool result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__setT_std__pairT_std__string_std__string_t_std__lessT_std__pairT_std__string_std__string_t_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringPairSet___nonzero__" "', argument " "1"" of type '" "std::set< std::pair< std::string,std::string > > const *""'"); - } - arg1 = reinterpret_cast< std::set< std::pair< std::string,std::string > > * >(argp1); - result = (bool)std_set_Sl_std_pair_Sl_std_string_Sc_std_string_Sg__Sg____nonzero__((std::set< std::pair< std::string,std::string > > const *)arg1); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_StringPairSet___bool__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::set< std::pair< std::string,std::string > > *arg1 = (std::set< std::pair< std::string,std::string > > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - bool result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__setT_std__pairT_std__string_std__string_t_std__lessT_std__pairT_std__string_std__string_t_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringPairSet___bool__" "', argument " "1"" of type '" "std::set< std::pair< std::string,std::string > > const *""'"); - } - arg1 = reinterpret_cast< std::set< std::pair< std::string,std::string > > * >(argp1); - result = (bool)std_set_Sl_std_pair_Sl_std_string_Sc_std_string_Sg__Sg____bool__((std::set< std::pair< std::string,std::string > > const *)arg1); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_StringPairSet___len__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::set< std::pair< std::string,std::string > > *arg1 = (std::set< std::pair< std::string,std::string > > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::set< std::pair< std::string,std::string > >::size_type result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__setT_std__pairT_std__string_std__string_t_std__lessT_std__pairT_std__string_std__string_t_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringPairSet___len__" "', argument " "1"" of type '" "std::set< std::pair< std::string,std::string > > const *""'"); - } - arg1 = reinterpret_cast< std::set< std::pair< std::string,std::string > > * >(argp1); - result = std_set_Sl_std_pair_Sl_std_string_Sc_std_string_Sg__Sg____len__((std::set< std::pair< std::string,std::string > > const *)arg1); - resultobj = SWIG_From_size_t(static_cast< size_t >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_StringPairSet_append(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::set< std::pair< std::string,std::string > > *arg1 = (std::set< std::pair< std::string,std::string > > *) 0 ; - std::set< std::pair< std::string,std::string > >::value_type arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args, "StringPairSet_append", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__setT_std__pairT_std__string_std__string_t_std__lessT_std__pairT_std__string_std__string_t_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringPairSet_append" "', argument " "1"" of type '" "std::set< std::pair< std::string,std::string > > *""'"); - } - arg1 = reinterpret_cast< std::set< std::pair< std::string,std::string > > * >(argp1); - { - std::pair< std::string,std::string > *ptr = (std::pair< std::string,std::string > *)0; - int res = swig::asptr(swig_obj[1], &ptr); - if (!SWIG_IsOK(res) || !ptr) { - SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "StringPairSet_append" "', argument " "2"" of type '" "std::set< std::pair< std::string,std::string > >::value_type""'"); - } - arg2 = *ptr; - if (SWIG_IsNewObj(res)) delete ptr; - } - std_set_Sl_std_pair_Sl_std_string_Sc_std_string_Sg__Sg__append(arg1,arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_StringPairSet___contains__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::set< std::pair< std::string,std::string > > *arg1 = (std::set< std::pair< std::string,std::string > > *) 0 ; - std::set< std::pair< std::string,std::string > >::value_type arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[2] ; - bool result; - - if (!SWIG_Python_UnpackTuple(args, "StringPairSet___contains__", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__setT_std__pairT_std__string_std__string_t_std__lessT_std__pairT_std__string_std__string_t_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringPairSet___contains__" "', argument " "1"" of type '" "std::set< std::pair< std::string,std::string > > *""'"); - } - arg1 = reinterpret_cast< std::set< std::pair< std::string,std::string > > * >(argp1); - { - std::pair< std::string,std::string > *ptr = (std::pair< std::string,std::string > *)0; - int res = swig::asptr(swig_obj[1], &ptr); - if (!SWIG_IsOK(res) || !ptr) { - SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "StringPairSet___contains__" "', argument " "2"" of type '" "std::set< std::pair< std::string,std::string > >::value_type""'"); - } - arg2 = *ptr; - if (SWIG_IsNewObj(res)) delete ptr; - } - result = (bool)std_set_Sl_std_pair_Sl_std_string_Sc_std_string_Sg__Sg____contains__(arg1,arg2); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_StringPairSet___getitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::set< std::pair< std::string,std::string > > *arg1 = (std::set< std::pair< std::string,std::string > > *) 0 ; - std::set< std::pair< std::string,std::string > >::difference_type arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - ptrdiff_t val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - std::set< std::pair< std::string,std::string > >::value_type result; - - if (!SWIG_Python_UnpackTuple(args, "StringPairSet___getitem__", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__setT_std__pairT_std__string_std__string_t_std__lessT_std__pairT_std__string_std__string_t_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringPairSet___getitem__" "', argument " "1"" of type '" "std::set< std::pair< std::string,std::string > > const *""'"); - } - arg1 = reinterpret_cast< std::set< std::pair< std::string,std::string > > * >(argp1); - ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "StringPairSet___getitem__" "', argument " "2"" of type '" "std::set< std::pair< std::string,std::string > >::difference_type""'"); - } - arg2 = static_cast< std::set< std::pair< std::string,std::string > >::difference_type >(val2); - try { - result = std_set_Sl_std_pair_Sl_std_string_Sc_std_string_Sg__Sg____getitem__((std::set< std::pair< std::string,std::string > > const *)arg1,arg2); - } catch(std::out_of_range &_e) { - SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); - } - resultobj = swig::from(static_cast< std::pair< std::string,std::string > >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_StringPairSet_add(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::set< std::pair< std::string,std::string > > *arg1 = (std::set< std::pair< std::string,std::string > > *) 0 ; - std::set< std::pair< std::string,std::string > >::value_type arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args, "StringPairSet_add", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__setT_std__pairT_std__string_std__string_t_std__lessT_std__pairT_std__string_std__string_t_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringPairSet_add" "', argument " "1"" of type '" "std::set< std::pair< std::string,std::string > > *""'"); - } - arg1 = reinterpret_cast< std::set< std::pair< std::string,std::string > > * >(argp1); - { - std::pair< std::string,std::string > *ptr = (std::pair< std::string,std::string > *)0; - int res = swig::asptr(swig_obj[1], &ptr); - if (!SWIG_IsOK(res) || !ptr) { - SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "StringPairSet_add" "', argument " "2"" of type '" "std::set< std::pair< std::string,std::string > >::value_type""'"); - } - arg2 = *ptr; - if (SWIG_IsNewObj(res)) delete ptr; - } - std_set_Sl_std_pair_Sl_std_string_Sc_std_string_Sg__Sg__add(arg1,arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_StringPairSet_discard(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::set< std::pair< std::string,std::string > > *arg1 = (std::set< std::pair< std::string,std::string > > *) 0 ; - std::set< std::pair< std::string,std::string > >::value_type arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args, "StringPairSet_discard", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__setT_std__pairT_std__string_std__string_t_std__lessT_std__pairT_std__string_std__string_t_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringPairSet_discard" "', argument " "1"" of type '" "std::set< std::pair< std::string,std::string > > *""'"); - } - arg1 = reinterpret_cast< std::set< std::pair< std::string,std::string > > * >(argp1); - { - std::pair< std::string,std::string > *ptr = (std::pair< std::string,std::string > *)0; - int res = swig::asptr(swig_obj[1], &ptr); - if (!SWIG_IsOK(res) || !ptr) { - SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "StringPairSet_discard" "', argument " "2"" of type '" "std::set< std::pair< std::string,std::string > >::value_type""'"); - } - arg2 = *ptr; - if (SWIG_IsNewObj(res)) delete ptr; - } - std_set_Sl_std_pair_Sl_std_string_Sc_std_string_Sg__Sg__discard(arg1,arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_StringPairSet__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **SWIGUNUSEDPARM(swig_obj)) { - PyObject *resultobj = 0; - std::set< std::pair< std::string,std::string > > *result = 0 ; - - if ((nobjs < 0) || (nobjs > 0)) SWIG_fail; - result = (std::set< std::pair< std::string,std::string > > *)new std::set< std::pair< std::string,std::string > >(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__setT_std__pairT_std__string_std__string_t_std__lessT_std__pairT_std__string_std__string_t_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_StringPairSet__SWIG_2(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::set< std::pair< std::string,std::string > > *arg1 = 0 ; - int res1 = SWIG_OLDOBJ ; - std::set< std::pair< std::string,std::string > > *result = 0 ; - - if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; - { - std::set< std::pair< std::string,std::string >,std::less< std::pair< std::string,std::string > >,std::allocator< std::pair< std::string,std::string > > > *ptr = (std::set< std::pair< std::string,std::string >,std::less< std::pair< std::string,std::string > >,std::allocator< std::pair< std::string,std::string > > > *)0; - res1 = swig::asptr(swig_obj[0], &ptr); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_StringPairSet" "', argument " "1"" of type '" "std::set< std::pair< std::string,std::string > > const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_StringPairSet" "', argument " "1"" of type '" "std::set< std::pair< std::string,std::string > > const &""'"); - } - arg1 = ptr; - } - result = (std::set< std::pair< std::string,std::string > > *)new std::set< std::pair< std::string,std::string > >((std::set< std::pair< std::string,std::string > > const &)*arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__setT_std__pairT_std__string_std__string_t_std__lessT_std__pairT_std__string_std__string_t_t_std__allocatorT_std__pairT_std__string_std__string_t_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_new_StringPairSet(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[2] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "new_StringPairSet", 0, 1, argv))) SWIG_fail; - --argc; - if (argc == 0) { - return _wrap_new_StringPairSet__SWIG_1(self, argc, argv); - } - if (argc == 1) { - int _v; - int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_std__lessT_std__pairT_std__string_std__string_t_t, SWIG_POINTER_NO_NULL | 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_new_StringPairSet__SWIG_0(self, argc, argv); - } - } - if (argc == 1) { - int _v; - int res = swig::asptr(argv[0], (std::set< std::pair< std::string,std::string >,std::less< std::pair< std::string,std::string > >,std::allocator< std::pair< std::string,std::string > > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_new_StringPairSet__SWIG_2(self, argc, argv); - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'new_StringPairSet'.\n" - " Possible C/C++ prototypes are:\n" - " std::set< std::pair< std::string,std::string > >::set(std::less< std::pair< std::string,std::string > > const &)\n" - " std::set< std::pair< std::string,std::string > >::set()\n" - " std::set< std::pair< std::string,std::string > >::set(std::set< std::pair< std::string,std::string > > const &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_StringPairSet_empty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::set< std::pair< std::string,std::string > > *arg1 = (std::set< std::pair< std::string,std::string > > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - bool result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__setT_std__pairT_std__string_std__string_t_std__lessT_std__pairT_std__string_std__string_t_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringPairSet_empty" "', argument " "1"" of type '" "std::set< std::pair< std::string,std::string > > const *""'"); - } - arg1 = reinterpret_cast< std::set< std::pair< std::string,std::string > > * >(argp1); - result = (bool)((std::set< std::pair< std::string,std::string > > const *)arg1)->empty(); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_StringPairSet_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::set< std::pair< std::string,std::string > > *arg1 = (std::set< std::pair< std::string,std::string > > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::set< std::pair< std::string,std::string > >::size_type result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__setT_std__pairT_std__string_std__string_t_std__lessT_std__pairT_std__string_std__string_t_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringPairSet_size" "', argument " "1"" of type '" "std::set< std::pair< std::string,std::string > > const *""'"); - } - arg1 = reinterpret_cast< std::set< std::pair< std::string,std::string > > * >(argp1); - result = ((std::set< std::pair< std::string,std::string > > const *)arg1)->size(); - resultobj = SWIG_From_size_t(static_cast< size_t >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_StringPairSet_clear(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::set< std::pair< std::string,std::string > > *arg1 = (std::set< std::pair< std::string,std::string > > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__setT_std__pairT_std__string_std__string_t_std__lessT_std__pairT_std__string_std__string_t_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringPairSet_clear" "', argument " "1"" of type '" "std::set< std::pair< std::string,std::string > > *""'"); - } - arg1 = reinterpret_cast< std::set< std::pair< std::string,std::string > > * >(argp1); - (arg1)->clear(); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_StringPairSet_swap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::set< std::pair< std::string,std::string > > *arg1 = (std::set< std::pair< std::string,std::string > > *) 0 ; - std::set< std::pair< std::string,std::string > > *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args, "StringPairSet_swap", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__setT_std__pairT_std__string_std__string_t_std__lessT_std__pairT_std__string_std__string_t_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringPairSet_swap" "', argument " "1"" of type '" "std::set< std::pair< std::string,std::string > > *""'"); - } - arg1 = reinterpret_cast< std::set< std::pair< std::string,std::string > > * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_std__setT_std__pairT_std__string_std__string_t_std__lessT_std__pairT_std__string_std__string_t_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t, 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "StringPairSet_swap" "', argument " "2"" of type '" "std::set< std::pair< std::string,std::string > > &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "StringPairSet_swap" "', argument " "2"" of type '" "std::set< std::pair< std::string,std::string > > &""'"); - } - arg2 = reinterpret_cast< std::set< std::pair< std::string,std::string > > * >(argp2); - (arg1)->swap(*arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_StringPairSet_erase__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::set< std::pair< std::string,std::string > > *arg1 = (std::set< std::pair< std::string,std::string > > *) 0 ; - std::set< std::pair< std::string,std::string > >::key_type *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 = SWIG_OLDOBJ ; - std::set< std::pair< std::string,std::string > >::size_type result; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__setT_std__pairT_std__string_std__string_t_std__lessT_std__pairT_std__string_std__string_t_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringPairSet_erase" "', argument " "1"" of type '" "std::set< std::pair< std::string,std::string > > *""'"); - } - arg1 = reinterpret_cast< std::set< std::pair< std::string,std::string > > * >(argp1); - { - std::pair< std::string,std::string > *ptr = (std::pair< std::string,std::string > *)0; - res2 = swig::asptr(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "StringPairSet_erase" "', argument " "2"" of type '" "std::set< std::pair< std::string,std::string > >::key_type const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "StringPairSet_erase" "', argument " "2"" of type '" "std::set< std::pair< std::string,std::string > >::key_type const &""'"); - } - arg2 = ptr; - } - result = (arg1)->erase((std::set< std::pair< std::string,std::string > >::key_type const &)*arg2); - resultobj = SWIG_From_size_t(static_cast< size_t >(result)); - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_StringPairSet_count(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::set< std::pair< std::string,std::string > > *arg1 = (std::set< std::pair< std::string,std::string > > *) 0 ; - std::set< std::pair< std::string,std::string > >::key_type *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 = SWIG_OLDOBJ ; - PyObject *swig_obj[2] ; - std::set< std::pair< std::string,std::string > >::size_type result; - - if (!SWIG_Python_UnpackTuple(args, "StringPairSet_count", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__setT_std__pairT_std__string_std__string_t_std__lessT_std__pairT_std__string_std__string_t_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringPairSet_count" "', argument " "1"" of type '" "std::set< std::pair< std::string,std::string > > const *""'"); - } - arg1 = reinterpret_cast< std::set< std::pair< std::string,std::string > > * >(argp1); - { - std::pair< std::string,std::string > *ptr = (std::pair< std::string,std::string > *)0; - res2 = swig::asptr(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "StringPairSet_count" "', argument " "2"" of type '" "std::set< std::pair< std::string,std::string > >::key_type const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "StringPairSet_count" "', argument " "2"" of type '" "std::set< std::pair< std::string,std::string > >::key_type const &""'"); - } - arg2 = ptr; - } - result = ((std::set< std::pair< std::string,std::string > > const *)arg1)->count((std::set< std::pair< std::string,std::string > >::key_type const &)*arg2); - resultobj = SWIG_From_size_t(static_cast< size_t >(result)); - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_StringPairSet_begin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::set< std::pair< std::string,std::string > > *arg1 = (std::set< std::pair< std::string,std::string > > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::set< std::pair< std::string,std::string > >::iterator result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__setT_std__pairT_std__string_std__string_t_std__lessT_std__pairT_std__string_std__string_t_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringPairSet_begin" "', argument " "1"" of type '" "std::set< std::pair< std::string,std::string > > *""'"); - } - arg1 = reinterpret_cast< std::set< std::pair< std::string,std::string > > * >(argp1); - result = (arg1)->begin(); - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::set< std::pair< std::string,std::string > >::iterator & >(result)), - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_StringPairSet_end(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::set< std::pair< std::string,std::string > > *arg1 = (std::set< std::pair< std::string,std::string > > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::set< std::pair< std::string,std::string > >::iterator result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__setT_std__pairT_std__string_std__string_t_std__lessT_std__pairT_std__string_std__string_t_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringPairSet_end" "', argument " "1"" of type '" "std::set< std::pair< std::string,std::string > > *""'"); - } - arg1 = reinterpret_cast< std::set< std::pair< std::string,std::string > > * >(argp1); - result = (arg1)->end(); - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::set< std::pair< std::string,std::string > >::iterator & >(result)), - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_StringPairSet_rbegin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::set< std::pair< std::string,std::string > > *arg1 = (std::set< std::pair< std::string,std::string > > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::set< std::pair< std::string,std::string > >::reverse_iterator result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__setT_std__pairT_std__string_std__string_t_std__lessT_std__pairT_std__string_std__string_t_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringPairSet_rbegin" "', argument " "1"" of type '" "std::set< std::pair< std::string,std::string > > *""'"); - } - arg1 = reinterpret_cast< std::set< std::pair< std::string,std::string > > * >(argp1); - result = (arg1)->rbegin(); - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::set< std::pair< std::string,std::string > >::reverse_iterator & >(result)), - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_StringPairSet_rend(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::set< std::pair< std::string,std::string > > *arg1 = (std::set< std::pair< std::string,std::string > > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::set< std::pair< std::string,std::string > >::reverse_iterator result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__setT_std__pairT_std__string_std__string_t_std__lessT_std__pairT_std__string_std__string_t_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringPairSet_rend" "', argument " "1"" of type '" "std::set< std::pair< std::string,std::string > > *""'"); - } - arg1 = reinterpret_cast< std::set< std::pair< std::string,std::string > > * >(argp1); - result = (arg1)->rend(); - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::set< std::pair< std::string,std::string > >::reverse_iterator & >(result)), - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_StringPairSet_erase__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::set< std::pair< std::string,std::string > > *arg1 = (std::set< std::pair< std::string,std::string > > *) 0 ; - std::set< std::pair< std::string,std::string > >::iterator arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - swig::SwigPyIterator *iter2 = 0 ; - int res2 ; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__setT_std__pairT_std__string_std__string_t_std__lessT_std__pairT_std__string_std__string_t_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringPairSet_erase" "', argument " "1"" of type '" "std::set< std::pair< std::string,std::string > > *""'"); - } - arg1 = reinterpret_cast< std::set< std::pair< std::string,std::string > > * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0); - if (!SWIG_IsOK(res2) || !iter2) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "StringPairSet_erase" "', argument " "2"" of type '" "std::set< std::pair< std::string,std::string > >::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 '" "StringPairSet_erase" "', argument " "2"" of type '" "std::set< std::pair< std::string,std::string > >::iterator""'"); - } - } - std_set_Sl_std_pair_Sl_std_string_Sc_std_string_Sg__Sg__erase__SWIG_1(arg1,arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_StringPairSet_erase__SWIG_2(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::set< std::pair< std::string,std::string > > *arg1 = (std::set< std::pair< std::string,std::string > > *) 0 ; - std::set< std::pair< std::string,std::string > >::iterator arg2 ; - std::set< std::pair< std::string,std::string > >::iterator arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - swig::SwigPyIterator *iter2 = 0 ; - int res2 ; - swig::SwigPyIterator *iter3 = 0 ; - int res3 ; - - if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__setT_std__pairT_std__string_std__string_t_std__lessT_std__pairT_std__string_std__string_t_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringPairSet_erase" "', argument " "1"" of type '" "std::set< std::pair< std::string,std::string > > *""'"); - } - arg1 = reinterpret_cast< std::set< std::pair< std::string,std::string > > * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0); - if (!SWIG_IsOK(res2) || !iter2) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "StringPairSet_erase" "', argument " "2"" of type '" "std::set< std::pair< std::string,std::string > >::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 '" "StringPairSet_erase" "', argument " "2"" of type '" "std::set< std::pair< std::string,std::string > >::iterator""'"); - } - } - res3 = SWIG_ConvertPtr(swig_obj[2], SWIG_as_voidptrptr(&iter3), swig::SwigPyIterator::descriptor(), 0); - if (!SWIG_IsOK(res3) || !iter3) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "StringPairSet_erase" "', argument " "3"" of type '" "std::set< std::pair< std::string,std::string > >::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 '" "StringPairSet_erase" "', argument " "3"" of type '" "std::set< std::pair< std::string,std::string > >::iterator""'"); - } - } - std_set_Sl_std_pair_Sl_std_string_Sc_std_string_Sg__Sg__erase__SWIG_2(arg1,arg2,arg3); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_StringPairSet_erase(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[4] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "StringPairSet_erase", 0, 3, argv))) SWIG_fail; - --argc; - if (argc == 2) { - int _v; - int res = swig::asptr(argv[0], (std::set< std::pair< std::string,std::string >,std::less< std::pair< std::string,std::string > >,std::allocator< std::pair< std::string,std::string > > >**)(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_StringPairSet_erase__SWIG_1(self, argc, argv); - } - } - } - if (argc == 2) { - int _v; - int res = swig::asptr(argv[0], (std::set< std::pair< std::string,std::string >,std::less< std::pair< std::string,std::string > >,std::allocator< std::pair< std::string,std::string > > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - int res = swig::asptr(argv[1], (std::pair< std::string,std::string >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_StringPairSet_erase__SWIG_0(self, argc, argv); - } - } - } - if (argc == 3) { - int _v; - int res = swig::asptr(argv[0], (std::set< std::pair< std::string,std::string >,std::less< std::pair< std::string,std::string > >,std::allocator< std::pair< std::string,std::string > > >**)(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_StringPairSet_erase__SWIG_2(self, argc, argv); - } - } - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'StringPairSet_erase'.\n" - " Possible C/C++ prototypes are:\n" - " std::set< std::pair< std::string,std::string > >::erase(std::set< std::pair< std::string,std::string > >::key_type const &)\n" - " std::set< std::pair< std::string,std::string > >::erase(std::set< std::pair< std::string,std::string > >::iterator)\n" - " std::set< std::pair< std::string,std::string > >::erase(std::set< std::pair< std::string,std::string > >::iterator,std::set< std::pair< std::string,std::string > >::iterator)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_StringPairSet_find(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::set< std::pair< std::string,std::string > > *arg1 = (std::set< std::pair< std::string,std::string > > *) 0 ; - std::set< std::pair< std::string,std::string > >::key_type *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 = SWIG_OLDOBJ ; - PyObject *swig_obj[2] ; - std::set< std::pair< std::string,std::string > >::iterator result; - - if (!SWIG_Python_UnpackTuple(args, "StringPairSet_find", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__setT_std__pairT_std__string_std__string_t_std__lessT_std__pairT_std__string_std__string_t_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringPairSet_find" "', argument " "1"" of type '" "std::set< std::pair< std::string,std::string > > *""'"); - } - arg1 = reinterpret_cast< std::set< std::pair< std::string,std::string > > * >(argp1); - { - std::pair< std::string,std::string > *ptr = (std::pair< std::string,std::string > *)0; - res2 = swig::asptr(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "StringPairSet_find" "', argument " "2"" of type '" "std::set< std::pair< std::string,std::string > >::key_type const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "StringPairSet_find" "', argument " "2"" of type '" "std::set< std::pair< std::string,std::string > >::key_type const &""'"); - } - arg2 = ptr; - } - result = (arg1)->find((std::set< std::pair< std::string,std::string > >::key_type const &)*arg2); - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::set< std::pair< std::string,std::string > >::iterator & >(result)), - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_StringPairSet_lower_bound(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::set< std::pair< std::string,std::string > > *arg1 = (std::set< std::pair< std::string,std::string > > *) 0 ; - std::set< std::pair< std::string,std::string > >::key_type *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 = SWIG_OLDOBJ ; - PyObject *swig_obj[2] ; - std::set< std::pair< std::string,std::string > >::iterator result; - - if (!SWIG_Python_UnpackTuple(args, "StringPairSet_lower_bound", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__setT_std__pairT_std__string_std__string_t_std__lessT_std__pairT_std__string_std__string_t_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringPairSet_lower_bound" "', argument " "1"" of type '" "std::set< std::pair< std::string,std::string > > *""'"); - } - arg1 = reinterpret_cast< std::set< std::pair< std::string,std::string > > * >(argp1); - { - std::pair< std::string,std::string > *ptr = (std::pair< std::string,std::string > *)0; - res2 = swig::asptr(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "StringPairSet_lower_bound" "', argument " "2"" of type '" "std::set< std::pair< std::string,std::string > >::key_type const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "StringPairSet_lower_bound" "', argument " "2"" of type '" "std::set< std::pair< std::string,std::string > >::key_type const &""'"); - } - arg2 = ptr; - } - result = (arg1)->lower_bound((std::set< std::pair< std::string,std::string > >::key_type const &)*arg2); - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::set< std::pair< std::string,std::string > >::iterator & >(result)), - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_StringPairSet_upper_bound(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::set< std::pair< std::string,std::string > > *arg1 = (std::set< std::pair< std::string,std::string > > *) 0 ; - std::set< std::pair< std::string,std::string > >::key_type *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 = SWIG_OLDOBJ ; - PyObject *swig_obj[2] ; - std::set< std::pair< std::string,std::string > >::iterator result; - - if (!SWIG_Python_UnpackTuple(args, "StringPairSet_upper_bound", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__setT_std__pairT_std__string_std__string_t_std__lessT_std__pairT_std__string_std__string_t_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringPairSet_upper_bound" "', argument " "1"" of type '" "std::set< std::pair< std::string,std::string > > *""'"); - } - arg1 = reinterpret_cast< std::set< std::pair< std::string,std::string > > * >(argp1); - { - std::pair< std::string,std::string > *ptr = (std::pair< std::string,std::string > *)0; - res2 = swig::asptr(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "StringPairSet_upper_bound" "', argument " "2"" of type '" "std::set< std::pair< std::string,std::string > >::key_type const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "StringPairSet_upper_bound" "', argument " "2"" of type '" "std::set< std::pair< std::string,std::string > >::key_type const &""'"); - } - arg2 = ptr; - } - result = (arg1)->upper_bound((std::set< std::pair< std::string,std::string > >::key_type const &)*arg2); - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::set< std::pair< std::string,std::string > >::iterator & >(result)), - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_StringPairSet_equal_range(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::set< std::pair< std::string,std::string > > *arg1 = (std::set< std::pair< std::string,std::string > > *) 0 ; - std::set< std::pair< std::string,std::string > >::key_type *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 = SWIG_OLDOBJ ; - PyObject *swig_obj[2] ; - SwigValueWrapper< std::pair< std::set< std::pair< std::string,std::string > >::iterator,std::set< std::pair< std::string,std::string > >::iterator > > result; - - if (!SWIG_Python_UnpackTuple(args, "StringPairSet_equal_range", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__setT_std__pairT_std__string_std__string_t_std__lessT_std__pairT_std__string_std__string_t_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringPairSet_equal_range" "', argument " "1"" of type '" "std::set< std::pair< std::string,std::string > > *""'"); - } - arg1 = reinterpret_cast< std::set< std::pair< std::string,std::string > > * >(argp1); - { - std::pair< std::string,std::string > *ptr = (std::pair< std::string,std::string > *)0; - res2 = swig::asptr(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "StringPairSet_equal_range" "', argument " "2"" of type '" "std::set< std::pair< std::string,std::string > >::key_type const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "StringPairSet_equal_range" "', argument " "2"" of type '" "std::set< std::pair< std::string,std::string > >::key_type const &""'"); - } - arg2 = ptr; - } - result = (arg1)->equal_range((std::set< std::pair< std::string,std::string > >::key_type const &)*arg2); - resultobj = PyTuple_New(2); - PyTuple_SetItem(resultobj,0,SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::pair< std::set< std::pair< std::string,std::string > >::iterator,std::set< std::pair< std::string,std::string > >::iterator > & >(result).first), - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN)); - PyTuple_SetItem(resultobj,1,SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::pair< std::set< std::pair< std::string,std::string > >::iterator,std::set< std::pair< std::string,std::string > >::iterator > & >(result).second), - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN)); - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_StringPairSet_insert(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::set< std::pair< std::string,std::string > > *arg1 = (std::set< std::pair< std::string,std::string > > *) 0 ; - std::set< std::pair< std::string,std::string > >::value_type *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 = SWIG_OLDOBJ ; - PyObject *swig_obj[2] ; - SwigValueWrapper< std::pair< std::set< std::pair< std::string,std::string > >::iterator,bool > > result; - - if (!SWIG_Python_UnpackTuple(args, "StringPairSet_insert", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__setT_std__pairT_std__string_std__string_t_std__lessT_std__pairT_std__string_std__string_t_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringPairSet_insert" "', argument " "1"" of type '" "std::set< std::pair< std::string,std::string > > *""'"); - } - arg1 = reinterpret_cast< std::set< std::pair< std::string,std::string > > * >(argp1); - { - std::pair< std::string,std::string > *ptr = (std::pair< std::string,std::string > *)0; - res2 = swig::asptr(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "StringPairSet_insert" "', argument " "2"" of type '" "std::set< std::pair< std::string,std::string > >::value_type const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "StringPairSet_insert" "', argument " "2"" of type '" "std::set< std::pair< std::string,std::string > >::value_type const &""'"); - } - arg2 = ptr; - } - result = (arg1)->insert((std::set< std::pair< std::string,std::string > >::value_type const &)*arg2); - resultobj = PyTuple_New(2); - PyTuple_SetItem(resultobj,0,SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::pair< std::set< std::pair< std::string,std::string > >::iterator,bool > & >(result).first), - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN)); - PyTuple_SetItem(resultobj,1,SWIG_From_bool (static_cast< const std::pair< std::set< std::pair< std::string,std::string > >::iterator,bool > & >(result).second)); - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_StringPairSet(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::set< std::pair< std::string,std::string > > *arg1 = (std::set< std::pair< std::string,std::string > > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__setT_std__pairT_std__string_std__string_t_std__lessT_std__pairT_std__string_std__string_t_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_StringPairSet" "', argument " "1"" of type '" "std::set< std::pair< std::string,std::string > > *""'"); - } - arg1 = reinterpret_cast< std::set< std::pair< std::string,std::string > > * >(argp1); - delete arg1; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *StringPairSet_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_std__setT_std__pairT_std__string_std__string_t_std__lessT_std__pairT_std__string_std__string_t_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *StringPairSet_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_HfstTransducerVector_iterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< hfst::HfstTransducer > *arg1 = (std::vector< hfst::HfstTransducer > *) 0 ; - PyObject **arg2 = (PyObject **) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - swig::SwigPyIterator *result = 0 ; - - arg2 = &swig_obj[0]; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst__HfstTransducer_std__allocatorT_hfst__HfstTransducer_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducerVector_iterator" "', argument " "1"" of type '" "std::vector< hfst::HfstTransducer > *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst::HfstTransducer > * >(argp1); - result = (swig::SwigPyIterator *)std_vector_Sl_hfst_HfstTransducer_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_HfstTransducerVector___nonzero__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< hfst::HfstTransducer > *arg1 = (std::vector< hfst::HfstTransducer > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - bool result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst__HfstTransducer_std__allocatorT_hfst__HfstTransducer_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducerVector___nonzero__" "', argument " "1"" of type '" "std::vector< hfst::HfstTransducer > const *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst::HfstTransducer > * >(argp1); - result = (bool)std_vector_Sl_hfst_HfstTransducer_Sg____nonzero__((std::vector< hfst::HfstTransducer > const *)arg1); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducerVector___bool__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< hfst::HfstTransducer > *arg1 = (std::vector< hfst::HfstTransducer > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - bool result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst__HfstTransducer_std__allocatorT_hfst__HfstTransducer_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducerVector___bool__" "', argument " "1"" of type '" "std::vector< hfst::HfstTransducer > const *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst::HfstTransducer > * >(argp1); - result = (bool)std_vector_Sl_hfst_HfstTransducer_Sg____bool__((std::vector< hfst::HfstTransducer > const *)arg1); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducerVector___len__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< hfst::HfstTransducer > *arg1 = (std::vector< hfst::HfstTransducer > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::vector< hfst::HfstTransducer >::size_type result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst__HfstTransducer_std__allocatorT_hfst__HfstTransducer_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducerVector___len__" "', argument " "1"" of type '" "std::vector< hfst::HfstTransducer > const *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst::HfstTransducer > * >(argp1); - result = std_vector_Sl_hfst_HfstTransducer_Sg____len__((std::vector< hfst::HfstTransducer > const *)arg1); - resultobj = SWIG_From_size_t(static_cast< size_t >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducerVector___getslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< hfst::HfstTransducer > *arg1 = (std::vector< hfst::HfstTransducer > *) 0 ; - std::vector< hfst::HfstTransducer >::difference_type arg2 ; - std::vector< hfst::HfstTransducer >::difference_type arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - ptrdiff_t val2 ; - int ecode2 = 0 ; - ptrdiff_t val3 ; - int ecode3 = 0 ; - PyObject *swig_obj[3] ; - std::vector< hfst::HfstTransducer,std::allocator< hfst::HfstTransducer > > *result = 0 ; - - if (!SWIG_Python_UnpackTuple(args, "HfstTransducerVector___getslice__", 3, 3, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst__HfstTransducer_std__allocatorT_hfst__HfstTransducer_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducerVector___getslice__" "', argument " "1"" of type '" "std::vector< hfst::HfstTransducer > *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst::HfstTransducer > * >(argp1); - ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HfstTransducerVector___getslice__" "', argument " "2"" of type '" "std::vector< hfst::HfstTransducer >::difference_type""'"); - } - arg2 = static_cast< std::vector< hfst::HfstTransducer >::difference_type >(val2); - ecode3 = SWIG_AsVal_ptrdiff_t(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "HfstTransducerVector___getslice__" "', argument " "3"" of type '" "std::vector< hfst::HfstTransducer >::difference_type""'"); - } - arg3 = static_cast< std::vector< hfst::HfstTransducer >::difference_type >(val3); - try { - result = (std::vector< hfst::HfstTransducer,std::allocator< hfst::HfstTransducer > > *)std_vector_Sl_hfst_HfstTransducer_Sg____getslice__(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_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_hfst__HfstTransducer_std__allocatorT_hfst__HfstTransducer_t_t, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducerVector___setslice____SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< hfst::HfstTransducer > *arg1 = (std::vector< hfst::HfstTransducer > *) 0 ; - std::vector< hfst::HfstTransducer >::difference_type arg2 ; - std::vector< hfst::HfstTransducer >::difference_type arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - ptrdiff_t val2 ; - int ecode2 = 0 ; - ptrdiff_t val3 ; - int ecode3 = 0 ; - - if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst__HfstTransducer_std__allocatorT_hfst__HfstTransducer_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducerVector___setslice__" "', argument " "1"" of type '" "std::vector< hfst::HfstTransducer > *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst::HfstTransducer > * >(argp1); - ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HfstTransducerVector___setslice__" "', argument " "2"" of type '" "std::vector< hfst::HfstTransducer >::difference_type""'"); - } - arg2 = static_cast< std::vector< hfst::HfstTransducer >::difference_type >(val2); - ecode3 = SWIG_AsVal_ptrdiff_t(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "HfstTransducerVector___setslice__" "', argument " "3"" of type '" "std::vector< hfst::HfstTransducer >::difference_type""'"); - } - arg3 = static_cast< std::vector< hfst::HfstTransducer >::difference_type >(val3); - try { - std_vector_Sl_hfst_HfstTransducer_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_HfstTransducerVector___setslice____SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< hfst::HfstTransducer > *arg1 = (std::vector< hfst::HfstTransducer > *) 0 ; - std::vector< hfst::HfstTransducer >::difference_type arg2 ; - std::vector< hfst::HfstTransducer >::difference_type arg3 ; - std::vector< hfst::HfstTransducer,std::allocator< hfst::HfstTransducer > > *arg4 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - ptrdiff_t val2 ; - int ecode2 = 0 ; - ptrdiff_t val3 ; - int ecode3 = 0 ; - int res4 = SWIG_OLDOBJ ; - - if ((nobjs < 4) || (nobjs > 4)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst__HfstTransducer_std__allocatorT_hfst__HfstTransducer_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducerVector___setslice__" "', argument " "1"" of type '" "std::vector< hfst::HfstTransducer > *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst::HfstTransducer > * >(argp1); - ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HfstTransducerVector___setslice__" "', argument " "2"" of type '" "std::vector< hfst::HfstTransducer >::difference_type""'"); - } - arg2 = static_cast< std::vector< hfst::HfstTransducer >::difference_type >(val2); - ecode3 = SWIG_AsVal_ptrdiff_t(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "HfstTransducerVector___setslice__" "', argument " "3"" of type '" "std::vector< hfst::HfstTransducer >::difference_type""'"); - } - arg3 = static_cast< std::vector< hfst::HfstTransducer >::difference_type >(val3); - { - std::vector< hfst::HfstTransducer,std::allocator< hfst::HfstTransducer > > *ptr = (std::vector< hfst::HfstTransducer,std::allocator< hfst::HfstTransducer > > *)0; - res4 = swig::asptr(swig_obj[3], &ptr); - if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "HfstTransducerVector___setslice__" "', argument " "4"" of type '" "std::vector< hfst::HfstTransducer,std::allocator< hfst::HfstTransducer > > const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstTransducerVector___setslice__" "', argument " "4"" of type '" "std::vector< hfst::HfstTransducer,std::allocator< hfst::HfstTransducer > > const &""'"); - } - arg4 = ptr; - } - try { - std_vector_Sl_hfst_HfstTransducer_Sg____setslice____SWIG_1(arg1,arg2,arg3,(std::vector< hfst::HfstTransducer,std::allocator< hfst::HfstTransducer > > 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_HfstTransducerVector___setslice__(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[5] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "HfstTransducerVector___setslice__", 0, 4, argv))) SWIG_fail; - --argc; - if (argc == 3) { - int _v; - int res = swig::asptr(argv[0], (std::vector< hfst::HfstTransducer,std::allocator< hfst::HfstTransducer > >**)(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_HfstTransducerVector___setslice____SWIG_0(self, argc, argv); - } - } - } - } - if (argc == 4) { - int _v; - int res = swig::asptr(argv[0], (std::vector< hfst::HfstTransducer,std::allocator< hfst::HfstTransducer > >**)(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< hfst::HfstTransducer,std::allocator< hfst::HfstTransducer > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_HfstTransducerVector___setslice____SWIG_1(self, argc, argv); - } - } - } - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'HfstTransducerVector___setslice__'.\n" - " Possible C/C++ prototypes are:\n" - " std::vector< hfst::HfstTransducer >::__setslice__(std::vector< hfst::HfstTransducer >::difference_type,std::vector< hfst::HfstTransducer >::difference_type)\n" - " std::vector< hfst::HfstTransducer >::__setslice__(std::vector< hfst::HfstTransducer >::difference_type,std::vector< hfst::HfstTransducer >::difference_type,std::vector< hfst::HfstTransducer,std::allocator< hfst::HfstTransducer > > const &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducerVector___delslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< hfst::HfstTransducer > *arg1 = (std::vector< hfst::HfstTransducer > *) 0 ; - std::vector< hfst::HfstTransducer >::difference_type arg2 ; - std::vector< hfst::HfstTransducer >::difference_type arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - ptrdiff_t val2 ; - int ecode2 = 0 ; - ptrdiff_t val3 ; - int ecode3 = 0 ; - PyObject *swig_obj[3] ; - - if (!SWIG_Python_UnpackTuple(args, "HfstTransducerVector___delslice__", 3, 3, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst__HfstTransducer_std__allocatorT_hfst__HfstTransducer_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducerVector___delslice__" "', argument " "1"" of type '" "std::vector< hfst::HfstTransducer > *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst::HfstTransducer > * >(argp1); - ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HfstTransducerVector___delslice__" "', argument " "2"" of type '" "std::vector< hfst::HfstTransducer >::difference_type""'"); - } - arg2 = static_cast< std::vector< hfst::HfstTransducer >::difference_type >(val2); - ecode3 = SWIG_AsVal_ptrdiff_t(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "HfstTransducerVector___delslice__" "', argument " "3"" of type '" "std::vector< hfst::HfstTransducer >::difference_type""'"); - } - arg3 = static_cast< std::vector< hfst::HfstTransducer >::difference_type >(val3); - try { - std_vector_Sl_hfst_HfstTransducer_Sg____delslice__(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_HfstTransducerVector___delitem____SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< hfst::HfstTransducer > *arg1 = (std::vector< hfst::HfstTransducer > *) 0 ; - std::vector< hfst::HfstTransducer >::difference_type arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - ptrdiff_t val2 ; - int ecode2 = 0 ; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst__HfstTransducer_std__allocatorT_hfst__HfstTransducer_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducerVector___delitem__" "', argument " "1"" of type '" "std::vector< hfst::HfstTransducer > *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst::HfstTransducer > * >(argp1); - ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HfstTransducerVector___delitem__" "', argument " "2"" of type '" "std::vector< hfst::HfstTransducer >::difference_type""'"); - } - arg2 = static_cast< std::vector< hfst::HfstTransducer >::difference_type >(val2); - try { - std_vector_Sl_hfst_HfstTransducer_Sg____delitem____SWIG_0(arg1,arg2); - } 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_HfstTransducerVector___getitem____SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< hfst::HfstTransducer > *arg1 = (std::vector< hfst::HfstTransducer > *) 0 ; - PySliceObject *arg2 = (PySliceObject *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::vector< hfst::HfstTransducer,std::allocator< hfst::HfstTransducer > > *result = 0 ; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst__HfstTransducer_std__allocatorT_hfst__HfstTransducer_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducerVector___getitem__" "', argument " "1"" of type '" "std::vector< hfst::HfstTransducer > *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst::HfstTransducer > * >(argp1); - { - if (!PySlice_Check(swig_obj[1])) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "HfstTransducerVector___getitem__" "', argument " "2"" of type '" "PySliceObject *""'"); - } - arg2 = (PySliceObject *) swig_obj[1]; - } - try { - result = (std::vector< hfst::HfstTransducer,std::allocator< hfst::HfstTransducer > > *)std_vector_Sl_hfst_HfstTransducer_Sg____getitem____SWIG_0(arg1,arg2); - } 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_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_hfst__HfstTransducer_std__allocatorT_hfst__HfstTransducer_t_t, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducerVector___setitem____SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< hfst::HfstTransducer > *arg1 = (std::vector< hfst::HfstTransducer > *) 0 ; - PySliceObject *arg2 = (PySliceObject *) 0 ; - std::vector< hfst::HfstTransducer,std::allocator< hfst::HfstTransducer > > *arg3 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res3 = SWIG_OLDOBJ ; - - if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst__HfstTransducer_std__allocatorT_hfst__HfstTransducer_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducerVector___setitem__" "', argument " "1"" of type '" "std::vector< hfst::HfstTransducer > *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst::HfstTransducer > * >(argp1); - { - if (!PySlice_Check(swig_obj[1])) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "HfstTransducerVector___setitem__" "', argument " "2"" of type '" "PySliceObject *""'"); - } - arg2 = (PySliceObject *) swig_obj[1]; - } - { - std::vector< hfst::HfstTransducer,std::allocator< hfst::HfstTransducer > > *ptr = (std::vector< hfst::HfstTransducer,std::allocator< hfst::HfstTransducer > > *)0; - res3 = swig::asptr(swig_obj[2], &ptr); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "HfstTransducerVector___setitem__" "', argument " "3"" of type '" "std::vector< hfst::HfstTransducer,std::allocator< hfst::HfstTransducer > > const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstTransducerVector___setitem__" "', argument " "3"" of type '" "std::vector< hfst::HfstTransducer,std::allocator< hfst::HfstTransducer > > const &""'"); - } - arg3 = ptr; - } - try { - std_vector_Sl_hfst_HfstTransducer_Sg____setitem____SWIG_0(arg1,arg2,(std::vector< hfst::HfstTransducer,std::allocator< hfst::HfstTransducer > > 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_HfstTransducerVector___setitem____SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< hfst::HfstTransducer > *arg1 = (std::vector< hfst::HfstTransducer > *) 0 ; - PySliceObject *arg2 = (PySliceObject *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst__HfstTransducer_std__allocatorT_hfst__HfstTransducer_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducerVector___setitem__" "', argument " "1"" of type '" "std::vector< hfst::HfstTransducer > *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst::HfstTransducer > * >(argp1); - { - if (!PySlice_Check(swig_obj[1])) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "HfstTransducerVector___setitem__" "', argument " "2"" of type '" "PySliceObject *""'"); - } - arg2 = (PySliceObject *) swig_obj[1]; - } - try { - std_vector_Sl_hfst_HfstTransducer_Sg____setitem____SWIG_1(arg1,arg2); - } 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_HfstTransducerVector___delitem____SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< hfst::HfstTransducer > *arg1 = (std::vector< hfst::HfstTransducer > *) 0 ; - PySliceObject *arg2 = (PySliceObject *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst__HfstTransducer_std__allocatorT_hfst__HfstTransducer_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducerVector___delitem__" "', argument " "1"" of type '" "std::vector< hfst::HfstTransducer > *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst::HfstTransducer > * >(argp1); - { - if (!PySlice_Check(swig_obj[1])) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "HfstTransducerVector___delitem__" "', argument " "2"" of type '" "PySliceObject *""'"); - } - arg2 = (PySliceObject *) swig_obj[1]; - } - try { - std_vector_Sl_hfst_HfstTransducer_Sg____delitem____SWIG_1(arg1,arg2); - } 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_HfstTransducerVector___delitem__(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[3] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "HfstTransducerVector___delitem__", 0, 2, argv))) SWIG_fail; - --argc; - if (argc == 2) { - int _v; - int res = swig::asptr(argv[0], (std::vector< hfst::HfstTransducer,std::allocator< hfst::HfstTransducer > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - { - _v = PySlice_Check(argv[1]); - } - if (_v) { - return _wrap_HfstTransducerVector___delitem____SWIG_1(self, argc, argv); - } - } - } - if (argc == 2) { - int _v; - int res = swig::asptr(argv[0], (std::vector< hfst::HfstTransducer,std::allocator< hfst::HfstTransducer > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_HfstTransducerVector___delitem____SWIG_0(self, argc, argv); - } - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'HfstTransducerVector___delitem__'.\n" - " Possible C/C++ prototypes are:\n" - " std::vector< hfst::HfstTransducer >::__delitem__(std::vector< hfst::HfstTransducer >::difference_type)\n" - " std::vector< hfst::HfstTransducer >::__delitem__(PySliceObject *)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducerVector___getitem____SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< hfst::HfstTransducer > *arg1 = (std::vector< hfst::HfstTransducer > *) 0 ; - std::vector< hfst::HfstTransducer >::difference_type arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - ptrdiff_t val2 ; - int ecode2 = 0 ; - std::vector< hfst::HfstTransducer >::value_type *result = 0 ; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst__HfstTransducer_std__allocatorT_hfst__HfstTransducer_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducerVector___getitem__" "', argument " "1"" of type '" "std::vector< hfst::HfstTransducer > const *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst::HfstTransducer > * >(argp1); - ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HfstTransducerVector___getitem__" "', argument " "2"" of type '" "std::vector< hfst::HfstTransducer >::difference_type""'"); - } - arg2 = static_cast< std::vector< hfst::HfstTransducer >::difference_type >(val2); - try { - result = (std::vector< hfst::HfstTransducer >::value_type *) &std_vector_Sl_hfst_HfstTransducer_Sg____getitem____SWIG_1((std::vector< hfst::HfstTransducer > const *)arg1,arg2); - } catch(std::out_of_range &_e) { - SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_hfst__HfstTransducer, 0 | 0 ); - (void)swig::container_owner::value_type>::category>::back_reference(resultobj, swig_obj[0]); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducerVector___getitem__(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[3] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "HfstTransducerVector___getitem__", 0, 2, argv))) SWIG_fail; - --argc; - if (argc == 2) { - int _v; - int res = swig::asptr(argv[0], (std::vector< hfst::HfstTransducer,std::allocator< hfst::HfstTransducer > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - { - _v = PySlice_Check(argv[1]); - } - if (_v) { - return _wrap_HfstTransducerVector___getitem____SWIG_0(self, argc, argv); - } - } - } - if (argc == 2) { - int _v; - int res = swig::asptr(argv[0], (std::vector< hfst::HfstTransducer,std::allocator< hfst::HfstTransducer > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_HfstTransducerVector___getitem____SWIG_1(self, argc, argv); - } - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'HfstTransducerVector___getitem__'.\n" - " Possible C/C++ prototypes are:\n" - " std::vector< hfst::HfstTransducer >::__getitem__(PySliceObject *)\n" - " std::vector< hfst::HfstTransducer >::__getitem__(std::vector< hfst::HfstTransducer >::difference_type) const\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducerVector___setitem____SWIG_2(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< hfst::HfstTransducer > *arg1 = (std::vector< hfst::HfstTransducer > *) 0 ; - std::vector< hfst::HfstTransducer >::difference_type arg2 ; - std::vector< hfst::HfstTransducer >::value_type *arg3 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - ptrdiff_t val2 ; - int ecode2 = 0 ; - void *argp3 = 0 ; - int res3 = 0 ; - - if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst__HfstTransducer_std__allocatorT_hfst__HfstTransducer_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducerVector___setitem__" "', argument " "1"" of type '" "std::vector< hfst::HfstTransducer > *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst::HfstTransducer > * >(argp1); - ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HfstTransducerVector___setitem__" "', argument " "2"" of type '" "std::vector< hfst::HfstTransducer >::difference_type""'"); - } - arg2 = static_cast< std::vector< hfst::HfstTransducer >::difference_type >(val2); - res3 = SWIG_ConvertPtr(swig_obj[2], &argp3, SWIGTYPE_p_hfst__HfstTransducer, 0 | 0); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "HfstTransducerVector___setitem__" "', argument " "3"" of type '" "std::vector< hfst::HfstTransducer >::value_type const &""'"); - } - if (!argp3) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstTransducerVector___setitem__" "', argument " "3"" of type '" "std::vector< hfst::HfstTransducer >::value_type const &""'"); - } - arg3 = reinterpret_cast< std::vector< hfst::HfstTransducer >::value_type * >(argp3); - try { - std_vector_Sl_hfst_HfstTransducer_Sg____setitem____SWIG_2(arg1,arg2,(hfst::HfstTransducer 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_HfstTransducerVector___setitem__(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[4] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "HfstTransducerVector___setitem__", 0, 3, argv))) SWIG_fail; - --argc; - if (argc == 2) { - int _v; - int res = swig::asptr(argv[0], (std::vector< hfst::HfstTransducer,std::allocator< hfst::HfstTransducer > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - { - _v = PySlice_Check(argv[1]); - } - if (_v) { - return _wrap_HfstTransducerVector___setitem____SWIG_1(self, argc, argv); - } - } - } - if (argc == 3) { - int _v; - int res = swig::asptr(argv[0], (std::vector< hfst::HfstTransducer,std::allocator< hfst::HfstTransducer > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - { - _v = PySlice_Check(argv[1]); - } - if (_v) { - int res = swig::asptr(argv[2], (std::vector< hfst::HfstTransducer,std::allocator< hfst::HfstTransducer > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_HfstTransducerVector___setitem____SWIG_0(self, argc, argv); - } - } - } - } - if (argc == 3) { - int _v; - int res = swig::asptr(argv[0], (std::vector< hfst::HfstTransducer,std::allocator< hfst::HfstTransducer > >**)(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_ConvertPtr(argv[2], 0, SWIGTYPE_p_hfst__HfstTransducer, SWIG_POINTER_NO_NULL | 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_HfstTransducerVector___setitem____SWIG_2(self, argc, argv); - } - } - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'HfstTransducerVector___setitem__'.\n" - " Possible C/C++ prototypes are:\n" - " std::vector< hfst::HfstTransducer >::__setitem__(PySliceObject *,std::vector< hfst::HfstTransducer,std::allocator< hfst::HfstTransducer > > const &)\n" - " std::vector< hfst::HfstTransducer >::__setitem__(PySliceObject *)\n" - " std::vector< hfst::HfstTransducer >::__setitem__(std::vector< hfst::HfstTransducer >::difference_type,std::vector< hfst::HfstTransducer >::value_type const &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducerVector_pop(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< hfst::HfstTransducer > *arg1 = (std::vector< hfst::HfstTransducer > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - SwigValueWrapper< hfst::HfstTransducer > result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst__HfstTransducer_std__allocatorT_hfst__HfstTransducer_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducerVector_pop" "', argument " "1"" of type '" "std::vector< hfst::HfstTransducer > *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst::HfstTransducer > * >(argp1); - try { - result = std_vector_Sl_hfst_HfstTransducer_Sg__pop(arg1); - } catch(std::out_of_range &_e) { - SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); - } - resultobj = SWIG_NewPointerObj((new std::vector< hfst::HfstTransducer >::value_type(static_cast< const std::vector< hfst::HfstTransducer >::value_type& >(result))), SWIGTYPE_p_hfst__HfstTransducer, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducerVector_append(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< hfst::HfstTransducer > *arg1 = (std::vector< hfst::HfstTransducer > *) 0 ; - std::vector< hfst::HfstTransducer >::value_type *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args, "HfstTransducerVector_append", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst__HfstTransducer_std__allocatorT_hfst__HfstTransducer_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducerVector_append" "', argument " "1"" of type '" "std::vector< hfst::HfstTransducer > *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst::HfstTransducer > * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_hfst__HfstTransducer, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HfstTransducerVector_append" "', argument " "2"" of type '" "std::vector< hfst::HfstTransducer >::value_type const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstTransducerVector_append" "', argument " "2"" of type '" "std::vector< hfst::HfstTransducer >::value_type const &""'"); - } - arg2 = reinterpret_cast< std::vector< hfst::HfstTransducer >::value_type * >(argp2); - std_vector_Sl_hfst_HfstTransducer_Sg__append(arg1,(hfst::HfstTransducer const &)*arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_HfstTransducerVector__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **SWIGUNUSEDPARM(swig_obj)) { - PyObject *resultobj = 0; - std::vector< hfst::HfstTransducer > *result = 0 ; - - if ((nobjs < 0) || (nobjs > 0)) SWIG_fail; - result = (std::vector< hfst::HfstTransducer > *)new std::vector< hfst::HfstTransducer >(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_hfst__HfstTransducer_std__allocatorT_hfst__HfstTransducer_t_t, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_HfstTransducerVector__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< hfst::HfstTransducer > *arg1 = 0 ; - int res1 = SWIG_OLDOBJ ; - std::vector< hfst::HfstTransducer > *result = 0 ; - - if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; - { - std::vector< hfst::HfstTransducer,std::allocator< hfst::HfstTransducer > > *ptr = (std::vector< hfst::HfstTransducer,std::allocator< hfst::HfstTransducer > > *)0; - res1 = swig::asptr(swig_obj[0], &ptr); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_HfstTransducerVector" "', argument " "1"" of type '" "std::vector< hfst::HfstTransducer > const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_HfstTransducerVector" "', argument " "1"" of type '" "std::vector< hfst::HfstTransducer > const &""'"); - } - arg1 = ptr; - } - result = (std::vector< hfst::HfstTransducer > *)new std::vector< hfst::HfstTransducer >((std::vector< hfst::HfstTransducer > const &)*arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_hfst__HfstTransducer_std__allocatorT_hfst__HfstTransducer_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_HfstTransducerVector_empty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< hfst::HfstTransducer > *arg1 = (std::vector< hfst::HfstTransducer > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - bool result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst__HfstTransducer_std__allocatorT_hfst__HfstTransducer_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducerVector_empty" "', argument " "1"" of type '" "std::vector< hfst::HfstTransducer > const *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst::HfstTransducer > * >(argp1); - result = (bool)((std::vector< hfst::HfstTransducer > const *)arg1)->empty(); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducerVector_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< hfst::HfstTransducer > *arg1 = (std::vector< hfst::HfstTransducer > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::vector< hfst::HfstTransducer >::size_type result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst__HfstTransducer_std__allocatorT_hfst__HfstTransducer_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducerVector_size" "', argument " "1"" of type '" "std::vector< hfst::HfstTransducer > const *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst::HfstTransducer > * >(argp1); - result = ((std::vector< hfst::HfstTransducer > const *)arg1)->size(); - resultobj = SWIG_From_size_t(static_cast< size_t >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducerVector_swap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< hfst::HfstTransducer > *arg1 = (std::vector< hfst::HfstTransducer > *) 0 ; - std::vector< hfst::HfstTransducer > *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args, "HfstTransducerVector_swap", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst__HfstTransducer_std__allocatorT_hfst__HfstTransducer_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducerVector_swap" "', argument " "1"" of type '" "std::vector< hfst::HfstTransducer > *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst::HfstTransducer > * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_std__vectorT_hfst__HfstTransducer_std__allocatorT_hfst__HfstTransducer_t_t, 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HfstTransducerVector_swap" "', argument " "2"" of type '" "std::vector< hfst::HfstTransducer > &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstTransducerVector_swap" "', argument " "2"" of type '" "std::vector< hfst::HfstTransducer > &""'"); - } - arg2 = reinterpret_cast< std::vector< hfst::HfstTransducer > * >(argp2); - (arg1)->swap(*arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducerVector_begin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< hfst::HfstTransducer > *arg1 = (std::vector< hfst::HfstTransducer > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::vector< hfst::HfstTransducer >::iterator result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst__HfstTransducer_std__allocatorT_hfst__HfstTransducer_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducerVector_begin" "', argument " "1"" of type '" "std::vector< hfst::HfstTransducer > *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst::HfstTransducer > * >(argp1); - result = (arg1)->begin(); - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< hfst::HfstTransducer >::iterator & >(result)), - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducerVector_end(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< hfst::HfstTransducer > *arg1 = (std::vector< hfst::HfstTransducer > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::vector< hfst::HfstTransducer >::iterator result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst__HfstTransducer_std__allocatorT_hfst__HfstTransducer_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducerVector_end" "', argument " "1"" of type '" "std::vector< hfst::HfstTransducer > *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst::HfstTransducer > * >(argp1); - result = (arg1)->end(); - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< hfst::HfstTransducer >::iterator & >(result)), - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducerVector_rbegin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< hfst::HfstTransducer > *arg1 = (std::vector< hfst::HfstTransducer > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::vector< hfst::HfstTransducer >::reverse_iterator result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst__HfstTransducer_std__allocatorT_hfst__HfstTransducer_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducerVector_rbegin" "', argument " "1"" of type '" "std::vector< hfst::HfstTransducer > *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst::HfstTransducer > * >(argp1); - result = (arg1)->rbegin(); - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< hfst::HfstTransducer >::reverse_iterator & >(result)), - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducerVector_rend(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< hfst::HfstTransducer > *arg1 = (std::vector< hfst::HfstTransducer > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::vector< hfst::HfstTransducer >::reverse_iterator result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst__HfstTransducer_std__allocatorT_hfst__HfstTransducer_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducerVector_rend" "', argument " "1"" of type '" "std::vector< hfst::HfstTransducer > *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst::HfstTransducer > * >(argp1); - result = (arg1)->rend(); - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< hfst::HfstTransducer >::reverse_iterator & >(result)), - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducerVector_clear(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< hfst::HfstTransducer > *arg1 = (std::vector< hfst::HfstTransducer > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst__HfstTransducer_std__allocatorT_hfst__HfstTransducer_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducerVector_clear" "', argument " "1"" of type '" "std::vector< hfst::HfstTransducer > *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst::HfstTransducer > * >(argp1); - (arg1)->clear(); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducerVector_get_allocator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< hfst::HfstTransducer > *arg1 = (std::vector< hfst::HfstTransducer > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - SwigValueWrapper< std::allocator< hfst::HfstTransducer > > result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst__HfstTransducer_std__allocatorT_hfst__HfstTransducer_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducerVector_get_allocator" "', argument " "1"" of type '" "std::vector< hfst::HfstTransducer > const *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst::HfstTransducer > * >(argp1); - result = ((std::vector< hfst::HfstTransducer > const *)arg1)->get_allocator(); - resultobj = SWIG_NewPointerObj((new std::vector< hfst::HfstTransducer >::allocator_type(static_cast< const std::vector< hfst::HfstTransducer >::allocator_type& >(result))), SWIGTYPE_p_std__allocatorT_hfst__HfstTransducer_t, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_HfstTransducerVector__SWIG_2(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< hfst::HfstTransducer >::size_type arg1 ; - size_t val1 ; - int ecode1 = 0 ; - std::vector< hfst::HfstTransducer > *result = 0 ; - - if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; - ecode1 = SWIG_AsVal_size_t(swig_obj[0], &val1); - if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_HfstTransducerVector" "', argument " "1"" of type '" "std::vector< hfst::HfstTransducer >::size_type""'"); - } - arg1 = static_cast< std::vector< hfst::HfstTransducer >::size_type >(val1); - result = (std::vector< hfst::HfstTransducer > *)new std::vector< hfst::HfstTransducer >(arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_hfst__HfstTransducer_std__allocatorT_hfst__HfstTransducer_t_t, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducerVector_pop_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< hfst::HfstTransducer > *arg1 = (std::vector< hfst::HfstTransducer > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst__HfstTransducer_std__allocatorT_hfst__HfstTransducer_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducerVector_pop_back" "', argument " "1"" of type '" "std::vector< hfst::HfstTransducer > *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst::HfstTransducer > * >(argp1); - (arg1)->pop_back(); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducerVector_resize__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< hfst::HfstTransducer > *arg1 = (std::vector< hfst::HfstTransducer > *) 0 ; - std::vector< hfst::HfstTransducer >::size_type arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - size_t val2 ; - int ecode2 = 0 ; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst__HfstTransducer_std__allocatorT_hfst__HfstTransducer_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducerVector_resize" "', argument " "1"" of type '" "std::vector< hfst::HfstTransducer > *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst::HfstTransducer > * >(argp1); - ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HfstTransducerVector_resize" "', argument " "2"" of type '" "std::vector< hfst::HfstTransducer >::size_type""'"); - } - arg2 = static_cast< std::vector< hfst::HfstTransducer >::size_type >(val2); - (arg1)->resize(arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducerVector_erase__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< hfst::HfstTransducer > *arg1 = (std::vector< hfst::HfstTransducer > *) 0 ; - std::vector< hfst::HfstTransducer >::iterator arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - swig::SwigPyIterator *iter2 = 0 ; - int res2 ; - std::vector< hfst::HfstTransducer >::iterator result; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst__HfstTransducer_std__allocatorT_hfst__HfstTransducer_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducerVector_erase" "', argument " "1"" of type '" "std::vector< hfst::HfstTransducer > *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst::HfstTransducer > * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0); - if (!SWIG_IsOK(res2) || !iter2) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "HfstTransducerVector_erase" "', argument " "2"" of type '" "std::vector< hfst::HfstTransducer >::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 '" "HfstTransducerVector_erase" "', argument " "2"" of type '" "std::vector< hfst::HfstTransducer >::iterator""'"); - } - } - result = std_vector_Sl_hfst_HfstTransducer_Sg__erase__SWIG_0(arg1,arg2); - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< hfst::HfstTransducer >::iterator & >(result)), - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducerVector_erase__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< hfst::HfstTransducer > *arg1 = (std::vector< hfst::HfstTransducer > *) 0 ; - std::vector< hfst::HfstTransducer >::iterator arg2 ; - std::vector< hfst::HfstTransducer >::iterator arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - swig::SwigPyIterator *iter2 = 0 ; - int res2 ; - swig::SwigPyIterator *iter3 = 0 ; - int res3 ; - std::vector< hfst::HfstTransducer >::iterator result; - - if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst__HfstTransducer_std__allocatorT_hfst__HfstTransducer_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducerVector_erase" "', argument " "1"" of type '" "std::vector< hfst::HfstTransducer > *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst::HfstTransducer > * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0); - if (!SWIG_IsOK(res2) || !iter2) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "HfstTransducerVector_erase" "', argument " "2"" of type '" "std::vector< hfst::HfstTransducer >::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 '" "HfstTransducerVector_erase" "', argument " "2"" of type '" "std::vector< hfst::HfstTransducer >::iterator""'"); - } - } - res3 = SWIG_ConvertPtr(swig_obj[2], SWIG_as_voidptrptr(&iter3), swig::SwigPyIterator::descriptor(), 0); - if (!SWIG_IsOK(res3) || !iter3) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "HfstTransducerVector_erase" "', argument " "3"" of type '" "std::vector< hfst::HfstTransducer >::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 '" "HfstTransducerVector_erase" "', argument " "3"" of type '" "std::vector< hfst::HfstTransducer >::iterator""'"); - } - } - result = std_vector_Sl_hfst_HfstTransducer_Sg__erase__SWIG_1(arg1,arg2,arg3); - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< hfst::HfstTransducer >::iterator & >(result)), - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducerVector_erase(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[4] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "HfstTransducerVector_erase", 0, 3, argv))) SWIG_fail; - --argc; - if (argc == 2) { - int _v; - int res = swig::asptr(argv[0], (std::vector< hfst::HfstTransducer,std::allocator< hfst::HfstTransducer > >**)(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_HfstTransducerVector_erase__SWIG_0(self, argc, argv); - } - } - } - if (argc == 3) { - int _v; - int res = swig::asptr(argv[0], (std::vector< hfst::HfstTransducer,std::allocator< hfst::HfstTransducer > >**)(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_HfstTransducerVector_erase__SWIG_1(self, argc, argv); - } - } - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'HfstTransducerVector_erase'.\n" - " Possible C/C++ prototypes are:\n" - " std::vector< hfst::HfstTransducer >::erase(std::vector< hfst::HfstTransducer >::iterator)\n" - " std::vector< hfst::HfstTransducer >::erase(std::vector< hfst::HfstTransducer >::iterator,std::vector< hfst::HfstTransducer >::iterator)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_new_HfstTransducerVector__SWIG_3(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< hfst::HfstTransducer >::size_type arg1 ; - std::vector< hfst::HfstTransducer >::value_type *arg2 = 0 ; - size_t val1 ; - int ecode1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - std::vector< hfst::HfstTransducer > *result = 0 ; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - ecode1 = SWIG_AsVal_size_t(swig_obj[0], &val1); - if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_HfstTransducerVector" "', argument " "1"" of type '" "std::vector< hfst::HfstTransducer >::size_type""'"); - } - arg1 = static_cast< std::vector< hfst::HfstTransducer >::size_type >(val1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_hfst__HfstTransducer, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_HfstTransducerVector" "', argument " "2"" of type '" "std::vector< hfst::HfstTransducer >::value_type const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_HfstTransducerVector" "', argument " "2"" of type '" "std::vector< hfst::HfstTransducer >::value_type const &""'"); - } - arg2 = reinterpret_cast< std::vector< hfst::HfstTransducer >::value_type * >(argp2); - result = (std::vector< hfst::HfstTransducer > *)new std::vector< hfst::HfstTransducer >(arg1,(std::vector< hfst::HfstTransducer >::value_type const &)*arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_hfst__HfstTransducer_std__allocatorT_hfst__HfstTransducer_t_t, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_HfstTransducerVector(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[3] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "new_HfstTransducerVector", 0, 2, argv))) SWIG_fail; - --argc; - if (argc == 0) { - return _wrap_new_HfstTransducerVector__SWIG_0(self, argc, argv); - } - if (argc == 1) { - int _v; - { - int res = SWIG_AsVal_size_t(argv[0], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_new_HfstTransducerVector__SWIG_2(self, argc, argv); - } - } - if (argc == 1) { - int _v; - int res = swig::asptr(argv[0], (std::vector< hfst::HfstTransducer,std::allocator< hfst::HfstTransducer > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_new_HfstTransducerVector__SWIG_1(self, argc, argv); - } - } - if (argc == 2) { - int _v; - { - int res = SWIG_AsVal_size_t(argv[0], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_hfst__HfstTransducer, SWIG_POINTER_NO_NULL | 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_new_HfstTransducerVector__SWIG_3(self, argc, argv); - } - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'new_HfstTransducerVector'.\n" - " Possible C/C++ prototypes are:\n" - " std::vector< hfst::HfstTransducer >::vector()\n" - " std::vector< hfst::HfstTransducer >::vector(std::vector< hfst::HfstTransducer > const &)\n" - " std::vector< hfst::HfstTransducer >::vector(std::vector< hfst::HfstTransducer >::size_type)\n" - " std::vector< hfst::HfstTransducer >::vector(std::vector< hfst::HfstTransducer >::size_type,std::vector< hfst::HfstTransducer >::value_type const &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducerVector_push_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< hfst::HfstTransducer > *arg1 = (std::vector< hfst::HfstTransducer > *) 0 ; - std::vector< hfst::HfstTransducer >::value_type *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args, "HfstTransducerVector_push_back", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst__HfstTransducer_std__allocatorT_hfst__HfstTransducer_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducerVector_push_back" "', argument " "1"" of type '" "std::vector< hfst::HfstTransducer > *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst::HfstTransducer > * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_hfst__HfstTransducer, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HfstTransducerVector_push_back" "', argument " "2"" of type '" "std::vector< hfst::HfstTransducer >::value_type const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstTransducerVector_push_back" "', argument " "2"" of type '" "std::vector< hfst::HfstTransducer >::value_type const &""'"); - } - arg2 = reinterpret_cast< std::vector< hfst::HfstTransducer >::value_type * >(argp2); - (arg1)->push_back((std::vector< hfst::HfstTransducer >::value_type const &)*arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducerVector_front(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< hfst::HfstTransducer > *arg1 = (std::vector< hfst::HfstTransducer > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::vector< hfst::HfstTransducer >::value_type *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst__HfstTransducer_std__allocatorT_hfst__HfstTransducer_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducerVector_front" "', argument " "1"" of type '" "std::vector< hfst::HfstTransducer > const *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst::HfstTransducer > * >(argp1); - result = (std::vector< hfst::HfstTransducer >::value_type *) &((std::vector< hfst::HfstTransducer > const *)arg1)->front(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_hfst__HfstTransducer, 0 | 0 ); - (void)swig::container_owner::value_type>::category>::back_reference(resultobj, swig_obj[0]); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducerVector_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< hfst::HfstTransducer > *arg1 = (std::vector< hfst::HfstTransducer > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::vector< hfst::HfstTransducer >::value_type *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst__HfstTransducer_std__allocatorT_hfst__HfstTransducer_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducerVector_back" "', argument " "1"" of type '" "std::vector< hfst::HfstTransducer > const *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst::HfstTransducer > * >(argp1); - result = (std::vector< hfst::HfstTransducer >::value_type *) &((std::vector< hfst::HfstTransducer > const *)arg1)->back(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_hfst__HfstTransducer, 0 | 0 ); - (void)swig::container_owner::value_type>::category>::back_reference(resultobj, swig_obj[0]); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducerVector_assign(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< hfst::HfstTransducer > *arg1 = (std::vector< hfst::HfstTransducer > *) 0 ; - std::vector< hfst::HfstTransducer >::size_type arg2 ; - std::vector< hfst::HfstTransducer >::value_type *arg3 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - size_t val2 ; - int ecode2 = 0 ; - void *argp3 = 0 ; - int res3 = 0 ; - PyObject *swig_obj[3] ; - - if (!SWIG_Python_UnpackTuple(args, "HfstTransducerVector_assign", 3, 3, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst__HfstTransducer_std__allocatorT_hfst__HfstTransducer_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducerVector_assign" "', argument " "1"" of type '" "std::vector< hfst::HfstTransducer > *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst::HfstTransducer > * >(argp1); - ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HfstTransducerVector_assign" "', argument " "2"" of type '" "std::vector< hfst::HfstTransducer >::size_type""'"); - } - arg2 = static_cast< std::vector< hfst::HfstTransducer >::size_type >(val2); - res3 = SWIG_ConvertPtr(swig_obj[2], &argp3, SWIGTYPE_p_hfst__HfstTransducer, 0 | 0); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "HfstTransducerVector_assign" "', argument " "3"" of type '" "std::vector< hfst::HfstTransducer >::value_type const &""'"); - } - if (!argp3) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstTransducerVector_assign" "', argument " "3"" of type '" "std::vector< hfst::HfstTransducer >::value_type const &""'"); - } - arg3 = reinterpret_cast< std::vector< hfst::HfstTransducer >::value_type * >(argp3); - (arg1)->assign(arg2,(std::vector< hfst::HfstTransducer >::value_type const &)*arg3); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducerVector_resize__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< hfst::HfstTransducer > *arg1 = (std::vector< hfst::HfstTransducer > *) 0 ; - std::vector< hfst::HfstTransducer >::size_type arg2 ; - std::vector< hfst::HfstTransducer >::value_type *arg3 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - size_t val2 ; - int ecode2 = 0 ; - void *argp3 = 0 ; - int res3 = 0 ; - - if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst__HfstTransducer_std__allocatorT_hfst__HfstTransducer_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducerVector_resize" "', argument " "1"" of type '" "std::vector< hfst::HfstTransducer > *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst::HfstTransducer > * >(argp1); - ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HfstTransducerVector_resize" "', argument " "2"" of type '" "std::vector< hfst::HfstTransducer >::size_type""'"); - } - arg2 = static_cast< std::vector< hfst::HfstTransducer >::size_type >(val2); - res3 = SWIG_ConvertPtr(swig_obj[2], &argp3, SWIGTYPE_p_hfst__HfstTransducer, 0 | 0); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "HfstTransducerVector_resize" "', argument " "3"" of type '" "std::vector< hfst::HfstTransducer >::value_type const &""'"); - } - if (!argp3) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstTransducerVector_resize" "', argument " "3"" of type '" "std::vector< hfst::HfstTransducer >::value_type const &""'"); - } - arg3 = reinterpret_cast< std::vector< hfst::HfstTransducer >::value_type * >(argp3); - (arg1)->resize(arg2,(std::vector< hfst::HfstTransducer >::value_type const &)*arg3); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducerVector_resize(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[4] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "HfstTransducerVector_resize", 0, 3, argv))) SWIG_fail; - --argc; - if (argc == 2) { - int _v; - int res = swig::asptr(argv[0], (std::vector< hfst::HfstTransducer,std::allocator< hfst::HfstTransducer > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_size_t(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_HfstTransducerVector_resize__SWIG_0(self, argc, argv); - } - } - } - if (argc == 3) { - int _v; - int res = swig::asptr(argv[0], (std::vector< hfst::HfstTransducer,std::allocator< hfst::HfstTransducer > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_size_t(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_hfst__HfstTransducer, SWIG_POINTER_NO_NULL | 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_HfstTransducerVector_resize__SWIG_1(self, argc, argv); - } - } - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'HfstTransducerVector_resize'.\n" - " Possible C/C++ prototypes are:\n" - " std::vector< hfst::HfstTransducer >::resize(std::vector< hfst::HfstTransducer >::size_type)\n" - " std::vector< hfst::HfstTransducer >::resize(std::vector< hfst::HfstTransducer >::size_type,std::vector< hfst::HfstTransducer >::value_type const &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducerVector_insert__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< hfst::HfstTransducer > *arg1 = (std::vector< hfst::HfstTransducer > *) 0 ; - std::vector< hfst::HfstTransducer >::iterator arg2 ; - std::vector< hfst::HfstTransducer >::value_type *arg3 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - swig::SwigPyIterator *iter2 = 0 ; - int res2 ; - void *argp3 = 0 ; - int res3 = 0 ; - std::vector< hfst::HfstTransducer >::iterator result; - - if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst__HfstTransducer_std__allocatorT_hfst__HfstTransducer_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducerVector_insert" "', argument " "1"" of type '" "std::vector< hfst::HfstTransducer > *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst::HfstTransducer > * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0); - if (!SWIG_IsOK(res2) || !iter2) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "HfstTransducerVector_insert" "', argument " "2"" of type '" "std::vector< hfst::HfstTransducer >::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 '" "HfstTransducerVector_insert" "', argument " "2"" of type '" "std::vector< hfst::HfstTransducer >::iterator""'"); - } - } - res3 = SWIG_ConvertPtr(swig_obj[2], &argp3, SWIGTYPE_p_hfst__HfstTransducer, 0 | 0); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "HfstTransducerVector_insert" "', argument " "3"" of type '" "std::vector< hfst::HfstTransducer >::value_type const &""'"); - } - if (!argp3) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstTransducerVector_insert" "', argument " "3"" of type '" "std::vector< hfst::HfstTransducer >::value_type const &""'"); - } - arg3 = reinterpret_cast< std::vector< hfst::HfstTransducer >::value_type * >(argp3); - result = std_vector_Sl_hfst_HfstTransducer_Sg__insert__SWIG_0(arg1,arg2,(hfst::HfstTransducer const &)*arg3); - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< hfst::HfstTransducer >::iterator & >(result)), - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducerVector_insert__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< hfst::HfstTransducer > *arg1 = (std::vector< hfst::HfstTransducer > *) 0 ; - std::vector< hfst::HfstTransducer >::iterator arg2 ; - std::vector< hfst::HfstTransducer >::size_type arg3 ; - std::vector< hfst::HfstTransducer >::value_type *arg4 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - swig::SwigPyIterator *iter2 = 0 ; - int res2 ; - size_t val3 ; - int ecode3 = 0 ; - void *argp4 = 0 ; - int res4 = 0 ; - - if ((nobjs < 4) || (nobjs > 4)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst__HfstTransducer_std__allocatorT_hfst__HfstTransducer_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducerVector_insert" "', argument " "1"" of type '" "std::vector< hfst::HfstTransducer > *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst::HfstTransducer > * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0); - if (!SWIG_IsOK(res2) || !iter2) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "HfstTransducerVector_insert" "', argument " "2"" of type '" "std::vector< hfst::HfstTransducer >::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 '" "HfstTransducerVector_insert" "', argument " "2"" of type '" "std::vector< hfst::HfstTransducer >::iterator""'"); - } - } - ecode3 = SWIG_AsVal_size_t(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "HfstTransducerVector_insert" "', argument " "3"" of type '" "std::vector< hfst::HfstTransducer >::size_type""'"); - } - arg3 = static_cast< std::vector< hfst::HfstTransducer >::size_type >(val3); - res4 = SWIG_ConvertPtr(swig_obj[3], &argp4, SWIGTYPE_p_hfst__HfstTransducer, 0 | 0); - if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "HfstTransducerVector_insert" "', argument " "4"" of type '" "std::vector< hfst::HfstTransducer >::value_type const &""'"); - } - if (!argp4) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstTransducerVector_insert" "', argument " "4"" of type '" "std::vector< hfst::HfstTransducer >::value_type const &""'"); - } - arg4 = reinterpret_cast< std::vector< hfst::HfstTransducer >::value_type * >(argp4); - std_vector_Sl_hfst_HfstTransducer_Sg__insert__SWIG_1(arg1,arg2,arg3,(hfst::HfstTransducer const &)*arg4); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducerVector_insert(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[5] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "HfstTransducerVector_insert", 0, 4, argv))) SWIG_fail; - --argc; - if (argc == 3) { - int _v; - int res = swig::asptr(argv[0], (std::vector< hfst::HfstTransducer,std::allocator< hfst::HfstTransducer > >**)(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_ConvertPtr(argv[2], 0, SWIGTYPE_p_hfst__HfstTransducer, SWIG_POINTER_NO_NULL | 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_HfstTransducerVector_insert__SWIG_0(self, argc, argv); - } - } - } - } - if (argc == 4) { - int _v; - int res = swig::asptr(argv[0], (std::vector< hfst::HfstTransducer,std::allocator< hfst::HfstTransducer > >**)(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_size_t(argv[2], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - int res = SWIG_ConvertPtr(argv[3], 0, SWIGTYPE_p_hfst__HfstTransducer, SWIG_POINTER_NO_NULL | 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_HfstTransducerVector_insert__SWIG_1(self, argc, argv); - } - } - } - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'HfstTransducerVector_insert'.\n" - " Possible C/C++ prototypes are:\n" - " std::vector< hfst::HfstTransducer >::insert(std::vector< hfst::HfstTransducer >::iterator,std::vector< hfst::HfstTransducer >::value_type const &)\n" - " std::vector< hfst::HfstTransducer >::insert(std::vector< hfst::HfstTransducer >::iterator,std::vector< hfst::HfstTransducer >::size_type,std::vector< hfst::HfstTransducer >::value_type const &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducerVector_reserve(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< hfst::HfstTransducer > *arg1 = (std::vector< hfst::HfstTransducer > *) 0 ; - std::vector< hfst::HfstTransducer >::size_type arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - size_t val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args, "HfstTransducerVector_reserve", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst__HfstTransducer_std__allocatorT_hfst__HfstTransducer_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducerVector_reserve" "', argument " "1"" of type '" "std::vector< hfst::HfstTransducer > *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst::HfstTransducer > * >(argp1); - ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HfstTransducerVector_reserve" "', argument " "2"" of type '" "std::vector< hfst::HfstTransducer >::size_type""'"); - } - arg2 = static_cast< std::vector< hfst::HfstTransducer >::size_type >(val2); - (arg1)->reserve(arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducerVector_capacity(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< hfst::HfstTransducer > *arg1 = (std::vector< hfst::HfstTransducer > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::vector< hfst::HfstTransducer >::size_type result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst__HfstTransducer_std__allocatorT_hfst__HfstTransducer_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducerVector_capacity" "', argument " "1"" of type '" "std::vector< hfst::HfstTransducer > const *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst::HfstTransducer > * >(argp1); - result = ((std::vector< hfst::HfstTransducer > const *)arg1)->capacity(); - resultobj = SWIG_From_size_t(static_cast< size_t >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_HfstTransducerVector(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< hfst::HfstTransducer > *arg1 = (std::vector< hfst::HfstTransducer > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst__HfstTransducer_std__allocatorT_hfst__HfstTransducer_t_t, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_HfstTransducerVector" "', argument " "1"" of type '" "std::vector< hfst::HfstTransducer > *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst::HfstTransducer > * >(argp1); - delete arg1; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *HfstTransducerVector_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_std__vectorT_hfst__HfstTransducer_std__allocatorT_hfst__HfstTransducer_t_t, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *HfstTransducerVector_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_new_HfstSymbolSubstitutions__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::less< std::string > *arg1 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::map< std::string,std::string > *result = 0 ; - - if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_std__lessT_std__string_t, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_HfstSymbolSubstitutions" "', argument " "1"" of type '" "std::less< std::string > const &""'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_HfstSymbolSubstitutions" "', argument " "1"" of type '" "std::less< std::string > const &""'"); - } - arg1 = reinterpret_cast< std::less< std::string > * >(argp1); - result = (std::map< std::string,std::string > *)new std::map< std::string,std::string >((std::less< std::string > const &)*arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__mapT_std__string_std__string_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_std__string_t_t_t, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstSymbolSubstitutions_iterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::map< std::string,std::string > *arg1 = (std::map< std::string,std::string > *) 0 ; - PyObject **arg2 = (PyObject **) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - swig::SwigPyIterator *result = 0 ; - - arg2 = &swig_obj[0]; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_std__string_std__string_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_std__string_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstSymbolSubstitutions_iterator" "', argument " "1"" of type '" "std::map< std::string,std::string > *""'"); - } - arg1 = reinterpret_cast< std::map< std::string,std::string > * >(argp1); - result = (swig::SwigPyIterator *)std_map_Sl_std_string_Sc_std_string_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_HfstSymbolSubstitutions___nonzero__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::map< std::string,std::string > *arg1 = (std::map< std::string,std::string > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - bool result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_std__string_std__string_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_std__string_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstSymbolSubstitutions___nonzero__" "', argument " "1"" of type '" "std::map< std::string,std::string > const *""'"); - } - arg1 = reinterpret_cast< std::map< std::string,std::string > * >(argp1); - result = (bool)std_map_Sl_std_string_Sc_std_string_Sg____nonzero__((std::map< std::string,std::string > const *)arg1); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstSymbolSubstitutions___bool__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::map< std::string,std::string > *arg1 = (std::map< std::string,std::string > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - bool result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_std__string_std__string_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_std__string_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstSymbolSubstitutions___bool__" "', argument " "1"" of type '" "std::map< std::string,std::string > const *""'"); - } - arg1 = reinterpret_cast< std::map< std::string,std::string > * >(argp1); - result = (bool)std_map_Sl_std_string_Sc_std_string_Sg____bool__((std::map< std::string,std::string > const *)arg1); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstSymbolSubstitutions___len__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::map< std::string,std::string > *arg1 = (std::map< std::string,std::string > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::map< std::string,std::string >::size_type result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_std__string_std__string_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_std__string_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstSymbolSubstitutions___len__" "', argument " "1"" of type '" "std::map< std::string,std::string > const *""'"); - } - arg1 = reinterpret_cast< std::map< std::string,std::string > * >(argp1); - result = std_map_Sl_std_string_Sc_std_string_Sg____len__((std::map< std::string,std::string > const *)arg1); - resultobj = SWIG_From_size_t(static_cast< size_t >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstSymbolSubstitutions___getitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::map< std::string,std::string > *arg1 = (std::map< std::string,std::string > *) 0 ; - std::map< std::string,std::string >::key_type *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 = SWIG_OLDOBJ ; - PyObject *swig_obj[2] ; - std::map< std::string,std::string >::mapped_type *result = 0 ; - - if (!SWIG_Python_UnpackTuple(args, "HfstSymbolSubstitutions___getitem__", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_std__string_std__string_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_std__string_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstSymbolSubstitutions___getitem__" "', argument " "1"" of type '" "std::map< std::string,std::string > *""'"); - } - arg1 = reinterpret_cast< std::map< std::string,std::string > * >(argp1); - { - std::string *ptr = (std::string *)0; - res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HfstSymbolSubstitutions___getitem__" "', argument " "2"" of type '" "std::map< std::string,std::string >::key_type const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstSymbolSubstitutions___getitem__" "', argument " "2"" of type '" "std::map< std::string,std::string >::key_type const &""'"); - } - arg2 = ptr; - } - try { - result = (std::map< std::string,std::string >::mapped_type *) &std_map_Sl_std_string_Sc_std_string_Sg____getitem__(arg1,(std::string const &)*arg2); - } catch(std::out_of_range &_e) { - SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); - } - resultobj = SWIG_From_std_string(static_cast< std::string >(*result)); - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstSymbolSubstitutions___delitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::map< std::string,std::string > *arg1 = (std::map< std::string,std::string > *) 0 ; - std::map< std::string,std::string >::key_type *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 = SWIG_OLDOBJ ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args, "HfstSymbolSubstitutions___delitem__", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_std__string_std__string_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_std__string_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstSymbolSubstitutions___delitem__" "', argument " "1"" of type '" "std::map< std::string,std::string > *""'"); - } - arg1 = reinterpret_cast< std::map< std::string,std::string > * >(argp1); - { - std::string *ptr = (std::string *)0; - res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HfstSymbolSubstitutions___delitem__" "', argument " "2"" of type '" "std::map< std::string,std::string >::key_type const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstSymbolSubstitutions___delitem__" "', argument " "2"" of type '" "std::map< std::string,std::string >::key_type const &""'"); - } - arg2 = ptr; - } - try { - std_map_Sl_std_string_Sc_std_string_Sg____delitem__(arg1,(std::string const &)*arg2); - } catch(std::out_of_range &_e) { - SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); - } - resultobj = SWIG_Py_Void(); - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstSymbolSubstitutions_has_key(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::map< std::string,std::string > *arg1 = (std::map< std::string,std::string > *) 0 ; - std::map< std::string,std::string >::key_type *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 = SWIG_OLDOBJ ; - PyObject *swig_obj[2] ; - bool result; - - if (!SWIG_Python_UnpackTuple(args, "HfstSymbolSubstitutions_has_key", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_std__string_std__string_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_std__string_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstSymbolSubstitutions_has_key" "', argument " "1"" of type '" "std::map< std::string,std::string > const *""'"); - } - arg1 = reinterpret_cast< std::map< std::string,std::string > * >(argp1); - { - std::string *ptr = (std::string *)0; - res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HfstSymbolSubstitutions_has_key" "', argument " "2"" of type '" "std::map< std::string,std::string >::key_type const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstSymbolSubstitutions_has_key" "', argument " "2"" of type '" "std::map< std::string,std::string >::key_type const &""'"); - } - arg2 = ptr; - } - result = (bool)std_map_Sl_std_string_Sc_std_string_Sg__has_key((std::map< std::string,std::string > const *)arg1,(std::string const &)*arg2); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstSymbolSubstitutions_keys(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::map< std::string,std::string > *arg1 = (std::map< std::string,std::string > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - PyObject *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_std__string_std__string_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_std__string_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstSymbolSubstitutions_keys" "', argument " "1"" of type '" "std::map< std::string,std::string > *""'"); - } - arg1 = reinterpret_cast< std::map< std::string,std::string > * >(argp1); - result = (PyObject *)std_map_Sl_std_string_Sc_std_string_Sg__keys(arg1); - resultobj = result; - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstSymbolSubstitutions_values(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::map< std::string,std::string > *arg1 = (std::map< std::string,std::string > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - PyObject *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_std__string_std__string_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_std__string_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstSymbolSubstitutions_values" "', argument " "1"" of type '" "std::map< std::string,std::string > *""'"); - } - arg1 = reinterpret_cast< std::map< std::string,std::string > * >(argp1); - result = (PyObject *)std_map_Sl_std_string_Sc_std_string_Sg__values(arg1); - resultobj = result; - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstSymbolSubstitutions_items(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::map< std::string,std::string > *arg1 = (std::map< std::string,std::string > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - PyObject *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_std__string_std__string_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_std__string_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstSymbolSubstitutions_items" "', argument " "1"" of type '" "std::map< std::string,std::string > *""'"); - } - arg1 = reinterpret_cast< std::map< std::string,std::string > * >(argp1); - result = (PyObject *)std_map_Sl_std_string_Sc_std_string_Sg__items(arg1); - resultobj = result; - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstSymbolSubstitutions___contains__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::map< std::string,std::string > *arg1 = (std::map< std::string,std::string > *) 0 ; - std::map< std::string,std::string >::key_type *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 = SWIG_OLDOBJ ; - PyObject *swig_obj[2] ; - bool result; - - if (!SWIG_Python_UnpackTuple(args, "HfstSymbolSubstitutions___contains__", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_std__string_std__string_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_std__string_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstSymbolSubstitutions___contains__" "', argument " "1"" of type '" "std::map< std::string,std::string > *""'"); - } - arg1 = reinterpret_cast< std::map< std::string,std::string > * >(argp1); - { - std::string *ptr = (std::string *)0; - res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HfstSymbolSubstitutions___contains__" "', argument " "2"" of type '" "std::map< std::string,std::string >::key_type const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstSymbolSubstitutions___contains__" "', argument " "2"" of type '" "std::map< std::string,std::string >::key_type const &""'"); - } - arg2 = ptr; - } - result = (bool)std_map_Sl_std_string_Sc_std_string_Sg____contains__(arg1,(std::string const &)*arg2); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstSymbolSubstitutions_key_iterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::map< std::string,std::string > *arg1 = (std::map< std::string,std::string > *) 0 ; - PyObject **arg2 = (PyObject **) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - swig::SwigPyIterator *result = 0 ; - - arg2 = &swig_obj[0]; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_std__string_std__string_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_std__string_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstSymbolSubstitutions_key_iterator" "', argument " "1"" of type '" "std::map< std::string,std::string > *""'"); - } - arg1 = reinterpret_cast< std::map< std::string,std::string > * >(argp1); - result = (swig::SwigPyIterator *)std_map_Sl_std_string_Sc_std_string_Sg__key_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_HfstSymbolSubstitutions_value_iterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::map< std::string,std::string > *arg1 = (std::map< std::string,std::string > *) 0 ; - PyObject **arg2 = (PyObject **) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - swig::SwigPyIterator *result = 0 ; - - arg2 = &swig_obj[0]; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_std__string_std__string_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_std__string_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstSymbolSubstitutions_value_iterator" "', argument " "1"" of type '" "std::map< std::string,std::string > *""'"); - } - arg1 = reinterpret_cast< std::map< std::string,std::string > * >(argp1); - result = (swig::SwigPyIterator *)std_map_Sl_std_string_Sc_std_string_Sg__value_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_HfstSymbolSubstitutions___setitem____SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::map< std::string,std::string > *arg1 = (std::map< std::string,std::string > *) 0 ; - std::map< std::string,std::string >::key_type *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 = SWIG_OLDOBJ ; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_std__string_std__string_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_std__string_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstSymbolSubstitutions___setitem__" "', argument " "1"" of type '" "std::map< std::string,std::string > *""'"); - } - arg1 = reinterpret_cast< std::map< std::string,std::string > * >(argp1); - { - std::string *ptr = (std::string *)0; - res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HfstSymbolSubstitutions___setitem__" "', argument " "2"" of type '" "std::map< std::string,std::string >::key_type const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstSymbolSubstitutions___setitem__" "', argument " "2"" of type '" "std::map< std::string,std::string >::key_type const &""'"); - } - arg2 = ptr; - } - std_map_Sl_std_string_Sc_std_string_Sg____setitem____SWIG_0(arg1,(std::string const &)*arg2); - resultobj = SWIG_Py_Void(); - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstSymbolSubstitutions___setitem____SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::map< std::string,std::string > *arg1 = (std::map< std::string,std::string > *) 0 ; - std::map< std::string,std::string >::key_type *arg2 = 0 ; - std::map< std::string,std::string >::mapped_type *arg3 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 = SWIG_OLDOBJ ; - int res3 = SWIG_OLDOBJ ; - - if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_std__string_std__string_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_std__string_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstSymbolSubstitutions___setitem__" "', argument " "1"" of type '" "std::map< std::string,std::string > *""'"); - } - arg1 = reinterpret_cast< std::map< std::string,std::string > * >(argp1); - { - std::string *ptr = (std::string *)0; - res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HfstSymbolSubstitutions___setitem__" "', argument " "2"" of type '" "std::map< std::string,std::string >::key_type const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstSymbolSubstitutions___setitem__" "', argument " "2"" of type '" "std::map< std::string,std::string >::key_type const &""'"); - } - arg2 = ptr; - } - { - std::string *ptr = (std::string *)0; - res3 = SWIG_AsPtr_std_string(swig_obj[2], &ptr); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "HfstSymbolSubstitutions___setitem__" "', argument " "3"" of type '" "std::map< std::string,std::string >::mapped_type const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstSymbolSubstitutions___setitem__" "', argument " "3"" of type '" "std::map< std::string,std::string >::mapped_type const &""'"); - } - arg3 = ptr; - } - try { - std_map_Sl_std_string_Sc_std_string_Sg____setitem____SWIG_1(arg1,(std::string const &)*arg2,(std::string const &)*arg3); - } catch(std::out_of_range &_e) { - SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); - } - resultobj = SWIG_Py_Void(); - if (SWIG_IsNewObj(res2)) delete arg2; - if (SWIG_IsNewObj(res3)) delete arg3; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - if (SWIG_IsNewObj(res3)) delete arg3; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstSymbolSubstitutions___setitem__(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[4] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "HfstSymbolSubstitutions___setitem__", 0, 3, argv))) SWIG_fail; - --argc; - if (argc == 2) { - int _v; - int res = swig::asptr(argv[0], (std::map< std::string,std::string,std::less< std::string >,std::allocator< std::pair< std::string const,std::string > > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_AsPtr_std_string(argv[1], (std::string**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_HfstSymbolSubstitutions___setitem____SWIG_0(self, argc, argv); - } - } - } - if (argc == 3) { - int _v; - int res = swig::asptr(argv[0], (std::map< std::string,std::string,std::less< std::string >,std::allocator< std::pair< std::string const,std::string > > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_AsPtr_std_string(argv[1], (std::string**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_AsPtr_std_string(argv[2], (std::string**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_HfstSymbolSubstitutions___setitem____SWIG_1(self, argc, argv); - } - } - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'HfstSymbolSubstitutions___setitem__'.\n" - " Possible C/C++ prototypes are:\n" - " std::map< std::string,std::string >::__setitem__(std::map< std::string,std::string >::key_type const &)\n" - " std::map< std::string,std::string >::__setitem__(std::map< std::string,std::string >::key_type const &,std::map< std::string,std::string >::mapped_type const &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_HfstSymbolSubstitutions_asdict(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::map< std::string,std::string > *arg1 = (std::map< std::string,std::string > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - PyObject *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_std__string_std__string_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_std__string_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstSymbolSubstitutions_asdict" "', argument " "1"" of type '" "std::map< std::string,std::string > *""'"); - } - arg1 = reinterpret_cast< std::map< std::string,std::string > * >(argp1); - result = (PyObject *)std_map_Sl_std_string_Sc_std_string_Sg__asdict(arg1); - resultobj = result; - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_HfstSymbolSubstitutions__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **SWIGUNUSEDPARM(swig_obj)) { - PyObject *resultobj = 0; - std::map< std::string,std::string > *result = 0 ; - - if ((nobjs < 0) || (nobjs > 0)) SWIG_fail; - result = (std::map< std::string,std::string > *)new std::map< std::string,std::string >(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__mapT_std__string_std__string_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_std__string_t_t_t, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_HfstSymbolSubstitutions__SWIG_2(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::map< std::string,std::string > *arg1 = 0 ; - int res1 = SWIG_OLDOBJ ; - std::map< std::string,std::string > *result = 0 ; - - if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; - { - std::map< std::string,std::string,std::less< std::string >,std::allocator< std::pair< std::string const,std::string > > > *ptr = (std::map< std::string,std::string,std::less< std::string >,std::allocator< std::pair< std::string const,std::string > > > *)0; - res1 = swig::asptr(swig_obj[0], &ptr); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_HfstSymbolSubstitutions" "', argument " "1"" of type '" "std::map< std::string,std::string > const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_HfstSymbolSubstitutions" "', argument " "1"" of type '" "std::map< std::string,std::string > const &""'"); - } - arg1 = ptr; - } - result = (std::map< std::string,std::string > *)new std::map< std::string,std::string >((std::map< std::string,std::string > const &)*arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__mapT_std__string_std__string_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_std__string_t_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_new_HfstSymbolSubstitutions(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[2] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "new_HfstSymbolSubstitutions", 0, 1, argv))) SWIG_fail; - --argc; - if (argc == 0) { - return _wrap_new_HfstSymbolSubstitutions__SWIG_1(self, argc, argv); - } - if (argc == 1) { - int _v; - int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_std__lessT_std__string_t, SWIG_POINTER_NO_NULL | 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_new_HfstSymbolSubstitutions__SWIG_0(self, argc, argv); - } - } - if (argc == 1) { - int _v; - int res = swig::asptr(argv[0], (std::map< std::string,std::string,std::less< std::string >,std::allocator< std::pair< std::string const,std::string > > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_new_HfstSymbolSubstitutions__SWIG_2(self, argc, argv); - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'new_HfstSymbolSubstitutions'.\n" - " Possible C/C++ prototypes are:\n" - " std::map< std::string,std::string >::map(std::less< std::string > const &)\n" - " std::map< std::string,std::string >::map()\n" - " std::map< std::string,std::string >::map(std::map< std::string,std::string > const &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_HfstSymbolSubstitutions_empty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::map< std::string,std::string > *arg1 = (std::map< std::string,std::string > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - bool result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_std__string_std__string_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_std__string_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstSymbolSubstitutions_empty" "', argument " "1"" of type '" "std::map< std::string,std::string > const *""'"); - } - arg1 = reinterpret_cast< std::map< std::string,std::string > * >(argp1); - result = (bool)((std::map< std::string,std::string > const *)arg1)->empty(); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstSymbolSubstitutions_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::map< std::string,std::string > *arg1 = (std::map< std::string,std::string > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::map< std::string,std::string >::size_type result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_std__string_std__string_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_std__string_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstSymbolSubstitutions_size" "', argument " "1"" of type '" "std::map< std::string,std::string > const *""'"); - } - arg1 = reinterpret_cast< std::map< std::string,std::string > * >(argp1); - result = ((std::map< std::string,std::string > const *)arg1)->size(); - resultobj = SWIG_From_size_t(static_cast< size_t >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstSymbolSubstitutions_swap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::map< std::string,std::string > *arg1 = (std::map< std::string,std::string > *) 0 ; - std::map< std::string,std::string > *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args, "HfstSymbolSubstitutions_swap", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_std__string_std__string_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_std__string_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstSymbolSubstitutions_swap" "', argument " "1"" of type '" "std::map< std::string,std::string > *""'"); - } - arg1 = reinterpret_cast< std::map< std::string,std::string > * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_std__mapT_std__string_std__string_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_std__string_t_t_t, 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HfstSymbolSubstitutions_swap" "', argument " "2"" of type '" "std::map< std::string,std::string > &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstSymbolSubstitutions_swap" "', argument " "2"" of type '" "std::map< std::string,std::string > &""'"); - } - arg2 = reinterpret_cast< std::map< std::string,std::string > * >(argp2); - (arg1)->swap(*arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstSymbolSubstitutions_begin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::map< std::string,std::string > *arg1 = (std::map< std::string,std::string > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::map< std::string,std::string >::iterator result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_std__string_std__string_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_std__string_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstSymbolSubstitutions_begin" "', argument " "1"" of type '" "std::map< std::string,std::string > *""'"); - } - arg1 = reinterpret_cast< std::map< std::string,std::string > * >(argp1); - result = (arg1)->begin(); - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::map< std::string,std::string >::iterator & >(result)), - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstSymbolSubstitutions_end(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::map< std::string,std::string > *arg1 = (std::map< std::string,std::string > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::map< std::string,std::string >::iterator result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_std__string_std__string_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_std__string_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstSymbolSubstitutions_end" "', argument " "1"" of type '" "std::map< std::string,std::string > *""'"); - } - arg1 = reinterpret_cast< std::map< std::string,std::string > * >(argp1); - result = (arg1)->end(); - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::map< std::string,std::string >::iterator & >(result)), - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstSymbolSubstitutions_rbegin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::map< std::string,std::string > *arg1 = (std::map< std::string,std::string > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::map< std::string,std::string >::reverse_iterator result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_std__string_std__string_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_std__string_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstSymbolSubstitutions_rbegin" "', argument " "1"" of type '" "std::map< std::string,std::string > *""'"); - } - arg1 = reinterpret_cast< std::map< std::string,std::string > * >(argp1); - result = (arg1)->rbegin(); - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::map< std::string,std::string >::reverse_iterator & >(result)), - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstSymbolSubstitutions_rend(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::map< std::string,std::string > *arg1 = (std::map< std::string,std::string > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::map< std::string,std::string >::reverse_iterator result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_std__string_std__string_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_std__string_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstSymbolSubstitutions_rend" "', argument " "1"" of type '" "std::map< std::string,std::string > *""'"); - } - arg1 = reinterpret_cast< std::map< std::string,std::string > * >(argp1); - result = (arg1)->rend(); - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::map< std::string,std::string >::reverse_iterator & >(result)), - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstSymbolSubstitutions_clear(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::map< std::string,std::string > *arg1 = (std::map< std::string,std::string > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_std__string_std__string_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_std__string_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstSymbolSubstitutions_clear" "', argument " "1"" of type '" "std::map< std::string,std::string > *""'"); - } - arg1 = reinterpret_cast< std::map< std::string,std::string > * >(argp1); - (arg1)->clear(); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstSymbolSubstitutions_get_allocator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::map< std::string,std::string > *arg1 = (std::map< std::string,std::string > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - SwigValueWrapper< std::allocator< std::pair< std::string const,std::string > > > result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_std__string_std__string_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_std__string_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstSymbolSubstitutions_get_allocator" "', argument " "1"" of type '" "std::map< std::string,std::string > const *""'"); - } - arg1 = reinterpret_cast< std::map< std::string,std::string > * >(argp1); - result = ((std::map< std::string,std::string > const *)arg1)->get_allocator(); - resultobj = SWIG_NewPointerObj((new std::map< std::string,std::string >::allocator_type(static_cast< const std::map< std::string,std::string >::allocator_type& >(result))), SWIGTYPE_p_std__allocatorT_std__pairT_std__string_const_std__string_t_t, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstSymbolSubstitutions_erase__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::map< std::string,std::string > *arg1 = (std::map< std::string,std::string > *) 0 ; - std::map< std::string,std::string >::key_type *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 = SWIG_OLDOBJ ; - std::map< std::string,std::string >::size_type result; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_std__string_std__string_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_std__string_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstSymbolSubstitutions_erase" "', argument " "1"" of type '" "std::map< std::string,std::string > *""'"); - } - arg1 = reinterpret_cast< std::map< std::string,std::string > * >(argp1); - { - std::string *ptr = (std::string *)0; - res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HfstSymbolSubstitutions_erase" "', argument " "2"" of type '" "std::map< std::string,std::string >::key_type const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstSymbolSubstitutions_erase" "', argument " "2"" of type '" "std::map< std::string,std::string >::key_type const &""'"); - } - arg2 = ptr; - } - result = (arg1)->erase((std::map< std::string,std::string >::key_type const &)*arg2); - resultobj = SWIG_From_size_t(static_cast< size_t >(result)); - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstSymbolSubstitutions_count(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::map< std::string,std::string > *arg1 = (std::map< std::string,std::string > *) 0 ; - std::map< std::string,std::string >::key_type *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 = SWIG_OLDOBJ ; - PyObject *swig_obj[2] ; - std::map< std::string,std::string >::size_type result; - - if (!SWIG_Python_UnpackTuple(args, "HfstSymbolSubstitutions_count", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_std__string_std__string_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_std__string_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstSymbolSubstitutions_count" "', argument " "1"" of type '" "std::map< std::string,std::string > const *""'"); - } - arg1 = reinterpret_cast< std::map< std::string,std::string > * >(argp1); - { - std::string *ptr = (std::string *)0; - res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HfstSymbolSubstitutions_count" "', argument " "2"" of type '" "std::map< std::string,std::string >::key_type const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstSymbolSubstitutions_count" "', argument " "2"" of type '" "std::map< std::string,std::string >::key_type const &""'"); - } - arg2 = ptr; - } - result = ((std::map< std::string,std::string > const *)arg1)->count((std::map< std::string,std::string >::key_type const &)*arg2); - resultobj = SWIG_From_size_t(static_cast< size_t >(result)); - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstSymbolSubstitutions_erase__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::map< std::string,std::string > *arg1 = (std::map< std::string,std::string > *) 0 ; - std::map< std::string,std::string >::iterator arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - swig::SwigPyIterator *iter2 = 0 ; - int res2 ; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_std__string_std__string_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_std__string_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstSymbolSubstitutions_erase" "', argument " "1"" of type '" "std::map< std::string,std::string > *""'"); - } - arg1 = reinterpret_cast< std::map< std::string,std::string > * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0); - if (!SWIG_IsOK(res2) || !iter2) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "HfstSymbolSubstitutions_erase" "', argument " "2"" of type '" "std::map< std::string,std::string >::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 '" "HfstSymbolSubstitutions_erase" "', argument " "2"" of type '" "std::map< std::string,std::string >::iterator""'"); - } - } - std_map_Sl_std_string_Sc_std_string_Sg__erase__SWIG_1(arg1,arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstSymbolSubstitutions_erase__SWIG_2(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::map< std::string,std::string > *arg1 = (std::map< std::string,std::string > *) 0 ; - std::map< std::string,std::string >::iterator arg2 ; - std::map< std::string,std::string >::iterator arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - swig::SwigPyIterator *iter2 = 0 ; - int res2 ; - swig::SwigPyIterator *iter3 = 0 ; - int res3 ; - - if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_std__string_std__string_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_std__string_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstSymbolSubstitutions_erase" "', argument " "1"" of type '" "std::map< std::string,std::string > *""'"); - } - arg1 = reinterpret_cast< std::map< std::string,std::string > * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0); - if (!SWIG_IsOK(res2) || !iter2) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "HfstSymbolSubstitutions_erase" "', argument " "2"" of type '" "std::map< std::string,std::string >::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 '" "HfstSymbolSubstitutions_erase" "', argument " "2"" of type '" "std::map< std::string,std::string >::iterator""'"); - } - } - res3 = SWIG_ConvertPtr(swig_obj[2], SWIG_as_voidptrptr(&iter3), swig::SwigPyIterator::descriptor(), 0); - if (!SWIG_IsOK(res3) || !iter3) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "HfstSymbolSubstitutions_erase" "', argument " "3"" of type '" "std::map< std::string,std::string >::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 '" "HfstSymbolSubstitutions_erase" "', argument " "3"" of type '" "std::map< std::string,std::string >::iterator""'"); - } - } - std_map_Sl_std_string_Sc_std_string_Sg__erase__SWIG_2(arg1,arg2,arg3); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstSymbolSubstitutions_erase(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[4] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "HfstSymbolSubstitutions_erase", 0, 3, argv))) SWIG_fail; - --argc; - if (argc == 2) { - int _v; - int res = swig::asptr(argv[0], (std::map< std::string,std::string,std::less< std::string >,std::allocator< std::pair< std::string const,std::string > > >**)(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_HfstSymbolSubstitutions_erase__SWIG_1(self, argc, argv); - } - } - } - if (argc == 2) { - int _v; - int res = swig::asptr(argv[0], (std::map< std::string,std::string,std::less< std::string >,std::allocator< std::pair< std::string const,std::string > > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_AsPtr_std_string(argv[1], (std::string**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_HfstSymbolSubstitutions_erase__SWIG_0(self, argc, argv); - } - } - } - if (argc == 3) { - int _v; - int res = swig::asptr(argv[0], (std::map< std::string,std::string,std::less< std::string >,std::allocator< std::pair< std::string const,std::string > > >**)(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_HfstSymbolSubstitutions_erase__SWIG_2(self, argc, argv); - } - } - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'HfstSymbolSubstitutions_erase'.\n" - " Possible C/C++ prototypes are:\n" - " std::map< std::string,std::string >::erase(std::map< std::string,std::string >::key_type const &)\n" - " std::map< std::string,std::string >::erase(std::map< std::string,std::string >::iterator)\n" - " std::map< std::string,std::string >::erase(std::map< std::string,std::string >::iterator,std::map< std::string,std::string >::iterator)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_HfstSymbolSubstitutions_find(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::map< std::string,std::string > *arg1 = (std::map< std::string,std::string > *) 0 ; - std::map< std::string,std::string >::key_type *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 = SWIG_OLDOBJ ; - PyObject *swig_obj[2] ; - std::map< std::string,std::string >::iterator result; - - if (!SWIG_Python_UnpackTuple(args, "HfstSymbolSubstitutions_find", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_std__string_std__string_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_std__string_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstSymbolSubstitutions_find" "', argument " "1"" of type '" "std::map< std::string,std::string > *""'"); - } - arg1 = reinterpret_cast< std::map< std::string,std::string > * >(argp1); - { - std::string *ptr = (std::string *)0; - res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HfstSymbolSubstitutions_find" "', argument " "2"" of type '" "std::map< std::string,std::string >::key_type const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstSymbolSubstitutions_find" "', argument " "2"" of type '" "std::map< std::string,std::string >::key_type const &""'"); - } - arg2 = ptr; - } - result = (arg1)->find((std::map< std::string,std::string >::key_type const &)*arg2); - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::map< std::string,std::string >::iterator & >(result)), - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstSymbolSubstitutions_lower_bound(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::map< std::string,std::string > *arg1 = (std::map< std::string,std::string > *) 0 ; - std::map< std::string,std::string >::key_type *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 = SWIG_OLDOBJ ; - PyObject *swig_obj[2] ; - std::map< std::string,std::string >::iterator result; - - if (!SWIG_Python_UnpackTuple(args, "HfstSymbolSubstitutions_lower_bound", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_std__string_std__string_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_std__string_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstSymbolSubstitutions_lower_bound" "', argument " "1"" of type '" "std::map< std::string,std::string > *""'"); - } - arg1 = reinterpret_cast< std::map< std::string,std::string > * >(argp1); - { - std::string *ptr = (std::string *)0; - res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HfstSymbolSubstitutions_lower_bound" "', argument " "2"" of type '" "std::map< std::string,std::string >::key_type const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstSymbolSubstitutions_lower_bound" "', argument " "2"" of type '" "std::map< std::string,std::string >::key_type const &""'"); - } - arg2 = ptr; - } - result = (arg1)->lower_bound((std::map< std::string,std::string >::key_type const &)*arg2); - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::map< std::string,std::string >::iterator & >(result)), - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstSymbolSubstitutions_upper_bound(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::map< std::string,std::string > *arg1 = (std::map< std::string,std::string > *) 0 ; - std::map< std::string,std::string >::key_type *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 = SWIG_OLDOBJ ; - PyObject *swig_obj[2] ; - std::map< std::string,std::string >::iterator result; - - if (!SWIG_Python_UnpackTuple(args, "HfstSymbolSubstitutions_upper_bound", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_std__string_std__string_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_std__string_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstSymbolSubstitutions_upper_bound" "', argument " "1"" of type '" "std::map< std::string,std::string > *""'"); - } - arg1 = reinterpret_cast< std::map< std::string,std::string > * >(argp1); - { - std::string *ptr = (std::string *)0; - res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HfstSymbolSubstitutions_upper_bound" "', argument " "2"" of type '" "std::map< std::string,std::string >::key_type const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstSymbolSubstitutions_upper_bound" "', argument " "2"" of type '" "std::map< std::string,std::string >::key_type const &""'"); - } - arg2 = ptr; - } - result = (arg1)->upper_bound((std::map< std::string,std::string >::key_type const &)*arg2); - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::map< std::string,std::string >::iterator & >(result)), - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_HfstSymbolSubstitutions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::map< std::string,std::string > *arg1 = (std::map< std::string,std::string > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_std__string_std__string_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_std__string_t_t_t, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_HfstSymbolSubstitutions" "', argument " "1"" of type '" "std::map< std::string,std::string > *""'"); - } - arg1 = reinterpret_cast< std::map< std::string,std::string > * >(argp1); - delete arg1; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *HfstSymbolSubstitutions_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_std__mapT_std__string_std__string_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_std__string_t_t_t, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *HfstSymbolSubstitutions_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_new_HfstSymbolPairSubstitutions__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::less< std::pair< std::string,std::string > > *arg1 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > *result = 0 ; - - if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_std__lessT_std__pairT_std__string_std__string_t_t, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_HfstSymbolPairSubstitutions" "', argument " "1"" of type '" "std::less< std::pair< std::string,std::string > > const &""'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_HfstSymbolPairSubstitutions" "', argument " "1"" of type '" "std::less< std::pair< std::string,std::string > > const &""'"); - } - arg1 = reinterpret_cast< std::less< std::pair< std::string,std::string > > * >(argp1); - result = (std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > *)new std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > >((std::less< std::pair< std::string,std::string > > const &)*arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__mapT_std__pairT_std__string_std__string_t_std__pairT_std__string_std__string_t_std__lessT_std__pairT_std__string_std__string_t_t_std__allocatorT_std__pairT_std__pairT_std__string_std__string_t_const_std__pairT_std__string_std__string_t_t_t_t, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstSymbolPairSubstitutions_iterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > *arg1 = (std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > *) 0 ; - PyObject **arg2 = (PyObject **) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - swig::SwigPyIterator *result = 0 ; - - arg2 = &swig_obj[0]; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_std__pairT_std__string_std__string_t_std__pairT_std__string_std__string_t_std__lessT_std__pairT_std__string_std__string_t_t_std__allocatorT_std__pairT_std__pairT_std__string_std__string_t_const_std__pairT_std__string_std__string_t_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstSymbolPairSubstitutions_iterator" "', argument " "1"" of type '" "std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > *""'"); - } - arg1 = reinterpret_cast< std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > * >(argp1); - result = (swig::SwigPyIterator *)std_map_Sl_std_pair_Sl_std_string_Sc_std_string_Sg__Sc_std_pair_Sl_std_string_Sc_std_string_Sg__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_HfstSymbolPairSubstitutions___nonzero__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > *arg1 = (std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - bool result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_std__pairT_std__string_std__string_t_std__pairT_std__string_std__string_t_std__lessT_std__pairT_std__string_std__string_t_t_std__allocatorT_std__pairT_std__pairT_std__string_std__string_t_const_std__pairT_std__string_std__string_t_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstSymbolPairSubstitutions___nonzero__" "', argument " "1"" of type '" "std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > const *""'"); - } - arg1 = reinterpret_cast< std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > * >(argp1); - result = (bool)std_map_Sl_std_pair_Sl_std_string_Sc_std_string_Sg__Sc_std_pair_Sl_std_string_Sc_std_string_Sg__Sg____nonzero__((std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > const *)arg1); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstSymbolPairSubstitutions___bool__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > *arg1 = (std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - bool result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_std__pairT_std__string_std__string_t_std__pairT_std__string_std__string_t_std__lessT_std__pairT_std__string_std__string_t_t_std__allocatorT_std__pairT_std__pairT_std__string_std__string_t_const_std__pairT_std__string_std__string_t_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstSymbolPairSubstitutions___bool__" "', argument " "1"" of type '" "std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > const *""'"); - } - arg1 = reinterpret_cast< std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > * >(argp1); - result = (bool)std_map_Sl_std_pair_Sl_std_string_Sc_std_string_Sg__Sc_std_pair_Sl_std_string_Sc_std_string_Sg__Sg____bool__((std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > const *)arg1); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstSymbolPairSubstitutions___len__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > *arg1 = (std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > >::size_type result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_std__pairT_std__string_std__string_t_std__pairT_std__string_std__string_t_std__lessT_std__pairT_std__string_std__string_t_t_std__allocatorT_std__pairT_std__pairT_std__string_std__string_t_const_std__pairT_std__string_std__string_t_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstSymbolPairSubstitutions___len__" "', argument " "1"" of type '" "std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > const *""'"); - } - arg1 = reinterpret_cast< std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > * >(argp1); - result = std_map_Sl_std_pair_Sl_std_string_Sc_std_string_Sg__Sc_std_pair_Sl_std_string_Sc_std_string_Sg__Sg____len__((std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > const *)arg1); - resultobj = SWIG_From_size_t(static_cast< size_t >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstSymbolPairSubstitutions___getitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > *arg1 = (std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > *) 0 ; - std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > >::key_type *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 = SWIG_OLDOBJ ; - PyObject *swig_obj[2] ; - std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > >::mapped_type *result = 0 ; - - if (!SWIG_Python_UnpackTuple(args, "HfstSymbolPairSubstitutions___getitem__", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_std__pairT_std__string_std__string_t_std__pairT_std__string_std__string_t_std__lessT_std__pairT_std__string_std__string_t_t_std__allocatorT_std__pairT_std__pairT_std__string_std__string_t_const_std__pairT_std__string_std__string_t_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstSymbolPairSubstitutions___getitem__" "', argument " "1"" of type '" "std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > *""'"); - } - arg1 = reinterpret_cast< std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > * >(argp1); - { - std::pair< std::string,std::string > *ptr = (std::pair< std::string,std::string > *)0; - res2 = swig::asptr(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HfstSymbolPairSubstitutions___getitem__" "', argument " "2"" of type '" "std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > >::key_type const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstSymbolPairSubstitutions___getitem__" "', argument " "2"" of type '" "std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > >::key_type const &""'"); - } - arg2 = ptr; - } - try { - result = (std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > >::mapped_type *) &std_map_Sl_std_pair_Sl_std_string_Sc_std_string_Sg__Sc_std_pair_Sl_std_string_Sc_std_string_Sg__Sg____getitem__(arg1,(std::pair< std::string,std::string > const &)*arg2); - } catch(std::out_of_range &_e) { - SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); - } - resultobj = swig::from(static_cast< std::pair< std::string,std::string > >(*result)); - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstSymbolPairSubstitutions___delitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > *arg1 = (std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > *) 0 ; - std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > >::key_type *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 = SWIG_OLDOBJ ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args, "HfstSymbolPairSubstitutions___delitem__", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_std__pairT_std__string_std__string_t_std__pairT_std__string_std__string_t_std__lessT_std__pairT_std__string_std__string_t_t_std__allocatorT_std__pairT_std__pairT_std__string_std__string_t_const_std__pairT_std__string_std__string_t_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstSymbolPairSubstitutions___delitem__" "', argument " "1"" of type '" "std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > *""'"); - } - arg1 = reinterpret_cast< std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > * >(argp1); - { - std::pair< std::string,std::string > *ptr = (std::pair< std::string,std::string > *)0; - res2 = swig::asptr(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HfstSymbolPairSubstitutions___delitem__" "', argument " "2"" of type '" "std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > >::key_type const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstSymbolPairSubstitutions___delitem__" "', argument " "2"" of type '" "std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > >::key_type const &""'"); - } - arg2 = ptr; - } - try { - std_map_Sl_std_pair_Sl_std_string_Sc_std_string_Sg__Sc_std_pair_Sl_std_string_Sc_std_string_Sg__Sg____delitem__(arg1,(std::pair< std::string,std::string > const &)*arg2); - } catch(std::out_of_range &_e) { - SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); - } - resultobj = SWIG_Py_Void(); - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstSymbolPairSubstitutions_has_key(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > *arg1 = (std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > *) 0 ; - std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > >::key_type *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 = SWIG_OLDOBJ ; - PyObject *swig_obj[2] ; - bool result; - - if (!SWIG_Python_UnpackTuple(args, "HfstSymbolPairSubstitutions_has_key", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_std__pairT_std__string_std__string_t_std__pairT_std__string_std__string_t_std__lessT_std__pairT_std__string_std__string_t_t_std__allocatorT_std__pairT_std__pairT_std__string_std__string_t_const_std__pairT_std__string_std__string_t_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstSymbolPairSubstitutions_has_key" "', argument " "1"" of type '" "std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > const *""'"); - } - arg1 = reinterpret_cast< std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > * >(argp1); - { - std::pair< std::string,std::string > *ptr = (std::pair< std::string,std::string > *)0; - res2 = swig::asptr(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HfstSymbolPairSubstitutions_has_key" "', argument " "2"" of type '" "std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > >::key_type const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstSymbolPairSubstitutions_has_key" "', argument " "2"" of type '" "std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > >::key_type const &""'"); - } - arg2 = ptr; - } - result = (bool)std_map_Sl_std_pair_Sl_std_string_Sc_std_string_Sg__Sc_std_pair_Sl_std_string_Sc_std_string_Sg__Sg__has_key((std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > const *)arg1,(std::pair< std::string,std::string > const &)*arg2); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstSymbolPairSubstitutions_keys(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > *arg1 = (std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - PyObject *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_std__pairT_std__string_std__string_t_std__pairT_std__string_std__string_t_std__lessT_std__pairT_std__string_std__string_t_t_std__allocatorT_std__pairT_std__pairT_std__string_std__string_t_const_std__pairT_std__string_std__string_t_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstSymbolPairSubstitutions_keys" "', argument " "1"" of type '" "std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > *""'"); - } - arg1 = reinterpret_cast< std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > * >(argp1); - result = (PyObject *)std_map_Sl_std_pair_Sl_std_string_Sc_std_string_Sg__Sc_std_pair_Sl_std_string_Sc_std_string_Sg__Sg__keys(arg1); - resultobj = result; - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstSymbolPairSubstitutions_values(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > *arg1 = (std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - PyObject *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_std__pairT_std__string_std__string_t_std__pairT_std__string_std__string_t_std__lessT_std__pairT_std__string_std__string_t_t_std__allocatorT_std__pairT_std__pairT_std__string_std__string_t_const_std__pairT_std__string_std__string_t_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstSymbolPairSubstitutions_values" "', argument " "1"" of type '" "std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > *""'"); - } - arg1 = reinterpret_cast< std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > * >(argp1); - result = (PyObject *)std_map_Sl_std_pair_Sl_std_string_Sc_std_string_Sg__Sc_std_pair_Sl_std_string_Sc_std_string_Sg__Sg__values(arg1); - resultobj = result; - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstSymbolPairSubstitutions_items(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > *arg1 = (std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - PyObject *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_std__pairT_std__string_std__string_t_std__pairT_std__string_std__string_t_std__lessT_std__pairT_std__string_std__string_t_t_std__allocatorT_std__pairT_std__pairT_std__string_std__string_t_const_std__pairT_std__string_std__string_t_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstSymbolPairSubstitutions_items" "', argument " "1"" of type '" "std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > *""'"); - } - arg1 = reinterpret_cast< std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > * >(argp1); - result = (PyObject *)std_map_Sl_std_pair_Sl_std_string_Sc_std_string_Sg__Sc_std_pair_Sl_std_string_Sc_std_string_Sg__Sg__items(arg1); - resultobj = result; - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstSymbolPairSubstitutions___contains__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > *arg1 = (std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > *) 0 ; - std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > >::key_type *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 = SWIG_OLDOBJ ; - PyObject *swig_obj[2] ; - bool result; - - if (!SWIG_Python_UnpackTuple(args, "HfstSymbolPairSubstitutions___contains__", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_std__pairT_std__string_std__string_t_std__pairT_std__string_std__string_t_std__lessT_std__pairT_std__string_std__string_t_t_std__allocatorT_std__pairT_std__pairT_std__string_std__string_t_const_std__pairT_std__string_std__string_t_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstSymbolPairSubstitutions___contains__" "', argument " "1"" of type '" "std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > *""'"); - } - arg1 = reinterpret_cast< std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > * >(argp1); - { - std::pair< std::string,std::string > *ptr = (std::pair< std::string,std::string > *)0; - res2 = swig::asptr(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HfstSymbolPairSubstitutions___contains__" "', argument " "2"" of type '" "std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > >::key_type const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstSymbolPairSubstitutions___contains__" "', argument " "2"" of type '" "std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > >::key_type const &""'"); - } - arg2 = ptr; - } - result = (bool)std_map_Sl_std_pair_Sl_std_string_Sc_std_string_Sg__Sc_std_pair_Sl_std_string_Sc_std_string_Sg__Sg____contains__(arg1,(std::pair< std::string,std::string > const &)*arg2); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstSymbolPairSubstitutions_key_iterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > *arg1 = (std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > *) 0 ; - PyObject **arg2 = (PyObject **) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - swig::SwigPyIterator *result = 0 ; - - arg2 = &swig_obj[0]; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_std__pairT_std__string_std__string_t_std__pairT_std__string_std__string_t_std__lessT_std__pairT_std__string_std__string_t_t_std__allocatorT_std__pairT_std__pairT_std__string_std__string_t_const_std__pairT_std__string_std__string_t_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstSymbolPairSubstitutions_key_iterator" "', argument " "1"" of type '" "std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > *""'"); - } - arg1 = reinterpret_cast< std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > * >(argp1); - result = (swig::SwigPyIterator *)std_map_Sl_std_pair_Sl_std_string_Sc_std_string_Sg__Sc_std_pair_Sl_std_string_Sc_std_string_Sg__Sg__key_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_HfstSymbolPairSubstitutions_value_iterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > *arg1 = (std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > *) 0 ; - PyObject **arg2 = (PyObject **) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - swig::SwigPyIterator *result = 0 ; - - arg2 = &swig_obj[0]; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_std__pairT_std__string_std__string_t_std__pairT_std__string_std__string_t_std__lessT_std__pairT_std__string_std__string_t_t_std__allocatorT_std__pairT_std__pairT_std__string_std__string_t_const_std__pairT_std__string_std__string_t_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstSymbolPairSubstitutions_value_iterator" "', argument " "1"" of type '" "std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > *""'"); - } - arg1 = reinterpret_cast< std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > * >(argp1); - result = (swig::SwigPyIterator *)std_map_Sl_std_pair_Sl_std_string_Sc_std_string_Sg__Sc_std_pair_Sl_std_string_Sc_std_string_Sg__Sg__value_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_HfstSymbolPairSubstitutions___setitem____SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > *arg1 = (std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > *) 0 ; - std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > >::key_type *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 = SWIG_OLDOBJ ; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_std__pairT_std__string_std__string_t_std__pairT_std__string_std__string_t_std__lessT_std__pairT_std__string_std__string_t_t_std__allocatorT_std__pairT_std__pairT_std__string_std__string_t_const_std__pairT_std__string_std__string_t_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstSymbolPairSubstitutions___setitem__" "', argument " "1"" of type '" "std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > *""'"); - } - arg1 = reinterpret_cast< std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > * >(argp1); - { - std::pair< std::string,std::string > *ptr = (std::pair< std::string,std::string > *)0; - res2 = swig::asptr(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HfstSymbolPairSubstitutions___setitem__" "', argument " "2"" of type '" "std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > >::key_type const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstSymbolPairSubstitutions___setitem__" "', argument " "2"" of type '" "std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > >::key_type const &""'"); - } - arg2 = ptr; - } - std_map_Sl_std_pair_Sl_std_string_Sc_std_string_Sg__Sc_std_pair_Sl_std_string_Sc_std_string_Sg__Sg____setitem____SWIG_0(arg1,(std::pair< std::string,std::string > const &)*arg2); - resultobj = SWIG_Py_Void(); - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstSymbolPairSubstitutions___setitem____SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > *arg1 = (std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > *) 0 ; - std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > >::key_type *arg2 = 0 ; - std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > >::mapped_type *arg3 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 = SWIG_OLDOBJ ; - int res3 = SWIG_OLDOBJ ; - - if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_std__pairT_std__string_std__string_t_std__pairT_std__string_std__string_t_std__lessT_std__pairT_std__string_std__string_t_t_std__allocatorT_std__pairT_std__pairT_std__string_std__string_t_const_std__pairT_std__string_std__string_t_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstSymbolPairSubstitutions___setitem__" "', argument " "1"" of type '" "std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > *""'"); - } - arg1 = reinterpret_cast< std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > * >(argp1); - { - std::pair< std::string,std::string > *ptr = (std::pair< std::string,std::string > *)0; - res2 = swig::asptr(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HfstSymbolPairSubstitutions___setitem__" "', argument " "2"" of type '" "std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > >::key_type const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstSymbolPairSubstitutions___setitem__" "', argument " "2"" of type '" "std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > >::key_type const &""'"); - } - arg2 = ptr; - } - { - std::pair< std::string,std::string > *ptr = (std::pair< std::string,std::string > *)0; - res3 = swig::asptr(swig_obj[2], &ptr); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "HfstSymbolPairSubstitutions___setitem__" "', argument " "3"" of type '" "std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > >::mapped_type const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstSymbolPairSubstitutions___setitem__" "', argument " "3"" of type '" "std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > >::mapped_type const &""'"); - } - arg3 = ptr; - } - try { - std_map_Sl_std_pair_Sl_std_string_Sc_std_string_Sg__Sc_std_pair_Sl_std_string_Sc_std_string_Sg__Sg____setitem____SWIG_1(arg1,(std::pair< std::string,std::string > const &)*arg2,(std::pair< std::string,std::string > const &)*arg3); - } catch(std::out_of_range &_e) { - SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); - } - resultobj = SWIG_Py_Void(); - if (SWIG_IsNewObj(res2)) delete arg2; - if (SWIG_IsNewObj(res3)) delete arg3; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - if (SWIG_IsNewObj(res3)) delete arg3; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstSymbolPairSubstitutions___setitem__(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[4] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "HfstSymbolPairSubstitutions___setitem__", 0, 3, argv))) SWIG_fail; - --argc; - if (argc == 2) { - int _v; - int res = swig::asptr(argv[0], (std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string >,std::less< std::pair< std::string,std::string > >,std::allocator< std::pair< std::pair< std::string,std::string > const,std::pair< std::string,std::string > > > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - int res = swig::asptr(argv[1], (std::pair< std::string,std::string >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_HfstSymbolPairSubstitutions___setitem____SWIG_0(self, argc, argv); - } - } - } - if (argc == 3) { - int _v; - int res = swig::asptr(argv[0], (std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string >,std::less< std::pair< std::string,std::string > >,std::allocator< std::pair< std::pair< std::string,std::string > const,std::pair< std::string,std::string > > > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - int res = swig::asptr(argv[1], (std::pair< std::string,std::string >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - int res = swig::asptr(argv[2], (std::pair< std::string,std::string >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_HfstSymbolPairSubstitutions___setitem____SWIG_1(self, argc, argv); - } - } - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'HfstSymbolPairSubstitutions___setitem__'.\n" - " Possible C/C++ prototypes are:\n" - " std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > >::__setitem__(std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > >::key_type const &)\n" - " std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > >::__setitem__(std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > >::key_type const &,std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > >::mapped_type const &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_HfstSymbolPairSubstitutions_asdict(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > *arg1 = (std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - PyObject *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_std__pairT_std__string_std__string_t_std__pairT_std__string_std__string_t_std__lessT_std__pairT_std__string_std__string_t_t_std__allocatorT_std__pairT_std__pairT_std__string_std__string_t_const_std__pairT_std__string_std__string_t_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstSymbolPairSubstitutions_asdict" "', argument " "1"" of type '" "std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > *""'"); - } - arg1 = reinterpret_cast< std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > * >(argp1); - result = (PyObject *)std_map_Sl_std_pair_Sl_std_string_Sc_std_string_Sg__Sc_std_pair_Sl_std_string_Sc_std_string_Sg__Sg__asdict(arg1); - resultobj = result; - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_HfstSymbolPairSubstitutions__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **SWIGUNUSEDPARM(swig_obj)) { - PyObject *resultobj = 0; - std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > *result = 0 ; - - if ((nobjs < 0) || (nobjs > 0)) SWIG_fail; - result = (std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > *)new std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > >(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__mapT_std__pairT_std__string_std__string_t_std__pairT_std__string_std__string_t_std__lessT_std__pairT_std__string_std__string_t_t_std__allocatorT_std__pairT_std__pairT_std__string_std__string_t_const_std__pairT_std__string_std__string_t_t_t_t, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_HfstSymbolPairSubstitutions__SWIG_2(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > *arg1 = 0 ; - int res1 = SWIG_OLDOBJ ; - std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > *result = 0 ; - - if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; - { - std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string >,std::less< std::pair< std::string,std::string > >,std::allocator< std::pair< std::pair< std::string,std::string > const,std::pair< std::string,std::string > > > > *ptr = (std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string >,std::less< std::pair< std::string,std::string > >,std::allocator< std::pair< std::pair< std::string,std::string > const,std::pair< std::string,std::string > > > > *)0; - res1 = swig::asptr(swig_obj[0], &ptr); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_HfstSymbolPairSubstitutions" "', argument " "1"" of type '" "std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_HfstSymbolPairSubstitutions" "', argument " "1"" of type '" "std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > const &""'"); - } - arg1 = ptr; - } - result = (std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > *)new std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > >((std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > const &)*arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__mapT_std__pairT_std__string_std__string_t_std__pairT_std__string_std__string_t_std__lessT_std__pairT_std__string_std__string_t_t_std__allocatorT_std__pairT_std__pairT_std__string_std__string_t_const_std__pairT_std__string_std__string_t_t_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_new_HfstSymbolPairSubstitutions(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[2] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "new_HfstSymbolPairSubstitutions", 0, 1, argv))) SWIG_fail; - --argc; - if (argc == 0) { - return _wrap_new_HfstSymbolPairSubstitutions__SWIG_1(self, argc, argv); - } - if (argc == 1) { - int _v; - int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_std__lessT_std__pairT_std__string_std__string_t_t, SWIG_POINTER_NO_NULL | 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_new_HfstSymbolPairSubstitutions__SWIG_0(self, argc, argv); - } - } - if (argc == 1) { - int _v; - int res = swig::asptr(argv[0], (std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string >,std::less< std::pair< std::string,std::string > >,std::allocator< std::pair< std::pair< std::string,std::string > const,std::pair< std::string,std::string > > > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_new_HfstSymbolPairSubstitutions__SWIG_2(self, argc, argv); - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'new_HfstSymbolPairSubstitutions'.\n" - " Possible C/C++ prototypes are:\n" - " std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > >::map(std::less< std::pair< std::string,std::string > > const &)\n" - " std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > >::map()\n" - " std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > >::map(std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > const &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_HfstSymbolPairSubstitutions_empty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > *arg1 = (std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - bool result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_std__pairT_std__string_std__string_t_std__pairT_std__string_std__string_t_std__lessT_std__pairT_std__string_std__string_t_t_std__allocatorT_std__pairT_std__pairT_std__string_std__string_t_const_std__pairT_std__string_std__string_t_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstSymbolPairSubstitutions_empty" "', argument " "1"" of type '" "std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > const *""'"); - } - arg1 = reinterpret_cast< std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > * >(argp1); - result = (bool)((std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > const *)arg1)->empty(); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstSymbolPairSubstitutions_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > *arg1 = (std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > >::size_type result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_std__pairT_std__string_std__string_t_std__pairT_std__string_std__string_t_std__lessT_std__pairT_std__string_std__string_t_t_std__allocatorT_std__pairT_std__pairT_std__string_std__string_t_const_std__pairT_std__string_std__string_t_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstSymbolPairSubstitutions_size" "', argument " "1"" of type '" "std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > const *""'"); - } - arg1 = reinterpret_cast< std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > * >(argp1); - result = ((std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > const *)arg1)->size(); - resultobj = SWIG_From_size_t(static_cast< size_t >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstSymbolPairSubstitutions_swap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > *arg1 = (std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > *) 0 ; - std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args, "HfstSymbolPairSubstitutions_swap", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_std__pairT_std__string_std__string_t_std__pairT_std__string_std__string_t_std__lessT_std__pairT_std__string_std__string_t_t_std__allocatorT_std__pairT_std__pairT_std__string_std__string_t_const_std__pairT_std__string_std__string_t_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstSymbolPairSubstitutions_swap" "', argument " "1"" of type '" "std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > *""'"); - } - arg1 = reinterpret_cast< std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_std__mapT_std__pairT_std__string_std__string_t_std__pairT_std__string_std__string_t_std__lessT_std__pairT_std__string_std__string_t_t_std__allocatorT_std__pairT_std__pairT_std__string_std__string_t_const_std__pairT_std__string_std__string_t_t_t_t, 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HfstSymbolPairSubstitutions_swap" "', argument " "2"" of type '" "std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstSymbolPairSubstitutions_swap" "', argument " "2"" of type '" "std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > &""'"); - } - arg2 = reinterpret_cast< std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > * >(argp2); - (arg1)->swap(*arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstSymbolPairSubstitutions_begin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > *arg1 = (std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > >::iterator result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_std__pairT_std__string_std__string_t_std__pairT_std__string_std__string_t_std__lessT_std__pairT_std__string_std__string_t_t_std__allocatorT_std__pairT_std__pairT_std__string_std__string_t_const_std__pairT_std__string_std__string_t_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstSymbolPairSubstitutions_begin" "', argument " "1"" of type '" "std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > *""'"); - } - arg1 = reinterpret_cast< std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > * >(argp1); - result = (arg1)->begin(); - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > >::iterator & >(result)), - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstSymbolPairSubstitutions_end(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > *arg1 = (std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > >::iterator result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_std__pairT_std__string_std__string_t_std__pairT_std__string_std__string_t_std__lessT_std__pairT_std__string_std__string_t_t_std__allocatorT_std__pairT_std__pairT_std__string_std__string_t_const_std__pairT_std__string_std__string_t_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstSymbolPairSubstitutions_end" "', argument " "1"" of type '" "std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > *""'"); - } - arg1 = reinterpret_cast< std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > * >(argp1); - result = (arg1)->end(); - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > >::iterator & >(result)), - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstSymbolPairSubstitutions_rbegin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > *arg1 = (std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > >::reverse_iterator result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_std__pairT_std__string_std__string_t_std__pairT_std__string_std__string_t_std__lessT_std__pairT_std__string_std__string_t_t_std__allocatorT_std__pairT_std__pairT_std__string_std__string_t_const_std__pairT_std__string_std__string_t_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstSymbolPairSubstitutions_rbegin" "', argument " "1"" of type '" "std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > *""'"); - } - arg1 = reinterpret_cast< std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > * >(argp1); - result = (arg1)->rbegin(); - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > >::reverse_iterator & >(result)), - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstSymbolPairSubstitutions_rend(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > *arg1 = (std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > >::reverse_iterator result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_std__pairT_std__string_std__string_t_std__pairT_std__string_std__string_t_std__lessT_std__pairT_std__string_std__string_t_t_std__allocatorT_std__pairT_std__pairT_std__string_std__string_t_const_std__pairT_std__string_std__string_t_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstSymbolPairSubstitutions_rend" "', argument " "1"" of type '" "std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > *""'"); - } - arg1 = reinterpret_cast< std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > * >(argp1); - result = (arg1)->rend(); - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > >::reverse_iterator & >(result)), - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstSymbolPairSubstitutions_clear(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > *arg1 = (std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_std__pairT_std__string_std__string_t_std__pairT_std__string_std__string_t_std__lessT_std__pairT_std__string_std__string_t_t_std__allocatorT_std__pairT_std__pairT_std__string_std__string_t_const_std__pairT_std__string_std__string_t_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstSymbolPairSubstitutions_clear" "', argument " "1"" of type '" "std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > *""'"); - } - arg1 = reinterpret_cast< std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > * >(argp1); - (arg1)->clear(); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstSymbolPairSubstitutions_get_allocator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > *arg1 = (std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - SwigValueWrapper< std::allocator< std::pair< std::pair< std::string,std::string > const,std::pair< std::string,std::string > > > > result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_std__pairT_std__string_std__string_t_std__pairT_std__string_std__string_t_std__lessT_std__pairT_std__string_std__string_t_t_std__allocatorT_std__pairT_std__pairT_std__string_std__string_t_const_std__pairT_std__string_std__string_t_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstSymbolPairSubstitutions_get_allocator" "', argument " "1"" of type '" "std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > const *""'"); - } - arg1 = reinterpret_cast< std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > * >(argp1); - result = ((std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > const *)arg1)->get_allocator(); - resultobj = SWIG_NewPointerObj((new std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > >::allocator_type(static_cast< const std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > >::allocator_type& >(result))), SWIGTYPE_p_std__allocatorT_std__pairT_std__pairT_std__string_std__string_t_const_std__pairT_std__string_std__string_t_t_t, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstSymbolPairSubstitutions_erase__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > *arg1 = (std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > *) 0 ; - std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > >::key_type *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 = SWIG_OLDOBJ ; - std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > >::size_type result; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_std__pairT_std__string_std__string_t_std__pairT_std__string_std__string_t_std__lessT_std__pairT_std__string_std__string_t_t_std__allocatorT_std__pairT_std__pairT_std__string_std__string_t_const_std__pairT_std__string_std__string_t_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstSymbolPairSubstitutions_erase" "', argument " "1"" of type '" "std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > *""'"); - } - arg1 = reinterpret_cast< std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > * >(argp1); - { - std::pair< std::string,std::string > *ptr = (std::pair< std::string,std::string > *)0; - res2 = swig::asptr(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HfstSymbolPairSubstitutions_erase" "', argument " "2"" of type '" "std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > >::key_type const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstSymbolPairSubstitutions_erase" "', argument " "2"" of type '" "std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > >::key_type const &""'"); - } - arg2 = ptr; - } - result = (arg1)->erase((std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > >::key_type const &)*arg2); - resultobj = SWIG_From_size_t(static_cast< size_t >(result)); - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstSymbolPairSubstitutions_count(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > *arg1 = (std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > *) 0 ; - std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > >::key_type *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 = SWIG_OLDOBJ ; - PyObject *swig_obj[2] ; - std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > >::size_type result; - - if (!SWIG_Python_UnpackTuple(args, "HfstSymbolPairSubstitutions_count", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_std__pairT_std__string_std__string_t_std__pairT_std__string_std__string_t_std__lessT_std__pairT_std__string_std__string_t_t_std__allocatorT_std__pairT_std__pairT_std__string_std__string_t_const_std__pairT_std__string_std__string_t_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstSymbolPairSubstitutions_count" "', argument " "1"" of type '" "std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > const *""'"); - } - arg1 = reinterpret_cast< std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > * >(argp1); - { - std::pair< std::string,std::string > *ptr = (std::pair< std::string,std::string > *)0; - res2 = swig::asptr(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HfstSymbolPairSubstitutions_count" "', argument " "2"" of type '" "std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > >::key_type const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstSymbolPairSubstitutions_count" "', argument " "2"" of type '" "std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > >::key_type const &""'"); - } - arg2 = ptr; - } - result = ((std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > const *)arg1)->count((std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > >::key_type const &)*arg2); - resultobj = SWIG_From_size_t(static_cast< size_t >(result)); - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstSymbolPairSubstitutions_erase__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > *arg1 = (std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > *) 0 ; - std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > >::iterator arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - swig::SwigPyIterator *iter2 = 0 ; - int res2 ; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_std__pairT_std__string_std__string_t_std__pairT_std__string_std__string_t_std__lessT_std__pairT_std__string_std__string_t_t_std__allocatorT_std__pairT_std__pairT_std__string_std__string_t_const_std__pairT_std__string_std__string_t_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstSymbolPairSubstitutions_erase" "', argument " "1"" of type '" "std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > *""'"); - } - arg1 = reinterpret_cast< std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0); - if (!SWIG_IsOK(res2) || !iter2) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "HfstSymbolPairSubstitutions_erase" "', argument " "2"" of type '" "std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > >::iterator""'"); - } else { - swig::SwigPyIterator_T,std::pair< std::string,std::string > >::iterator > *iter_t = dynamic_cast,std::pair< std::string,std::string > >::iterator > *>(iter2); - if (iter_t) { - arg2 = iter_t->get_current(); - } else { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "HfstSymbolPairSubstitutions_erase" "', argument " "2"" of type '" "std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > >::iterator""'"); - } - } - std_map_Sl_std_pair_Sl_std_string_Sc_std_string_Sg__Sc_std_pair_Sl_std_string_Sc_std_string_Sg__Sg__erase__SWIG_1(arg1,arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstSymbolPairSubstitutions_erase__SWIG_2(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > *arg1 = (std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > *) 0 ; - std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > >::iterator arg2 ; - std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > >::iterator arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - swig::SwigPyIterator *iter2 = 0 ; - int res2 ; - swig::SwigPyIterator *iter3 = 0 ; - int res3 ; - - if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_std__pairT_std__string_std__string_t_std__pairT_std__string_std__string_t_std__lessT_std__pairT_std__string_std__string_t_t_std__allocatorT_std__pairT_std__pairT_std__string_std__string_t_const_std__pairT_std__string_std__string_t_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstSymbolPairSubstitutions_erase" "', argument " "1"" of type '" "std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > *""'"); - } - arg1 = reinterpret_cast< std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0); - if (!SWIG_IsOK(res2) || !iter2) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "HfstSymbolPairSubstitutions_erase" "', argument " "2"" of type '" "std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > >::iterator""'"); - } else { - swig::SwigPyIterator_T,std::pair< std::string,std::string > >::iterator > *iter_t = dynamic_cast,std::pair< std::string,std::string > >::iterator > *>(iter2); - if (iter_t) { - arg2 = iter_t->get_current(); - } else { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "HfstSymbolPairSubstitutions_erase" "', argument " "2"" of type '" "std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > >::iterator""'"); - } - } - res3 = SWIG_ConvertPtr(swig_obj[2], SWIG_as_voidptrptr(&iter3), swig::SwigPyIterator::descriptor(), 0); - if (!SWIG_IsOK(res3) || !iter3) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "HfstSymbolPairSubstitutions_erase" "', argument " "3"" of type '" "std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > >::iterator""'"); - } else { - swig::SwigPyIterator_T,std::pair< std::string,std::string > >::iterator > *iter_t = dynamic_cast,std::pair< std::string,std::string > >::iterator > *>(iter3); - if (iter_t) { - arg3 = iter_t->get_current(); - } else { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "HfstSymbolPairSubstitutions_erase" "', argument " "3"" of type '" "std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > >::iterator""'"); - } - } - std_map_Sl_std_pair_Sl_std_string_Sc_std_string_Sg__Sc_std_pair_Sl_std_string_Sc_std_string_Sg__Sg__erase__SWIG_2(arg1,arg2,arg3); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstSymbolPairSubstitutions_erase(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[4] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "HfstSymbolPairSubstitutions_erase", 0, 3, argv))) SWIG_fail; - --argc; - if (argc == 2) { - int _v; - int res = swig::asptr(argv[0], (std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string >,std::less< std::pair< std::string,std::string > >,std::allocator< std::pair< std::pair< std::string,std::string > const,std::pair< std::string,std::string > > > >**)(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,std::pair< std::string,std::string > >::iterator > *>(iter) != 0)); - if (_v) { - return _wrap_HfstSymbolPairSubstitutions_erase__SWIG_1(self, argc, argv); - } - } - } - if (argc == 2) { - int _v; - int res = swig::asptr(argv[0], (std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string >,std::less< std::pair< std::string,std::string > >,std::allocator< std::pair< std::pair< std::string,std::string > const,std::pair< std::string,std::string > > > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - int res = swig::asptr(argv[1], (std::pair< std::string,std::string >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_HfstSymbolPairSubstitutions_erase__SWIG_0(self, argc, argv); - } - } - } - if (argc == 3) { - int _v; - int res = swig::asptr(argv[0], (std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string >,std::less< std::pair< std::string,std::string > >,std::allocator< std::pair< std::pair< std::string,std::string > const,std::pair< std::string,std::string > > > >**)(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,std::pair< std::string,std::string > >::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,std::pair< std::string,std::string > >::iterator > *>(iter) != 0)); - if (_v) { - return _wrap_HfstSymbolPairSubstitutions_erase__SWIG_2(self, argc, argv); - } - } - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'HfstSymbolPairSubstitutions_erase'.\n" - " Possible C/C++ prototypes are:\n" - " std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > >::erase(std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > >::key_type const &)\n" - " std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > >::erase(std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > >::iterator)\n" - " std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > >::erase(std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > >::iterator,std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > >::iterator)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_HfstSymbolPairSubstitutions_find(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > *arg1 = (std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > *) 0 ; - std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > >::key_type *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 = SWIG_OLDOBJ ; - PyObject *swig_obj[2] ; - std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > >::iterator result; - - if (!SWIG_Python_UnpackTuple(args, "HfstSymbolPairSubstitutions_find", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_std__pairT_std__string_std__string_t_std__pairT_std__string_std__string_t_std__lessT_std__pairT_std__string_std__string_t_t_std__allocatorT_std__pairT_std__pairT_std__string_std__string_t_const_std__pairT_std__string_std__string_t_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstSymbolPairSubstitutions_find" "', argument " "1"" of type '" "std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > *""'"); - } - arg1 = reinterpret_cast< std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > * >(argp1); - { - std::pair< std::string,std::string > *ptr = (std::pair< std::string,std::string > *)0; - res2 = swig::asptr(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HfstSymbolPairSubstitutions_find" "', argument " "2"" of type '" "std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > >::key_type const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstSymbolPairSubstitutions_find" "', argument " "2"" of type '" "std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > >::key_type const &""'"); - } - arg2 = ptr; - } - result = (arg1)->find((std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > >::key_type const &)*arg2); - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > >::iterator & >(result)), - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstSymbolPairSubstitutions_lower_bound(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > *arg1 = (std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > *) 0 ; - std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > >::key_type *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 = SWIG_OLDOBJ ; - PyObject *swig_obj[2] ; - std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > >::iterator result; - - if (!SWIG_Python_UnpackTuple(args, "HfstSymbolPairSubstitutions_lower_bound", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_std__pairT_std__string_std__string_t_std__pairT_std__string_std__string_t_std__lessT_std__pairT_std__string_std__string_t_t_std__allocatorT_std__pairT_std__pairT_std__string_std__string_t_const_std__pairT_std__string_std__string_t_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstSymbolPairSubstitutions_lower_bound" "', argument " "1"" of type '" "std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > *""'"); - } - arg1 = reinterpret_cast< std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > * >(argp1); - { - std::pair< std::string,std::string > *ptr = (std::pair< std::string,std::string > *)0; - res2 = swig::asptr(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HfstSymbolPairSubstitutions_lower_bound" "', argument " "2"" of type '" "std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > >::key_type const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstSymbolPairSubstitutions_lower_bound" "', argument " "2"" of type '" "std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > >::key_type const &""'"); - } - arg2 = ptr; - } - result = (arg1)->lower_bound((std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > >::key_type const &)*arg2); - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > >::iterator & >(result)), - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstSymbolPairSubstitutions_upper_bound(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > *arg1 = (std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > *) 0 ; - std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > >::key_type *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 = SWIG_OLDOBJ ; - PyObject *swig_obj[2] ; - std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > >::iterator result; - - if (!SWIG_Python_UnpackTuple(args, "HfstSymbolPairSubstitutions_upper_bound", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_std__pairT_std__string_std__string_t_std__pairT_std__string_std__string_t_std__lessT_std__pairT_std__string_std__string_t_t_std__allocatorT_std__pairT_std__pairT_std__string_std__string_t_const_std__pairT_std__string_std__string_t_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstSymbolPairSubstitutions_upper_bound" "', argument " "1"" of type '" "std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > *""'"); - } - arg1 = reinterpret_cast< std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > * >(argp1); - { - std::pair< std::string,std::string > *ptr = (std::pair< std::string,std::string > *)0; - res2 = swig::asptr(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HfstSymbolPairSubstitutions_upper_bound" "', argument " "2"" of type '" "std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > >::key_type const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstSymbolPairSubstitutions_upper_bound" "', argument " "2"" of type '" "std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > >::key_type const &""'"); - } - arg2 = ptr; - } - result = (arg1)->upper_bound((std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > >::key_type const &)*arg2); - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > >::iterator & >(result)), - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_HfstSymbolPairSubstitutions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > *arg1 = (std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_std__pairT_std__string_std__string_t_std__pairT_std__string_std__string_t_std__lessT_std__pairT_std__string_std__string_t_t_std__allocatorT_std__pairT_std__pairT_std__string_std__string_t_const_std__pairT_std__string_std__string_t_t_t_t, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_HfstSymbolPairSubstitutions" "', argument " "1"" of type '" "std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > *""'"); - } - arg1 = reinterpret_cast< std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > * >(argp1); - delete arg1; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *HfstSymbolPairSubstitutions_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_std__mapT_std__pairT_std__string_std__string_t_std__pairT_std__string_std__string_t_std__lessT_std__pairT_std__string_std__string_t_t_std__allocatorT_std__pairT_std__pairT_std__string_std__string_t_const_std__pairT_std__string_std__string_t_t_t_t, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *HfstSymbolPairSubstitutions_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_BarBazFoo_iterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< unsigned int > *arg1 = (std::vector< unsigned int > *) 0 ; - PyObject **arg2 = (PyObject **) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - swig::SwigPyIterator *result = 0 ; - - arg2 = &swig_obj[0]; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_unsigned_int_std__allocatorT_unsigned_int_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BarBazFoo_iterator" "', argument " "1"" of type '" "std::vector< unsigned int > *""'"); - } - arg1 = reinterpret_cast< std::vector< unsigned int > * >(argp1); - result = (swig::SwigPyIterator *)std_vector_Sl_unsigned_SS_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_BarBazFoo___nonzero__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< unsigned int > *arg1 = (std::vector< unsigned int > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - bool result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_unsigned_int_std__allocatorT_unsigned_int_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BarBazFoo___nonzero__" "', argument " "1"" of type '" "std::vector< unsigned int > const *""'"); - } - arg1 = reinterpret_cast< std::vector< unsigned int > * >(argp1); - result = (bool)std_vector_Sl_unsigned_SS_int_Sg____nonzero__((std::vector< unsigned int > const *)arg1); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_BarBazFoo___bool__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< unsigned int > *arg1 = (std::vector< unsigned int > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - bool result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_unsigned_int_std__allocatorT_unsigned_int_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BarBazFoo___bool__" "', argument " "1"" of type '" "std::vector< unsigned int > const *""'"); - } - arg1 = reinterpret_cast< std::vector< unsigned int > * >(argp1); - result = (bool)std_vector_Sl_unsigned_SS_int_Sg____bool__((std::vector< unsigned int > const *)arg1); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_BarBazFoo___len__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< unsigned int > *arg1 = (std::vector< unsigned int > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::vector< unsigned int >::size_type result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_unsigned_int_std__allocatorT_unsigned_int_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BarBazFoo___len__" "', argument " "1"" of type '" "std::vector< unsigned int > const *""'"); - } - arg1 = reinterpret_cast< std::vector< unsigned int > * >(argp1); - result = std_vector_Sl_unsigned_SS_int_Sg____len__((std::vector< unsigned int > const *)arg1); - resultobj = SWIG_From_size_t(static_cast< size_t >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_BarBazFoo___getslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< unsigned int > *arg1 = (std::vector< unsigned int > *) 0 ; - std::vector< unsigned int >::difference_type arg2 ; - std::vector< unsigned int >::difference_type arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - ptrdiff_t val2 ; - int ecode2 = 0 ; - ptrdiff_t val3 ; - int ecode3 = 0 ; - PyObject *swig_obj[3] ; - std::vector< unsigned int,std::allocator< unsigned int > > *result = 0 ; - - if (!SWIG_Python_UnpackTuple(args, "BarBazFoo___getslice__", 3, 3, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_unsigned_int_std__allocatorT_unsigned_int_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BarBazFoo___getslice__" "', argument " "1"" of type '" "std::vector< unsigned int > *""'"); - } - arg1 = reinterpret_cast< std::vector< unsigned int > * >(argp1); - ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BarBazFoo___getslice__" "', argument " "2"" of type '" "std::vector< unsigned int >::difference_type""'"); - } - arg2 = static_cast< std::vector< unsigned int >::difference_type >(val2); - ecode3 = SWIG_AsVal_ptrdiff_t(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "BarBazFoo___getslice__" "', argument " "3"" of type '" "std::vector< unsigned int >::difference_type""'"); - } - arg3 = static_cast< std::vector< unsigned int >::difference_type >(val3); - try { - result = (std::vector< unsigned int,std::allocator< unsigned int > > *)std_vector_Sl_unsigned_SS_int_Sg____getslice__(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_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_unsigned_int_std__allocatorT_unsigned_int_t_t, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_BarBazFoo___setslice____SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< unsigned int > *arg1 = (std::vector< unsigned int > *) 0 ; - std::vector< unsigned int >::difference_type arg2 ; - std::vector< unsigned int >::difference_type arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - ptrdiff_t val2 ; - int ecode2 = 0 ; - ptrdiff_t val3 ; - int ecode3 = 0 ; - - if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_unsigned_int_std__allocatorT_unsigned_int_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BarBazFoo___setslice__" "', argument " "1"" of type '" "std::vector< unsigned int > *""'"); - } - arg1 = reinterpret_cast< std::vector< unsigned int > * >(argp1); - ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BarBazFoo___setslice__" "', argument " "2"" of type '" "std::vector< unsigned int >::difference_type""'"); - } - arg2 = static_cast< std::vector< unsigned int >::difference_type >(val2); - ecode3 = SWIG_AsVal_ptrdiff_t(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "BarBazFoo___setslice__" "', argument " "3"" of type '" "std::vector< unsigned int >::difference_type""'"); - } - arg3 = static_cast< std::vector< unsigned int >::difference_type >(val3); - try { - std_vector_Sl_unsigned_SS_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_BarBazFoo___setslice____SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< unsigned int > *arg1 = (std::vector< unsigned int > *) 0 ; - std::vector< unsigned int >::difference_type arg2 ; - std::vector< unsigned int >::difference_type arg3 ; - std::vector< unsigned int,std::allocator< unsigned 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 ; - - if ((nobjs < 4) || (nobjs > 4)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_unsigned_int_std__allocatorT_unsigned_int_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BarBazFoo___setslice__" "', argument " "1"" of type '" "std::vector< unsigned int > *""'"); - } - arg1 = reinterpret_cast< std::vector< unsigned int > * >(argp1); - ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BarBazFoo___setslice__" "', argument " "2"" of type '" "std::vector< unsigned int >::difference_type""'"); - } - arg2 = static_cast< std::vector< unsigned int >::difference_type >(val2); - ecode3 = SWIG_AsVal_ptrdiff_t(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "BarBazFoo___setslice__" "', argument " "3"" of type '" "std::vector< unsigned int >::difference_type""'"); - } - arg3 = static_cast< std::vector< unsigned int >::difference_type >(val3); - { - std::vector< unsigned int,std::allocator< unsigned int > > *ptr = (std::vector< unsigned int,std::allocator< unsigned int > > *)0; - res4 = swig::asptr(swig_obj[3], &ptr); - if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "BarBazFoo___setslice__" "', argument " "4"" of type '" "std::vector< unsigned int,std::allocator< unsigned int > > const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BarBazFoo___setslice__" "', argument " "4"" of type '" "std::vector< unsigned int,std::allocator< unsigned int > > const &""'"); - } - arg4 = ptr; - } - try { - std_vector_Sl_unsigned_SS_int_Sg____setslice____SWIG_1(arg1,arg2,arg3,(std::vector< unsigned int,std::allocator< unsigned 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_BarBazFoo___setslice__(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[5] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "BarBazFoo___setslice__", 0, 4, argv))) SWIG_fail; - --argc; - if (argc == 3) { - int _v; - int res = swig::asptr(argv[0], (std::vector< unsigned int,std::allocator< unsigned int > >**)(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_BarBazFoo___setslice____SWIG_0(self, argc, argv); - } - } - } - } - if (argc == 4) { - int _v; - int res = swig::asptr(argv[0], (std::vector< unsigned int,std::allocator< unsigned int > >**)(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< unsigned int,std::allocator< unsigned int > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_BarBazFoo___setslice____SWIG_1(self, argc, argv); - } - } - } - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'BarBazFoo___setslice__'.\n" - " Possible C/C++ prototypes are:\n" - " std::vector< unsigned int >::__setslice__(std::vector< unsigned int >::difference_type,std::vector< unsigned int >::difference_type)\n" - " std::vector< unsigned int >::__setslice__(std::vector< unsigned int >::difference_type,std::vector< unsigned int >::difference_type,std::vector< unsigned int,std::allocator< unsigned int > > const &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_BarBazFoo___delslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< unsigned int > *arg1 = (std::vector< unsigned int > *) 0 ; - std::vector< unsigned int >::difference_type arg2 ; - std::vector< unsigned int >::difference_type arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - ptrdiff_t val2 ; - int ecode2 = 0 ; - ptrdiff_t val3 ; - int ecode3 = 0 ; - PyObject *swig_obj[3] ; - - if (!SWIG_Python_UnpackTuple(args, "BarBazFoo___delslice__", 3, 3, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_unsigned_int_std__allocatorT_unsigned_int_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BarBazFoo___delslice__" "', argument " "1"" of type '" "std::vector< unsigned int > *""'"); - } - arg1 = reinterpret_cast< std::vector< unsigned int > * >(argp1); - ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BarBazFoo___delslice__" "', argument " "2"" of type '" "std::vector< unsigned int >::difference_type""'"); - } - arg2 = static_cast< std::vector< unsigned int >::difference_type >(val2); - ecode3 = SWIG_AsVal_ptrdiff_t(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "BarBazFoo___delslice__" "', argument " "3"" of type '" "std::vector< unsigned int >::difference_type""'"); - } - arg3 = static_cast< std::vector< unsigned int >::difference_type >(val3); - try { - std_vector_Sl_unsigned_SS_int_Sg____delslice__(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_BarBazFoo___delitem____SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< unsigned int > *arg1 = (std::vector< unsigned int > *) 0 ; - std::vector< unsigned int >::difference_type arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - ptrdiff_t val2 ; - int ecode2 = 0 ; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_unsigned_int_std__allocatorT_unsigned_int_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BarBazFoo___delitem__" "', argument " "1"" of type '" "std::vector< unsigned int > *""'"); - } - arg1 = reinterpret_cast< std::vector< unsigned int > * >(argp1); - ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BarBazFoo___delitem__" "', argument " "2"" of type '" "std::vector< unsigned int >::difference_type""'"); - } - arg2 = static_cast< std::vector< unsigned int >::difference_type >(val2); - try { - std_vector_Sl_unsigned_SS_int_Sg____delitem____SWIG_0(arg1,arg2); - } 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_BarBazFoo___getitem____SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< unsigned int > *arg1 = (std::vector< unsigned int > *) 0 ; - PySliceObject *arg2 = (PySliceObject *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::vector< unsigned int,std::allocator< unsigned int > > *result = 0 ; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_unsigned_int_std__allocatorT_unsigned_int_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BarBazFoo___getitem__" "', argument " "1"" of type '" "std::vector< unsigned int > *""'"); - } - arg1 = reinterpret_cast< std::vector< unsigned int > * >(argp1); - { - if (!PySlice_Check(swig_obj[1])) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "BarBazFoo___getitem__" "', argument " "2"" of type '" "PySliceObject *""'"); - } - arg2 = (PySliceObject *) swig_obj[1]; - } - try { - result = (std::vector< unsigned int,std::allocator< unsigned int > > *)std_vector_Sl_unsigned_SS_int_Sg____getitem____SWIG_0(arg1,arg2); - } 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_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_unsigned_int_std__allocatorT_unsigned_int_t_t, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_BarBazFoo___setitem____SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< unsigned int > *arg1 = (std::vector< unsigned int > *) 0 ; - PySliceObject *arg2 = (PySliceObject *) 0 ; - std::vector< unsigned int,std::allocator< unsigned int > > *arg3 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res3 = SWIG_OLDOBJ ; - - if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_unsigned_int_std__allocatorT_unsigned_int_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BarBazFoo___setitem__" "', argument " "1"" of type '" "std::vector< unsigned int > *""'"); - } - arg1 = reinterpret_cast< std::vector< unsigned int > * >(argp1); - { - if (!PySlice_Check(swig_obj[1])) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "BarBazFoo___setitem__" "', argument " "2"" of type '" "PySliceObject *""'"); - } - arg2 = (PySliceObject *) swig_obj[1]; - } - { - std::vector< unsigned int,std::allocator< unsigned int > > *ptr = (std::vector< unsigned int,std::allocator< unsigned int > > *)0; - res3 = swig::asptr(swig_obj[2], &ptr); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "BarBazFoo___setitem__" "', argument " "3"" of type '" "std::vector< unsigned int,std::allocator< unsigned int > > const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BarBazFoo___setitem__" "', argument " "3"" of type '" "std::vector< unsigned int,std::allocator< unsigned int > > const &""'"); - } - arg3 = ptr; - } - try { - std_vector_Sl_unsigned_SS_int_Sg____setitem____SWIG_0(arg1,arg2,(std::vector< unsigned int,std::allocator< unsigned 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_BarBazFoo___setitem____SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< unsigned int > *arg1 = (std::vector< unsigned int > *) 0 ; - PySliceObject *arg2 = (PySliceObject *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_unsigned_int_std__allocatorT_unsigned_int_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BarBazFoo___setitem__" "', argument " "1"" of type '" "std::vector< unsigned int > *""'"); - } - arg1 = reinterpret_cast< std::vector< unsigned int > * >(argp1); - { - if (!PySlice_Check(swig_obj[1])) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "BarBazFoo___setitem__" "', argument " "2"" of type '" "PySliceObject *""'"); - } - arg2 = (PySliceObject *) swig_obj[1]; - } - try { - std_vector_Sl_unsigned_SS_int_Sg____setitem____SWIG_1(arg1,arg2); - } 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_BarBazFoo___delitem____SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< unsigned int > *arg1 = (std::vector< unsigned int > *) 0 ; - PySliceObject *arg2 = (PySliceObject *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_unsigned_int_std__allocatorT_unsigned_int_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BarBazFoo___delitem__" "', argument " "1"" of type '" "std::vector< unsigned int > *""'"); - } - arg1 = reinterpret_cast< std::vector< unsigned int > * >(argp1); - { - if (!PySlice_Check(swig_obj[1])) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "BarBazFoo___delitem__" "', argument " "2"" of type '" "PySliceObject *""'"); - } - arg2 = (PySliceObject *) swig_obj[1]; - } - try { - std_vector_Sl_unsigned_SS_int_Sg____delitem____SWIG_1(arg1,arg2); - } 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_BarBazFoo___delitem__(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[3] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "BarBazFoo___delitem__", 0, 2, argv))) SWIG_fail; - --argc; - if (argc == 2) { - int _v; - int res = swig::asptr(argv[0], (std::vector< unsigned int,std::allocator< unsigned int > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - { - _v = PySlice_Check(argv[1]); - } - if (_v) { - return _wrap_BarBazFoo___delitem____SWIG_1(self, argc, argv); - } - } - } - if (argc == 2) { - int _v; - int res = swig::asptr(argv[0], (std::vector< unsigned int,std::allocator< unsigned int > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_BarBazFoo___delitem____SWIG_0(self, argc, argv); - } - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'BarBazFoo___delitem__'.\n" - " Possible C/C++ prototypes are:\n" - " std::vector< unsigned int >::__delitem__(std::vector< unsigned int >::difference_type)\n" - " std::vector< unsigned int >::__delitem__(PySliceObject *)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_BarBazFoo___getitem____SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< unsigned int > *arg1 = (std::vector< unsigned int > *) 0 ; - std::vector< unsigned int >::difference_type arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - ptrdiff_t val2 ; - int ecode2 = 0 ; - std::vector< unsigned int >::value_type *result = 0 ; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_unsigned_int_std__allocatorT_unsigned_int_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BarBazFoo___getitem__" "', argument " "1"" of type '" "std::vector< unsigned int > const *""'"); - } - arg1 = reinterpret_cast< std::vector< unsigned int > * >(argp1); - ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BarBazFoo___getitem__" "', argument " "2"" of type '" "std::vector< unsigned int >::difference_type""'"); - } - arg2 = static_cast< std::vector< unsigned int >::difference_type >(val2); - try { - result = (std::vector< unsigned int >::value_type *) &std_vector_Sl_unsigned_SS_int_Sg____getitem____SWIG_1((std::vector< unsigned int > const *)arg1,arg2); - } catch(std::out_of_range &_e) { - SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); - } - resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(*result)); - (void)swig::container_owner::value_type>::category>::back_reference(resultobj, swig_obj[0]); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_BarBazFoo___getitem__(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[3] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "BarBazFoo___getitem__", 0, 2, argv))) SWIG_fail; - --argc; - if (argc == 2) { - int _v; - int res = swig::asptr(argv[0], (std::vector< unsigned int,std::allocator< unsigned int > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - { - _v = PySlice_Check(argv[1]); - } - if (_v) { - return _wrap_BarBazFoo___getitem____SWIG_0(self, argc, argv); - } - } - } - if (argc == 2) { - int _v; - int res = swig::asptr(argv[0], (std::vector< unsigned int,std::allocator< unsigned int > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_BarBazFoo___getitem____SWIG_1(self, argc, argv); - } - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'BarBazFoo___getitem__'.\n" - " Possible C/C++ prototypes are:\n" - " std::vector< unsigned int >::__getitem__(PySliceObject *)\n" - " std::vector< unsigned int >::__getitem__(std::vector< unsigned int >::difference_type) const\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_BarBazFoo___setitem____SWIG_2(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< unsigned int > *arg1 = (std::vector< unsigned int > *) 0 ; - std::vector< unsigned int >::difference_type arg2 ; - std::vector< unsigned int >::value_type *arg3 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - ptrdiff_t val2 ; - int ecode2 = 0 ; - std::vector< unsigned int >::value_type temp3 ; - unsigned int val3 ; - int ecode3 = 0 ; - - if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_unsigned_int_std__allocatorT_unsigned_int_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BarBazFoo___setitem__" "', argument " "1"" of type '" "std::vector< unsigned int > *""'"); - } - arg1 = reinterpret_cast< std::vector< unsigned int > * >(argp1); - ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BarBazFoo___setitem__" "', argument " "2"" of type '" "std::vector< unsigned int >::difference_type""'"); - } - arg2 = static_cast< std::vector< unsigned int >::difference_type >(val2); - ecode3 = SWIG_AsVal_unsigned_SS_int(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "BarBazFoo___setitem__" "', argument " "3"" of type '" "std::vector< unsigned int >::value_type""'"); - } - temp3 = static_cast< std::vector< unsigned int >::value_type >(val3); - arg3 = &temp3; - try { - std_vector_Sl_unsigned_SS_int_Sg____setitem____SWIG_2(arg1,arg2,(unsigned 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_BarBazFoo___setitem__(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[4] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "BarBazFoo___setitem__", 0, 3, argv))) SWIG_fail; - --argc; - if (argc == 2) { - int _v; - int res = swig::asptr(argv[0], (std::vector< unsigned int,std::allocator< unsigned int > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - { - _v = PySlice_Check(argv[1]); - } - if (_v) { - return _wrap_BarBazFoo___setitem____SWIG_1(self, argc, argv); - } - } - } - if (argc == 3) { - int _v; - int res = swig::asptr(argv[0], (std::vector< unsigned int,std::allocator< unsigned int > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - { - _v = PySlice_Check(argv[1]); - } - if (_v) { - int res = swig::asptr(argv[2], (std::vector< unsigned int,std::allocator< unsigned int > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_BarBazFoo___setitem____SWIG_0(self, argc, argv); - } - } - } - } - if (argc == 3) { - int _v; - int res = swig::asptr(argv[0], (std::vector< unsigned int,std::allocator< unsigned int > >**)(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_unsigned_SS_int(argv[2], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_BarBazFoo___setitem____SWIG_2(self, argc, argv); - } - } - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'BarBazFoo___setitem__'.\n" - " Possible C/C++ prototypes are:\n" - " std::vector< unsigned int >::__setitem__(PySliceObject *,std::vector< unsigned int,std::allocator< unsigned int > > const &)\n" - " std::vector< unsigned int >::__setitem__(PySliceObject *)\n" - " std::vector< unsigned int >::__setitem__(std::vector< unsigned int >::difference_type,std::vector< unsigned int >::value_type const &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_BarBazFoo_pop(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< unsigned int > *arg1 = (std::vector< unsigned int > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::vector< unsigned int >::value_type result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_unsigned_int_std__allocatorT_unsigned_int_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BarBazFoo_pop" "', argument " "1"" of type '" "std::vector< unsigned int > *""'"); - } - arg1 = reinterpret_cast< std::vector< unsigned int > * >(argp1); - try { - result = (std::vector< unsigned int >::value_type)std_vector_Sl_unsigned_SS_int_Sg__pop(arg1); - } catch(std::out_of_range &_e) { - SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); - } - resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_BarBazFoo_append(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< unsigned int > *arg1 = (std::vector< unsigned int > *) 0 ; - std::vector< unsigned int >::value_type *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::vector< unsigned int >::value_type temp2 ; - unsigned int val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args, "BarBazFoo_append", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_unsigned_int_std__allocatorT_unsigned_int_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BarBazFoo_append" "', argument " "1"" of type '" "std::vector< unsigned int > *""'"); - } - arg1 = reinterpret_cast< std::vector< unsigned int > * >(argp1); - ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BarBazFoo_append" "', argument " "2"" of type '" "std::vector< unsigned int >::value_type""'"); - } - temp2 = static_cast< std::vector< unsigned int >::value_type >(val2); - arg2 = &temp2; - std_vector_Sl_unsigned_SS_int_Sg__append(arg1,(unsigned int const &)*arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_BarBazFoo__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **SWIGUNUSEDPARM(swig_obj)) { - PyObject *resultobj = 0; - std::vector< unsigned int > *result = 0 ; - - if ((nobjs < 0) || (nobjs > 0)) SWIG_fail; - result = (std::vector< unsigned int > *)new std::vector< unsigned int >(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_unsigned_int_std__allocatorT_unsigned_int_t_t, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_BarBazFoo__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< unsigned int > *arg1 = 0 ; - int res1 = SWIG_OLDOBJ ; - std::vector< unsigned int > *result = 0 ; - - if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; - { - std::vector< unsigned int,std::allocator< unsigned int > > *ptr = (std::vector< unsigned int,std::allocator< unsigned int > > *)0; - res1 = swig::asptr(swig_obj[0], &ptr); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_BarBazFoo" "', argument " "1"" of type '" "std::vector< unsigned int > const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BarBazFoo" "', argument " "1"" of type '" "std::vector< unsigned int > const &""'"); - } - arg1 = ptr; - } - result = (std::vector< unsigned int > *)new std::vector< unsigned int >((std::vector< unsigned int > const &)*arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_unsigned_int_std__allocatorT_unsigned_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_BarBazFoo_empty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< unsigned int > *arg1 = (std::vector< unsigned int > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - bool result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_unsigned_int_std__allocatorT_unsigned_int_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BarBazFoo_empty" "', argument " "1"" of type '" "std::vector< unsigned int > const *""'"); - } - arg1 = reinterpret_cast< std::vector< unsigned int > * >(argp1); - result = (bool)((std::vector< unsigned int > const *)arg1)->empty(); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_BarBazFoo_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< unsigned int > *arg1 = (std::vector< unsigned int > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::vector< unsigned int >::size_type result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_unsigned_int_std__allocatorT_unsigned_int_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BarBazFoo_size" "', argument " "1"" of type '" "std::vector< unsigned int > const *""'"); - } - arg1 = reinterpret_cast< std::vector< unsigned int > * >(argp1); - result = ((std::vector< unsigned int > const *)arg1)->size(); - resultobj = SWIG_From_size_t(static_cast< size_t >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_BarBazFoo_swap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< unsigned int > *arg1 = (std::vector< unsigned int > *) 0 ; - std::vector< unsigned int > *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args, "BarBazFoo_swap", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_unsigned_int_std__allocatorT_unsigned_int_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BarBazFoo_swap" "', argument " "1"" of type '" "std::vector< unsigned int > *""'"); - } - arg1 = reinterpret_cast< std::vector< unsigned int > * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_std__vectorT_unsigned_int_std__allocatorT_unsigned_int_t_t, 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "BarBazFoo_swap" "', argument " "2"" of type '" "std::vector< unsigned int > &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BarBazFoo_swap" "', argument " "2"" of type '" "std::vector< unsigned int > &""'"); - } - arg2 = reinterpret_cast< std::vector< unsigned int > * >(argp2); - (arg1)->swap(*arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_BarBazFoo_begin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< unsigned int > *arg1 = (std::vector< unsigned int > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::vector< unsigned int >::iterator result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_unsigned_int_std__allocatorT_unsigned_int_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BarBazFoo_begin" "', argument " "1"" of type '" "std::vector< unsigned int > *""'"); - } - arg1 = reinterpret_cast< std::vector< unsigned int > * >(argp1); - result = (arg1)->begin(); - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< unsigned int >::iterator & >(result)), - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_BarBazFoo_end(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< unsigned int > *arg1 = (std::vector< unsigned int > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::vector< unsigned int >::iterator result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_unsigned_int_std__allocatorT_unsigned_int_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BarBazFoo_end" "', argument " "1"" of type '" "std::vector< unsigned int > *""'"); - } - arg1 = reinterpret_cast< std::vector< unsigned int > * >(argp1); - result = (arg1)->end(); - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< unsigned int >::iterator & >(result)), - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_BarBazFoo_rbegin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< unsigned int > *arg1 = (std::vector< unsigned int > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::vector< unsigned int >::reverse_iterator result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_unsigned_int_std__allocatorT_unsigned_int_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BarBazFoo_rbegin" "', argument " "1"" of type '" "std::vector< unsigned int > *""'"); - } - arg1 = reinterpret_cast< std::vector< unsigned int > * >(argp1); - result = (arg1)->rbegin(); - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< unsigned int >::reverse_iterator & >(result)), - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_BarBazFoo_rend(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< unsigned int > *arg1 = (std::vector< unsigned int > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::vector< unsigned int >::reverse_iterator result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_unsigned_int_std__allocatorT_unsigned_int_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BarBazFoo_rend" "', argument " "1"" of type '" "std::vector< unsigned int > *""'"); - } - arg1 = reinterpret_cast< std::vector< unsigned int > * >(argp1); - result = (arg1)->rend(); - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< unsigned int >::reverse_iterator & >(result)), - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_BarBazFoo_clear(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< unsigned int > *arg1 = (std::vector< unsigned int > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_unsigned_int_std__allocatorT_unsigned_int_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BarBazFoo_clear" "', argument " "1"" of type '" "std::vector< unsigned int > *""'"); - } - arg1 = reinterpret_cast< std::vector< unsigned int > * >(argp1); - (arg1)->clear(); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_BarBazFoo_get_allocator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< unsigned int > *arg1 = (std::vector< unsigned int > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - SwigValueWrapper< std::allocator< unsigned int > > result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_unsigned_int_std__allocatorT_unsigned_int_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BarBazFoo_get_allocator" "', argument " "1"" of type '" "std::vector< unsigned int > const *""'"); - } - arg1 = reinterpret_cast< std::vector< unsigned int > * >(argp1); - result = ((std::vector< unsigned int > const *)arg1)->get_allocator(); - resultobj = SWIG_NewPointerObj((new std::vector< unsigned int >::allocator_type(static_cast< const std::vector< unsigned int >::allocator_type& >(result))), SWIGTYPE_p_std__allocatorT_unsigned_int_t, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_BarBazFoo__SWIG_2(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< unsigned int >::size_type arg1 ; - size_t val1 ; - int ecode1 = 0 ; - std::vector< unsigned int > *result = 0 ; - - if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; - ecode1 = SWIG_AsVal_size_t(swig_obj[0], &val1); - if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_BarBazFoo" "', argument " "1"" of type '" "std::vector< unsigned int >::size_type""'"); - } - arg1 = static_cast< std::vector< unsigned int >::size_type >(val1); - result = (std::vector< unsigned int > *)new std::vector< unsigned int >(arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_unsigned_int_std__allocatorT_unsigned_int_t_t, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_BarBazFoo_pop_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< unsigned int > *arg1 = (std::vector< unsigned int > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_unsigned_int_std__allocatorT_unsigned_int_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BarBazFoo_pop_back" "', argument " "1"" of type '" "std::vector< unsigned int > *""'"); - } - arg1 = reinterpret_cast< std::vector< unsigned int > * >(argp1); - (arg1)->pop_back(); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_BarBazFoo_resize__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< unsigned int > *arg1 = (std::vector< unsigned int > *) 0 ; - std::vector< unsigned int >::size_type arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - size_t val2 ; - int ecode2 = 0 ; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_unsigned_int_std__allocatorT_unsigned_int_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BarBazFoo_resize" "', argument " "1"" of type '" "std::vector< unsigned int > *""'"); - } - arg1 = reinterpret_cast< std::vector< unsigned int > * >(argp1); - ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BarBazFoo_resize" "', argument " "2"" of type '" "std::vector< unsigned int >::size_type""'"); - } - arg2 = static_cast< std::vector< unsigned int >::size_type >(val2); - (arg1)->resize(arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_BarBazFoo_erase__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< unsigned int > *arg1 = (std::vector< unsigned int > *) 0 ; - std::vector< unsigned int >::iterator arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - swig::SwigPyIterator *iter2 = 0 ; - int res2 ; - std::vector< unsigned int >::iterator result; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_unsigned_int_std__allocatorT_unsigned_int_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BarBazFoo_erase" "', argument " "1"" of type '" "std::vector< unsigned int > *""'"); - } - arg1 = reinterpret_cast< std::vector< unsigned int > * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0); - if (!SWIG_IsOK(res2) || !iter2) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "BarBazFoo_erase" "', argument " "2"" of type '" "std::vector< unsigned 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 '" "BarBazFoo_erase" "', argument " "2"" of type '" "std::vector< unsigned int >::iterator""'"); - } - } - result = std_vector_Sl_unsigned_SS_int_Sg__erase__SWIG_0(arg1,arg2); - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< unsigned int >::iterator & >(result)), - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_BarBazFoo_erase__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< unsigned int > *arg1 = (std::vector< unsigned int > *) 0 ; - std::vector< unsigned int >::iterator arg2 ; - std::vector< unsigned int >::iterator arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - swig::SwigPyIterator *iter2 = 0 ; - int res2 ; - swig::SwigPyIterator *iter3 = 0 ; - int res3 ; - std::vector< unsigned int >::iterator result; - - if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_unsigned_int_std__allocatorT_unsigned_int_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BarBazFoo_erase" "', argument " "1"" of type '" "std::vector< unsigned int > *""'"); - } - arg1 = reinterpret_cast< std::vector< unsigned int > * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0); - if (!SWIG_IsOK(res2) || !iter2) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "BarBazFoo_erase" "', argument " "2"" of type '" "std::vector< unsigned 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 '" "BarBazFoo_erase" "', argument " "2"" of type '" "std::vector< unsigned int >::iterator""'"); - } - } - res3 = SWIG_ConvertPtr(swig_obj[2], SWIG_as_voidptrptr(&iter3), swig::SwigPyIterator::descriptor(), 0); - if (!SWIG_IsOK(res3) || !iter3) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "BarBazFoo_erase" "', argument " "3"" of type '" "std::vector< unsigned 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 '" "BarBazFoo_erase" "', argument " "3"" of type '" "std::vector< unsigned int >::iterator""'"); - } - } - result = std_vector_Sl_unsigned_SS_int_Sg__erase__SWIG_1(arg1,arg2,arg3); - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< unsigned int >::iterator & >(result)), - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_BarBazFoo_erase(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[4] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "BarBazFoo_erase", 0, 3, argv))) SWIG_fail; - --argc; - if (argc == 2) { - int _v; - int res = swig::asptr(argv[0], (std::vector< unsigned int,std::allocator< unsigned int > >**)(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_BarBazFoo_erase__SWIG_0(self, argc, argv); - } - } - } - if (argc == 3) { - int _v; - int res = swig::asptr(argv[0], (std::vector< unsigned int,std::allocator< unsigned int > >**)(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_BarBazFoo_erase__SWIG_1(self, argc, argv); - } - } - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'BarBazFoo_erase'.\n" - " Possible C/C++ prototypes are:\n" - " std::vector< unsigned int >::erase(std::vector< unsigned int >::iterator)\n" - " std::vector< unsigned int >::erase(std::vector< unsigned int >::iterator,std::vector< unsigned int >::iterator)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_new_BarBazFoo__SWIG_3(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< unsigned int >::size_type arg1 ; - std::vector< unsigned int >::value_type *arg2 = 0 ; - size_t val1 ; - int ecode1 = 0 ; - std::vector< unsigned int >::value_type temp2 ; - unsigned int val2 ; - int ecode2 = 0 ; - std::vector< unsigned int > *result = 0 ; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - ecode1 = SWIG_AsVal_size_t(swig_obj[0], &val1); - if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_BarBazFoo" "', argument " "1"" of type '" "std::vector< unsigned int >::size_type""'"); - } - arg1 = static_cast< std::vector< unsigned int >::size_type >(val1); - ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_BarBazFoo" "', argument " "2"" of type '" "std::vector< unsigned int >::value_type""'"); - } - temp2 = static_cast< std::vector< unsigned int >::value_type >(val2); - arg2 = &temp2; - result = (std::vector< unsigned int > *)new std::vector< unsigned int >(arg1,(std::vector< unsigned int >::value_type const &)*arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_unsigned_int_std__allocatorT_unsigned_int_t_t, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_BarBazFoo(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[3] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "new_BarBazFoo", 0, 2, argv))) SWIG_fail; - --argc; - if (argc == 0) { - return _wrap_new_BarBazFoo__SWIG_0(self, argc, argv); - } - if (argc == 1) { - int _v; - { - int res = SWIG_AsVal_size_t(argv[0], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_new_BarBazFoo__SWIG_2(self, argc, argv); - } - } - if (argc == 1) { - int _v; - int res = swig::asptr(argv[0], (std::vector< unsigned int,std::allocator< unsigned int > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_new_BarBazFoo__SWIG_1(self, argc, argv); - } - } - if (argc == 2) { - int _v; - { - int res = SWIG_AsVal_size_t(argv[0], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - { - int res = SWIG_AsVal_unsigned_SS_int(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_new_BarBazFoo__SWIG_3(self, argc, argv); - } - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'new_BarBazFoo'.\n" - " Possible C/C++ prototypes are:\n" - " std::vector< unsigned int >::vector()\n" - " std::vector< unsigned int >::vector(std::vector< unsigned int > const &)\n" - " std::vector< unsigned int >::vector(std::vector< unsigned int >::size_type)\n" - " std::vector< unsigned int >::vector(std::vector< unsigned int >::size_type,std::vector< unsigned int >::value_type const &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_BarBazFoo_push_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< unsigned int > *arg1 = (std::vector< unsigned int > *) 0 ; - std::vector< unsigned int >::value_type *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::vector< unsigned int >::value_type temp2 ; - unsigned int val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args, "BarBazFoo_push_back", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_unsigned_int_std__allocatorT_unsigned_int_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BarBazFoo_push_back" "', argument " "1"" of type '" "std::vector< unsigned int > *""'"); - } - arg1 = reinterpret_cast< std::vector< unsigned int > * >(argp1); - ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BarBazFoo_push_back" "', argument " "2"" of type '" "std::vector< unsigned int >::value_type""'"); - } - temp2 = static_cast< std::vector< unsigned int >::value_type >(val2); - arg2 = &temp2; - (arg1)->push_back((std::vector< unsigned int >::value_type const &)*arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_BarBazFoo_front(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< unsigned int > *arg1 = (std::vector< unsigned int > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::vector< unsigned int >::value_type *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_unsigned_int_std__allocatorT_unsigned_int_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BarBazFoo_front" "', argument " "1"" of type '" "std::vector< unsigned int > const *""'"); - } - arg1 = reinterpret_cast< std::vector< unsigned int > * >(argp1); - result = (std::vector< unsigned int >::value_type *) &((std::vector< unsigned int > const *)arg1)->front(); - resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(*result)); - (void)swig::container_owner::value_type>::category>::back_reference(resultobj, swig_obj[0]); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_BarBazFoo_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< unsigned int > *arg1 = (std::vector< unsigned int > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::vector< unsigned int >::value_type *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_unsigned_int_std__allocatorT_unsigned_int_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BarBazFoo_back" "', argument " "1"" of type '" "std::vector< unsigned int > const *""'"); - } - arg1 = reinterpret_cast< std::vector< unsigned int > * >(argp1); - result = (std::vector< unsigned int >::value_type *) &((std::vector< unsigned int > const *)arg1)->back(); - resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(*result)); - (void)swig::container_owner::value_type>::category>::back_reference(resultobj, swig_obj[0]); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_BarBazFoo_assign(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< unsigned int > *arg1 = (std::vector< unsigned int > *) 0 ; - std::vector< unsigned int >::size_type arg2 ; - std::vector< unsigned int >::value_type *arg3 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - size_t val2 ; - int ecode2 = 0 ; - std::vector< unsigned int >::value_type temp3 ; - unsigned int val3 ; - int ecode3 = 0 ; - PyObject *swig_obj[3] ; - - if (!SWIG_Python_UnpackTuple(args, "BarBazFoo_assign", 3, 3, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_unsigned_int_std__allocatorT_unsigned_int_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BarBazFoo_assign" "', argument " "1"" of type '" "std::vector< unsigned int > *""'"); - } - arg1 = reinterpret_cast< std::vector< unsigned int > * >(argp1); - ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BarBazFoo_assign" "', argument " "2"" of type '" "std::vector< unsigned int >::size_type""'"); - } - arg2 = static_cast< std::vector< unsigned int >::size_type >(val2); - ecode3 = SWIG_AsVal_unsigned_SS_int(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "BarBazFoo_assign" "', argument " "3"" of type '" "std::vector< unsigned int >::value_type""'"); - } - temp3 = static_cast< std::vector< unsigned int >::value_type >(val3); - arg3 = &temp3; - (arg1)->assign(arg2,(std::vector< unsigned int >::value_type const &)*arg3); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_BarBazFoo_resize__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< unsigned int > *arg1 = (std::vector< unsigned int > *) 0 ; - std::vector< unsigned int >::size_type arg2 ; - std::vector< unsigned int >::value_type *arg3 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - size_t val2 ; - int ecode2 = 0 ; - std::vector< unsigned int >::value_type temp3 ; - unsigned int val3 ; - int ecode3 = 0 ; - - if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_unsigned_int_std__allocatorT_unsigned_int_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BarBazFoo_resize" "', argument " "1"" of type '" "std::vector< unsigned int > *""'"); - } - arg1 = reinterpret_cast< std::vector< unsigned int > * >(argp1); - ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BarBazFoo_resize" "', argument " "2"" of type '" "std::vector< unsigned int >::size_type""'"); - } - arg2 = static_cast< std::vector< unsigned int >::size_type >(val2); - ecode3 = SWIG_AsVal_unsigned_SS_int(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "BarBazFoo_resize" "', argument " "3"" of type '" "std::vector< unsigned int >::value_type""'"); - } - temp3 = static_cast< std::vector< unsigned int >::value_type >(val3); - arg3 = &temp3; - (arg1)->resize(arg2,(std::vector< unsigned int >::value_type const &)*arg3); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_BarBazFoo_resize(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[4] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "BarBazFoo_resize", 0, 3, argv))) SWIG_fail; - --argc; - if (argc == 2) { - int _v; - int res = swig::asptr(argv[0], (std::vector< unsigned int,std::allocator< unsigned int > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_size_t(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_BarBazFoo_resize__SWIG_0(self, argc, argv); - } - } - } - if (argc == 3) { - int _v; - int res = swig::asptr(argv[0], (std::vector< unsigned int,std::allocator< unsigned int > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_size_t(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - { - int res = SWIG_AsVal_unsigned_SS_int(argv[2], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_BarBazFoo_resize__SWIG_1(self, argc, argv); - } - } - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'BarBazFoo_resize'.\n" - " Possible C/C++ prototypes are:\n" - " std::vector< unsigned int >::resize(std::vector< unsigned int >::size_type)\n" - " std::vector< unsigned int >::resize(std::vector< unsigned int >::size_type,std::vector< unsigned int >::value_type const &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_BarBazFoo_insert__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< unsigned int > *arg1 = (std::vector< unsigned int > *) 0 ; - std::vector< unsigned int >::iterator arg2 ; - std::vector< unsigned int >::value_type *arg3 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - swig::SwigPyIterator *iter2 = 0 ; - int res2 ; - std::vector< unsigned int >::value_type temp3 ; - unsigned int val3 ; - int ecode3 = 0 ; - std::vector< unsigned int >::iterator result; - - if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_unsigned_int_std__allocatorT_unsigned_int_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BarBazFoo_insert" "', argument " "1"" of type '" "std::vector< unsigned int > *""'"); - } - arg1 = reinterpret_cast< std::vector< unsigned int > * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0); - if (!SWIG_IsOK(res2) || !iter2) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "BarBazFoo_insert" "', argument " "2"" of type '" "std::vector< unsigned 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 '" "BarBazFoo_insert" "', argument " "2"" of type '" "std::vector< unsigned int >::iterator""'"); - } - } - ecode3 = SWIG_AsVal_unsigned_SS_int(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "BarBazFoo_insert" "', argument " "3"" of type '" "std::vector< unsigned int >::value_type""'"); - } - temp3 = static_cast< std::vector< unsigned int >::value_type >(val3); - arg3 = &temp3; - result = std_vector_Sl_unsigned_SS_int_Sg__insert__SWIG_0(arg1,arg2,(unsigned int const &)*arg3); - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< unsigned int >::iterator & >(result)), - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_BarBazFoo_insert__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< unsigned int > *arg1 = (std::vector< unsigned int > *) 0 ; - std::vector< unsigned int >::iterator arg2 ; - std::vector< unsigned int >::size_type arg3 ; - std::vector< unsigned int >::value_type *arg4 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - swig::SwigPyIterator *iter2 = 0 ; - int res2 ; - size_t val3 ; - int ecode3 = 0 ; - std::vector< unsigned int >::value_type temp4 ; - unsigned int val4 ; - int ecode4 = 0 ; - - if ((nobjs < 4) || (nobjs > 4)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_unsigned_int_std__allocatorT_unsigned_int_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BarBazFoo_insert" "', argument " "1"" of type '" "std::vector< unsigned int > *""'"); - } - arg1 = reinterpret_cast< std::vector< unsigned int > * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0); - if (!SWIG_IsOK(res2) || !iter2) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "BarBazFoo_insert" "', argument " "2"" of type '" "std::vector< unsigned 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 '" "BarBazFoo_insert" "', argument " "2"" of type '" "std::vector< unsigned int >::iterator""'"); - } - } - ecode3 = SWIG_AsVal_size_t(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "BarBazFoo_insert" "', argument " "3"" of type '" "std::vector< unsigned int >::size_type""'"); - } - arg3 = static_cast< std::vector< unsigned int >::size_type >(val3); - ecode4 = SWIG_AsVal_unsigned_SS_int(swig_obj[3], &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "BarBazFoo_insert" "', argument " "4"" of type '" "std::vector< unsigned int >::value_type""'"); - } - temp4 = static_cast< std::vector< unsigned int >::value_type >(val4); - arg4 = &temp4; - std_vector_Sl_unsigned_SS_int_Sg__insert__SWIG_1(arg1,arg2,arg3,(unsigned int const &)*arg4); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_BarBazFoo_insert(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[5] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "BarBazFoo_insert", 0, 4, argv))) SWIG_fail; - --argc; - if (argc == 3) { - int _v; - int res = swig::asptr(argv[0], (std::vector< unsigned int,std::allocator< unsigned int > >**)(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) { - return _wrap_BarBazFoo_insert__SWIG_0(self, argc, argv); - } - } - } - } - if (argc == 4) { - int _v; - int res = swig::asptr(argv[0], (std::vector< unsigned int,std::allocator< unsigned int > >**)(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_size_t(argv[2], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - { - int res = SWIG_AsVal_unsigned_SS_int(argv[3], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_BarBazFoo_insert__SWIG_1(self, argc, argv); - } - } - } - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'BarBazFoo_insert'.\n" - " Possible C/C++ prototypes are:\n" - " std::vector< unsigned int >::insert(std::vector< unsigned int >::iterator,std::vector< unsigned int >::value_type const &)\n" - " std::vector< unsigned int >::insert(std::vector< unsigned int >::iterator,std::vector< unsigned int >::size_type,std::vector< unsigned int >::value_type const &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_BarBazFoo_reserve(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< unsigned int > *arg1 = (std::vector< unsigned int > *) 0 ; - std::vector< unsigned int >::size_type arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - size_t val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args, "BarBazFoo_reserve", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_unsigned_int_std__allocatorT_unsigned_int_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BarBazFoo_reserve" "', argument " "1"" of type '" "std::vector< unsigned int > *""'"); - } - arg1 = reinterpret_cast< std::vector< unsigned int > * >(argp1); - ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BarBazFoo_reserve" "', argument " "2"" of type '" "std::vector< unsigned int >::size_type""'"); - } - arg2 = static_cast< std::vector< unsigned int >::size_type >(val2); - (arg1)->reserve(arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_BarBazFoo_capacity(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< unsigned int > *arg1 = (std::vector< unsigned int > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::vector< unsigned int >::size_type result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_unsigned_int_std__allocatorT_unsigned_int_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BarBazFoo_capacity" "', argument " "1"" of type '" "std::vector< unsigned int > const *""'"); - } - arg1 = reinterpret_cast< std::vector< unsigned int > * >(argp1); - result = ((std::vector< unsigned int > const *)arg1)->capacity(); - resultobj = SWIG_From_size_t(static_cast< size_t >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_BarBazFoo(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< unsigned int > *arg1 = (std::vector< unsigned int > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_unsigned_int_std__allocatorT_unsigned_int_t_t, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_BarBazFoo" "', argument " "1"" of type '" "std::vector< unsigned int > *""'"); - } - arg1 = reinterpret_cast< std::vector< unsigned int > * >(argp1); - delete arg1; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *BarBazFoo_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_std__vectorT_unsigned_int_std__allocatorT_unsigned_int_t_t, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *BarBazFoo_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_HfstBasicTransitions_iterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< hfst::implementations::HfstBasicTransition > *arg1 = (std::vector< hfst::implementations::HfstBasicTransition > *) 0 ; - PyObject **arg2 = (PyObject **) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - swig::SwigPyIterator *result = 0 ; - - arg2 = &swig_obj[0]; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst__implementations__HfstBasicTransition_std__allocatorT_hfst__implementations__HfstBasicTransition_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstBasicTransitions_iterator" "', argument " "1"" of type '" "std::vector< hfst::implementations::HfstBasicTransition > *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst::implementations::HfstBasicTransition > * >(argp1); - result = (swig::SwigPyIterator *)std_vector_Sl_hfst_implementations_HfstBasicTransition_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_HfstBasicTransitions___nonzero__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< hfst::implementations::HfstBasicTransition > *arg1 = (std::vector< hfst::implementations::HfstBasicTransition > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - bool result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst__implementations__HfstBasicTransition_std__allocatorT_hfst__implementations__HfstBasicTransition_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstBasicTransitions___nonzero__" "', argument " "1"" of type '" "std::vector< hfst::implementations::HfstBasicTransition > const *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst::implementations::HfstBasicTransition > * >(argp1); - result = (bool)std_vector_Sl_hfst_implementations_HfstBasicTransition_Sg____nonzero__((std::vector< hfst::implementations::HfstBasicTransition > const *)arg1); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstBasicTransitions___bool__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< hfst::implementations::HfstBasicTransition > *arg1 = (std::vector< hfst::implementations::HfstBasicTransition > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - bool result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst__implementations__HfstBasicTransition_std__allocatorT_hfst__implementations__HfstBasicTransition_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstBasicTransitions___bool__" "', argument " "1"" of type '" "std::vector< hfst::implementations::HfstBasicTransition > const *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst::implementations::HfstBasicTransition > * >(argp1); - result = (bool)std_vector_Sl_hfst_implementations_HfstBasicTransition_Sg____bool__((std::vector< hfst::implementations::HfstBasicTransition > const *)arg1); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstBasicTransitions___len__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< hfst::implementations::HfstBasicTransition > *arg1 = (std::vector< hfst::implementations::HfstBasicTransition > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::vector< hfst::implementations::HfstBasicTransition >::size_type result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst__implementations__HfstBasicTransition_std__allocatorT_hfst__implementations__HfstBasicTransition_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstBasicTransitions___len__" "', argument " "1"" of type '" "std::vector< hfst::implementations::HfstBasicTransition > const *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst::implementations::HfstBasicTransition > * >(argp1); - result = std_vector_Sl_hfst_implementations_HfstBasicTransition_Sg____len__((std::vector< hfst::implementations::HfstBasicTransition > const *)arg1); - resultobj = SWIG_From_size_t(static_cast< size_t >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstBasicTransitions___getslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< hfst::implementations::HfstBasicTransition > *arg1 = (std::vector< hfst::implementations::HfstBasicTransition > *) 0 ; - std::vector< hfst::implementations::HfstBasicTransition >::difference_type arg2 ; - std::vector< hfst::implementations::HfstBasicTransition >::difference_type arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - ptrdiff_t val2 ; - int ecode2 = 0 ; - ptrdiff_t val3 ; - int ecode3 = 0 ; - PyObject *swig_obj[3] ; - std::vector< hfst::implementations::HfstBasicTransition,std::allocator< hfst::implementations::HfstBasicTransition > > *result = 0 ; - - if (!SWIG_Python_UnpackTuple(args, "HfstBasicTransitions___getslice__", 3, 3, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst__implementations__HfstBasicTransition_std__allocatorT_hfst__implementations__HfstBasicTransition_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstBasicTransitions___getslice__" "', argument " "1"" of type '" "std::vector< hfst::implementations::HfstBasicTransition > *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst::implementations::HfstBasicTransition > * >(argp1); - ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HfstBasicTransitions___getslice__" "', argument " "2"" of type '" "std::vector< hfst::implementations::HfstBasicTransition >::difference_type""'"); - } - arg2 = static_cast< std::vector< hfst::implementations::HfstBasicTransition >::difference_type >(val2); - ecode3 = SWIG_AsVal_ptrdiff_t(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "HfstBasicTransitions___getslice__" "', argument " "3"" of type '" "std::vector< hfst::implementations::HfstBasicTransition >::difference_type""'"); - } - arg3 = static_cast< std::vector< hfst::implementations::HfstBasicTransition >::difference_type >(val3); - try { - result = (std::vector< hfst::implementations::HfstBasicTransition,std::allocator< hfst::implementations::HfstBasicTransition > > *)std_vector_Sl_hfst_implementations_HfstBasicTransition_Sg____getslice__(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_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_hfst__implementations__HfstBasicTransition_std__allocatorT_hfst__implementations__HfstBasicTransition_t_t, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstBasicTransitions___setslice____SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< hfst::implementations::HfstBasicTransition > *arg1 = (std::vector< hfst::implementations::HfstBasicTransition > *) 0 ; - std::vector< hfst::implementations::HfstBasicTransition >::difference_type arg2 ; - std::vector< hfst::implementations::HfstBasicTransition >::difference_type arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - ptrdiff_t val2 ; - int ecode2 = 0 ; - ptrdiff_t val3 ; - int ecode3 = 0 ; - - if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst__implementations__HfstBasicTransition_std__allocatorT_hfst__implementations__HfstBasicTransition_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstBasicTransitions___setslice__" "', argument " "1"" of type '" "std::vector< hfst::implementations::HfstBasicTransition > *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst::implementations::HfstBasicTransition > * >(argp1); - ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HfstBasicTransitions___setslice__" "', argument " "2"" of type '" "std::vector< hfst::implementations::HfstBasicTransition >::difference_type""'"); - } - arg2 = static_cast< std::vector< hfst::implementations::HfstBasicTransition >::difference_type >(val2); - ecode3 = SWIG_AsVal_ptrdiff_t(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "HfstBasicTransitions___setslice__" "', argument " "3"" of type '" "std::vector< hfst::implementations::HfstBasicTransition >::difference_type""'"); - } - arg3 = static_cast< std::vector< hfst::implementations::HfstBasicTransition >::difference_type >(val3); - try { - std_vector_Sl_hfst_implementations_HfstBasicTransition_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_HfstBasicTransitions___setslice____SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< hfst::implementations::HfstBasicTransition > *arg1 = (std::vector< hfst::implementations::HfstBasicTransition > *) 0 ; - std::vector< hfst::implementations::HfstBasicTransition >::difference_type arg2 ; - std::vector< hfst::implementations::HfstBasicTransition >::difference_type arg3 ; - std::vector< hfst::implementations::HfstBasicTransition,std::allocator< hfst::implementations::HfstBasicTransition > > *arg4 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - ptrdiff_t val2 ; - int ecode2 = 0 ; - ptrdiff_t val3 ; - int ecode3 = 0 ; - int res4 = SWIG_OLDOBJ ; - - if ((nobjs < 4) || (nobjs > 4)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst__implementations__HfstBasicTransition_std__allocatorT_hfst__implementations__HfstBasicTransition_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstBasicTransitions___setslice__" "', argument " "1"" of type '" "std::vector< hfst::implementations::HfstBasicTransition > *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst::implementations::HfstBasicTransition > * >(argp1); - ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HfstBasicTransitions___setslice__" "', argument " "2"" of type '" "std::vector< hfst::implementations::HfstBasicTransition >::difference_type""'"); - } - arg2 = static_cast< std::vector< hfst::implementations::HfstBasicTransition >::difference_type >(val2); - ecode3 = SWIG_AsVal_ptrdiff_t(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "HfstBasicTransitions___setslice__" "', argument " "3"" of type '" "std::vector< hfst::implementations::HfstBasicTransition >::difference_type""'"); - } - arg3 = static_cast< std::vector< hfst::implementations::HfstBasicTransition >::difference_type >(val3); - { - std::vector< hfst::implementations::HfstBasicTransition,std::allocator< hfst::implementations::HfstBasicTransition > > *ptr = (std::vector< hfst::implementations::HfstBasicTransition,std::allocator< hfst::implementations::HfstBasicTransition > > *)0; - res4 = swig::asptr(swig_obj[3], &ptr); - if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "HfstBasicTransitions___setslice__" "', argument " "4"" of type '" "std::vector< hfst::implementations::HfstBasicTransition,std::allocator< hfst::implementations::HfstBasicTransition > > const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstBasicTransitions___setslice__" "', argument " "4"" of type '" "std::vector< hfst::implementations::HfstBasicTransition,std::allocator< hfst::implementations::HfstBasicTransition > > const &""'"); - } - arg4 = ptr; - } - try { - std_vector_Sl_hfst_implementations_HfstBasicTransition_Sg____setslice____SWIG_1(arg1,arg2,arg3,(std::vector< hfst::implementations::HfstBasicTransition,std::allocator< hfst::implementations::HfstBasicTransition > > 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_HfstBasicTransitions___setslice__(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[5] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "HfstBasicTransitions___setslice__", 0, 4, argv))) SWIG_fail; - --argc; - if (argc == 3) { - int _v; - int res = swig::asptr(argv[0], (std::vector< hfst::implementations::HfstBasicTransition,std::allocator< hfst::implementations::HfstBasicTransition > >**)(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_HfstBasicTransitions___setslice____SWIG_0(self, argc, argv); - } - } - } - } - if (argc == 4) { - int _v; - int res = swig::asptr(argv[0], (std::vector< hfst::implementations::HfstBasicTransition,std::allocator< hfst::implementations::HfstBasicTransition > >**)(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< hfst::implementations::HfstBasicTransition,std::allocator< hfst::implementations::HfstBasicTransition > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_HfstBasicTransitions___setslice____SWIG_1(self, argc, argv); - } - } - } - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'HfstBasicTransitions___setslice__'.\n" - " Possible C/C++ prototypes are:\n" - " std::vector< hfst::implementations::HfstBasicTransition >::__setslice__(std::vector< hfst::implementations::HfstBasicTransition >::difference_type,std::vector< hfst::implementations::HfstBasicTransition >::difference_type)\n" - " std::vector< hfst::implementations::HfstBasicTransition >::__setslice__(std::vector< hfst::implementations::HfstBasicTransition >::difference_type,std::vector< hfst::implementations::HfstBasicTransition >::difference_type,std::vector< hfst::implementations::HfstBasicTransition,std::allocator< hfst::implementations::HfstBasicTransition > > const &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_HfstBasicTransitions___delslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< hfst::implementations::HfstBasicTransition > *arg1 = (std::vector< hfst::implementations::HfstBasicTransition > *) 0 ; - std::vector< hfst::implementations::HfstBasicTransition >::difference_type arg2 ; - std::vector< hfst::implementations::HfstBasicTransition >::difference_type arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - ptrdiff_t val2 ; - int ecode2 = 0 ; - ptrdiff_t val3 ; - int ecode3 = 0 ; - PyObject *swig_obj[3] ; - - if (!SWIG_Python_UnpackTuple(args, "HfstBasicTransitions___delslice__", 3, 3, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst__implementations__HfstBasicTransition_std__allocatorT_hfst__implementations__HfstBasicTransition_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstBasicTransitions___delslice__" "', argument " "1"" of type '" "std::vector< hfst::implementations::HfstBasicTransition > *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst::implementations::HfstBasicTransition > * >(argp1); - ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HfstBasicTransitions___delslice__" "', argument " "2"" of type '" "std::vector< hfst::implementations::HfstBasicTransition >::difference_type""'"); - } - arg2 = static_cast< std::vector< hfst::implementations::HfstBasicTransition >::difference_type >(val2); - ecode3 = SWIG_AsVal_ptrdiff_t(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "HfstBasicTransitions___delslice__" "', argument " "3"" of type '" "std::vector< hfst::implementations::HfstBasicTransition >::difference_type""'"); - } - arg3 = static_cast< std::vector< hfst::implementations::HfstBasicTransition >::difference_type >(val3); - try { - std_vector_Sl_hfst_implementations_HfstBasicTransition_Sg____delslice__(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_HfstBasicTransitions___delitem____SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< hfst::implementations::HfstBasicTransition > *arg1 = (std::vector< hfst::implementations::HfstBasicTransition > *) 0 ; - std::vector< hfst::implementations::HfstBasicTransition >::difference_type arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - ptrdiff_t val2 ; - int ecode2 = 0 ; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst__implementations__HfstBasicTransition_std__allocatorT_hfst__implementations__HfstBasicTransition_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstBasicTransitions___delitem__" "', argument " "1"" of type '" "std::vector< hfst::implementations::HfstBasicTransition > *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst::implementations::HfstBasicTransition > * >(argp1); - ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HfstBasicTransitions___delitem__" "', argument " "2"" of type '" "std::vector< hfst::implementations::HfstBasicTransition >::difference_type""'"); - } - arg2 = static_cast< std::vector< hfst::implementations::HfstBasicTransition >::difference_type >(val2); - try { - std_vector_Sl_hfst_implementations_HfstBasicTransition_Sg____delitem____SWIG_0(arg1,arg2); - } 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_HfstBasicTransitions___getitem____SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< hfst::implementations::HfstBasicTransition > *arg1 = (std::vector< hfst::implementations::HfstBasicTransition > *) 0 ; - PySliceObject *arg2 = (PySliceObject *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::vector< hfst::implementations::HfstBasicTransition,std::allocator< hfst::implementations::HfstBasicTransition > > *result = 0 ; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst__implementations__HfstBasicTransition_std__allocatorT_hfst__implementations__HfstBasicTransition_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstBasicTransitions___getitem__" "', argument " "1"" of type '" "std::vector< hfst::implementations::HfstBasicTransition > *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst::implementations::HfstBasicTransition > * >(argp1); - { - if (!PySlice_Check(swig_obj[1])) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "HfstBasicTransitions___getitem__" "', argument " "2"" of type '" "PySliceObject *""'"); - } - arg2 = (PySliceObject *) swig_obj[1]; - } - try { - result = (std::vector< hfst::implementations::HfstBasicTransition,std::allocator< hfst::implementations::HfstBasicTransition > > *)std_vector_Sl_hfst_implementations_HfstBasicTransition_Sg____getitem____SWIG_0(arg1,arg2); - } 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_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_hfst__implementations__HfstBasicTransition_std__allocatorT_hfst__implementations__HfstBasicTransition_t_t, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstBasicTransitions___setitem____SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< hfst::implementations::HfstBasicTransition > *arg1 = (std::vector< hfst::implementations::HfstBasicTransition > *) 0 ; - PySliceObject *arg2 = (PySliceObject *) 0 ; - std::vector< hfst::implementations::HfstBasicTransition,std::allocator< hfst::implementations::HfstBasicTransition > > *arg3 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res3 = SWIG_OLDOBJ ; - - if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst__implementations__HfstBasicTransition_std__allocatorT_hfst__implementations__HfstBasicTransition_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstBasicTransitions___setitem__" "', argument " "1"" of type '" "std::vector< hfst::implementations::HfstBasicTransition > *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst::implementations::HfstBasicTransition > * >(argp1); - { - if (!PySlice_Check(swig_obj[1])) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "HfstBasicTransitions___setitem__" "', argument " "2"" of type '" "PySliceObject *""'"); - } - arg2 = (PySliceObject *) swig_obj[1]; - } - { - std::vector< hfst::implementations::HfstBasicTransition,std::allocator< hfst::implementations::HfstBasicTransition > > *ptr = (std::vector< hfst::implementations::HfstBasicTransition,std::allocator< hfst::implementations::HfstBasicTransition > > *)0; - res3 = swig::asptr(swig_obj[2], &ptr); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "HfstBasicTransitions___setitem__" "', argument " "3"" of type '" "std::vector< hfst::implementations::HfstBasicTransition,std::allocator< hfst::implementations::HfstBasicTransition > > const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstBasicTransitions___setitem__" "', argument " "3"" of type '" "std::vector< hfst::implementations::HfstBasicTransition,std::allocator< hfst::implementations::HfstBasicTransition > > const &""'"); - } - arg3 = ptr; - } - try { - std_vector_Sl_hfst_implementations_HfstBasicTransition_Sg____setitem____SWIG_0(arg1,arg2,(std::vector< hfst::implementations::HfstBasicTransition,std::allocator< hfst::implementations::HfstBasicTransition > > 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_HfstBasicTransitions___setitem____SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< hfst::implementations::HfstBasicTransition > *arg1 = (std::vector< hfst::implementations::HfstBasicTransition > *) 0 ; - PySliceObject *arg2 = (PySliceObject *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst__implementations__HfstBasicTransition_std__allocatorT_hfst__implementations__HfstBasicTransition_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstBasicTransitions___setitem__" "', argument " "1"" of type '" "std::vector< hfst::implementations::HfstBasicTransition > *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst::implementations::HfstBasicTransition > * >(argp1); - { - if (!PySlice_Check(swig_obj[1])) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "HfstBasicTransitions___setitem__" "', argument " "2"" of type '" "PySliceObject *""'"); - } - arg2 = (PySliceObject *) swig_obj[1]; - } - try { - std_vector_Sl_hfst_implementations_HfstBasicTransition_Sg____setitem____SWIG_1(arg1,arg2); - } 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_HfstBasicTransitions___delitem____SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< hfst::implementations::HfstBasicTransition > *arg1 = (std::vector< hfst::implementations::HfstBasicTransition > *) 0 ; - PySliceObject *arg2 = (PySliceObject *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst__implementations__HfstBasicTransition_std__allocatorT_hfst__implementations__HfstBasicTransition_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstBasicTransitions___delitem__" "', argument " "1"" of type '" "std::vector< hfst::implementations::HfstBasicTransition > *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst::implementations::HfstBasicTransition > * >(argp1); - { - if (!PySlice_Check(swig_obj[1])) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "HfstBasicTransitions___delitem__" "', argument " "2"" of type '" "PySliceObject *""'"); - } - arg2 = (PySliceObject *) swig_obj[1]; - } - try { - std_vector_Sl_hfst_implementations_HfstBasicTransition_Sg____delitem____SWIG_1(arg1,arg2); - } 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_HfstBasicTransitions___delitem__(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[3] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "HfstBasicTransitions___delitem__", 0, 2, argv))) SWIG_fail; - --argc; - if (argc == 2) { - int _v; - int res = swig::asptr(argv[0], (std::vector< hfst::implementations::HfstBasicTransition,std::allocator< hfst::implementations::HfstBasicTransition > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - { - _v = PySlice_Check(argv[1]); - } - if (_v) { - return _wrap_HfstBasicTransitions___delitem____SWIG_1(self, argc, argv); - } - } - } - if (argc == 2) { - int _v; - int res = swig::asptr(argv[0], (std::vector< hfst::implementations::HfstBasicTransition,std::allocator< hfst::implementations::HfstBasicTransition > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_HfstBasicTransitions___delitem____SWIG_0(self, argc, argv); - } - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'HfstBasicTransitions___delitem__'.\n" - " Possible C/C++ prototypes are:\n" - " std::vector< hfst::implementations::HfstBasicTransition >::__delitem__(std::vector< hfst::implementations::HfstBasicTransition >::difference_type)\n" - " std::vector< hfst::implementations::HfstBasicTransition >::__delitem__(PySliceObject *)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_HfstBasicTransitions___getitem____SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< hfst::implementations::HfstBasicTransition > *arg1 = (std::vector< hfst::implementations::HfstBasicTransition > *) 0 ; - std::vector< hfst::implementations::HfstBasicTransition >::difference_type arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - ptrdiff_t val2 ; - int ecode2 = 0 ; - std::vector< hfst::implementations::HfstBasicTransition >::value_type *result = 0 ; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst__implementations__HfstBasicTransition_std__allocatorT_hfst__implementations__HfstBasicTransition_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstBasicTransitions___getitem__" "', argument " "1"" of type '" "std::vector< hfst::implementations::HfstBasicTransition > const *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst::implementations::HfstBasicTransition > * >(argp1); - ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HfstBasicTransitions___getitem__" "', argument " "2"" of type '" "std::vector< hfst::implementations::HfstBasicTransition >::difference_type""'"); - } - arg2 = static_cast< std::vector< hfst::implementations::HfstBasicTransition >::difference_type >(val2); - try { - result = (std::vector< hfst::implementations::HfstBasicTransition >::value_type *) &std_vector_Sl_hfst_implementations_HfstBasicTransition_Sg____getitem____SWIG_1((std::vector< hfst::implementations::HfstBasicTransition > const *)arg1,arg2); - } catch(std::out_of_range &_e) { - SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_hfst__implementations__HfstBasicTransition, 0 | 0 ); - (void)swig::container_owner::value_type>::category>::back_reference(resultobj, swig_obj[0]); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstBasicTransitions___getitem__(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[3] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "HfstBasicTransitions___getitem__", 0, 2, argv))) SWIG_fail; - --argc; - if (argc == 2) { - int _v; - int res = swig::asptr(argv[0], (std::vector< hfst::implementations::HfstBasicTransition,std::allocator< hfst::implementations::HfstBasicTransition > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - { - _v = PySlice_Check(argv[1]); - } - if (_v) { - return _wrap_HfstBasicTransitions___getitem____SWIG_0(self, argc, argv); - } - } - } - if (argc == 2) { - int _v; - int res = swig::asptr(argv[0], (std::vector< hfst::implementations::HfstBasicTransition,std::allocator< hfst::implementations::HfstBasicTransition > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_HfstBasicTransitions___getitem____SWIG_1(self, argc, argv); - } - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'HfstBasicTransitions___getitem__'.\n" - " Possible C/C++ prototypes are:\n" - " std::vector< hfst::implementations::HfstBasicTransition >::__getitem__(PySliceObject *)\n" - " std::vector< hfst::implementations::HfstBasicTransition >::__getitem__(std::vector< hfst::implementations::HfstBasicTransition >::difference_type) const\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_HfstBasicTransitions___setitem____SWIG_2(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< hfst::implementations::HfstBasicTransition > *arg1 = (std::vector< hfst::implementations::HfstBasicTransition > *) 0 ; - std::vector< hfst::implementations::HfstBasicTransition >::difference_type arg2 ; - std::vector< hfst::implementations::HfstBasicTransition >::value_type *arg3 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - ptrdiff_t val2 ; - int ecode2 = 0 ; - void *argp3 = 0 ; - int res3 = 0 ; - - if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst__implementations__HfstBasicTransition_std__allocatorT_hfst__implementations__HfstBasicTransition_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstBasicTransitions___setitem__" "', argument " "1"" of type '" "std::vector< hfst::implementations::HfstBasicTransition > *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst::implementations::HfstBasicTransition > * >(argp1); - ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HfstBasicTransitions___setitem__" "', argument " "2"" of type '" "std::vector< hfst::implementations::HfstBasicTransition >::difference_type""'"); - } - arg2 = static_cast< std::vector< hfst::implementations::HfstBasicTransition >::difference_type >(val2); - res3 = SWIG_ConvertPtr(swig_obj[2], &argp3, SWIGTYPE_p_hfst__implementations__HfstBasicTransition, 0 | 0); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "HfstBasicTransitions___setitem__" "', argument " "3"" of type '" "std::vector< hfst::implementations::HfstBasicTransition >::value_type const &""'"); - } - if (!argp3) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstBasicTransitions___setitem__" "', argument " "3"" of type '" "std::vector< hfst::implementations::HfstBasicTransition >::value_type const &""'"); - } - arg3 = reinterpret_cast< std::vector< hfst::implementations::HfstBasicTransition >::value_type * >(argp3); - try { - std_vector_Sl_hfst_implementations_HfstBasicTransition_Sg____setitem____SWIG_2(arg1,arg2,(hfst::implementations::HfstBasicTransition 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_HfstBasicTransitions___setitem__(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[4] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "HfstBasicTransitions___setitem__", 0, 3, argv))) SWIG_fail; - --argc; - if (argc == 2) { - int _v; - int res = swig::asptr(argv[0], (std::vector< hfst::implementations::HfstBasicTransition,std::allocator< hfst::implementations::HfstBasicTransition > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - { - _v = PySlice_Check(argv[1]); - } - if (_v) { - return _wrap_HfstBasicTransitions___setitem____SWIG_1(self, argc, argv); - } - } - } - if (argc == 3) { - int _v; - int res = swig::asptr(argv[0], (std::vector< hfst::implementations::HfstBasicTransition,std::allocator< hfst::implementations::HfstBasicTransition > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - { - _v = PySlice_Check(argv[1]); - } - if (_v) { - int res = swig::asptr(argv[2], (std::vector< hfst::implementations::HfstBasicTransition,std::allocator< hfst::implementations::HfstBasicTransition > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_HfstBasicTransitions___setitem____SWIG_0(self, argc, argv); - } - } - } - } - if (argc == 3) { - int _v; - int res = swig::asptr(argv[0], (std::vector< hfst::implementations::HfstBasicTransition,std::allocator< hfst::implementations::HfstBasicTransition > >**)(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_ConvertPtr(argv[2], 0, SWIGTYPE_p_hfst__implementations__HfstBasicTransition, SWIG_POINTER_NO_NULL | 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_HfstBasicTransitions___setitem____SWIG_2(self, argc, argv); - } - } - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'HfstBasicTransitions___setitem__'.\n" - " Possible C/C++ prototypes are:\n" - " std::vector< hfst::implementations::HfstBasicTransition >::__setitem__(PySliceObject *,std::vector< hfst::implementations::HfstBasicTransition,std::allocator< hfst::implementations::HfstBasicTransition > > const &)\n" - " std::vector< hfst::implementations::HfstBasicTransition >::__setitem__(PySliceObject *)\n" - " std::vector< hfst::implementations::HfstBasicTransition >::__setitem__(std::vector< hfst::implementations::HfstBasicTransition >::difference_type,std::vector< hfst::implementations::HfstBasicTransition >::value_type const &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_HfstBasicTransitions_pop(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< hfst::implementations::HfstBasicTransition > *arg1 = (std::vector< hfst::implementations::HfstBasicTransition > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::vector< hfst::implementations::HfstBasicTransition >::value_type result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst__implementations__HfstBasicTransition_std__allocatorT_hfst__implementations__HfstBasicTransition_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstBasicTransitions_pop" "', argument " "1"" of type '" "std::vector< hfst::implementations::HfstBasicTransition > *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst::implementations::HfstBasicTransition > * >(argp1); - try { - result = std_vector_Sl_hfst_implementations_HfstBasicTransition_Sg__pop(arg1); - } catch(std::out_of_range &_e) { - SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); - } - resultobj = SWIG_NewPointerObj((new std::vector< hfst::implementations::HfstBasicTransition >::value_type(static_cast< const std::vector< hfst::implementations::HfstBasicTransition >::value_type& >(result))), SWIGTYPE_p_hfst__implementations__HfstBasicTransition, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstBasicTransitions_append(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< hfst::implementations::HfstBasicTransition > *arg1 = (std::vector< hfst::implementations::HfstBasicTransition > *) 0 ; - std::vector< hfst::implementations::HfstBasicTransition >::value_type *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args, "HfstBasicTransitions_append", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst__implementations__HfstBasicTransition_std__allocatorT_hfst__implementations__HfstBasicTransition_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstBasicTransitions_append" "', argument " "1"" of type '" "std::vector< hfst::implementations::HfstBasicTransition > *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst::implementations::HfstBasicTransition > * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_hfst__implementations__HfstBasicTransition, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HfstBasicTransitions_append" "', argument " "2"" of type '" "std::vector< hfst::implementations::HfstBasicTransition >::value_type const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstBasicTransitions_append" "', argument " "2"" of type '" "std::vector< hfst::implementations::HfstBasicTransition >::value_type const &""'"); - } - arg2 = reinterpret_cast< std::vector< hfst::implementations::HfstBasicTransition >::value_type * >(argp2); - std_vector_Sl_hfst_implementations_HfstBasicTransition_Sg__append(arg1,(hfst::implementations::HfstBasicTransition const &)*arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_HfstBasicTransitions__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **SWIGUNUSEDPARM(swig_obj)) { - PyObject *resultobj = 0; - std::vector< hfst::implementations::HfstBasicTransition > *result = 0 ; - - if ((nobjs < 0) || (nobjs > 0)) SWIG_fail; - result = (std::vector< hfst::implementations::HfstBasicTransition > *)new std::vector< hfst::implementations::HfstBasicTransition >(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_hfst__implementations__HfstBasicTransition_std__allocatorT_hfst__implementations__HfstBasicTransition_t_t, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_HfstBasicTransitions__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< hfst::implementations::HfstBasicTransition > *arg1 = 0 ; - int res1 = SWIG_OLDOBJ ; - std::vector< hfst::implementations::HfstBasicTransition > *result = 0 ; - - if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; - { - std::vector< hfst::implementations::HfstBasicTransition,std::allocator< hfst::implementations::HfstBasicTransition > > *ptr = (std::vector< hfst::implementations::HfstBasicTransition,std::allocator< hfst::implementations::HfstBasicTransition > > *)0; - res1 = swig::asptr(swig_obj[0], &ptr); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_HfstBasicTransitions" "', argument " "1"" of type '" "std::vector< hfst::implementations::HfstBasicTransition > const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_HfstBasicTransitions" "', argument " "1"" of type '" "std::vector< hfst::implementations::HfstBasicTransition > const &""'"); - } - arg1 = ptr; - } - result = (std::vector< hfst::implementations::HfstBasicTransition > *)new std::vector< hfst::implementations::HfstBasicTransition >((std::vector< hfst::implementations::HfstBasicTransition > const &)*arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_hfst__implementations__HfstBasicTransition_std__allocatorT_hfst__implementations__HfstBasicTransition_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_HfstBasicTransitions_empty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< hfst::implementations::HfstBasicTransition > *arg1 = (std::vector< hfst::implementations::HfstBasicTransition > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - bool result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst__implementations__HfstBasicTransition_std__allocatorT_hfst__implementations__HfstBasicTransition_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstBasicTransitions_empty" "', argument " "1"" of type '" "std::vector< hfst::implementations::HfstBasicTransition > const *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst::implementations::HfstBasicTransition > * >(argp1); - result = (bool)((std::vector< hfst::implementations::HfstBasicTransition > const *)arg1)->empty(); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstBasicTransitions_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< hfst::implementations::HfstBasicTransition > *arg1 = (std::vector< hfst::implementations::HfstBasicTransition > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::vector< hfst::implementations::HfstBasicTransition >::size_type result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst__implementations__HfstBasicTransition_std__allocatorT_hfst__implementations__HfstBasicTransition_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstBasicTransitions_size" "', argument " "1"" of type '" "std::vector< hfst::implementations::HfstBasicTransition > const *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst::implementations::HfstBasicTransition > * >(argp1); - result = ((std::vector< hfst::implementations::HfstBasicTransition > const *)arg1)->size(); - resultobj = SWIG_From_size_t(static_cast< size_t >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstBasicTransitions_swap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< hfst::implementations::HfstBasicTransition > *arg1 = (std::vector< hfst::implementations::HfstBasicTransition > *) 0 ; - std::vector< hfst::implementations::HfstBasicTransition > *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args, "HfstBasicTransitions_swap", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst__implementations__HfstBasicTransition_std__allocatorT_hfst__implementations__HfstBasicTransition_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstBasicTransitions_swap" "', argument " "1"" of type '" "std::vector< hfst::implementations::HfstBasicTransition > *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst::implementations::HfstBasicTransition > * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_std__vectorT_hfst__implementations__HfstBasicTransition_std__allocatorT_hfst__implementations__HfstBasicTransition_t_t, 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HfstBasicTransitions_swap" "', argument " "2"" of type '" "std::vector< hfst::implementations::HfstBasicTransition > &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstBasicTransitions_swap" "', argument " "2"" of type '" "std::vector< hfst::implementations::HfstBasicTransition > &""'"); - } - arg2 = reinterpret_cast< std::vector< hfst::implementations::HfstBasicTransition > * >(argp2); - (arg1)->swap(*arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstBasicTransitions_begin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< hfst::implementations::HfstBasicTransition > *arg1 = (std::vector< hfst::implementations::HfstBasicTransition > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::vector< hfst::implementations::HfstBasicTransition >::iterator result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst__implementations__HfstBasicTransition_std__allocatorT_hfst__implementations__HfstBasicTransition_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstBasicTransitions_begin" "', argument " "1"" of type '" "std::vector< hfst::implementations::HfstBasicTransition > *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst::implementations::HfstBasicTransition > * >(argp1); - result = (arg1)->begin(); - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< hfst::implementations::HfstBasicTransition >::iterator & >(result)), - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstBasicTransitions_end(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< hfst::implementations::HfstBasicTransition > *arg1 = (std::vector< hfst::implementations::HfstBasicTransition > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::vector< hfst::implementations::HfstBasicTransition >::iterator result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst__implementations__HfstBasicTransition_std__allocatorT_hfst__implementations__HfstBasicTransition_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstBasicTransitions_end" "', argument " "1"" of type '" "std::vector< hfst::implementations::HfstBasicTransition > *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst::implementations::HfstBasicTransition > * >(argp1); - result = (arg1)->end(); - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< hfst::implementations::HfstBasicTransition >::iterator & >(result)), - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstBasicTransitions_rbegin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< hfst::implementations::HfstBasicTransition > *arg1 = (std::vector< hfst::implementations::HfstBasicTransition > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::vector< hfst::implementations::HfstBasicTransition >::reverse_iterator result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst__implementations__HfstBasicTransition_std__allocatorT_hfst__implementations__HfstBasicTransition_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstBasicTransitions_rbegin" "', argument " "1"" of type '" "std::vector< hfst::implementations::HfstBasicTransition > *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst::implementations::HfstBasicTransition > * >(argp1); - result = (arg1)->rbegin(); - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< hfst::implementations::HfstBasicTransition >::reverse_iterator & >(result)), - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstBasicTransitions_rend(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< hfst::implementations::HfstBasicTransition > *arg1 = (std::vector< hfst::implementations::HfstBasicTransition > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::vector< hfst::implementations::HfstBasicTransition >::reverse_iterator result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst__implementations__HfstBasicTransition_std__allocatorT_hfst__implementations__HfstBasicTransition_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstBasicTransitions_rend" "', argument " "1"" of type '" "std::vector< hfst::implementations::HfstBasicTransition > *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst::implementations::HfstBasicTransition > * >(argp1); - result = (arg1)->rend(); - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< hfst::implementations::HfstBasicTransition >::reverse_iterator & >(result)), - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstBasicTransitions_clear(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< hfst::implementations::HfstBasicTransition > *arg1 = (std::vector< hfst::implementations::HfstBasicTransition > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst__implementations__HfstBasicTransition_std__allocatorT_hfst__implementations__HfstBasicTransition_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstBasicTransitions_clear" "', argument " "1"" of type '" "std::vector< hfst::implementations::HfstBasicTransition > *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst::implementations::HfstBasicTransition > * >(argp1); - (arg1)->clear(); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstBasicTransitions_get_allocator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< hfst::implementations::HfstBasicTransition > *arg1 = (std::vector< hfst::implementations::HfstBasicTransition > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - SwigValueWrapper< std::allocator< hfst::implementations::HfstBasicTransition > > result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst__implementations__HfstBasicTransition_std__allocatorT_hfst__implementations__HfstBasicTransition_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstBasicTransitions_get_allocator" "', argument " "1"" of type '" "std::vector< hfst::implementations::HfstBasicTransition > const *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst::implementations::HfstBasicTransition > * >(argp1); - result = ((std::vector< hfst::implementations::HfstBasicTransition > const *)arg1)->get_allocator(); - resultobj = SWIG_NewPointerObj((new std::vector< hfst::implementations::HfstBasicTransition >::allocator_type(static_cast< const std::vector< hfst::implementations::HfstBasicTransition >::allocator_type& >(result))), SWIGTYPE_p_std__allocatorT_hfst__implementations__HfstBasicTransition_t, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_HfstBasicTransitions__SWIG_2(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< hfst::implementations::HfstBasicTransition >::size_type arg1 ; - size_t val1 ; - int ecode1 = 0 ; - std::vector< hfst::implementations::HfstBasicTransition > *result = 0 ; - - if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; - ecode1 = SWIG_AsVal_size_t(swig_obj[0], &val1); - if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_HfstBasicTransitions" "', argument " "1"" of type '" "std::vector< hfst::implementations::HfstBasicTransition >::size_type""'"); - } - arg1 = static_cast< std::vector< hfst::implementations::HfstBasicTransition >::size_type >(val1); - result = (std::vector< hfst::implementations::HfstBasicTransition > *)new std::vector< hfst::implementations::HfstBasicTransition >(arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_hfst__implementations__HfstBasicTransition_std__allocatorT_hfst__implementations__HfstBasicTransition_t_t, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstBasicTransitions_pop_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< hfst::implementations::HfstBasicTransition > *arg1 = (std::vector< hfst::implementations::HfstBasicTransition > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst__implementations__HfstBasicTransition_std__allocatorT_hfst__implementations__HfstBasicTransition_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstBasicTransitions_pop_back" "', argument " "1"" of type '" "std::vector< hfst::implementations::HfstBasicTransition > *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst::implementations::HfstBasicTransition > * >(argp1); - (arg1)->pop_back(); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstBasicTransitions_resize__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< hfst::implementations::HfstBasicTransition > *arg1 = (std::vector< hfst::implementations::HfstBasicTransition > *) 0 ; - std::vector< hfst::implementations::HfstBasicTransition >::size_type arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - size_t val2 ; - int ecode2 = 0 ; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst__implementations__HfstBasicTransition_std__allocatorT_hfst__implementations__HfstBasicTransition_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstBasicTransitions_resize" "', argument " "1"" of type '" "std::vector< hfst::implementations::HfstBasicTransition > *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst::implementations::HfstBasicTransition > * >(argp1); - ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HfstBasicTransitions_resize" "', argument " "2"" of type '" "std::vector< hfst::implementations::HfstBasicTransition >::size_type""'"); - } - arg2 = static_cast< std::vector< hfst::implementations::HfstBasicTransition >::size_type >(val2); - (arg1)->resize(arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstBasicTransitions_erase__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< hfst::implementations::HfstBasicTransition > *arg1 = (std::vector< hfst::implementations::HfstBasicTransition > *) 0 ; - std::vector< hfst::implementations::HfstBasicTransition >::iterator arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - swig::SwigPyIterator *iter2 = 0 ; - int res2 ; - std::vector< hfst::implementations::HfstBasicTransition >::iterator result; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst__implementations__HfstBasicTransition_std__allocatorT_hfst__implementations__HfstBasicTransition_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstBasicTransitions_erase" "', argument " "1"" of type '" "std::vector< hfst::implementations::HfstBasicTransition > *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst::implementations::HfstBasicTransition > * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0); - if (!SWIG_IsOK(res2) || !iter2) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "HfstBasicTransitions_erase" "', argument " "2"" of type '" "std::vector< hfst::implementations::HfstBasicTransition >::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 '" "HfstBasicTransitions_erase" "', argument " "2"" of type '" "std::vector< hfst::implementations::HfstBasicTransition >::iterator""'"); - } - } - result = std_vector_Sl_hfst_implementations_HfstBasicTransition_Sg__erase__SWIG_0(arg1,arg2); - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< hfst::implementations::HfstBasicTransition >::iterator & >(result)), - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstBasicTransitions_erase__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< hfst::implementations::HfstBasicTransition > *arg1 = (std::vector< hfst::implementations::HfstBasicTransition > *) 0 ; - std::vector< hfst::implementations::HfstBasicTransition >::iterator arg2 ; - std::vector< hfst::implementations::HfstBasicTransition >::iterator arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - swig::SwigPyIterator *iter2 = 0 ; - int res2 ; - swig::SwigPyIterator *iter3 = 0 ; - int res3 ; - std::vector< hfst::implementations::HfstBasicTransition >::iterator result; - - if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst__implementations__HfstBasicTransition_std__allocatorT_hfst__implementations__HfstBasicTransition_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstBasicTransitions_erase" "', argument " "1"" of type '" "std::vector< hfst::implementations::HfstBasicTransition > *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst::implementations::HfstBasicTransition > * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0); - if (!SWIG_IsOK(res2) || !iter2) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "HfstBasicTransitions_erase" "', argument " "2"" of type '" "std::vector< hfst::implementations::HfstBasicTransition >::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 '" "HfstBasicTransitions_erase" "', argument " "2"" of type '" "std::vector< hfst::implementations::HfstBasicTransition >::iterator""'"); - } - } - res3 = SWIG_ConvertPtr(swig_obj[2], SWIG_as_voidptrptr(&iter3), swig::SwigPyIterator::descriptor(), 0); - if (!SWIG_IsOK(res3) || !iter3) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "HfstBasicTransitions_erase" "', argument " "3"" of type '" "std::vector< hfst::implementations::HfstBasicTransition >::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 '" "HfstBasicTransitions_erase" "', argument " "3"" of type '" "std::vector< hfst::implementations::HfstBasicTransition >::iterator""'"); - } - } - result = std_vector_Sl_hfst_implementations_HfstBasicTransition_Sg__erase__SWIG_1(arg1,arg2,arg3); - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< hfst::implementations::HfstBasicTransition >::iterator & >(result)), - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstBasicTransitions_erase(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[4] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "HfstBasicTransitions_erase", 0, 3, argv))) SWIG_fail; - --argc; - if (argc == 2) { - int _v; - int res = swig::asptr(argv[0], (std::vector< hfst::implementations::HfstBasicTransition,std::allocator< hfst::implementations::HfstBasicTransition > >**)(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_HfstBasicTransitions_erase__SWIG_0(self, argc, argv); - } - } - } - if (argc == 3) { - int _v; - int res = swig::asptr(argv[0], (std::vector< hfst::implementations::HfstBasicTransition,std::allocator< hfst::implementations::HfstBasicTransition > >**)(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_HfstBasicTransitions_erase__SWIG_1(self, argc, argv); - } - } - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'HfstBasicTransitions_erase'.\n" - " Possible C/C++ prototypes are:\n" - " std::vector< hfst::implementations::HfstBasicTransition >::erase(std::vector< hfst::implementations::HfstBasicTransition >::iterator)\n" - " std::vector< hfst::implementations::HfstBasicTransition >::erase(std::vector< hfst::implementations::HfstBasicTransition >::iterator,std::vector< hfst::implementations::HfstBasicTransition >::iterator)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_new_HfstBasicTransitions__SWIG_3(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< hfst::implementations::HfstBasicTransition >::size_type arg1 ; - std::vector< hfst::implementations::HfstBasicTransition >::value_type *arg2 = 0 ; - size_t val1 ; - int ecode1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - std::vector< hfst::implementations::HfstBasicTransition > *result = 0 ; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - ecode1 = SWIG_AsVal_size_t(swig_obj[0], &val1); - if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_HfstBasicTransitions" "', argument " "1"" of type '" "std::vector< hfst::implementations::HfstBasicTransition >::size_type""'"); - } - arg1 = static_cast< std::vector< hfst::implementations::HfstBasicTransition >::size_type >(val1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_hfst__implementations__HfstBasicTransition, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_HfstBasicTransitions" "', argument " "2"" of type '" "std::vector< hfst::implementations::HfstBasicTransition >::value_type const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_HfstBasicTransitions" "', argument " "2"" of type '" "std::vector< hfst::implementations::HfstBasicTransition >::value_type const &""'"); - } - arg2 = reinterpret_cast< std::vector< hfst::implementations::HfstBasicTransition >::value_type * >(argp2); - result = (std::vector< hfst::implementations::HfstBasicTransition > *)new std::vector< hfst::implementations::HfstBasicTransition >(arg1,(std::vector< hfst::implementations::HfstBasicTransition >::value_type const &)*arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_hfst__implementations__HfstBasicTransition_std__allocatorT_hfst__implementations__HfstBasicTransition_t_t, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_HfstBasicTransitions(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[3] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "new_HfstBasicTransitions", 0, 2, argv))) SWIG_fail; - --argc; - if (argc == 0) { - return _wrap_new_HfstBasicTransitions__SWIG_0(self, argc, argv); - } - if (argc == 1) { - int _v; - { - int res = SWIG_AsVal_size_t(argv[0], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_new_HfstBasicTransitions__SWIG_2(self, argc, argv); - } - } - if (argc == 1) { - int _v; - int res = swig::asptr(argv[0], (std::vector< hfst::implementations::HfstBasicTransition,std::allocator< hfst::implementations::HfstBasicTransition > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_new_HfstBasicTransitions__SWIG_1(self, argc, argv); - } - } - if (argc == 2) { - int _v; - { - int res = SWIG_AsVal_size_t(argv[0], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_hfst__implementations__HfstBasicTransition, SWIG_POINTER_NO_NULL | 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_new_HfstBasicTransitions__SWIG_3(self, argc, argv); - } - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'new_HfstBasicTransitions'.\n" - " Possible C/C++ prototypes are:\n" - " std::vector< hfst::implementations::HfstBasicTransition >::vector()\n" - " std::vector< hfst::implementations::HfstBasicTransition >::vector(std::vector< hfst::implementations::HfstBasicTransition > const &)\n" - " std::vector< hfst::implementations::HfstBasicTransition >::vector(std::vector< hfst::implementations::HfstBasicTransition >::size_type)\n" - " std::vector< hfst::implementations::HfstBasicTransition >::vector(std::vector< hfst::implementations::HfstBasicTransition >::size_type,std::vector< hfst::implementations::HfstBasicTransition >::value_type const &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_HfstBasicTransitions_push_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< hfst::implementations::HfstBasicTransition > *arg1 = (std::vector< hfst::implementations::HfstBasicTransition > *) 0 ; - std::vector< hfst::implementations::HfstBasicTransition >::value_type *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args, "HfstBasicTransitions_push_back", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst__implementations__HfstBasicTransition_std__allocatorT_hfst__implementations__HfstBasicTransition_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstBasicTransitions_push_back" "', argument " "1"" of type '" "std::vector< hfst::implementations::HfstBasicTransition > *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst::implementations::HfstBasicTransition > * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_hfst__implementations__HfstBasicTransition, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HfstBasicTransitions_push_back" "', argument " "2"" of type '" "std::vector< hfst::implementations::HfstBasicTransition >::value_type const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstBasicTransitions_push_back" "', argument " "2"" of type '" "std::vector< hfst::implementations::HfstBasicTransition >::value_type const &""'"); - } - arg2 = reinterpret_cast< std::vector< hfst::implementations::HfstBasicTransition >::value_type * >(argp2); - (arg1)->push_back((std::vector< hfst::implementations::HfstBasicTransition >::value_type const &)*arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstBasicTransitions_front(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< hfst::implementations::HfstBasicTransition > *arg1 = (std::vector< hfst::implementations::HfstBasicTransition > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::vector< hfst::implementations::HfstBasicTransition >::value_type *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst__implementations__HfstBasicTransition_std__allocatorT_hfst__implementations__HfstBasicTransition_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstBasicTransitions_front" "', argument " "1"" of type '" "std::vector< hfst::implementations::HfstBasicTransition > const *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst::implementations::HfstBasicTransition > * >(argp1); - result = (std::vector< hfst::implementations::HfstBasicTransition >::value_type *) &((std::vector< hfst::implementations::HfstBasicTransition > const *)arg1)->front(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_hfst__implementations__HfstBasicTransition, 0 | 0 ); - (void)swig::container_owner::value_type>::category>::back_reference(resultobj, swig_obj[0]); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstBasicTransitions_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< hfst::implementations::HfstBasicTransition > *arg1 = (std::vector< hfst::implementations::HfstBasicTransition > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::vector< hfst::implementations::HfstBasicTransition >::value_type *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst__implementations__HfstBasicTransition_std__allocatorT_hfst__implementations__HfstBasicTransition_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstBasicTransitions_back" "', argument " "1"" of type '" "std::vector< hfst::implementations::HfstBasicTransition > const *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst::implementations::HfstBasicTransition > * >(argp1); - result = (std::vector< hfst::implementations::HfstBasicTransition >::value_type *) &((std::vector< hfst::implementations::HfstBasicTransition > const *)arg1)->back(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_hfst__implementations__HfstBasicTransition, 0 | 0 ); - (void)swig::container_owner::value_type>::category>::back_reference(resultobj, swig_obj[0]); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstBasicTransitions_assign(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< hfst::implementations::HfstBasicTransition > *arg1 = (std::vector< hfst::implementations::HfstBasicTransition > *) 0 ; - std::vector< hfst::implementations::HfstBasicTransition >::size_type arg2 ; - std::vector< hfst::implementations::HfstBasicTransition >::value_type *arg3 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - size_t val2 ; - int ecode2 = 0 ; - void *argp3 = 0 ; - int res3 = 0 ; - PyObject *swig_obj[3] ; - - if (!SWIG_Python_UnpackTuple(args, "HfstBasicTransitions_assign", 3, 3, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst__implementations__HfstBasicTransition_std__allocatorT_hfst__implementations__HfstBasicTransition_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstBasicTransitions_assign" "', argument " "1"" of type '" "std::vector< hfst::implementations::HfstBasicTransition > *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst::implementations::HfstBasicTransition > * >(argp1); - ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HfstBasicTransitions_assign" "', argument " "2"" of type '" "std::vector< hfst::implementations::HfstBasicTransition >::size_type""'"); - } - arg2 = static_cast< std::vector< hfst::implementations::HfstBasicTransition >::size_type >(val2); - res3 = SWIG_ConvertPtr(swig_obj[2], &argp3, SWIGTYPE_p_hfst__implementations__HfstBasicTransition, 0 | 0); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "HfstBasicTransitions_assign" "', argument " "3"" of type '" "std::vector< hfst::implementations::HfstBasicTransition >::value_type const &""'"); - } - if (!argp3) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstBasicTransitions_assign" "', argument " "3"" of type '" "std::vector< hfst::implementations::HfstBasicTransition >::value_type const &""'"); - } - arg3 = reinterpret_cast< std::vector< hfst::implementations::HfstBasicTransition >::value_type * >(argp3); - (arg1)->assign(arg2,(std::vector< hfst::implementations::HfstBasicTransition >::value_type const &)*arg3); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstBasicTransitions_resize__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< hfst::implementations::HfstBasicTransition > *arg1 = (std::vector< hfst::implementations::HfstBasicTransition > *) 0 ; - std::vector< hfst::implementations::HfstBasicTransition >::size_type arg2 ; - std::vector< hfst::implementations::HfstBasicTransition >::value_type *arg3 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - size_t val2 ; - int ecode2 = 0 ; - void *argp3 = 0 ; - int res3 = 0 ; - - if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst__implementations__HfstBasicTransition_std__allocatorT_hfst__implementations__HfstBasicTransition_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstBasicTransitions_resize" "', argument " "1"" of type '" "std::vector< hfst::implementations::HfstBasicTransition > *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst::implementations::HfstBasicTransition > * >(argp1); - ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HfstBasicTransitions_resize" "', argument " "2"" of type '" "std::vector< hfst::implementations::HfstBasicTransition >::size_type""'"); - } - arg2 = static_cast< std::vector< hfst::implementations::HfstBasicTransition >::size_type >(val2); - res3 = SWIG_ConvertPtr(swig_obj[2], &argp3, SWIGTYPE_p_hfst__implementations__HfstBasicTransition, 0 | 0); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "HfstBasicTransitions_resize" "', argument " "3"" of type '" "std::vector< hfst::implementations::HfstBasicTransition >::value_type const &""'"); - } - if (!argp3) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstBasicTransitions_resize" "', argument " "3"" of type '" "std::vector< hfst::implementations::HfstBasicTransition >::value_type const &""'"); - } - arg3 = reinterpret_cast< std::vector< hfst::implementations::HfstBasicTransition >::value_type * >(argp3); - (arg1)->resize(arg2,(std::vector< hfst::implementations::HfstBasicTransition >::value_type const &)*arg3); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstBasicTransitions_resize(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[4] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "HfstBasicTransitions_resize", 0, 3, argv))) SWIG_fail; - --argc; - if (argc == 2) { - int _v; - int res = swig::asptr(argv[0], (std::vector< hfst::implementations::HfstBasicTransition,std::allocator< hfst::implementations::HfstBasicTransition > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_size_t(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_HfstBasicTransitions_resize__SWIG_0(self, argc, argv); - } - } - } - if (argc == 3) { - int _v; - int res = swig::asptr(argv[0], (std::vector< hfst::implementations::HfstBasicTransition,std::allocator< hfst::implementations::HfstBasicTransition > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_size_t(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_hfst__implementations__HfstBasicTransition, SWIG_POINTER_NO_NULL | 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_HfstBasicTransitions_resize__SWIG_1(self, argc, argv); - } - } - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'HfstBasicTransitions_resize'.\n" - " Possible C/C++ prototypes are:\n" - " std::vector< hfst::implementations::HfstBasicTransition >::resize(std::vector< hfst::implementations::HfstBasicTransition >::size_type)\n" - " std::vector< hfst::implementations::HfstBasicTransition >::resize(std::vector< hfst::implementations::HfstBasicTransition >::size_type,std::vector< hfst::implementations::HfstBasicTransition >::value_type const &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_HfstBasicTransitions_insert__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< hfst::implementations::HfstBasicTransition > *arg1 = (std::vector< hfst::implementations::HfstBasicTransition > *) 0 ; - std::vector< hfst::implementations::HfstBasicTransition >::iterator arg2 ; - std::vector< hfst::implementations::HfstBasicTransition >::value_type *arg3 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - swig::SwigPyIterator *iter2 = 0 ; - int res2 ; - void *argp3 = 0 ; - int res3 = 0 ; - std::vector< hfst::implementations::HfstBasicTransition >::iterator result; - - if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst__implementations__HfstBasicTransition_std__allocatorT_hfst__implementations__HfstBasicTransition_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstBasicTransitions_insert" "', argument " "1"" of type '" "std::vector< hfst::implementations::HfstBasicTransition > *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst::implementations::HfstBasicTransition > * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0); - if (!SWIG_IsOK(res2) || !iter2) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "HfstBasicTransitions_insert" "', argument " "2"" of type '" "std::vector< hfst::implementations::HfstBasicTransition >::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 '" "HfstBasicTransitions_insert" "', argument " "2"" of type '" "std::vector< hfst::implementations::HfstBasicTransition >::iterator""'"); - } - } - res3 = SWIG_ConvertPtr(swig_obj[2], &argp3, SWIGTYPE_p_hfst__implementations__HfstBasicTransition, 0 | 0); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "HfstBasicTransitions_insert" "', argument " "3"" of type '" "std::vector< hfst::implementations::HfstBasicTransition >::value_type const &""'"); - } - if (!argp3) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstBasicTransitions_insert" "', argument " "3"" of type '" "std::vector< hfst::implementations::HfstBasicTransition >::value_type const &""'"); - } - arg3 = reinterpret_cast< std::vector< hfst::implementations::HfstBasicTransition >::value_type * >(argp3); - result = std_vector_Sl_hfst_implementations_HfstBasicTransition_Sg__insert__SWIG_0(arg1,arg2,(hfst::implementations::HfstBasicTransition const &)*arg3); - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< hfst::implementations::HfstBasicTransition >::iterator & >(result)), - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstBasicTransitions_insert__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< hfst::implementations::HfstBasicTransition > *arg1 = (std::vector< hfst::implementations::HfstBasicTransition > *) 0 ; - std::vector< hfst::implementations::HfstBasicTransition >::iterator arg2 ; - std::vector< hfst::implementations::HfstBasicTransition >::size_type arg3 ; - std::vector< hfst::implementations::HfstBasicTransition >::value_type *arg4 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - swig::SwigPyIterator *iter2 = 0 ; - int res2 ; - size_t val3 ; - int ecode3 = 0 ; - void *argp4 = 0 ; - int res4 = 0 ; - - if ((nobjs < 4) || (nobjs > 4)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst__implementations__HfstBasicTransition_std__allocatorT_hfst__implementations__HfstBasicTransition_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstBasicTransitions_insert" "', argument " "1"" of type '" "std::vector< hfst::implementations::HfstBasicTransition > *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst::implementations::HfstBasicTransition > * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0); - if (!SWIG_IsOK(res2) || !iter2) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "HfstBasicTransitions_insert" "', argument " "2"" of type '" "std::vector< hfst::implementations::HfstBasicTransition >::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 '" "HfstBasicTransitions_insert" "', argument " "2"" of type '" "std::vector< hfst::implementations::HfstBasicTransition >::iterator""'"); - } - } - ecode3 = SWIG_AsVal_size_t(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "HfstBasicTransitions_insert" "', argument " "3"" of type '" "std::vector< hfst::implementations::HfstBasicTransition >::size_type""'"); - } - arg3 = static_cast< std::vector< hfst::implementations::HfstBasicTransition >::size_type >(val3); - res4 = SWIG_ConvertPtr(swig_obj[3], &argp4, SWIGTYPE_p_hfst__implementations__HfstBasicTransition, 0 | 0); - if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "HfstBasicTransitions_insert" "', argument " "4"" of type '" "std::vector< hfst::implementations::HfstBasicTransition >::value_type const &""'"); - } - if (!argp4) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstBasicTransitions_insert" "', argument " "4"" of type '" "std::vector< hfst::implementations::HfstBasicTransition >::value_type const &""'"); - } - arg4 = reinterpret_cast< std::vector< hfst::implementations::HfstBasicTransition >::value_type * >(argp4); - std_vector_Sl_hfst_implementations_HfstBasicTransition_Sg__insert__SWIG_1(arg1,arg2,arg3,(hfst::implementations::HfstBasicTransition const &)*arg4); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstBasicTransitions_insert(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[5] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "HfstBasicTransitions_insert", 0, 4, argv))) SWIG_fail; - --argc; - if (argc == 3) { - int _v; - int res = swig::asptr(argv[0], (std::vector< hfst::implementations::HfstBasicTransition,std::allocator< hfst::implementations::HfstBasicTransition > >**)(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_ConvertPtr(argv[2], 0, SWIGTYPE_p_hfst__implementations__HfstBasicTransition, SWIG_POINTER_NO_NULL | 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_HfstBasicTransitions_insert__SWIG_0(self, argc, argv); - } - } - } - } - if (argc == 4) { - int _v; - int res = swig::asptr(argv[0], (std::vector< hfst::implementations::HfstBasicTransition,std::allocator< hfst::implementations::HfstBasicTransition > >**)(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_size_t(argv[2], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - int res = SWIG_ConvertPtr(argv[3], 0, SWIGTYPE_p_hfst__implementations__HfstBasicTransition, SWIG_POINTER_NO_NULL | 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_HfstBasicTransitions_insert__SWIG_1(self, argc, argv); - } - } - } - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'HfstBasicTransitions_insert'.\n" - " Possible C/C++ prototypes are:\n" - " std::vector< hfst::implementations::HfstBasicTransition >::insert(std::vector< hfst::implementations::HfstBasicTransition >::iterator,std::vector< hfst::implementations::HfstBasicTransition >::value_type const &)\n" - " std::vector< hfst::implementations::HfstBasicTransition >::insert(std::vector< hfst::implementations::HfstBasicTransition >::iterator,std::vector< hfst::implementations::HfstBasicTransition >::size_type,std::vector< hfst::implementations::HfstBasicTransition >::value_type const &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_HfstBasicTransitions_reserve(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< hfst::implementations::HfstBasicTransition > *arg1 = (std::vector< hfst::implementations::HfstBasicTransition > *) 0 ; - std::vector< hfst::implementations::HfstBasicTransition >::size_type arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - size_t val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args, "HfstBasicTransitions_reserve", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst__implementations__HfstBasicTransition_std__allocatorT_hfst__implementations__HfstBasicTransition_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstBasicTransitions_reserve" "', argument " "1"" of type '" "std::vector< hfst::implementations::HfstBasicTransition > *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst::implementations::HfstBasicTransition > * >(argp1); - ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HfstBasicTransitions_reserve" "', argument " "2"" of type '" "std::vector< hfst::implementations::HfstBasicTransition >::size_type""'"); - } - arg2 = static_cast< std::vector< hfst::implementations::HfstBasicTransition >::size_type >(val2); - (arg1)->reserve(arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstBasicTransitions_capacity(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< hfst::implementations::HfstBasicTransition > *arg1 = (std::vector< hfst::implementations::HfstBasicTransition > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::vector< hfst::implementations::HfstBasicTransition >::size_type result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst__implementations__HfstBasicTransition_std__allocatorT_hfst__implementations__HfstBasicTransition_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstBasicTransitions_capacity" "', argument " "1"" of type '" "std::vector< hfst::implementations::HfstBasicTransition > const *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst::implementations::HfstBasicTransition > * >(argp1); - result = ((std::vector< hfst::implementations::HfstBasicTransition > const *)arg1)->capacity(); - resultobj = SWIG_From_size_t(static_cast< size_t >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_HfstBasicTransitions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< hfst::implementations::HfstBasicTransition > *arg1 = (std::vector< hfst::implementations::HfstBasicTransition > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst__implementations__HfstBasicTransition_std__allocatorT_hfst__implementations__HfstBasicTransition_t_t, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_HfstBasicTransitions" "', argument " "1"" of type '" "std::vector< hfst::implementations::HfstBasicTransition > *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst::implementations::HfstBasicTransition > * >(argp1); - delete arg1; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *HfstBasicTransitions_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_std__vectorT_hfst__implementations__HfstBasicTransition_std__allocatorT_hfst__implementations__HfstBasicTransition_t_t, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *HfstBasicTransitions_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_new_HfstOneLevelPath__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **SWIGUNUSEDPARM(swig_obj)) { - PyObject *resultobj = 0; - std::pair< float,std::vector< std::string > > *result = 0 ; - - if ((nobjs < 0) || (nobjs > 0)) SWIG_fail; - result = (std::pair< float,std::vector< std::string > > *)new std::pair< float,std::vector< std::string > >(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__pairT_float_std__vectorT_std__string_std__allocatorT_std__string_t_t_t, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_HfstOneLevelPath__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - float arg1 ; - std::vector< std::string,std::allocator< std::string > > arg2 ; - float val1 ; - int ecode1 = 0 ; - std::pair< float,std::vector< std::string > > *result = 0 ; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - ecode1 = SWIG_AsVal_float(swig_obj[0], &val1); - if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_HfstOneLevelPath" "', argument " "1"" of type '" "float""'"); - } - arg1 = static_cast< float >(val1); - { - std::vector< std::string,std::allocator< std::string > > *ptr = (std::vector< std::string,std::allocator< std::string > > *)0; - int res = swig::asptr(swig_obj[1], &ptr); - if (!SWIG_IsOK(res) || !ptr) { - SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "new_HfstOneLevelPath" "', argument " "2"" of type '" "std::vector< std::string,std::allocator< std::string > >""'"); - } - arg2 = *ptr; - if (SWIG_IsNewObj(res)) delete ptr; - } - result = (std::pair< float,std::vector< std::string > > *)new std::pair< float,std::vector< std::string > >(arg1,arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__pairT_float_std__vectorT_std__string_std__allocatorT_std__string_t_t_t, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_HfstOneLevelPath__SWIG_2(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::pair< float,std::vector< std::string,std::allocator< std::string > > > *arg1 = 0 ; - int res1 = SWIG_OLDOBJ ; - std::pair< float,std::vector< std::string > > *result = 0 ; - - if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; - { - std::pair< float,std::vector< std::string,std::allocator< std::string > > > *ptr = (std::pair< float,std::vector< std::string,std::allocator< std::string > > > *)0; - res1 = swig::asptr(swig_obj[0], &ptr); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_HfstOneLevelPath" "', argument " "1"" of type '" "std::pair< float,std::vector< std::string,std::allocator< std::string > > > const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_HfstOneLevelPath" "', argument " "1"" of type '" "std::pair< float,std::vector< std::string,std::allocator< std::string > > > const &""'"); - } - arg1 = ptr; - } - result = (std::pair< float,std::vector< std::string > > *)new std::pair< float,std::vector< std::string > >((std::pair< float,std::vector< std::string,std::allocator< std::string > > > const &)*arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__pairT_float_std__vectorT_std__string_std__allocatorT_std__string_t_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_new_HfstOneLevelPath(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[3] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "new_HfstOneLevelPath", 0, 2, argv))) SWIG_fail; - --argc; - if (argc == 0) { - return _wrap_new_HfstOneLevelPath__SWIG_0(self, argc, argv); - } - if (argc == 1) { - int _v; - int res = swig::asptr(argv[0], (std::pair< float,std::vector< std::string,std::allocator< std::string > > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_new_HfstOneLevelPath__SWIG_2(self, argc, argv); - } - } - if (argc == 2) { - int _v; - { - int res = SWIG_AsVal_float(argv[0], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - int res = swig::asptr(argv[1], (std::vector< std::string,std::allocator< std::string > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_new_HfstOneLevelPath__SWIG_1(self, argc, argv); - } - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'new_HfstOneLevelPath'.\n" - " Possible C/C++ prototypes are:\n" - " std::pair< float,std::vector< std::string > >::pair()\n" - " std::pair< float,std::vector< std::string > >::pair(float,std::vector< std::string,std::allocator< std::string > >)\n" - " std::pair< float,std::vector< std::string > >::pair(std::pair< float,std::vector< std::string,std::allocator< std::string > > > const &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_HfstOneLevelPath_first_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::pair< float,std::vector< std::string > > *arg1 = (std::pair< float,std::vector< std::string > > *) 0 ; - float arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - float val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args, "HfstOneLevelPath_first_set", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__pairT_float_std__vectorT_std__string_std__allocatorT_std__string_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstOneLevelPath_first_set" "', argument " "1"" of type '" "std::pair< float,std::vector< std::string > > *""'"); - } - arg1 = reinterpret_cast< std::pair< float,std::vector< std::string > > * >(argp1); - ecode2 = SWIG_AsVal_float(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HfstOneLevelPath_first_set" "', argument " "2"" of type '" "float""'"); - } - arg2 = static_cast< float >(val2); - if (arg1) (arg1)->first = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstOneLevelPath_first_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::pair< float,std::vector< std::string > > *arg1 = (std::pair< float,std::vector< std::string > > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - float result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__pairT_float_std__vectorT_std__string_std__allocatorT_std__string_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstOneLevelPath_first_get" "', argument " "1"" of type '" "std::pair< float,std::vector< std::string > > *""'"); - } - arg1 = reinterpret_cast< std::pair< float,std::vector< std::string > > * >(argp1); - result = (float) ((arg1)->first); - resultobj = SWIG_From_float(static_cast< float >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstOneLevelPath_second_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::pair< float,std::vector< std::string > > *arg1 = (std::pair< float,std::vector< std::string > > *) 0 ; - std::vector< std::string,std::allocator< std::string > > *arg2 = (std::vector< std::string,std::allocator< std::string > > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args, "HfstOneLevelPath_second_set", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__pairT_float_std__vectorT_std__string_std__allocatorT_std__string_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstOneLevelPath_second_set" "', argument " "1"" of type '" "std::pair< float,std::vector< std::string > > *""'"); - } - arg1 = reinterpret_cast< std::pair< float,std::vector< std::string > > * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HfstOneLevelPath_second_set" "', argument " "2"" of type '" "std::vector< std::string,std::allocator< std::string > > *""'"); - } - arg2 = reinterpret_cast< std::vector< std::string,std::allocator< std::string > > * >(argp2); - if (arg1) (arg1)->second = *arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstOneLevelPath_second_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::pair< float,std::vector< std::string > > *arg1 = (std::pair< float,std::vector< std::string > > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::vector< std::string,std::allocator< std::string > > *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__pairT_float_std__vectorT_std__string_std__allocatorT_std__string_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstOneLevelPath_second_get" "', argument " "1"" of type '" "std::pair< float,std::vector< std::string > > *""'"); - } - arg1 = reinterpret_cast< std::pair< float,std::vector< std::string > > * >(argp1); - result = (std::vector< std::string,std::allocator< std::string > > *)& ((arg1)->second); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_HfstOneLevelPath(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::pair< float,std::vector< std::string > > *arg1 = (std::pair< float,std::vector< std::string > > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__pairT_float_std__vectorT_std__string_std__allocatorT_std__string_t_t_t, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_HfstOneLevelPath" "', argument " "1"" of type '" "std::pair< float,std::vector< std::string > > *""'"); - } - arg1 = reinterpret_cast< std::pair< float,std::vector< std::string > > * >(argp1); - delete arg1; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *HfstOneLevelPath_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_std__pairT_float_std__vectorT_std__string_std__allocatorT_std__string_t_t_t, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *HfstOneLevelPath_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_new_HfstOneLevelPaths__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::less< std::pair< float,std::vector< std::string,std::allocator< std::string > > > > *arg1 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::set< std::pair< float,std::vector< std::string > > > *result = 0 ; - - if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_std__lessT_std__pairT_float_std__vectorT_std__string_std__allocatorT_std__string_t_t_t_t, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_HfstOneLevelPaths" "', argument " "1"" of type '" "std::less< std::pair< float,std::vector< std::string,std::allocator< std::string > > > > const &""'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_HfstOneLevelPaths" "', argument " "1"" of type '" "std::less< std::pair< float,std::vector< std::string,std::allocator< std::string > > > > const &""'"); - } - arg1 = reinterpret_cast< std::less< std::pair< float,std::vector< std::string,std::allocator< std::string > > > > * >(argp1); - result = (std::set< std::pair< float,std::vector< std::string > > > *)new std::set< std::pair< float,std::vector< std::string > > >((std::less< std::pair< float,std::vector< std::string,std::allocator< std::string > > > > const &)*arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__setT_std__pairT_float_std__vectorT_std__string_std__allocatorT_std__string_t_t_t_std__lessT_std__pairT_float_std__vectorT_std__string_t_t_t_std__allocatorT_std__pairT_float_std__vectorT_std__string_std__allocatorT_std__string_t_t_t_t_t, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstOneLevelPaths_iterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::set< std::pair< float,std::vector< std::string > > > *arg1 = (std::set< std::pair< float,std::vector< std::string > > > *) 0 ; - PyObject **arg2 = (PyObject **) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - swig::SwigPyIterator *result = 0 ; - - arg2 = &swig_obj[0]; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__setT_std__pairT_float_std__vectorT_std__string_std__allocatorT_std__string_t_t_t_std__lessT_std__pairT_float_std__vectorT_std__string_t_t_t_std__allocatorT_std__pairT_float_std__vectorT_std__string_std__allocatorT_std__string_t_t_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstOneLevelPaths_iterator" "', argument " "1"" of type '" "std::set< std::pair< float,std::vector< std::string > > > *""'"); - } - arg1 = reinterpret_cast< std::set< std::pair< float,std::vector< std::string > > > * >(argp1); - result = (swig::SwigPyIterator *)std_set_Sl_std_pair_Sl_float_Sc_std_vector_Sl_std_string_Sg__Sg__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_HfstOneLevelPaths___nonzero__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::set< std::pair< float,std::vector< std::string > > > *arg1 = (std::set< std::pair< float,std::vector< std::string > > > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - bool result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__setT_std__pairT_float_std__vectorT_std__string_std__allocatorT_std__string_t_t_t_std__lessT_std__pairT_float_std__vectorT_std__string_t_t_t_std__allocatorT_std__pairT_float_std__vectorT_std__string_std__allocatorT_std__string_t_t_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstOneLevelPaths___nonzero__" "', argument " "1"" of type '" "std::set< std::pair< float,std::vector< std::string > > > const *""'"); - } - arg1 = reinterpret_cast< std::set< std::pair< float,std::vector< std::string > > > * >(argp1); - result = (bool)std_set_Sl_std_pair_Sl_float_Sc_std_vector_Sl_std_string_Sg__Sg__Sg____nonzero__((std::set< std::pair< float,std::vector< std::string > > > const *)arg1); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstOneLevelPaths___bool__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::set< std::pair< float,std::vector< std::string > > > *arg1 = (std::set< std::pair< float,std::vector< std::string > > > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - bool result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__setT_std__pairT_float_std__vectorT_std__string_std__allocatorT_std__string_t_t_t_std__lessT_std__pairT_float_std__vectorT_std__string_t_t_t_std__allocatorT_std__pairT_float_std__vectorT_std__string_std__allocatorT_std__string_t_t_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstOneLevelPaths___bool__" "', argument " "1"" of type '" "std::set< std::pair< float,std::vector< std::string > > > const *""'"); - } - arg1 = reinterpret_cast< std::set< std::pair< float,std::vector< std::string > > > * >(argp1); - result = (bool)std_set_Sl_std_pair_Sl_float_Sc_std_vector_Sl_std_string_Sg__Sg__Sg____bool__((std::set< std::pair< float,std::vector< std::string > > > const *)arg1); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstOneLevelPaths___len__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::set< std::pair< float,std::vector< std::string > > > *arg1 = (std::set< std::pair< float,std::vector< std::string > > > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::set< std::pair< float,std::vector< std::string > > >::size_type result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__setT_std__pairT_float_std__vectorT_std__string_std__allocatorT_std__string_t_t_t_std__lessT_std__pairT_float_std__vectorT_std__string_t_t_t_std__allocatorT_std__pairT_float_std__vectorT_std__string_std__allocatorT_std__string_t_t_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstOneLevelPaths___len__" "', argument " "1"" of type '" "std::set< std::pair< float,std::vector< std::string > > > const *""'"); - } - arg1 = reinterpret_cast< std::set< std::pair< float,std::vector< std::string > > > * >(argp1); - result = std_set_Sl_std_pair_Sl_float_Sc_std_vector_Sl_std_string_Sg__Sg__Sg____len__((std::set< std::pair< float,std::vector< std::string > > > const *)arg1); - resultobj = SWIG_From_size_t(static_cast< size_t >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstOneLevelPaths_append(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::set< std::pair< float,std::vector< std::string > > > *arg1 = (std::set< std::pair< float,std::vector< std::string > > > *) 0 ; - std::set< std::pair< float,std::vector< std::string > > >::value_type arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args, "HfstOneLevelPaths_append", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__setT_std__pairT_float_std__vectorT_std__string_std__allocatorT_std__string_t_t_t_std__lessT_std__pairT_float_std__vectorT_std__string_t_t_t_std__allocatorT_std__pairT_float_std__vectorT_std__string_std__allocatorT_std__string_t_t_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstOneLevelPaths_append" "', argument " "1"" of type '" "std::set< std::pair< float,std::vector< std::string > > > *""'"); - } - arg1 = reinterpret_cast< std::set< std::pair< float,std::vector< std::string > > > * >(argp1); - { - std::pair< float,std::vector< std::string,std::allocator< std::string > > > *ptr = (std::pair< float,std::vector< std::string,std::allocator< std::string > > > *)0; - int res = swig::asptr(swig_obj[1], &ptr); - if (!SWIG_IsOK(res) || !ptr) { - SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "HfstOneLevelPaths_append" "', argument " "2"" of type '" "std::set< std::pair< float,std::vector< std::string > > >::value_type""'"); - } - arg2 = *ptr; - if (SWIG_IsNewObj(res)) delete ptr; - } - std_set_Sl_std_pair_Sl_float_Sc_std_vector_Sl_std_string_Sg__Sg__Sg__append(arg1,arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstOneLevelPaths___contains__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::set< std::pair< float,std::vector< std::string > > > *arg1 = (std::set< std::pair< float,std::vector< std::string > > > *) 0 ; - std::set< std::pair< float,std::vector< std::string > > >::value_type arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[2] ; - bool result; - - if (!SWIG_Python_UnpackTuple(args, "HfstOneLevelPaths___contains__", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__setT_std__pairT_float_std__vectorT_std__string_std__allocatorT_std__string_t_t_t_std__lessT_std__pairT_float_std__vectorT_std__string_t_t_t_std__allocatorT_std__pairT_float_std__vectorT_std__string_std__allocatorT_std__string_t_t_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstOneLevelPaths___contains__" "', argument " "1"" of type '" "std::set< std::pair< float,std::vector< std::string > > > *""'"); - } - arg1 = reinterpret_cast< std::set< std::pair< float,std::vector< std::string > > > * >(argp1); - { - std::pair< float,std::vector< std::string,std::allocator< std::string > > > *ptr = (std::pair< float,std::vector< std::string,std::allocator< std::string > > > *)0; - int res = swig::asptr(swig_obj[1], &ptr); - if (!SWIG_IsOK(res) || !ptr) { - SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "HfstOneLevelPaths___contains__" "', argument " "2"" of type '" "std::set< std::pair< float,std::vector< std::string > > >::value_type""'"); - } - arg2 = *ptr; - if (SWIG_IsNewObj(res)) delete ptr; - } - result = (bool)std_set_Sl_std_pair_Sl_float_Sc_std_vector_Sl_std_string_Sg__Sg__Sg____contains__(arg1,arg2); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstOneLevelPaths___getitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::set< std::pair< float,std::vector< std::string > > > *arg1 = (std::set< std::pair< float,std::vector< std::string > > > *) 0 ; - std::set< std::pair< float,std::vector< std::string > > >::difference_type arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - ptrdiff_t val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - std::set< std::pair< float,std::vector< std::string > > >::value_type result; - - if (!SWIG_Python_UnpackTuple(args, "HfstOneLevelPaths___getitem__", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__setT_std__pairT_float_std__vectorT_std__string_std__allocatorT_std__string_t_t_t_std__lessT_std__pairT_float_std__vectorT_std__string_t_t_t_std__allocatorT_std__pairT_float_std__vectorT_std__string_std__allocatorT_std__string_t_t_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstOneLevelPaths___getitem__" "', argument " "1"" of type '" "std::set< std::pair< float,std::vector< std::string > > > const *""'"); - } - arg1 = reinterpret_cast< std::set< std::pair< float,std::vector< std::string > > > * >(argp1); - ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HfstOneLevelPaths___getitem__" "', argument " "2"" of type '" "std::set< std::pair< float,std::vector< std::string > > >::difference_type""'"); - } - arg2 = static_cast< std::set< std::pair< float,std::vector< std::string > > >::difference_type >(val2); - try { - result = std_set_Sl_std_pair_Sl_float_Sc_std_vector_Sl_std_string_Sg__Sg__Sg____getitem__((std::set< std::pair< float,std::vector< std::string > > > const *)arg1,arg2); - } catch(std::out_of_range &_e) { - SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); - } - resultobj = swig::from(static_cast< std::pair< float,std::vector< std::string,std::allocator< std::string > > > >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstOneLevelPaths_add(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::set< std::pair< float,std::vector< std::string > > > *arg1 = (std::set< std::pair< float,std::vector< std::string > > > *) 0 ; - std::set< std::pair< float,std::vector< std::string > > >::value_type arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args, "HfstOneLevelPaths_add", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__setT_std__pairT_float_std__vectorT_std__string_std__allocatorT_std__string_t_t_t_std__lessT_std__pairT_float_std__vectorT_std__string_t_t_t_std__allocatorT_std__pairT_float_std__vectorT_std__string_std__allocatorT_std__string_t_t_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstOneLevelPaths_add" "', argument " "1"" of type '" "std::set< std::pair< float,std::vector< std::string > > > *""'"); - } - arg1 = reinterpret_cast< std::set< std::pair< float,std::vector< std::string > > > * >(argp1); - { - std::pair< float,std::vector< std::string,std::allocator< std::string > > > *ptr = (std::pair< float,std::vector< std::string,std::allocator< std::string > > > *)0; - int res = swig::asptr(swig_obj[1], &ptr); - if (!SWIG_IsOK(res) || !ptr) { - SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "HfstOneLevelPaths_add" "', argument " "2"" of type '" "std::set< std::pair< float,std::vector< std::string > > >::value_type""'"); - } - arg2 = *ptr; - if (SWIG_IsNewObj(res)) delete ptr; - } - std_set_Sl_std_pair_Sl_float_Sc_std_vector_Sl_std_string_Sg__Sg__Sg__add(arg1,arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstOneLevelPaths_discard(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::set< std::pair< float,std::vector< std::string > > > *arg1 = (std::set< std::pair< float,std::vector< std::string > > > *) 0 ; - std::set< std::pair< float,std::vector< std::string > > >::value_type arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args, "HfstOneLevelPaths_discard", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__setT_std__pairT_float_std__vectorT_std__string_std__allocatorT_std__string_t_t_t_std__lessT_std__pairT_float_std__vectorT_std__string_t_t_t_std__allocatorT_std__pairT_float_std__vectorT_std__string_std__allocatorT_std__string_t_t_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstOneLevelPaths_discard" "', argument " "1"" of type '" "std::set< std::pair< float,std::vector< std::string > > > *""'"); - } - arg1 = reinterpret_cast< std::set< std::pair< float,std::vector< std::string > > > * >(argp1); - { - std::pair< float,std::vector< std::string,std::allocator< std::string > > > *ptr = (std::pair< float,std::vector< std::string,std::allocator< std::string > > > *)0; - int res = swig::asptr(swig_obj[1], &ptr); - if (!SWIG_IsOK(res) || !ptr) { - SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "HfstOneLevelPaths_discard" "', argument " "2"" of type '" "std::set< std::pair< float,std::vector< std::string > > >::value_type""'"); - } - arg2 = *ptr; - if (SWIG_IsNewObj(res)) delete ptr; - } - std_set_Sl_std_pair_Sl_float_Sc_std_vector_Sl_std_string_Sg__Sg__Sg__discard(arg1,arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_HfstOneLevelPaths__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **SWIGUNUSEDPARM(swig_obj)) { - PyObject *resultobj = 0; - std::set< std::pair< float,std::vector< std::string > > > *result = 0 ; - - if ((nobjs < 0) || (nobjs > 0)) SWIG_fail; - result = (std::set< std::pair< float,std::vector< std::string > > > *)new std::set< std::pair< float,std::vector< std::string > > >(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__setT_std__pairT_float_std__vectorT_std__string_std__allocatorT_std__string_t_t_t_std__lessT_std__pairT_float_std__vectorT_std__string_t_t_t_std__allocatorT_std__pairT_float_std__vectorT_std__string_std__allocatorT_std__string_t_t_t_t_t, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_HfstOneLevelPaths__SWIG_2(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::set< std::pair< float,std::vector< std::string,std::allocator< std::string > > > > *arg1 = 0 ; - int res1 = SWIG_OLDOBJ ; - std::set< std::pair< float,std::vector< std::string > > > *result = 0 ; - - if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; - { - std::set< std::pair< float,std::vector< std::string,std::allocator< std::string > > >,std::less< std::pair< float,std::vector< std::string > > >,std::allocator< std::pair< float,std::vector< std::string,std::allocator< std::string > > > > > *ptr = (std::set< std::pair< float,std::vector< std::string,std::allocator< std::string > > >,std::less< std::pair< float,std::vector< std::string > > >,std::allocator< std::pair< float,std::vector< std::string,std::allocator< std::string > > > > > *)0; - res1 = swig::asptr(swig_obj[0], &ptr); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_HfstOneLevelPaths" "', argument " "1"" of type '" "std::set< std::pair< float,std::vector< std::string,std::allocator< std::string > > > > const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_HfstOneLevelPaths" "', argument " "1"" of type '" "std::set< std::pair< float,std::vector< std::string,std::allocator< std::string > > > > const &""'"); - } - arg1 = ptr; - } - result = (std::set< std::pair< float,std::vector< std::string > > > *)new std::set< std::pair< float,std::vector< std::string > > >((std::set< std::pair< float,std::vector< std::string,std::allocator< std::string > > > > const &)*arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__setT_std__pairT_float_std__vectorT_std__string_std__allocatorT_std__string_t_t_t_std__lessT_std__pairT_float_std__vectorT_std__string_t_t_t_std__allocatorT_std__pairT_float_std__vectorT_std__string_std__allocatorT_std__string_t_t_t_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_new_HfstOneLevelPaths(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[2] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "new_HfstOneLevelPaths", 0, 1, argv))) SWIG_fail; - --argc; - if (argc == 0) { - return _wrap_new_HfstOneLevelPaths__SWIG_1(self, argc, argv); - } - if (argc == 1) { - int _v; - int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_std__lessT_std__pairT_float_std__vectorT_std__string_std__allocatorT_std__string_t_t_t_t, SWIG_POINTER_NO_NULL | 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_new_HfstOneLevelPaths__SWIG_0(self, argc, argv); - } - } - if (argc == 1) { - int _v; - int res = swig::asptr(argv[0], (std::set< std::pair< float,std::vector< std::string,std::allocator< std::string > > >,std::less< std::pair< float,std::vector< std::string > > >,std::allocator< std::pair< float,std::vector< std::string,std::allocator< std::string > > > > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_new_HfstOneLevelPaths__SWIG_2(self, argc, argv); - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'new_HfstOneLevelPaths'.\n" - " Possible C/C++ prototypes are:\n" - " std::set< std::pair< float,std::vector< std::string > > >::set(std::less< std::pair< float,std::vector< std::string,std::allocator< std::string > > > > const &)\n" - " std::set< std::pair< float,std::vector< std::string > > >::set()\n" - " std::set< std::pair< float,std::vector< std::string > > >::set(std::set< std::pair< float,std::vector< std::string,std::allocator< std::string > > > > const &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_HfstOneLevelPaths_empty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::set< std::pair< float,std::vector< std::string > > > *arg1 = (std::set< std::pair< float,std::vector< std::string > > > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - bool result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__setT_std__pairT_float_std__vectorT_std__string_std__allocatorT_std__string_t_t_t_std__lessT_std__pairT_float_std__vectorT_std__string_t_t_t_std__allocatorT_std__pairT_float_std__vectorT_std__string_std__allocatorT_std__string_t_t_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstOneLevelPaths_empty" "', argument " "1"" of type '" "std::set< std::pair< float,std::vector< std::string > > > const *""'"); - } - arg1 = reinterpret_cast< std::set< std::pair< float,std::vector< std::string > > > * >(argp1); - result = (bool)((std::set< std::pair< float,std::vector< std::string > > > const *)arg1)->empty(); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstOneLevelPaths_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::set< std::pair< float,std::vector< std::string > > > *arg1 = (std::set< std::pair< float,std::vector< std::string > > > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::set< std::pair< float,std::vector< std::string > > >::size_type result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__setT_std__pairT_float_std__vectorT_std__string_std__allocatorT_std__string_t_t_t_std__lessT_std__pairT_float_std__vectorT_std__string_t_t_t_std__allocatorT_std__pairT_float_std__vectorT_std__string_std__allocatorT_std__string_t_t_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstOneLevelPaths_size" "', argument " "1"" of type '" "std::set< std::pair< float,std::vector< std::string > > > const *""'"); - } - arg1 = reinterpret_cast< std::set< std::pair< float,std::vector< std::string > > > * >(argp1); - result = ((std::set< std::pair< float,std::vector< std::string > > > const *)arg1)->size(); - resultobj = SWIG_From_size_t(static_cast< size_t >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstOneLevelPaths_clear(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::set< std::pair< float,std::vector< std::string > > > *arg1 = (std::set< std::pair< float,std::vector< std::string > > > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__setT_std__pairT_float_std__vectorT_std__string_std__allocatorT_std__string_t_t_t_std__lessT_std__pairT_float_std__vectorT_std__string_t_t_t_std__allocatorT_std__pairT_float_std__vectorT_std__string_std__allocatorT_std__string_t_t_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstOneLevelPaths_clear" "', argument " "1"" of type '" "std::set< std::pair< float,std::vector< std::string > > > *""'"); - } - arg1 = reinterpret_cast< std::set< std::pair< float,std::vector< std::string > > > * >(argp1); - (arg1)->clear(); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstOneLevelPaths_swap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::set< std::pair< float,std::vector< std::string > > > *arg1 = (std::set< std::pair< float,std::vector< std::string > > > *) 0 ; - std::set< std::pair< float,std::vector< std::string,std::allocator< std::string > > > > *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args, "HfstOneLevelPaths_swap", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__setT_std__pairT_float_std__vectorT_std__string_std__allocatorT_std__string_t_t_t_std__lessT_std__pairT_float_std__vectorT_std__string_t_t_t_std__allocatorT_std__pairT_float_std__vectorT_std__string_std__allocatorT_std__string_t_t_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstOneLevelPaths_swap" "', argument " "1"" of type '" "std::set< std::pair< float,std::vector< std::string > > > *""'"); - } - arg1 = reinterpret_cast< std::set< std::pair< float,std::vector< std::string > > > * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_std__setT_std__pairT_float_std__vectorT_std__string_std__allocatorT_std__string_t_t_t_std__lessT_std__pairT_float_std__vectorT_std__string_t_t_t_std__allocatorT_std__pairT_float_std__vectorT_std__string_std__allocatorT_std__string_t_t_t_t_t, 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HfstOneLevelPaths_swap" "', argument " "2"" of type '" "std::set< std::pair< float,std::vector< std::string,std::allocator< std::string > > > > &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstOneLevelPaths_swap" "', argument " "2"" of type '" "std::set< std::pair< float,std::vector< std::string,std::allocator< std::string > > > > &""'"); - } - arg2 = reinterpret_cast< std::set< std::pair< float,std::vector< std::string,std::allocator< std::string > > > > * >(argp2); - (arg1)->swap(*arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstOneLevelPaths_erase__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::set< std::pair< float,std::vector< std::string > > > *arg1 = (std::set< std::pair< float,std::vector< std::string > > > *) 0 ; - std::set< std::pair< float,std::vector< std::string > > >::key_type *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 = SWIG_OLDOBJ ; - std::set< std::pair< float,std::vector< std::string > > >::size_type result; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__setT_std__pairT_float_std__vectorT_std__string_std__allocatorT_std__string_t_t_t_std__lessT_std__pairT_float_std__vectorT_std__string_t_t_t_std__allocatorT_std__pairT_float_std__vectorT_std__string_std__allocatorT_std__string_t_t_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstOneLevelPaths_erase" "', argument " "1"" of type '" "std::set< std::pair< float,std::vector< std::string > > > *""'"); - } - arg1 = reinterpret_cast< std::set< std::pair< float,std::vector< std::string > > > * >(argp1); - { - std::pair< float,std::vector< std::string,std::allocator< std::string > > > *ptr = (std::pair< float,std::vector< std::string,std::allocator< std::string > > > *)0; - res2 = swig::asptr(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HfstOneLevelPaths_erase" "', argument " "2"" of type '" "std::set< std::pair< float,std::vector< std::string > > >::key_type const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstOneLevelPaths_erase" "', argument " "2"" of type '" "std::set< std::pair< float,std::vector< std::string > > >::key_type const &""'"); - } - arg2 = ptr; - } - result = (arg1)->erase((std::set< std::pair< float,std::vector< std::string > > >::key_type const &)*arg2); - resultobj = SWIG_From_size_t(static_cast< size_t >(result)); - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstOneLevelPaths_count(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::set< std::pair< float,std::vector< std::string > > > *arg1 = (std::set< std::pair< float,std::vector< std::string > > > *) 0 ; - std::set< std::pair< float,std::vector< std::string > > >::key_type *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 = SWIG_OLDOBJ ; - PyObject *swig_obj[2] ; - std::set< std::pair< float,std::vector< std::string > > >::size_type result; - - if (!SWIG_Python_UnpackTuple(args, "HfstOneLevelPaths_count", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__setT_std__pairT_float_std__vectorT_std__string_std__allocatorT_std__string_t_t_t_std__lessT_std__pairT_float_std__vectorT_std__string_t_t_t_std__allocatorT_std__pairT_float_std__vectorT_std__string_std__allocatorT_std__string_t_t_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstOneLevelPaths_count" "', argument " "1"" of type '" "std::set< std::pair< float,std::vector< std::string > > > const *""'"); - } - arg1 = reinterpret_cast< std::set< std::pair< float,std::vector< std::string > > > * >(argp1); - { - std::pair< float,std::vector< std::string,std::allocator< std::string > > > *ptr = (std::pair< float,std::vector< std::string,std::allocator< std::string > > > *)0; - res2 = swig::asptr(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HfstOneLevelPaths_count" "', argument " "2"" of type '" "std::set< std::pair< float,std::vector< std::string > > >::key_type const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstOneLevelPaths_count" "', argument " "2"" of type '" "std::set< std::pair< float,std::vector< std::string > > >::key_type const &""'"); - } - arg2 = ptr; - } - result = ((std::set< std::pair< float,std::vector< std::string > > > const *)arg1)->count((std::set< std::pair< float,std::vector< std::string > > >::key_type const &)*arg2); - resultobj = SWIG_From_size_t(static_cast< size_t >(result)); - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstOneLevelPaths_begin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::set< std::pair< float,std::vector< std::string > > > *arg1 = (std::set< std::pair< float,std::vector< std::string > > > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::set< std::pair< float,std::vector< std::string > > >::iterator result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__setT_std__pairT_float_std__vectorT_std__string_std__allocatorT_std__string_t_t_t_std__lessT_std__pairT_float_std__vectorT_std__string_t_t_t_std__allocatorT_std__pairT_float_std__vectorT_std__string_std__allocatorT_std__string_t_t_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstOneLevelPaths_begin" "', argument " "1"" of type '" "std::set< std::pair< float,std::vector< std::string > > > *""'"); - } - arg1 = reinterpret_cast< std::set< std::pair< float,std::vector< std::string > > > * >(argp1); - result = (arg1)->begin(); - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::set< std::pair< float,std::vector< std::string > > >::iterator & >(result)), - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstOneLevelPaths_end(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::set< std::pair< float,std::vector< std::string > > > *arg1 = (std::set< std::pair< float,std::vector< std::string > > > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::set< std::pair< float,std::vector< std::string > > >::iterator result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__setT_std__pairT_float_std__vectorT_std__string_std__allocatorT_std__string_t_t_t_std__lessT_std__pairT_float_std__vectorT_std__string_t_t_t_std__allocatorT_std__pairT_float_std__vectorT_std__string_std__allocatorT_std__string_t_t_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstOneLevelPaths_end" "', argument " "1"" of type '" "std::set< std::pair< float,std::vector< std::string > > > *""'"); - } - arg1 = reinterpret_cast< std::set< std::pair< float,std::vector< std::string > > > * >(argp1); - result = (arg1)->end(); - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::set< std::pair< float,std::vector< std::string > > >::iterator & >(result)), - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstOneLevelPaths_rbegin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::set< std::pair< float,std::vector< std::string > > > *arg1 = (std::set< std::pair< float,std::vector< std::string > > > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::set< std::pair< float,std::vector< std::string > > >::reverse_iterator result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__setT_std__pairT_float_std__vectorT_std__string_std__allocatorT_std__string_t_t_t_std__lessT_std__pairT_float_std__vectorT_std__string_t_t_t_std__allocatorT_std__pairT_float_std__vectorT_std__string_std__allocatorT_std__string_t_t_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstOneLevelPaths_rbegin" "', argument " "1"" of type '" "std::set< std::pair< float,std::vector< std::string > > > *""'"); - } - arg1 = reinterpret_cast< std::set< std::pair< float,std::vector< std::string > > > * >(argp1); - result = (arg1)->rbegin(); - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::set< std::pair< float,std::vector< std::string > > >::reverse_iterator & >(result)), - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstOneLevelPaths_rend(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::set< std::pair< float,std::vector< std::string > > > *arg1 = (std::set< std::pair< float,std::vector< std::string > > > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::set< std::pair< float,std::vector< std::string > > >::reverse_iterator result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__setT_std__pairT_float_std__vectorT_std__string_std__allocatorT_std__string_t_t_t_std__lessT_std__pairT_float_std__vectorT_std__string_t_t_t_std__allocatorT_std__pairT_float_std__vectorT_std__string_std__allocatorT_std__string_t_t_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstOneLevelPaths_rend" "', argument " "1"" of type '" "std::set< std::pair< float,std::vector< std::string > > > *""'"); - } - arg1 = reinterpret_cast< std::set< std::pair< float,std::vector< std::string > > > * >(argp1); - result = (arg1)->rend(); - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::set< std::pair< float,std::vector< std::string > > >::reverse_iterator & >(result)), - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstOneLevelPaths_erase__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::set< std::pair< float,std::vector< std::string > > > *arg1 = (std::set< std::pair< float,std::vector< std::string > > > *) 0 ; - std::set< std::pair< float,std::vector< std::string > > >::iterator arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - swig::SwigPyIterator *iter2 = 0 ; - int res2 ; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__setT_std__pairT_float_std__vectorT_std__string_std__allocatorT_std__string_t_t_t_std__lessT_std__pairT_float_std__vectorT_std__string_t_t_t_std__allocatorT_std__pairT_float_std__vectorT_std__string_std__allocatorT_std__string_t_t_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstOneLevelPaths_erase" "', argument " "1"" of type '" "std::set< std::pair< float,std::vector< std::string > > > *""'"); - } - arg1 = reinterpret_cast< std::set< std::pair< float,std::vector< std::string > > > * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0); - if (!SWIG_IsOK(res2) || !iter2) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "HfstOneLevelPaths_erase" "', argument " "2"" of type '" "std::set< std::pair< float,std::vector< std::string > > >::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 '" "HfstOneLevelPaths_erase" "', argument " "2"" of type '" "std::set< std::pair< float,std::vector< std::string > > >::iterator""'"); - } - } - std_set_Sl_std_pair_Sl_float_Sc_std_vector_Sl_std_string_Sg__Sg__Sg__erase__SWIG_1(arg1,arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstOneLevelPaths_erase__SWIG_2(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::set< std::pair< float,std::vector< std::string > > > *arg1 = (std::set< std::pair< float,std::vector< std::string > > > *) 0 ; - std::set< std::pair< float,std::vector< std::string > > >::iterator arg2 ; - std::set< std::pair< float,std::vector< std::string > > >::iterator arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - swig::SwigPyIterator *iter2 = 0 ; - int res2 ; - swig::SwigPyIterator *iter3 = 0 ; - int res3 ; - - if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__setT_std__pairT_float_std__vectorT_std__string_std__allocatorT_std__string_t_t_t_std__lessT_std__pairT_float_std__vectorT_std__string_t_t_t_std__allocatorT_std__pairT_float_std__vectorT_std__string_std__allocatorT_std__string_t_t_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstOneLevelPaths_erase" "', argument " "1"" of type '" "std::set< std::pair< float,std::vector< std::string > > > *""'"); - } - arg1 = reinterpret_cast< std::set< std::pair< float,std::vector< std::string > > > * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0); - if (!SWIG_IsOK(res2) || !iter2) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "HfstOneLevelPaths_erase" "', argument " "2"" of type '" "std::set< std::pair< float,std::vector< std::string > > >::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 '" "HfstOneLevelPaths_erase" "', argument " "2"" of type '" "std::set< std::pair< float,std::vector< std::string > > >::iterator""'"); - } - } - res3 = SWIG_ConvertPtr(swig_obj[2], SWIG_as_voidptrptr(&iter3), swig::SwigPyIterator::descriptor(), 0); - if (!SWIG_IsOK(res3) || !iter3) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "HfstOneLevelPaths_erase" "', argument " "3"" of type '" "std::set< std::pair< float,std::vector< std::string > > >::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 '" "HfstOneLevelPaths_erase" "', argument " "3"" of type '" "std::set< std::pair< float,std::vector< std::string > > >::iterator""'"); - } - } - std_set_Sl_std_pair_Sl_float_Sc_std_vector_Sl_std_string_Sg__Sg__Sg__erase__SWIG_2(arg1,arg2,arg3); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstOneLevelPaths_erase(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[4] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "HfstOneLevelPaths_erase", 0, 3, argv))) SWIG_fail; - --argc; - if (argc == 2) { - int _v; - int res = swig::asptr(argv[0], (std::set< std::pair< float,std::vector< std::string,std::allocator< std::string > > >,std::less< std::pair< float,std::vector< std::string > > >,std::allocator< std::pair< float,std::vector< std::string,std::allocator< std::string > > > > >**)(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_HfstOneLevelPaths_erase__SWIG_1(self, argc, argv); - } - } - } - if (argc == 2) { - int _v; - int res = swig::asptr(argv[0], (std::set< std::pair< float,std::vector< std::string,std::allocator< std::string > > >,std::less< std::pair< float,std::vector< std::string > > >,std::allocator< std::pair< float,std::vector< std::string,std::allocator< std::string > > > > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - int res = swig::asptr(argv[1], (std::pair< float,std::vector< std::string,std::allocator< std::string > > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_HfstOneLevelPaths_erase__SWIG_0(self, argc, argv); - } - } - } - if (argc == 3) { - int _v; - int res = swig::asptr(argv[0], (std::set< std::pair< float,std::vector< std::string,std::allocator< std::string > > >,std::less< std::pair< float,std::vector< std::string > > >,std::allocator< std::pair< float,std::vector< std::string,std::allocator< std::string > > > > >**)(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_HfstOneLevelPaths_erase__SWIG_2(self, argc, argv); - } - } - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'HfstOneLevelPaths_erase'.\n" - " Possible C/C++ prototypes are:\n" - " std::set< std::pair< float,std::vector< std::string > > >::erase(std::set< std::pair< float,std::vector< std::string > > >::key_type const &)\n" - " std::set< std::pair< float,std::vector< std::string > > >::erase(std::set< std::pair< float,std::vector< std::string > > >::iterator)\n" - " std::set< std::pair< float,std::vector< std::string > > >::erase(std::set< std::pair< float,std::vector< std::string > > >::iterator,std::set< std::pair< float,std::vector< std::string > > >::iterator)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_HfstOneLevelPaths_find(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::set< std::pair< float,std::vector< std::string > > > *arg1 = (std::set< std::pair< float,std::vector< std::string > > > *) 0 ; - std::set< std::pair< float,std::vector< std::string > > >::key_type *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 = SWIG_OLDOBJ ; - PyObject *swig_obj[2] ; - std::set< std::pair< float,std::vector< std::string > > >::iterator result; - - if (!SWIG_Python_UnpackTuple(args, "HfstOneLevelPaths_find", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__setT_std__pairT_float_std__vectorT_std__string_std__allocatorT_std__string_t_t_t_std__lessT_std__pairT_float_std__vectorT_std__string_t_t_t_std__allocatorT_std__pairT_float_std__vectorT_std__string_std__allocatorT_std__string_t_t_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstOneLevelPaths_find" "', argument " "1"" of type '" "std::set< std::pair< float,std::vector< std::string > > > *""'"); - } - arg1 = reinterpret_cast< std::set< std::pair< float,std::vector< std::string > > > * >(argp1); - { - std::pair< float,std::vector< std::string,std::allocator< std::string > > > *ptr = (std::pair< float,std::vector< std::string,std::allocator< std::string > > > *)0; - res2 = swig::asptr(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HfstOneLevelPaths_find" "', argument " "2"" of type '" "std::set< std::pair< float,std::vector< std::string > > >::key_type const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstOneLevelPaths_find" "', argument " "2"" of type '" "std::set< std::pair< float,std::vector< std::string > > >::key_type const &""'"); - } - arg2 = ptr; - } - result = (arg1)->find((std::set< std::pair< float,std::vector< std::string > > >::key_type const &)*arg2); - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::set< std::pair< float,std::vector< std::string > > >::iterator & >(result)), - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstOneLevelPaths_lower_bound(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::set< std::pair< float,std::vector< std::string > > > *arg1 = (std::set< std::pair< float,std::vector< std::string > > > *) 0 ; - std::set< std::pair< float,std::vector< std::string > > >::key_type *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 = SWIG_OLDOBJ ; - PyObject *swig_obj[2] ; - std::set< std::pair< float,std::vector< std::string > > >::iterator result; - - if (!SWIG_Python_UnpackTuple(args, "HfstOneLevelPaths_lower_bound", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__setT_std__pairT_float_std__vectorT_std__string_std__allocatorT_std__string_t_t_t_std__lessT_std__pairT_float_std__vectorT_std__string_t_t_t_std__allocatorT_std__pairT_float_std__vectorT_std__string_std__allocatorT_std__string_t_t_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstOneLevelPaths_lower_bound" "', argument " "1"" of type '" "std::set< std::pair< float,std::vector< std::string > > > *""'"); - } - arg1 = reinterpret_cast< std::set< std::pair< float,std::vector< std::string > > > * >(argp1); - { - std::pair< float,std::vector< std::string,std::allocator< std::string > > > *ptr = (std::pair< float,std::vector< std::string,std::allocator< std::string > > > *)0; - res2 = swig::asptr(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HfstOneLevelPaths_lower_bound" "', argument " "2"" of type '" "std::set< std::pair< float,std::vector< std::string > > >::key_type const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstOneLevelPaths_lower_bound" "', argument " "2"" of type '" "std::set< std::pair< float,std::vector< std::string > > >::key_type const &""'"); - } - arg2 = ptr; - } - result = (arg1)->lower_bound((std::set< std::pair< float,std::vector< std::string > > >::key_type const &)*arg2); - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::set< std::pair< float,std::vector< std::string > > >::iterator & >(result)), - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstOneLevelPaths_upper_bound(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::set< std::pair< float,std::vector< std::string > > > *arg1 = (std::set< std::pair< float,std::vector< std::string > > > *) 0 ; - std::set< std::pair< float,std::vector< std::string > > >::key_type *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 = SWIG_OLDOBJ ; - PyObject *swig_obj[2] ; - std::set< std::pair< float,std::vector< std::string > > >::iterator result; - - if (!SWIG_Python_UnpackTuple(args, "HfstOneLevelPaths_upper_bound", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__setT_std__pairT_float_std__vectorT_std__string_std__allocatorT_std__string_t_t_t_std__lessT_std__pairT_float_std__vectorT_std__string_t_t_t_std__allocatorT_std__pairT_float_std__vectorT_std__string_std__allocatorT_std__string_t_t_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstOneLevelPaths_upper_bound" "', argument " "1"" of type '" "std::set< std::pair< float,std::vector< std::string > > > *""'"); - } - arg1 = reinterpret_cast< std::set< std::pair< float,std::vector< std::string > > > * >(argp1); - { - std::pair< float,std::vector< std::string,std::allocator< std::string > > > *ptr = (std::pair< float,std::vector< std::string,std::allocator< std::string > > > *)0; - res2 = swig::asptr(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HfstOneLevelPaths_upper_bound" "', argument " "2"" of type '" "std::set< std::pair< float,std::vector< std::string > > >::key_type const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstOneLevelPaths_upper_bound" "', argument " "2"" of type '" "std::set< std::pair< float,std::vector< std::string > > >::key_type const &""'"); - } - arg2 = ptr; - } - result = (arg1)->upper_bound((std::set< std::pair< float,std::vector< std::string > > >::key_type const &)*arg2); - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::set< std::pair< float,std::vector< std::string > > >::iterator & >(result)), - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstOneLevelPaths_equal_range(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::set< std::pair< float,std::vector< std::string > > > *arg1 = (std::set< std::pair< float,std::vector< std::string > > > *) 0 ; - std::set< std::pair< float,std::vector< std::string > > >::key_type *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 = SWIG_OLDOBJ ; - PyObject *swig_obj[2] ; - SwigValueWrapper< std::pair< std::set< std::pair< float,std::vector< std::string > > >::iterator,std::set< std::pair< float,std::vector< std::string > > >::iterator > > result; - - if (!SWIG_Python_UnpackTuple(args, "HfstOneLevelPaths_equal_range", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__setT_std__pairT_float_std__vectorT_std__string_std__allocatorT_std__string_t_t_t_std__lessT_std__pairT_float_std__vectorT_std__string_t_t_t_std__allocatorT_std__pairT_float_std__vectorT_std__string_std__allocatorT_std__string_t_t_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstOneLevelPaths_equal_range" "', argument " "1"" of type '" "std::set< std::pair< float,std::vector< std::string > > > *""'"); - } - arg1 = reinterpret_cast< std::set< std::pair< float,std::vector< std::string > > > * >(argp1); - { - std::pair< float,std::vector< std::string,std::allocator< std::string > > > *ptr = (std::pair< float,std::vector< std::string,std::allocator< std::string > > > *)0; - res2 = swig::asptr(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HfstOneLevelPaths_equal_range" "', argument " "2"" of type '" "std::set< std::pair< float,std::vector< std::string > > >::key_type const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstOneLevelPaths_equal_range" "', argument " "2"" of type '" "std::set< std::pair< float,std::vector< std::string > > >::key_type const &""'"); - } - arg2 = ptr; - } - result = (arg1)->equal_range((std::set< std::pair< float,std::vector< std::string > > >::key_type const &)*arg2); - resultobj = PyTuple_New(2); - PyTuple_SetItem(resultobj,0,SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::pair< std::set< std::pair< float,std::vector< std::string > > >::iterator,std::set< std::pair< float,std::vector< std::string > > >::iterator > & >(result).first), - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN)); - PyTuple_SetItem(resultobj,1,SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::pair< std::set< std::pair< float,std::vector< std::string > > >::iterator,std::set< std::pair< float,std::vector< std::string > > >::iterator > & >(result).second), - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN)); - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstOneLevelPaths_insert(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::set< std::pair< float,std::vector< std::string > > > *arg1 = (std::set< std::pair< float,std::vector< std::string > > > *) 0 ; - std::set< std::pair< float,std::vector< std::string > > >::value_type *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 = SWIG_OLDOBJ ; - PyObject *swig_obj[2] ; - SwigValueWrapper< std::pair< std::set< std::pair< float,std::vector< std::string > > >::iterator,bool > > result; - - if (!SWIG_Python_UnpackTuple(args, "HfstOneLevelPaths_insert", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__setT_std__pairT_float_std__vectorT_std__string_std__allocatorT_std__string_t_t_t_std__lessT_std__pairT_float_std__vectorT_std__string_t_t_t_std__allocatorT_std__pairT_float_std__vectorT_std__string_std__allocatorT_std__string_t_t_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstOneLevelPaths_insert" "', argument " "1"" of type '" "std::set< std::pair< float,std::vector< std::string > > > *""'"); - } - arg1 = reinterpret_cast< std::set< std::pair< float,std::vector< std::string > > > * >(argp1); - { - std::pair< float,std::vector< std::string,std::allocator< std::string > > > *ptr = (std::pair< float,std::vector< std::string,std::allocator< std::string > > > *)0; - res2 = swig::asptr(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HfstOneLevelPaths_insert" "', argument " "2"" of type '" "std::set< std::pair< float,std::vector< std::string > > >::value_type const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstOneLevelPaths_insert" "', argument " "2"" of type '" "std::set< std::pair< float,std::vector< std::string > > >::value_type const &""'"); - } - arg2 = ptr; - } - result = (arg1)->insert((std::set< std::pair< float,std::vector< std::string > > >::value_type const &)*arg2); - resultobj = PyTuple_New(2); - PyTuple_SetItem(resultobj,0,SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::pair< std::set< std::pair< float,std::vector< std::string > > >::iterator,bool > & >(result).first), - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN)); - PyTuple_SetItem(resultobj,1,SWIG_From_bool (static_cast< const std::pair< std::set< std::pair< float,std::vector< std::string > > >::iterator,bool > & >(result).second)); - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_HfstOneLevelPaths(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::set< std::pair< float,std::vector< std::string > > > *arg1 = (std::set< std::pair< float,std::vector< std::string > > > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__setT_std__pairT_float_std__vectorT_std__string_std__allocatorT_std__string_t_t_t_std__lessT_std__pairT_float_std__vectorT_std__string_t_t_t_std__allocatorT_std__pairT_float_std__vectorT_std__string_std__allocatorT_std__string_t_t_t_t_t, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_HfstOneLevelPaths" "', argument " "1"" of type '" "std::set< std::pair< float,std::vector< std::string > > > *""'"); - } - arg1 = reinterpret_cast< std::set< std::pair< float,std::vector< std::string > > > * >(argp1); - delete arg1; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *HfstOneLevelPaths_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_std__setT_std__pairT_float_std__vectorT_std__string_std__allocatorT_std__string_t_t_t_std__lessT_std__pairT_float_std__vectorT_std__string_t_t_t_std__allocatorT_std__pairT_float_std__vectorT_std__string_std__allocatorT_std__string_t_t_t_t_t, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *HfstOneLevelPaths_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_new_HfstTwoLevelPath__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **SWIGUNUSEDPARM(swig_obj)) { - PyObject *resultobj = 0; - std::pair< float,std::vector< std::pair< std::string,std::string > > > *result = 0 ; - - if ((nobjs < 0) || (nobjs > 0)) SWIG_fail; - result = (std::pair< float,std::vector< std::pair< std::string,std::string > > > *)new std::pair< float,std::vector< std::pair< std::string,std::string > > >(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__pairT_float_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t_t, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_HfstTwoLevelPath__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - float arg1 ; - std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > > arg2 ; - float val1 ; - int ecode1 = 0 ; - std::pair< float,std::vector< std::pair< std::string,std::string > > > *result = 0 ; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - ecode1 = SWIG_AsVal_float(swig_obj[0], &val1); - if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_HfstTwoLevelPath" "', argument " "1"" of type '" "float""'"); - } - arg1 = static_cast< float >(val1); - { - std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > > *ptr = (std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > > *)0; - int res = swig::asptr(swig_obj[1], &ptr); - if (!SWIG_IsOK(res) || !ptr) { - SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "new_HfstTwoLevelPath" "', argument " "2"" of type '" "std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > >""'"); - } - arg2 = *ptr; - if (SWIG_IsNewObj(res)) delete ptr; - } - result = (std::pair< float,std::vector< std::pair< std::string,std::string > > > *)new std::pair< float,std::vector< std::pair< std::string,std::string > > >(arg1,arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__pairT_float_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t_t, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_HfstTwoLevelPath__SWIG_2(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::pair< float,std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > > > *arg1 = 0 ; - int res1 = SWIG_OLDOBJ ; - std::pair< float,std::vector< std::pair< std::string,std::string > > > *result = 0 ; - - if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; - { - std::pair< float,std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > > > *ptr = (std::pair< float,std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > > > *)0; - res1 = swig::asptr(swig_obj[0], &ptr); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_HfstTwoLevelPath" "', argument " "1"" of type '" "std::pair< float,std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > > > const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_HfstTwoLevelPath" "', argument " "1"" of type '" "std::pair< float,std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > > > const &""'"); - } - arg1 = ptr; - } - result = (std::pair< float,std::vector< std::pair< std::string,std::string > > > *)new std::pair< float,std::vector< std::pair< std::string,std::string > > >((std::pair< float,std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > > > const &)*arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__pairT_float_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_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_new_HfstTwoLevelPath(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[3] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "new_HfstTwoLevelPath", 0, 2, argv))) SWIG_fail; - --argc; - if (argc == 0) { - return _wrap_new_HfstTwoLevelPath__SWIG_0(self, argc, argv); - } - if (argc == 1) { - int _v; - int res = swig::asptr(argv[0], (std::pair< float,std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_new_HfstTwoLevelPath__SWIG_2(self, argc, argv); - } - } - if (argc == 2) { - int _v; - { - int res = SWIG_AsVal_float(argv[0], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - int res = swig::asptr(argv[1], (std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_new_HfstTwoLevelPath__SWIG_1(self, argc, argv); - } - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'new_HfstTwoLevelPath'.\n" - " Possible C/C++ prototypes are:\n" - " std::pair< float,std::vector< std::pair< std::string,std::string > > >::pair()\n" - " std::pair< float,std::vector< std::pair< std::string,std::string > > >::pair(float,std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > >)\n" - " std::pair< float,std::vector< std::pair< std::string,std::string > > >::pair(std::pair< float,std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > > > const &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_HfstTwoLevelPath_first_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::pair< float,std::vector< std::pair< std::string,std::string > > > *arg1 = (std::pair< float,std::vector< std::pair< std::string,std::string > > > *) 0 ; - float arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - float val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args, "HfstTwoLevelPath_first_set", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__pairT_float_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTwoLevelPath_first_set" "', argument " "1"" of type '" "std::pair< float,std::vector< std::pair< std::string,std::string > > > *""'"); - } - arg1 = reinterpret_cast< std::pair< float,std::vector< std::pair< std::string,std::string > > > * >(argp1); - ecode2 = SWIG_AsVal_float(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HfstTwoLevelPath_first_set" "', argument " "2"" of type '" "float""'"); - } - arg2 = static_cast< float >(val2); - if (arg1) (arg1)->first = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTwoLevelPath_first_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::pair< float,std::vector< std::pair< std::string,std::string > > > *arg1 = (std::pair< float,std::vector< std::pair< std::string,std::string > > > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - float result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__pairT_float_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTwoLevelPath_first_get" "', argument " "1"" of type '" "std::pair< float,std::vector< std::pair< std::string,std::string > > > *""'"); - } - arg1 = reinterpret_cast< std::pair< float,std::vector< std::pair< std::string,std::string > > > * >(argp1); - result = (float) ((arg1)->first); - resultobj = SWIG_From_float(static_cast< float >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTwoLevelPath_second_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::pair< float,std::vector< std::pair< std::string,std::string > > > *arg1 = (std::pair< float,std::vector< std::pair< std::string,std::string > > > *) 0 ; - std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > > *arg2 = (std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args, "HfstTwoLevelPath_second_set", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__pairT_float_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTwoLevelPath_second_set" "', argument " "1"" of type '" "std::pair< float,std::vector< std::pair< std::string,std::string > > > *""'"); - } - arg1 = reinterpret_cast< std::pair< float,std::vector< std::pair< std::string,std::string > > > * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HfstTwoLevelPath_second_set" "', argument " "2"" of type '" "std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > > *""'"); - } - arg2 = reinterpret_cast< std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > > * >(argp2); - if (arg1) (arg1)->second = *arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTwoLevelPath_second_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::pair< float,std::vector< std::pair< std::string,std::string > > > *arg1 = (std::pair< float,std::vector< std::pair< std::string,std::string > > > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > > *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__pairT_float_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTwoLevelPath_second_get" "', argument " "1"" of type '" "std::pair< float,std::vector< std::pair< std::string,std::string > > > *""'"); - } - arg1 = reinterpret_cast< std::pair< float,std::vector< std::pair< std::string,std::string > > > * >(argp1); - result = (std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > > *)& ((arg1)->second); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_HfstTwoLevelPath(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::pair< float,std::vector< std::pair< std::string,std::string > > > *arg1 = (std::pair< float,std::vector< std::pair< std::string,std::string > > > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__pairT_float_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t_t, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_HfstTwoLevelPath" "', argument " "1"" of type '" "std::pair< float,std::vector< std::pair< std::string,std::string > > > *""'"); - } - arg1 = reinterpret_cast< std::pair< float,std::vector< std::pair< std::string,std::string > > > * >(argp1); - delete arg1; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *HfstTwoLevelPath_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_std__pairT_float_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t_t, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *HfstTwoLevelPath_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_new_HfstTwoLevelPaths__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::less< std::pair< float,std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > > > > *arg1 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > > *result = 0 ; - - if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_std__lessT_std__pairT_float_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t_t_t, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_HfstTwoLevelPaths" "', argument " "1"" of type '" "std::less< std::pair< float,std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > > > > const &""'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_HfstTwoLevelPaths" "', argument " "1"" of type '" "std::less< std::pair< float,std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > > > > const &""'"); - } - arg1 = reinterpret_cast< std::less< std::pair< float,std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > > > > * >(argp1); - result = (std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > > *)new std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > >((std::less< std::pair< float,std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > > > > const &)*arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__setT_std__pairT_float_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t_t_std__lessT_std__pairT_float_std__vectorT_std__pairT_std__string_std__string_t_t_t_t_std__allocatorT_std__pairT_float_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t_t_t_t, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTwoLevelPaths_iterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > > *arg1 = (std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > > *) 0 ; - PyObject **arg2 = (PyObject **) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - swig::SwigPyIterator *result = 0 ; - - arg2 = &swig_obj[0]; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__setT_std__pairT_float_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t_t_std__lessT_std__pairT_float_std__vectorT_std__pairT_std__string_std__string_t_t_t_t_std__allocatorT_std__pairT_float_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTwoLevelPaths_iterator" "', argument " "1"" of type '" "std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > > *""'"); - } - arg1 = reinterpret_cast< std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > > * >(argp1); - result = (swig::SwigPyIterator *)std_set_Sl_std_pair_Sl_float_Sc_std_vector_Sl_std_pair_Sl_std_string_Sc_std_string_Sg__Sg__Sg__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_HfstTwoLevelPaths___nonzero__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > > *arg1 = (std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - bool result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__setT_std__pairT_float_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t_t_std__lessT_std__pairT_float_std__vectorT_std__pairT_std__string_std__string_t_t_t_t_std__allocatorT_std__pairT_float_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTwoLevelPaths___nonzero__" "', argument " "1"" of type '" "std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > > const *""'"); - } - arg1 = reinterpret_cast< std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > > * >(argp1); - result = (bool)std_set_Sl_std_pair_Sl_float_Sc_std_vector_Sl_std_pair_Sl_std_string_Sc_std_string_Sg__Sg__Sg__Sg____nonzero__((std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > > const *)arg1); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTwoLevelPaths___bool__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > > *arg1 = (std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - bool result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__setT_std__pairT_float_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t_t_std__lessT_std__pairT_float_std__vectorT_std__pairT_std__string_std__string_t_t_t_t_std__allocatorT_std__pairT_float_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTwoLevelPaths___bool__" "', argument " "1"" of type '" "std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > > const *""'"); - } - arg1 = reinterpret_cast< std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > > * >(argp1); - result = (bool)std_set_Sl_std_pair_Sl_float_Sc_std_vector_Sl_std_pair_Sl_std_string_Sc_std_string_Sg__Sg__Sg__Sg____bool__((std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > > const *)arg1); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTwoLevelPaths___len__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > > *arg1 = (std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > >::size_type result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__setT_std__pairT_float_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t_t_std__lessT_std__pairT_float_std__vectorT_std__pairT_std__string_std__string_t_t_t_t_std__allocatorT_std__pairT_float_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTwoLevelPaths___len__" "', argument " "1"" of type '" "std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > > const *""'"); - } - arg1 = reinterpret_cast< std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > > * >(argp1); - result = std_set_Sl_std_pair_Sl_float_Sc_std_vector_Sl_std_pair_Sl_std_string_Sc_std_string_Sg__Sg__Sg__Sg____len__((std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > > const *)arg1); - resultobj = SWIG_From_size_t(static_cast< size_t >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTwoLevelPaths_append(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > > *arg1 = (std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > > *) 0 ; - std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > >::value_type arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args, "HfstTwoLevelPaths_append", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__setT_std__pairT_float_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t_t_std__lessT_std__pairT_float_std__vectorT_std__pairT_std__string_std__string_t_t_t_t_std__allocatorT_std__pairT_float_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTwoLevelPaths_append" "', argument " "1"" of type '" "std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > > *""'"); - } - arg1 = reinterpret_cast< std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > > * >(argp1); - { - std::pair< float,std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > > > *ptr = (std::pair< float,std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > > > *)0; - int res = swig::asptr(swig_obj[1], &ptr); - if (!SWIG_IsOK(res) || !ptr) { - SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "HfstTwoLevelPaths_append" "', argument " "2"" of type '" "std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > >::value_type""'"); - } - arg2 = *ptr; - if (SWIG_IsNewObj(res)) delete ptr; - } - std_set_Sl_std_pair_Sl_float_Sc_std_vector_Sl_std_pair_Sl_std_string_Sc_std_string_Sg__Sg__Sg__Sg__append(arg1,arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTwoLevelPaths___contains__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > > *arg1 = (std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > > *) 0 ; - std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > >::value_type arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[2] ; - bool result; - - if (!SWIG_Python_UnpackTuple(args, "HfstTwoLevelPaths___contains__", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__setT_std__pairT_float_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t_t_std__lessT_std__pairT_float_std__vectorT_std__pairT_std__string_std__string_t_t_t_t_std__allocatorT_std__pairT_float_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTwoLevelPaths___contains__" "', argument " "1"" of type '" "std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > > *""'"); - } - arg1 = reinterpret_cast< std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > > * >(argp1); - { - std::pair< float,std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > > > *ptr = (std::pair< float,std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > > > *)0; - int res = swig::asptr(swig_obj[1], &ptr); - if (!SWIG_IsOK(res) || !ptr) { - SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "HfstTwoLevelPaths___contains__" "', argument " "2"" of type '" "std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > >::value_type""'"); - } - arg2 = *ptr; - if (SWIG_IsNewObj(res)) delete ptr; - } - result = (bool)std_set_Sl_std_pair_Sl_float_Sc_std_vector_Sl_std_pair_Sl_std_string_Sc_std_string_Sg__Sg__Sg__Sg____contains__(arg1,arg2); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTwoLevelPaths___getitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > > *arg1 = (std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > > *) 0 ; - std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > >::difference_type arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - ptrdiff_t val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > >::value_type result; - - if (!SWIG_Python_UnpackTuple(args, "HfstTwoLevelPaths___getitem__", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__setT_std__pairT_float_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t_t_std__lessT_std__pairT_float_std__vectorT_std__pairT_std__string_std__string_t_t_t_t_std__allocatorT_std__pairT_float_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTwoLevelPaths___getitem__" "', argument " "1"" of type '" "std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > > const *""'"); - } - arg1 = reinterpret_cast< std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > > * >(argp1); - ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HfstTwoLevelPaths___getitem__" "', argument " "2"" of type '" "std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > >::difference_type""'"); - } - arg2 = static_cast< std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > >::difference_type >(val2); - try { - result = std_set_Sl_std_pair_Sl_float_Sc_std_vector_Sl_std_pair_Sl_std_string_Sc_std_string_Sg__Sg__Sg__Sg____getitem__((std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > > const *)arg1,arg2); - } catch(std::out_of_range &_e) { - SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); - } - resultobj = swig::from(static_cast< std::pair< float,std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > > > >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTwoLevelPaths_add(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > > *arg1 = (std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > > *) 0 ; - std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > >::value_type arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args, "HfstTwoLevelPaths_add", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__setT_std__pairT_float_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t_t_std__lessT_std__pairT_float_std__vectorT_std__pairT_std__string_std__string_t_t_t_t_std__allocatorT_std__pairT_float_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTwoLevelPaths_add" "', argument " "1"" of type '" "std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > > *""'"); - } - arg1 = reinterpret_cast< std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > > * >(argp1); - { - std::pair< float,std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > > > *ptr = (std::pair< float,std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > > > *)0; - int res = swig::asptr(swig_obj[1], &ptr); - if (!SWIG_IsOK(res) || !ptr) { - SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "HfstTwoLevelPaths_add" "', argument " "2"" of type '" "std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > >::value_type""'"); - } - arg2 = *ptr; - if (SWIG_IsNewObj(res)) delete ptr; - } - std_set_Sl_std_pair_Sl_float_Sc_std_vector_Sl_std_pair_Sl_std_string_Sc_std_string_Sg__Sg__Sg__Sg__add(arg1,arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTwoLevelPaths_discard(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > > *arg1 = (std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > > *) 0 ; - std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > >::value_type arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args, "HfstTwoLevelPaths_discard", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__setT_std__pairT_float_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t_t_std__lessT_std__pairT_float_std__vectorT_std__pairT_std__string_std__string_t_t_t_t_std__allocatorT_std__pairT_float_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTwoLevelPaths_discard" "', argument " "1"" of type '" "std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > > *""'"); - } - arg1 = reinterpret_cast< std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > > * >(argp1); - { - std::pair< float,std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > > > *ptr = (std::pair< float,std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > > > *)0; - int res = swig::asptr(swig_obj[1], &ptr); - if (!SWIG_IsOK(res) || !ptr) { - SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "HfstTwoLevelPaths_discard" "', argument " "2"" of type '" "std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > >::value_type""'"); - } - arg2 = *ptr; - if (SWIG_IsNewObj(res)) delete ptr; - } - std_set_Sl_std_pair_Sl_float_Sc_std_vector_Sl_std_pair_Sl_std_string_Sc_std_string_Sg__Sg__Sg__Sg__discard(arg1,arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_HfstTwoLevelPaths__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **SWIGUNUSEDPARM(swig_obj)) { - PyObject *resultobj = 0; - std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > > *result = 0 ; - - if ((nobjs < 0) || (nobjs > 0)) SWIG_fail; - result = (std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > > *)new std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > >(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__setT_std__pairT_float_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t_t_std__lessT_std__pairT_float_std__vectorT_std__pairT_std__string_std__string_t_t_t_t_std__allocatorT_std__pairT_float_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t_t_t_t, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_HfstTwoLevelPaths__SWIG_2(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::set< std::pair< float,std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > > > > *arg1 = 0 ; - int res1 = SWIG_OLDOBJ ; - std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > > *result = 0 ; - - if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; - { - std::set< std::pair< float,std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > > >,std::less< std::pair< float,std::vector< std::pair< std::string,std::string > > > >,std::allocator< std::pair< float,std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > > > > > *ptr = (std::set< std::pair< float,std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > > >,std::less< std::pair< float,std::vector< std::pair< std::string,std::string > > > >,std::allocator< std::pair< float,std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > > > > > *)0; - res1 = swig::asptr(swig_obj[0], &ptr); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_HfstTwoLevelPaths" "', argument " "1"" of type '" "std::set< std::pair< float,std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > > > > const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_HfstTwoLevelPaths" "', argument " "1"" of type '" "std::set< std::pair< float,std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > > > > const &""'"); - } - arg1 = ptr; - } - result = (std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > > *)new std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > >((std::set< std::pair< float,std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > > > > const &)*arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__setT_std__pairT_float_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t_t_std__lessT_std__pairT_float_std__vectorT_std__pairT_std__string_std__string_t_t_t_t_std__allocatorT_std__pairT_float_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t_t_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_new_HfstTwoLevelPaths(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[2] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "new_HfstTwoLevelPaths", 0, 1, argv))) SWIG_fail; - --argc; - if (argc == 0) { - return _wrap_new_HfstTwoLevelPaths__SWIG_1(self, argc, argv); - } - if (argc == 1) { - int _v; - int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_std__lessT_std__pairT_float_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t_t_t, SWIG_POINTER_NO_NULL | 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_new_HfstTwoLevelPaths__SWIG_0(self, argc, argv); - } - } - if (argc == 1) { - int _v; - int res = swig::asptr(argv[0], (std::set< std::pair< float,std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > > >,std::less< std::pair< float,std::vector< std::pair< std::string,std::string > > > >,std::allocator< std::pair< float,std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > > > > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_new_HfstTwoLevelPaths__SWIG_2(self, argc, argv); - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'new_HfstTwoLevelPaths'.\n" - " Possible C/C++ prototypes are:\n" - " std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > >::set(std::less< std::pair< float,std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > > > > const &)\n" - " std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > >::set()\n" - " std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > >::set(std::set< std::pair< float,std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > > > > const &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_HfstTwoLevelPaths_empty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > > *arg1 = (std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - bool result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__setT_std__pairT_float_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t_t_std__lessT_std__pairT_float_std__vectorT_std__pairT_std__string_std__string_t_t_t_t_std__allocatorT_std__pairT_float_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTwoLevelPaths_empty" "', argument " "1"" of type '" "std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > > const *""'"); - } - arg1 = reinterpret_cast< std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > > * >(argp1); - result = (bool)((std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > > const *)arg1)->empty(); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTwoLevelPaths_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > > *arg1 = (std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > >::size_type result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__setT_std__pairT_float_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t_t_std__lessT_std__pairT_float_std__vectorT_std__pairT_std__string_std__string_t_t_t_t_std__allocatorT_std__pairT_float_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTwoLevelPaths_size" "', argument " "1"" of type '" "std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > > const *""'"); - } - arg1 = reinterpret_cast< std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > > * >(argp1); - result = ((std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > > const *)arg1)->size(); - resultobj = SWIG_From_size_t(static_cast< size_t >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTwoLevelPaths_clear(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > > *arg1 = (std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__setT_std__pairT_float_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t_t_std__lessT_std__pairT_float_std__vectorT_std__pairT_std__string_std__string_t_t_t_t_std__allocatorT_std__pairT_float_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTwoLevelPaths_clear" "', argument " "1"" of type '" "std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > > *""'"); - } - arg1 = reinterpret_cast< std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > > * >(argp1); - (arg1)->clear(); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTwoLevelPaths_swap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > > *arg1 = (std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > > *) 0 ; - std::set< std::pair< float,std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > > > > *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args, "HfstTwoLevelPaths_swap", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__setT_std__pairT_float_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t_t_std__lessT_std__pairT_float_std__vectorT_std__pairT_std__string_std__string_t_t_t_t_std__allocatorT_std__pairT_float_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTwoLevelPaths_swap" "', argument " "1"" of type '" "std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > > *""'"); - } - arg1 = reinterpret_cast< std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > > * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_std__setT_std__pairT_float_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t_t_std__lessT_std__pairT_float_std__vectorT_std__pairT_std__string_std__string_t_t_t_t_std__allocatorT_std__pairT_float_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t_t_t_t, 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HfstTwoLevelPaths_swap" "', argument " "2"" of type '" "std::set< std::pair< float,std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > > > > &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstTwoLevelPaths_swap" "', argument " "2"" of type '" "std::set< std::pair< float,std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > > > > &""'"); - } - arg2 = reinterpret_cast< std::set< std::pair< float,std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > > > > * >(argp2); - (arg1)->swap(*arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTwoLevelPaths_erase__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > > *arg1 = (std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > > *) 0 ; - std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > >::key_type *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 = SWIG_OLDOBJ ; - std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > >::size_type result; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__setT_std__pairT_float_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t_t_std__lessT_std__pairT_float_std__vectorT_std__pairT_std__string_std__string_t_t_t_t_std__allocatorT_std__pairT_float_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTwoLevelPaths_erase" "', argument " "1"" of type '" "std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > > *""'"); - } - arg1 = reinterpret_cast< std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > > * >(argp1); - { - std::pair< float,std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > > > *ptr = (std::pair< float,std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > > > *)0; - res2 = swig::asptr(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HfstTwoLevelPaths_erase" "', argument " "2"" of type '" "std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > >::key_type const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstTwoLevelPaths_erase" "', argument " "2"" of type '" "std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > >::key_type const &""'"); - } - arg2 = ptr; - } - result = (arg1)->erase((std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > >::key_type const &)*arg2); - resultobj = SWIG_From_size_t(static_cast< size_t >(result)); - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTwoLevelPaths_count(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > > *arg1 = (std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > > *) 0 ; - std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > >::key_type *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 = SWIG_OLDOBJ ; - PyObject *swig_obj[2] ; - std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > >::size_type result; - - if (!SWIG_Python_UnpackTuple(args, "HfstTwoLevelPaths_count", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__setT_std__pairT_float_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t_t_std__lessT_std__pairT_float_std__vectorT_std__pairT_std__string_std__string_t_t_t_t_std__allocatorT_std__pairT_float_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTwoLevelPaths_count" "', argument " "1"" of type '" "std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > > const *""'"); - } - arg1 = reinterpret_cast< std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > > * >(argp1); - { - std::pair< float,std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > > > *ptr = (std::pair< float,std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > > > *)0; - res2 = swig::asptr(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HfstTwoLevelPaths_count" "', argument " "2"" of type '" "std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > >::key_type const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstTwoLevelPaths_count" "', argument " "2"" of type '" "std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > >::key_type const &""'"); - } - arg2 = ptr; - } - result = ((std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > > const *)arg1)->count((std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > >::key_type const &)*arg2); - resultobj = SWIG_From_size_t(static_cast< size_t >(result)); - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTwoLevelPaths_begin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > > *arg1 = (std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > >::iterator result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__setT_std__pairT_float_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t_t_std__lessT_std__pairT_float_std__vectorT_std__pairT_std__string_std__string_t_t_t_t_std__allocatorT_std__pairT_float_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTwoLevelPaths_begin" "', argument " "1"" of type '" "std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > > *""'"); - } - arg1 = reinterpret_cast< std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > > * >(argp1); - result = (arg1)->begin(); - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > >::iterator & >(result)), - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTwoLevelPaths_end(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > > *arg1 = (std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > >::iterator result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__setT_std__pairT_float_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t_t_std__lessT_std__pairT_float_std__vectorT_std__pairT_std__string_std__string_t_t_t_t_std__allocatorT_std__pairT_float_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTwoLevelPaths_end" "', argument " "1"" of type '" "std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > > *""'"); - } - arg1 = reinterpret_cast< std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > > * >(argp1); - result = (arg1)->end(); - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > >::iterator & >(result)), - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTwoLevelPaths_rbegin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > > *arg1 = (std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > >::reverse_iterator result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__setT_std__pairT_float_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t_t_std__lessT_std__pairT_float_std__vectorT_std__pairT_std__string_std__string_t_t_t_t_std__allocatorT_std__pairT_float_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTwoLevelPaths_rbegin" "', argument " "1"" of type '" "std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > > *""'"); - } - arg1 = reinterpret_cast< std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > > * >(argp1); - result = (arg1)->rbegin(); - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > >::reverse_iterator & >(result)), - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTwoLevelPaths_rend(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > > *arg1 = (std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > >::reverse_iterator result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__setT_std__pairT_float_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t_t_std__lessT_std__pairT_float_std__vectorT_std__pairT_std__string_std__string_t_t_t_t_std__allocatorT_std__pairT_float_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTwoLevelPaths_rend" "', argument " "1"" of type '" "std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > > *""'"); - } - arg1 = reinterpret_cast< std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > > * >(argp1); - result = (arg1)->rend(); - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > >::reverse_iterator & >(result)), - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTwoLevelPaths_erase__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > > *arg1 = (std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > > *) 0 ; - std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > >::iterator arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - swig::SwigPyIterator *iter2 = 0 ; - int res2 ; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__setT_std__pairT_float_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t_t_std__lessT_std__pairT_float_std__vectorT_std__pairT_std__string_std__string_t_t_t_t_std__allocatorT_std__pairT_float_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTwoLevelPaths_erase" "', argument " "1"" of type '" "std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > > *""'"); - } - arg1 = reinterpret_cast< std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > > * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0); - if (!SWIG_IsOK(res2) || !iter2) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "HfstTwoLevelPaths_erase" "', argument " "2"" of type '" "std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > >::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 '" "HfstTwoLevelPaths_erase" "', argument " "2"" of type '" "std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > >::iterator""'"); - } - } - std_set_Sl_std_pair_Sl_float_Sc_std_vector_Sl_std_pair_Sl_std_string_Sc_std_string_Sg__Sg__Sg__Sg__erase__SWIG_1(arg1,arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTwoLevelPaths_erase__SWIG_2(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > > *arg1 = (std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > > *) 0 ; - std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > >::iterator arg2 ; - std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > >::iterator arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - swig::SwigPyIterator *iter2 = 0 ; - int res2 ; - swig::SwigPyIterator *iter3 = 0 ; - int res3 ; - - if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__setT_std__pairT_float_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t_t_std__lessT_std__pairT_float_std__vectorT_std__pairT_std__string_std__string_t_t_t_t_std__allocatorT_std__pairT_float_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTwoLevelPaths_erase" "', argument " "1"" of type '" "std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > > *""'"); - } - arg1 = reinterpret_cast< std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > > * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0); - if (!SWIG_IsOK(res2) || !iter2) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "HfstTwoLevelPaths_erase" "', argument " "2"" of type '" "std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > >::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 '" "HfstTwoLevelPaths_erase" "', argument " "2"" of type '" "std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > >::iterator""'"); - } - } - res3 = SWIG_ConvertPtr(swig_obj[2], SWIG_as_voidptrptr(&iter3), swig::SwigPyIterator::descriptor(), 0); - if (!SWIG_IsOK(res3) || !iter3) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "HfstTwoLevelPaths_erase" "', argument " "3"" of type '" "std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > >::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 '" "HfstTwoLevelPaths_erase" "', argument " "3"" of type '" "std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > >::iterator""'"); - } - } - std_set_Sl_std_pair_Sl_float_Sc_std_vector_Sl_std_pair_Sl_std_string_Sc_std_string_Sg__Sg__Sg__Sg__erase__SWIG_2(arg1,arg2,arg3); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTwoLevelPaths_erase(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[4] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "HfstTwoLevelPaths_erase", 0, 3, argv))) SWIG_fail; - --argc; - if (argc == 2) { - int _v; - int res = swig::asptr(argv[0], (std::set< std::pair< float,std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > > >,std::less< std::pair< float,std::vector< std::pair< std::string,std::string > > > >,std::allocator< std::pair< float,std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > > > > >**)(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_HfstTwoLevelPaths_erase__SWIG_1(self, argc, argv); - } - } - } - if (argc == 2) { - int _v; - int res = swig::asptr(argv[0], (std::set< std::pair< float,std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > > >,std::less< std::pair< float,std::vector< std::pair< std::string,std::string > > > >,std::allocator< std::pair< float,std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > > > > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - int res = swig::asptr(argv[1], (std::pair< float,std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_HfstTwoLevelPaths_erase__SWIG_0(self, argc, argv); - } - } - } - if (argc == 3) { - int _v; - int res = swig::asptr(argv[0], (std::set< std::pair< float,std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > > >,std::less< std::pair< float,std::vector< std::pair< std::string,std::string > > > >,std::allocator< std::pair< float,std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > > > > >**)(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_HfstTwoLevelPaths_erase__SWIG_2(self, argc, argv); - } - } - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'HfstTwoLevelPaths_erase'.\n" - " Possible C/C++ prototypes are:\n" - " std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > >::erase(std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > >::key_type const &)\n" - " std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > >::erase(std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > >::iterator)\n" - " std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > >::erase(std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > >::iterator,std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > >::iterator)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_HfstTwoLevelPaths_find(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > > *arg1 = (std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > > *) 0 ; - std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > >::key_type *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 = SWIG_OLDOBJ ; - PyObject *swig_obj[2] ; - std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > >::iterator result; - - if (!SWIG_Python_UnpackTuple(args, "HfstTwoLevelPaths_find", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__setT_std__pairT_float_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t_t_std__lessT_std__pairT_float_std__vectorT_std__pairT_std__string_std__string_t_t_t_t_std__allocatorT_std__pairT_float_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTwoLevelPaths_find" "', argument " "1"" of type '" "std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > > *""'"); - } - arg1 = reinterpret_cast< std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > > * >(argp1); - { - std::pair< float,std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > > > *ptr = (std::pair< float,std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > > > *)0; - res2 = swig::asptr(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HfstTwoLevelPaths_find" "', argument " "2"" of type '" "std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > >::key_type const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstTwoLevelPaths_find" "', argument " "2"" of type '" "std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > >::key_type const &""'"); - } - arg2 = ptr; - } - result = (arg1)->find((std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > >::key_type const &)*arg2); - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > >::iterator & >(result)), - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTwoLevelPaths_lower_bound(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > > *arg1 = (std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > > *) 0 ; - std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > >::key_type *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 = SWIG_OLDOBJ ; - PyObject *swig_obj[2] ; - std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > >::iterator result; - - if (!SWIG_Python_UnpackTuple(args, "HfstTwoLevelPaths_lower_bound", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__setT_std__pairT_float_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t_t_std__lessT_std__pairT_float_std__vectorT_std__pairT_std__string_std__string_t_t_t_t_std__allocatorT_std__pairT_float_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTwoLevelPaths_lower_bound" "', argument " "1"" of type '" "std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > > *""'"); - } - arg1 = reinterpret_cast< std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > > * >(argp1); - { - std::pair< float,std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > > > *ptr = (std::pair< float,std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > > > *)0; - res2 = swig::asptr(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HfstTwoLevelPaths_lower_bound" "', argument " "2"" of type '" "std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > >::key_type const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstTwoLevelPaths_lower_bound" "', argument " "2"" of type '" "std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > >::key_type const &""'"); - } - arg2 = ptr; - } - result = (arg1)->lower_bound((std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > >::key_type const &)*arg2); - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > >::iterator & >(result)), - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTwoLevelPaths_upper_bound(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > > *arg1 = (std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > > *) 0 ; - std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > >::key_type *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 = SWIG_OLDOBJ ; - PyObject *swig_obj[2] ; - std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > >::iterator result; - - if (!SWIG_Python_UnpackTuple(args, "HfstTwoLevelPaths_upper_bound", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__setT_std__pairT_float_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t_t_std__lessT_std__pairT_float_std__vectorT_std__pairT_std__string_std__string_t_t_t_t_std__allocatorT_std__pairT_float_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTwoLevelPaths_upper_bound" "', argument " "1"" of type '" "std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > > *""'"); - } - arg1 = reinterpret_cast< std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > > * >(argp1); - { - std::pair< float,std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > > > *ptr = (std::pair< float,std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > > > *)0; - res2 = swig::asptr(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HfstTwoLevelPaths_upper_bound" "', argument " "2"" of type '" "std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > >::key_type const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstTwoLevelPaths_upper_bound" "', argument " "2"" of type '" "std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > >::key_type const &""'"); - } - arg2 = ptr; - } - result = (arg1)->upper_bound((std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > >::key_type const &)*arg2); - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > >::iterator & >(result)), - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTwoLevelPaths_equal_range(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > > *arg1 = (std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > > *) 0 ; - std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > >::key_type *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 = SWIG_OLDOBJ ; - PyObject *swig_obj[2] ; - SwigValueWrapper< std::pair< std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > >::iterator,std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > >::iterator > > result; - - if (!SWIG_Python_UnpackTuple(args, "HfstTwoLevelPaths_equal_range", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__setT_std__pairT_float_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t_t_std__lessT_std__pairT_float_std__vectorT_std__pairT_std__string_std__string_t_t_t_t_std__allocatorT_std__pairT_float_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTwoLevelPaths_equal_range" "', argument " "1"" of type '" "std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > > *""'"); - } - arg1 = reinterpret_cast< std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > > * >(argp1); - { - std::pair< float,std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > > > *ptr = (std::pair< float,std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > > > *)0; - res2 = swig::asptr(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HfstTwoLevelPaths_equal_range" "', argument " "2"" of type '" "std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > >::key_type const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstTwoLevelPaths_equal_range" "', argument " "2"" of type '" "std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > >::key_type const &""'"); - } - arg2 = ptr; - } - result = (arg1)->equal_range((std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > >::key_type const &)*arg2); - resultobj = PyTuple_New(2); - PyTuple_SetItem(resultobj,0,SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::pair< std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > >::iterator,std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > >::iterator > & >(result).first), - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN)); - PyTuple_SetItem(resultobj,1,SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::pair< std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > >::iterator,std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > >::iterator > & >(result).second), - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN)); - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTwoLevelPaths_insert(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > > *arg1 = (std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > > *) 0 ; - std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > >::value_type *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 = SWIG_OLDOBJ ; - PyObject *swig_obj[2] ; - SwigValueWrapper< std::pair< std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > >::iterator,bool > > result; - - if (!SWIG_Python_UnpackTuple(args, "HfstTwoLevelPaths_insert", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__setT_std__pairT_float_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t_t_std__lessT_std__pairT_float_std__vectorT_std__pairT_std__string_std__string_t_t_t_t_std__allocatorT_std__pairT_float_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTwoLevelPaths_insert" "', argument " "1"" of type '" "std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > > *""'"); - } - arg1 = reinterpret_cast< std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > > * >(argp1); - { - std::pair< float,std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > > > *ptr = (std::pair< float,std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > > > *)0; - res2 = swig::asptr(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HfstTwoLevelPaths_insert" "', argument " "2"" of type '" "std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > >::value_type const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstTwoLevelPaths_insert" "', argument " "2"" of type '" "std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > >::value_type const &""'"); - } - arg2 = ptr; - } - result = (arg1)->insert((std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > >::value_type const &)*arg2); - resultobj = PyTuple_New(2); - PyTuple_SetItem(resultobj,0,SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::pair< std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > >::iterator,bool > & >(result).first), - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN)); - PyTuple_SetItem(resultobj,1,SWIG_From_bool (static_cast< const std::pair< std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > >::iterator,bool > & >(result).second)); - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_HfstTwoLevelPaths(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > > *arg1 = (std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__setT_std__pairT_float_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t_t_std__lessT_std__pairT_float_std__vectorT_std__pairT_std__string_std__string_t_t_t_t_std__allocatorT_std__pairT_float_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t_t_t_t, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_HfstTwoLevelPaths" "', argument " "1"" of type '" "std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > > *""'"); - } - arg1 = reinterpret_cast< std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > > * >(argp1); - delete arg1; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *HfstTwoLevelPaths_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_std__setT_std__pairT_float_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t_t_std__lessT_std__pairT_float_std__vectorT_std__pairT_std__string_std__string_t_t_t_t_std__allocatorT_std__pairT_float_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t_t_t_t, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *HfstTwoLevelPaths_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_new_HfstTransducerPair__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **SWIGUNUSEDPARM(swig_obj)) { - PyObject *resultobj = 0; - std::pair< hfst::HfstTransducer,hfst::HfstTransducer > *result = 0 ; - - if ((nobjs < 0) || (nobjs > 0)) SWIG_fail; - result = (std::pair< hfst::HfstTransducer,hfst::HfstTransducer > *)new std::pair< hfst::HfstTransducer,hfst::HfstTransducer >(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__pairT_hfst__HfstTransducer_hfst__HfstTransducer_t, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_HfstTransducerPair__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - SwigValueWrapper< hfst::HfstTransducer > arg1 ; - SwigValueWrapper< hfst::HfstTransducer > arg2 ; - void *argp1 ; - int res1 = 0 ; - void *argp2 ; - int res2 = 0 ; - std::pair< hfst::HfstTransducer,hfst::HfstTransducer > *result = 0 ; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - { - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_hfst__HfstTransducer, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_HfstTransducerPair" "', argument " "1"" of type '" "hfst::HfstTransducer""'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_HfstTransducerPair" "', argument " "1"" of type '" "hfst::HfstTransducer""'"); - } else { - hfst::HfstTransducer * temp = reinterpret_cast< hfst::HfstTransducer * >(argp1); - arg1 = *temp; - if (SWIG_IsNewObj(res1)) delete temp; - } - } - { - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_hfst__HfstTransducer, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_HfstTransducerPair" "', argument " "2"" of type '" "hfst::HfstTransducer""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_HfstTransducerPair" "', argument " "2"" of type '" "hfst::HfstTransducer""'"); - } else { - hfst::HfstTransducer * temp = reinterpret_cast< hfst::HfstTransducer * >(argp2); - arg2 = *temp; - if (SWIG_IsNewObj(res2)) delete temp; - } - } - result = (std::pair< hfst::HfstTransducer,hfst::HfstTransducer > *)new std::pair< hfst::HfstTransducer,hfst::HfstTransducer >(arg1,arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__pairT_hfst__HfstTransducer_hfst__HfstTransducer_t, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_HfstTransducerPair__SWIG_2(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::pair< hfst::HfstTransducer,hfst::HfstTransducer > *arg1 = 0 ; - int res1 = SWIG_OLDOBJ ; - std::pair< hfst::HfstTransducer,hfst::HfstTransducer > *result = 0 ; - - if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; - { - std::pair< hfst::HfstTransducer,hfst::HfstTransducer > *ptr = (std::pair< hfst::HfstTransducer,hfst::HfstTransducer > *)0; - res1 = swig::asptr(swig_obj[0], &ptr); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_HfstTransducerPair" "', argument " "1"" of type '" "std::pair< hfst::HfstTransducer,hfst::HfstTransducer > const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_HfstTransducerPair" "', argument " "1"" of type '" "std::pair< hfst::HfstTransducer,hfst::HfstTransducer > const &""'"); - } - arg1 = ptr; - } - result = (std::pair< hfst::HfstTransducer,hfst::HfstTransducer > *)new std::pair< hfst::HfstTransducer,hfst::HfstTransducer >((std::pair< hfst::HfstTransducer,hfst::HfstTransducer > const &)*arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__pairT_hfst__HfstTransducer_hfst__HfstTransducer_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_new_HfstTransducerPair(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[3] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "new_HfstTransducerPair", 0, 2, argv))) SWIG_fail; - --argc; - if (argc == 0) { - return _wrap_new_HfstTransducerPair__SWIG_0(self, argc, argv); - } - if (argc == 1) { - int _v; - int res = swig::asptr(argv[0], (std::pair< hfst::HfstTransducer,hfst::HfstTransducer >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_new_HfstTransducerPair__SWIG_2(self, argc, argv); - } - } - if (argc == 2) { - int _v; - int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_hfst__HfstTransducer, SWIG_POINTER_NO_NULL | 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_hfst__HfstTransducer, SWIG_POINTER_NO_NULL | 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_new_HfstTransducerPair__SWIG_1(self, argc, argv); - } - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'new_HfstTransducerPair'.\n" - " Possible C/C++ prototypes are:\n" - " std::pair< hfst::HfstTransducer,hfst::HfstTransducer >::pair()\n" - " std::pair< hfst::HfstTransducer,hfst::HfstTransducer >::pair(hfst::HfstTransducer,hfst::HfstTransducer)\n" - " std::pair< hfst::HfstTransducer,hfst::HfstTransducer >::pair(std::pair< hfst::HfstTransducer,hfst::HfstTransducer > const &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducerPair_first_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::pair< hfst::HfstTransducer,hfst::HfstTransducer > *arg1 = (std::pair< hfst::HfstTransducer,hfst::HfstTransducer > *) 0 ; - hfst::HfstTransducer *arg2 = (hfst::HfstTransducer *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args, "HfstTransducerPair_first_set", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__pairT_hfst__HfstTransducer_hfst__HfstTransducer_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducerPair_first_set" "', argument " "1"" of type '" "std::pair< hfst::HfstTransducer,hfst::HfstTransducer > *""'"); - } - arg1 = reinterpret_cast< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_hfst__HfstTransducer, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HfstTransducerPair_first_set" "', argument " "2"" of type '" "hfst::HfstTransducer *""'"); - } - arg2 = reinterpret_cast< hfst::HfstTransducer * >(argp2); - if (arg1) (arg1)->first = *arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducerPair_first_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::pair< hfst::HfstTransducer,hfst::HfstTransducer > *arg1 = (std::pair< hfst::HfstTransducer,hfst::HfstTransducer > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - hfst::HfstTransducer *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__pairT_hfst__HfstTransducer_hfst__HfstTransducer_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducerPair_first_get" "', argument " "1"" of type '" "std::pair< hfst::HfstTransducer,hfst::HfstTransducer > *""'"); - } - arg1 = reinterpret_cast< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > * >(argp1); - result = (hfst::HfstTransducer *)& ((arg1)->first); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_hfst__HfstTransducer, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducerPair_second_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::pair< hfst::HfstTransducer,hfst::HfstTransducer > *arg1 = (std::pair< hfst::HfstTransducer,hfst::HfstTransducer > *) 0 ; - hfst::HfstTransducer *arg2 = (hfst::HfstTransducer *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args, "HfstTransducerPair_second_set", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__pairT_hfst__HfstTransducer_hfst__HfstTransducer_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducerPair_second_set" "', argument " "1"" of type '" "std::pair< hfst::HfstTransducer,hfst::HfstTransducer > *""'"); - } - arg1 = reinterpret_cast< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_hfst__HfstTransducer, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HfstTransducerPair_second_set" "', argument " "2"" of type '" "hfst::HfstTransducer *""'"); - } - arg2 = reinterpret_cast< hfst::HfstTransducer * >(argp2); - if (arg1) (arg1)->second = *arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducerPair_second_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::pair< hfst::HfstTransducer,hfst::HfstTransducer > *arg1 = (std::pair< hfst::HfstTransducer,hfst::HfstTransducer > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - hfst::HfstTransducer *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__pairT_hfst__HfstTransducer_hfst__HfstTransducer_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducerPair_second_get" "', argument " "1"" of type '" "std::pair< hfst::HfstTransducer,hfst::HfstTransducer > *""'"); - } - arg1 = reinterpret_cast< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > * >(argp1); - result = (hfst::HfstTransducer *)& ((arg1)->second); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_hfst__HfstTransducer, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_HfstTransducerPair(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::pair< hfst::HfstTransducer,hfst::HfstTransducer > *arg1 = (std::pair< hfst::HfstTransducer,hfst::HfstTransducer > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__pairT_hfst__HfstTransducer_hfst__HfstTransducer_t, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_HfstTransducerPair" "', argument " "1"" of type '" "std::pair< hfst::HfstTransducer,hfst::HfstTransducer > *""'"); - } - arg1 = reinterpret_cast< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > * >(argp1); - delete arg1; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *HfstTransducerPair_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_std__pairT_hfst__HfstTransducer_hfst__HfstTransducer_t, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *HfstTransducerPair_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_HfstTransducerPairVector_iterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > *arg1 = (std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > *) 0 ; - PyObject **arg2 = (PyObject **) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - swig::SwigPyIterator *result = 0 ; - - arg2 = &swig_obj[0]; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__pairT_hfst__HfstTransducer_hfst__HfstTransducer_t_std__allocatorT_std__pairT_hfst__HfstTransducer_hfst__HfstTransducer_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducerPairVector_iterator" "', argument " "1"" of type '" "std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > *""'"); - } - arg1 = reinterpret_cast< std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > * >(argp1); - result = (swig::SwigPyIterator *)std_vector_Sl_std_pair_Sl_hfst_HfstTransducer_Sc_hfst_HfstTransducer_Sg__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_HfstTransducerPairVector___nonzero__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > *arg1 = (std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - bool result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__pairT_hfst__HfstTransducer_hfst__HfstTransducer_t_std__allocatorT_std__pairT_hfst__HfstTransducer_hfst__HfstTransducer_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducerPairVector___nonzero__" "', argument " "1"" of type '" "std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > const *""'"); - } - arg1 = reinterpret_cast< std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > * >(argp1); - result = (bool)std_vector_Sl_std_pair_Sl_hfst_HfstTransducer_Sc_hfst_HfstTransducer_Sg__Sg____nonzero__((std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > const *)arg1); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducerPairVector___bool__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > *arg1 = (std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - bool result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__pairT_hfst__HfstTransducer_hfst__HfstTransducer_t_std__allocatorT_std__pairT_hfst__HfstTransducer_hfst__HfstTransducer_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducerPairVector___bool__" "', argument " "1"" of type '" "std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > const *""'"); - } - arg1 = reinterpret_cast< std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > * >(argp1); - result = (bool)std_vector_Sl_std_pair_Sl_hfst_HfstTransducer_Sc_hfst_HfstTransducer_Sg__Sg____bool__((std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > const *)arg1); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducerPairVector___len__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > *arg1 = (std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::size_type result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__pairT_hfst__HfstTransducer_hfst__HfstTransducer_t_std__allocatorT_std__pairT_hfst__HfstTransducer_hfst__HfstTransducer_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducerPairVector___len__" "', argument " "1"" of type '" "std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > const *""'"); - } - arg1 = reinterpret_cast< std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > * >(argp1); - result = std_vector_Sl_std_pair_Sl_hfst_HfstTransducer_Sc_hfst_HfstTransducer_Sg__Sg____len__((std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > const *)arg1); - resultobj = SWIG_From_size_t(static_cast< size_t >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducerPairVector___getslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > *arg1 = (std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > *) 0 ; - std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::difference_type arg2 ; - std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::difference_type arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - ptrdiff_t val2 ; - int ecode2 = 0 ; - ptrdiff_t val3 ; - int ecode3 = 0 ; - PyObject *swig_obj[3] ; - std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer >,std::allocator< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > > *result = 0 ; - - if (!SWIG_Python_UnpackTuple(args, "HfstTransducerPairVector___getslice__", 3, 3, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__pairT_hfst__HfstTransducer_hfst__HfstTransducer_t_std__allocatorT_std__pairT_hfst__HfstTransducer_hfst__HfstTransducer_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducerPairVector___getslice__" "', argument " "1"" of type '" "std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > *""'"); - } - arg1 = reinterpret_cast< std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > * >(argp1); - ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HfstTransducerPairVector___getslice__" "', argument " "2"" of type '" "std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::difference_type""'"); - } - arg2 = static_cast< std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::difference_type >(val2); - ecode3 = SWIG_AsVal_ptrdiff_t(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "HfstTransducerPairVector___getslice__" "', argument " "3"" of type '" "std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::difference_type""'"); - } - arg3 = static_cast< std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::difference_type >(val3); - try { - result = (std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer >,std::allocator< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > > *)std_vector_Sl_std_pair_Sl_hfst_HfstTransducer_Sc_hfst_HfstTransducer_Sg__Sg____getslice__(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_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_std__pairT_hfst__HfstTransducer_hfst__HfstTransducer_t_std__allocatorT_std__pairT_hfst__HfstTransducer_hfst__HfstTransducer_t_t_t, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducerPairVector___setslice____SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > *arg1 = (std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > *) 0 ; - std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::difference_type arg2 ; - std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::difference_type arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - ptrdiff_t val2 ; - int ecode2 = 0 ; - ptrdiff_t val3 ; - int ecode3 = 0 ; - - if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__pairT_hfst__HfstTransducer_hfst__HfstTransducer_t_std__allocatorT_std__pairT_hfst__HfstTransducer_hfst__HfstTransducer_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducerPairVector___setslice__" "', argument " "1"" of type '" "std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > *""'"); - } - arg1 = reinterpret_cast< std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > * >(argp1); - ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HfstTransducerPairVector___setslice__" "', argument " "2"" of type '" "std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::difference_type""'"); - } - arg2 = static_cast< std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::difference_type >(val2); - ecode3 = SWIG_AsVal_ptrdiff_t(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "HfstTransducerPairVector___setslice__" "', argument " "3"" of type '" "std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::difference_type""'"); - } - arg3 = static_cast< std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::difference_type >(val3); - try { - std_vector_Sl_std_pair_Sl_hfst_HfstTransducer_Sc_hfst_HfstTransducer_Sg__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_HfstTransducerPairVector___setslice____SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > *arg1 = (std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > *) 0 ; - std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::difference_type arg2 ; - std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::difference_type arg3 ; - std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer >,std::allocator< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > > *arg4 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - ptrdiff_t val2 ; - int ecode2 = 0 ; - ptrdiff_t val3 ; - int ecode3 = 0 ; - int res4 = SWIG_OLDOBJ ; - - if ((nobjs < 4) || (nobjs > 4)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__pairT_hfst__HfstTransducer_hfst__HfstTransducer_t_std__allocatorT_std__pairT_hfst__HfstTransducer_hfst__HfstTransducer_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducerPairVector___setslice__" "', argument " "1"" of type '" "std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > *""'"); - } - arg1 = reinterpret_cast< std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > * >(argp1); - ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HfstTransducerPairVector___setslice__" "', argument " "2"" of type '" "std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::difference_type""'"); - } - arg2 = static_cast< std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::difference_type >(val2); - ecode3 = SWIG_AsVal_ptrdiff_t(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "HfstTransducerPairVector___setslice__" "', argument " "3"" of type '" "std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::difference_type""'"); - } - arg3 = static_cast< std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::difference_type >(val3); - { - std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer >,std::allocator< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > > *ptr = (std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer >,std::allocator< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > > *)0; - res4 = swig::asptr(swig_obj[3], &ptr); - if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "HfstTransducerPairVector___setslice__" "', argument " "4"" of type '" "std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer >,std::allocator< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > > const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstTransducerPairVector___setslice__" "', argument " "4"" of type '" "std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer >,std::allocator< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > > const &""'"); - } - arg4 = ptr; - } - try { - std_vector_Sl_std_pair_Sl_hfst_HfstTransducer_Sc_hfst_HfstTransducer_Sg__Sg____setslice____SWIG_1(arg1,arg2,arg3,(std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer >,std::allocator< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > > 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_HfstTransducerPairVector___setslice__(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[5] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "HfstTransducerPairVector___setslice__", 0, 4, argv))) SWIG_fail; - --argc; - if (argc == 3) { - int _v; - int res = swig::asptr(argv[0], (std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer >,std::allocator< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > >**)(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_HfstTransducerPairVector___setslice____SWIG_0(self, argc, argv); - } - } - } - } - if (argc == 4) { - int _v; - int res = swig::asptr(argv[0], (std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer >,std::allocator< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > >**)(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< std::pair< hfst::HfstTransducer,hfst::HfstTransducer >,std::allocator< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_HfstTransducerPairVector___setslice____SWIG_1(self, argc, argv); - } - } - } - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'HfstTransducerPairVector___setslice__'.\n" - " Possible C/C++ prototypes are:\n" - " std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::__setslice__(std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::difference_type,std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::difference_type)\n" - " std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::__setslice__(std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::difference_type,std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::difference_type,std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer >,std::allocator< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > > const &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducerPairVector___delslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > *arg1 = (std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > *) 0 ; - std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::difference_type arg2 ; - std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::difference_type arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - ptrdiff_t val2 ; - int ecode2 = 0 ; - ptrdiff_t val3 ; - int ecode3 = 0 ; - PyObject *swig_obj[3] ; - - if (!SWIG_Python_UnpackTuple(args, "HfstTransducerPairVector___delslice__", 3, 3, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__pairT_hfst__HfstTransducer_hfst__HfstTransducer_t_std__allocatorT_std__pairT_hfst__HfstTransducer_hfst__HfstTransducer_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducerPairVector___delslice__" "', argument " "1"" of type '" "std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > *""'"); - } - arg1 = reinterpret_cast< std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > * >(argp1); - ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HfstTransducerPairVector___delslice__" "', argument " "2"" of type '" "std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::difference_type""'"); - } - arg2 = static_cast< std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::difference_type >(val2); - ecode3 = SWIG_AsVal_ptrdiff_t(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "HfstTransducerPairVector___delslice__" "', argument " "3"" of type '" "std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::difference_type""'"); - } - arg3 = static_cast< std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::difference_type >(val3); - try { - std_vector_Sl_std_pair_Sl_hfst_HfstTransducer_Sc_hfst_HfstTransducer_Sg__Sg____delslice__(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_HfstTransducerPairVector___delitem____SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > *arg1 = (std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > *) 0 ; - std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::difference_type arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - ptrdiff_t val2 ; - int ecode2 = 0 ; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__pairT_hfst__HfstTransducer_hfst__HfstTransducer_t_std__allocatorT_std__pairT_hfst__HfstTransducer_hfst__HfstTransducer_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducerPairVector___delitem__" "', argument " "1"" of type '" "std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > *""'"); - } - arg1 = reinterpret_cast< std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > * >(argp1); - ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HfstTransducerPairVector___delitem__" "', argument " "2"" of type '" "std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::difference_type""'"); - } - arg2 = static_cast< std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::difference_type >(val2); - try { - std_vector_Sl_std_pair_Sl_hfst_HfstTransducer_Sc_hfst_HfstTransducer_Sg__Sg____delitem____SWIG_0(arg1,arg2); - } 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_HfstTransducerPairVector___getitem____SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > *arg1 = (std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > *) 0 ; - PySliceObject *arg2 = (PySliceObject *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer >,std::allocator< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > > *result = 0 ; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__pairT_hfst__HfstTransducer_hfst__HfstTransducer_t_std__allocatorT_std__pairT_hfst__HfstTransducer_hfst__HfstTransducer_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducerPairVector___getitem__" "', argument " "1"" of type '" "std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > *""'"); - } - arg1 = reinterpret_cast< std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > * >(argp1); - { - if (!PySlice_Check(swig_obj[1])) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "HfstTransducerPairVector___getitem__" "', argument " "2"" of type '" "PySliceObject *""'"); - } - arg2 = (PySliceObject *) swig_obj[1]; - } - try { - result = (std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer >,std::allocator< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > > *)std_vector_Sl_std_pair_Sl_hfst_HfstTransducer_Sc_hfst_HfstTransducer_Sg__Sg____getitem____SWIG_0(arg1,arg2); - } 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_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_std__pairT_hfst__HfstTransducer_hfst__HfstTransducer_t_std__allocatorT_std__pairT_hfst__HfstTransducer_hfst__HfstTransducer_t_t_t, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducerPairVector___setitem____SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > *arg1 = (std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > *) 0 ; - PySliceObject *arg2 = (PySliceObject *) 0 ; - std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer >,std::allocator< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > > *arg3 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res3 = SWIG_OLDOBJ ; - - if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__pairT_hfst__HfstTransducer_hfst__HfstTransducer_t_std__allocatorT_std__pairT_hfst__HfstTransducer_hfst__HfstTransducer_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducerPairVector___setitem__" "', argument " "1"" of type '" "std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > *""'"); - } - arg1 = reinterpret_cast< std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > * >(argp1); - { - if (!PySlice_Check(swig_obj[1])) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "HfstTransducerPairVector___setitem__" "', argument " "2"" of type '" "PySliceObject *""'"); - } - arg2 = (PySliceObject *) swig_obj[1]; - } - { - std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer >,std::allocator< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > > *ptr = (std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer >,std::allocator< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > > *)0; - res3 = swig::asptr(swig_obj[2], &ptr); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "HfstTransducerPairVector___setitem__" "', argument " "3"" of type '" "std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer >,std::allocator< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > > const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstTransducerPairVector___setitem__" "', argument " "3"" of type '" "std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer >,std::allocator< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > > const &""'"); - } - arg3 = ptr; - } - try { - std_vector_Sl_std_pair_Sl_hfst_HfstTransducer_Sc_hfst_HfstTransducer_Sg__Sg____setitem____SWIG_0(arg1,arg2,(std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer >,std::allocator< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > > 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_HfstTransducerPairVector___setitem____SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > *arg1 = (std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > *) 0 ; - PySliceObject *arg2 = (PySliceObject *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__pairT_hfst__HfstTransducer_hfst__HfstTransducer_t_std__allocatorT_std__pairT_hfst__HfstTransducer_hfst__HfstTransducer_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducerPairVector___setitem__" "', argument " "1"" of type '" "std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > *""'"); - } - arg1 = reinterpret_cast< std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > * >(argp1); - { - if (!PySlice_Check(swig_obj[1])) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "HfstTransducerPairVector___setitem__" "', argument " "2"" of type '" "PySliceObject *""'"); - } - arg2 = (PySliceObject *) swig_obj[1]; - } - try { - std_vector_Sl_std_pair_Sl_hfst_HfstTransducer_Sc_hfst_HfstTransducer_Sg__Sg____setitem____SWIG_1(arg1,arg2); - } 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_HfstTransducerPairVector___delitem____SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > *arg1 = (std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > *) 0 ; - PySliceObject *arg2 = (PySliceObject *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__pairT_hfst__HfstTransducer_hfst__HfstTransducer_t_std__allocatorT_std__pairT_hfst__HfstTransducer_hfst__HfstTransducer_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducerPairVector___delitem__" "', argument " "1"" of type '" "std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > *""'"); - } - arg1 = reinterpret_cast< std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > * >(argp1); - { - if (!PySlice_Check(swig_obj[1])) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "HfstTransducerPairVector___delitem__" "', argument " "2"" of type '" "PySliceObject *""'"); - } - arg2 = (PySliceObject *) swig_obj[1]; - } - try { - std_vector_Sl_std_pair_Sl_hfst_HfstTransducer_Sc_hfst_HfstTransducer_Sg__Sg____delitem____SWIG_1(arg1,arg2); - } 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_HfstTransducerPairVector___delitem__(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[3] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "HfstTransducerPairVector___delitem__", 0, 2, argv))) SWIG_fail; - --argc; - if (argc == 2) { - int _v; - int res = swig::asptr(argv[0], (std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer >,std::allocator< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - { - _v = PySlice_Check(argv[1]); - } - if (_v) { - return _wrap_HfstTransducerPairVector___delitem____SWIG_1(self, argc, argv); - } - } - } - if (argc == 2) { - int _v; - int res = swig::asptr(argv[0], (std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer >,std::allocator< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_HfstTransducerPairVector___delitem____SWIG_0(self, argc, argv); - } - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'HfstTransducerPairVector___delitem__'.\n" - " Possible C/C++ prototypes are:\n" - " std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::__delitem__(std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::difference_type)\n" - " std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::__delitem__(PySliceObject *)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducerPairVector___getitem____SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > *arg1 = (std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > *) 0 ; - std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::difference_type arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - ptrdiff_t val2 ; - int ecode2 = 0 ; - std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::value_type *result = 0 ; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__pairT_hfst__HfstTransducer_hfst__HfstTransducer_t_std__allocatorT_std__pairT_hfst__HfstTransducer_hfst__HfstTransducer_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducerPairVector___getitem__" "', argument " "1"" of type '" "std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > const *""'"); - } - arg1 = reinterpret_cast< std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > * >(argp1); - ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HfstTransducerPairVector___getitem__" "', argument " "2"" of type '" "std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::difference_type""'"); - } - arg2 = static_cast< std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::difference_type >(val2); - try { - result = (std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::value_type *) &std_vector_Sl_std_pair_Sl_hfst_HfstTransducer_Sc_hfst_HfstTransducer_Sg__Sg____getitem____SWIG_1((std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > const *)arg1,arg2); - } catch(std::out_of_range &_e) { - SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); - } - resultobj = swig::from(static_cast< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >(*result)); - (void)swig::container_owner >::value_type>::category>::back_reference(resultobj, swig_obj[0]); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducerPairVector___getitem__(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[3] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "HfstTransducerPairVector___getitem__", 0, 2, argv))) SWIG_fail; - --argc; - if (argc == 2) { - int _v; - int res = swig::asptr(argv[0], (std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer >,std::allocator< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - { - _v = PySlice_Check(argv[1]); - } - if (_v) { - return _wrap_HfstTransducerPairVector___getitem____SWIG_0(self, argc, argv); - } - } - } - if (argc == 2) { - int _v; - int res = swig::asptr(argv[0], (std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer >,std::allocator< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_HfstTransducerPairVector___getitem____SWIG_1(self, argc, argv); - } - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'HfstTransducerPairVector___getitem__'.\n" - " Possible C/C++ prototypes are:\n" - " std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::__getitem__(PySliceObject *)\n" - " std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::__getitem__(std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::difference_type) const\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducerPairVector___setitem____SWIG_2(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > *arg1 = (std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > *) 0 ; - std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::difference_type arg2 ; - std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::value_type *arg3 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - ptrdiff_t val2 ; - int ecode2 = 0 ; - int res3 = SWIG_OLDOBJ ; - - if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__pairT_hfst__HfstTransducer_hfst__HfstTransducer_t_std__allocatorT_std__pairT_hfst__HfstTransducer_hfst__HfstTransducer_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducerPairVector___setitem__" "', argument " "1"" of type '" "std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > *""'"); - } - arg1 = reinterpret_cast< std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > * >(argp1); - ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HfstTransducerPairVector___setitem__" "', argument " "2"" of type '" "std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::difference_type""'"); - } - arg2 = static_cast< std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::difference_type >(val2); - { - std::pair< hfst::HfstTransducer,hfst::HfstTransducer > *ptr = (std::pair< hfst::HfstTransducer,hfst::HfstTransducer > *)0; - res3 = swig::asptr(swig_obj[2], &ptr); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "HfstTransducerPairVector___setitem__" "', argument " "3"" of type '" "std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::value_type const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstTransducerPairVector___setitem__" "', argument " "3"" of type '" "std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::value_type const &""'"); - } - arg3 = ptr; - } - try { - std_vector_Sl_std_pair_Sl_hfst_HfstTransducer_Sc_hfst_HfstTransducer_Sg__Sg____setitem____SWIG_2(arg1,arg2,(std::pair< hfst::HfstTransducer,hfst::HfstTransducer > const &)*arg3); - } catch(std::out_of_range &_e) { - SWIG_exception_fail(SWIG_IndexError, (&_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_HfstTransducerPairVector___setitem__(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[4] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "HfstTransducerPairVector___setitem__", 0, 3, argv))) SWIG_fail; - --argc; - if (argc == 2) { - int _v; - int res = swig::asptr(argv[0], (std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer >,std::allocator< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - { - _v = PySlice_Check(argv[1]); - } - if (_v) { - return _wrap_HfstTransducerPairVector___setitem____SWIG_1(self, argc, argv); - } - } - } - if (argc == 3) { - int _v; - int res = swig::asptr(argv[0], (std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer >,std::allocator< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - { - _v = PySlice_Check(argv[1]); - } - if (_v) { - int res = swig::asptr(argv[2], (std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer >,std::allocator< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_HfstTransducerPairVector___setitem____SWIG_0(self, argc, argv); - } - } - } - } - if (argc == 3) { - int _v; - int res = swig::asptr(argv[0], (std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer >,std::allocator< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > >**)(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::asptr(argv[2], (std::pair< hfst::HfstTransducer,hfst::HfstTransducer >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_HfstTransducerPairVector___setitem____SWIG_2(self, argc, argv); - } - } - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'HfstTransducerPairVector___setitem__'.\n" - " Possible C/C++ prototypes are:\n" - " std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::__setitem__(PySliceObject *,std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer >,std::allocator< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > > const &)\n" - " std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::__setitem__(PySliceObject *)\n" - " std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::__setitem__(std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::difference_type,std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::value_type const &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducerPairVector_pop(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > *arg1 = (std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::value_type result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__pairT_hfst__HfstTransducer_hfst__HfstTransducer_t_std__allocatorT_std__pairT_hfst__HfstTransducer_hfst__HfstTransducer_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducerPairVector_pop" "', argument " "1"" of type '" "std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > *""'"); - } - arg1 = reinterpret_cast< std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > * >(argp1); - try { - result = std_vector_Sl_std_pair_Sl_hfst_HfstTransducer_Sc_hfst_HfstTransducer_Sg__Sg__pop(arg1); - } catch(std::out_of_range &_e) { - SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); - } - resultobj = swig::from(static_cast< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducerPairVector_append(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > *arg1 = (std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > *) 0 ; - std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::value_type *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 = SWIG_OLDOBJ ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args, "HfstTransducerPairVector_append", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__pairT_hfst__HfstTransducer_hfst__HfstTransducer_t_std__allocatorT_std__pairT_hfst__HfstTransducer_hfst__HfstTransducer_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducerPairVector_append" "', argument " "1"" of type '" "std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > *""'"); - } - arg1 = reinterpret_cast< std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > * >(argp1); - { - std::pair< hfst::HfstTransducer,hfst::HfstTransducer > *ptr = (std::pair< hfst::HfstTransducer,hfst::HfstTransducer > *)0; - res2 = swig::asptr(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HfstTransducerPairVector_append" "', argument " "2"" of type '" "std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::value_type const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstTransducerPairVector_append" "', argument " "2"" of type '" "std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::value_type const &""'"); - } - arg2 = ptr; - } - std_vector_Sl_std_pair_Sl_hfst_HfstTransducer_Sc_hfst_HfstTransducer_Sg__Sg__append(arg1,(std::pair< hfst::HfstTransducer,hfst::HfstTransducer > const &)*arg2); - resultobj = SWIG_Py_Void(); - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_HfstTransducerPairVector__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **SWIGUNUSEDPARM(swig_obj)) { - PyObject *resultobj = 0; - std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > *result = 0 ; - - if ((nobjs < 0) || (nobjs > 0)) SWIG_fail; - result = (std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > *)new std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_std__pairT_hfst__HfstTransducer_hfst__HfstTransducer_t_std__allocatorT_std__pairT_hfst__HfstTransducer_hfst__HfstTransducer_t_t_t, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_HfstTransducerPairVector__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > *arg1 = 0 ; - int res1 = SWIG_OLDOBJ ; - std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > *result = 0 ; - - if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; - { - std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer >,std::allocator< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > > *ptr = (std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer >,std::allocator< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > > *)0; - res1 = swig::asptr(swig_obj[0], &ptr); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_HfstTransducerPairVector" "', argument " "1"" of type '" "std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_HfstTransducerPairVector" "', argument " "1"" of type '" "std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > const &""'"); - } - arg1 = ptr; - } - result = (std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > *)new std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >((std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > const &)*arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_std__pairT_hfst__HfstTransducer_hfst__HfstTransducer_t_std__allocatorT_std__pairT_hfst__HfstTransducer_hfst__HfstTransducer_t_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_HfstTransducerPairVector_empty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > *arg1 = (std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - bool result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__pairT_hfst__HfstTransducer_hfst__HfstTransducer_t_std__allocatorT_std__pairT_hfst__HfstTransducer_hfst__HfstTransducer_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducerPairVector_empty" "', argument " "1"" of type '" "std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > const *""'"); - } - arg1 = reinterpret_cast< std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > * >(argp1); - result = (bool)((std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > const *)arg1)->empty(); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducerPairVector_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > *arg1 = (std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::size_type result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__pairT_hfst__HfstTransducer_hfst__HfstTransducer_t_std__allocatorT_std__pairT_hfst__HfstTransducer_hfst__HfstTransducer_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducerPairVector_size" "', argument " "1"" of type '" "std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > const *""'"); - } - arg1 = reinterpret_cast< std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > * >(argp1); - result = ((std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > const *)arg1)->size(); - resultobj = SWIG_From_size_t(static_cast< size_t >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducerPairVector_swap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > *arg1 = (std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > *) 0 ; - std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args, "HfstTransducerPairVector_swap", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__pairT_hfst__HfstTransducer_hfst__HfstTransducer_t_std__allocatorT_std__pairT_hfst__HfstTransducer_hfst__HfstTransducer_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducerPairVector_swap" "', argument " "1"" of type '" "std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > *""'"); - } - arg1 = reinterpret_cast< std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_std__vectorT_std__pairT_hfst__HfstTransducer_hfst__HfstTransducer_t_std__allocatorT_std__pairT_hfst__HfstTransducer_hfst__HfstTransducer_t_t_t, 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HfstTransducerPairVector_swap" "', argument " "2"" of type '" "std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstTransducerPairVector_swap" "', argument " "2"" of type '" "std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > &""'"); - } - arg2 = reinterpret_cast< std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > * >(argp2); - (arg1)->swap(*arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducerPairVector_begin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > *arg1 = (std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::iterator result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__pairT_hfst__HfstTransducer_hfst__HfstTransducer_t_std__allocatorT_std__pairT_hfst__HfstTransducer_hfst__HfstTransducer_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducerPairVector_begin" "', argument " "1"" of type '" "std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > *""'"); - } - arg1 = reinterpret_cast< std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > * >(argp1); - result = (arg1)->begin(); - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::iterator & >(result)), - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducerPairVector_end(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > *arg1 = (std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::iterator result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__pairT_hfst__HfstTransducer_hfst__HfstTransducer_t_std__allocatorT_std__pairT_hfst__HfstTransducer_hfst__HfstTransducer_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducerPairVector_end" "', argument " "1"" of type '" "std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > *""'"); - } - arg1 = reinterpret_cast< std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > * >(argp1); - result = (arg1)->end(); - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::iterator & >(result)), - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducerPairVector_rbegin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > *arg1 = (std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::reverse_iterator result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__pairT_hfst__HfstTransducer_hfst__HfstTransducer_t_std__allocatorT_std__pairT_hfst__HfstTransducer_hfst__HfstTransducer_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducerPairVector_rbegin" "', argument " "1"" of type '" "std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > *""'"); - } - arg1 = reinterpret_cast< std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > * >(argp1); - result = (arg1)->rbegin(); - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::reverse_iterator & >(result)), - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducerPairVector_rend(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > *arg1 = (std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::reverse_iterator result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__pairT_hfst__HfstTransducer_hfst__HfstTransducer_t_std__allocatorT_std__pairT_hfst__HfstTransducer_hfst__HfstTransducer_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducerPairVector_rend" "', argument " "1"" of type '" "std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > *""'"); - } - arg1 = reinterpret_cast< std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > * >(argp1); - result = (arg1)->rend(); - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::reverse_iterator & >(result)), - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducerPairVector_clear(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > *arg1 = (std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__pairT_hfst__HfstTransducer_hfst__HfstTransducer_t_std__allocatorT_std__pairT_hfst__HfstTransducer_hfst__HfstTransducer_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducerPairVector_clear" "', argument " "1"" of type '" "std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > *""'"); - } - arg1 = reinterpret_cast< std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > * >(argp1); - (arg1)->clear(); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducerPairVector_get_allocator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > *arg1 = (std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - SwigValueWrapper< std::allocator< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > > result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__pairT_hfst__HfstTransducer_hfst__HfstTransducer_t_std__allocatorT_std__pairT_hfst__HfstTransducer_hfst__HfstTransducer_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducerPairVector_get_allocator" "', argument " "1"" of type '" "std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > const *""'"); - } - arg1 = reinterpret_cast< std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > * >(argp1); - result = ((std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > const *)arg1)->get_allocator(); - resultobj = SWIG_NewPointerObj((new std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::allocator_type(static_cast< const std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::allocator_type& >(result))), SWIGTYPE_p_std__allocatorT_std__pairT_hfst__HfstTransducer_hfst__HfstTransducer_t_t, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_HfstTransducerPairVector__SWIG_2(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::size_type arg1 ; - size_t val1 ; - int ecode1 = 0 ; - std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > *result = 0 ; - - if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; - ecode1 = SWIG_AsVal_size_t(swig_obj[0], &val1); - if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_HfstTransducerPairVector" "', argument " "1"" of type '" "std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::size_type""'"); - } - arg1 = static_cast< std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::size_type >(val1); - result = (std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > *)new std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >(arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_std__pairT_hfst__HfstTransducer_hfst__HfstTransducer_t_std__allocatorT_std__pairT_hfst__HfstTransducer_hfst__HfstTransducer_t_t_t, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducerPairVector_pop_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > *arg1 = (std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__pairT_hfst__HfstTransducer_hfst__HfstTransducer_t_std__allocatorT_std__pairT_hfst__HfstTransducer_hfst__HfstTransducer_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducerPairVector_pop_back" "', argument " "1"" of type '" "std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > *""'"); - } - arg1 = reinterpret_cast< std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > * >(argp1); - (arg1)->pop_back(); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducerPairVector_resize__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > *arg1 = (std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > *) 0 ; - std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::size_type arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - size_t val2 ; - int ecode2 = 0 ; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__pairT_hfst__HfstTransducer_hfst__HfstTransducer_t_std__allocatorT_std__pairT_hfst__HfstTransducer_hfst__HfstTransducer_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducerPairVector_resize" "', argument " "1"" of type '" "std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > *""'"); - } - arg1 = reinterpret_cast< std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > * >(argp1); - ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HfstTransducerPairVector_resize" "', argument " "2"" of type '" "std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::size_type""'"); - } - arg2 = static_cast< std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::size_type >(val2); - (arg1)->resize(arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducerPairVector_erase__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > *arg1 = (std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > *) 0 ; - std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::iterator arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - swig::SwigPyIterator *iter2 = 0 ; - int res2 ; - std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::iterator result; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__pairT_hfst__HfstTransducer_hfst__HfstTransducer_t_std__allocatorT_std__pairT_hfst__HfstTransducer_hfst__HfstTransducer_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducerPairVector_erase" "', argument " "1"" of type '" "std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > *""'"); - } - arg1 = reinterpret_cast< std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0); - if (!SWIG_IsOK(res2) || !iter2) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "HfstTransducerPairVector_erase" "', argument " "2"" of type '" "std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::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 '" "HfstTransducerPairVector_erase" "', argument " "2"" of type '" "std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::iterator""'"); - } - } - result = std_vector_Sl_std_pair_Sl_hfst_HfstTransducer_Sc_hfst_HfstTransducer_Sg__Sg__erase__SWIG_0(arg1,arg2); - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::iterator & >(result)), - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducerPairVector_erase__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > *arg1 = (std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > *) 0 ; - std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::iterator arg2 ; - std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::iterator arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - swig::SwigPyIterator *iter2 = 0 ; - int res2 ; - swig::SwigPyIterator *iter3 = 0 ; - int res3 ; - std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::iterator result; - - if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__pairT_hfst__HfstTransducer_hfst__HfstTransducer_t_std__allocatorT_std__pairT_hfst__HfstTransducer_hfst__HfstTransducer_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducerPairVector_erase" "', argument " "1"" of type '" "std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > *""'"); - } - arg1 = reinterpret_cast< std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0); - if (!SWIG_IsOK(res2) || !iter2) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "HfstTransducerPairVector_erase" "', argument " "2"" of type '" "std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::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 '" "HfstTransducerPairVector_erase" "', argument " "2"" of type '" "std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::iterator""'"); - } - } - res3 = SWIG_ConvertPtr(swig_obj[2], SWIG_as_voidptrptr(&iter3), swig::SwigPyIterator::descriptor(), 0); - if (!SWIG_IsOK(res3) || !iter3) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "HfstTransducerPairVector_erase" "', argument " "3"" of type '" "std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::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 '" "HfstTransducerPairVector_erase" "', argument " "3"" of type '" "std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::iterator""'"); - } - } - result = std_vector_Sl_std_pair_Sl_hfst_HfstTransducer_Sc_hfst_HfstTransducer_Sg__Sg__erase__SWIG_1(arg1,arg2,arg3); - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::iterator & >(result)), - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducerPairVector_erase(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[4] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "HfstTransducerPairVector_erase", 0, 3, argv))) SWIG_fail; - --argc; - if (argc == 2) { - int _v; - int res = swig::asptr(argv[0], (std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer >,std::allocator< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > >**)(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_HfstTransducerPairVector_erase__SWIG_0(self, argc, argv); - } - } - } - if (argc == 3) { - int _v; - int res = swig::asptr(argv[0], (std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer >,std::allocator< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > >**)(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_HfstTransducerPairVector_erase__SWIG_1(self, argc, argv); - } - } - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'HfstTransducerPairVector_erase'.\n" - " Possible C/C++ prototypes are:\n" - " std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::erase(std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::iterator)\n" - " std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::erase(std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::iterator,std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::iterator)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_new_HfstTransducerPairVector__SWIG_3(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::size_type arg1 ; - std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::value_type *arg2 = 0 ; - size_t val1 ; - int ecode1 = 0 ; - int res2 = SWIG_OLDOBJ ; - std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > *result = 0 ; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - ecode1 = SWIG_AsVal_size_t(swig_obj[0], &val1); - if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_HfstTransducerPairVector" "', argument " "1"" of type '" "std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::size_type""'"); - } - arg1 = static_cast< std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::size_type >(val1); - { - std::pair< hfst::HfstTransducer,hfst::HfstTransducer > *ptr = (std::pair< hfst::HfstTransducer,hfst::HfstTransducer > *)0; - res2 = swig::asptr(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_HfstTransducerPairVector" "', argument " "2"" of type '" "std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::value_type const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_HfstTransducerPairVector" "', argument " "2"" of type '" "std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::value_type const &""'"); - } - arg2 = ptr; - } - result = (std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > *)new std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >(arg1,(std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::value_type const &)*arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_std__pairT_hfst__HfstTransducer_hfst__HfstTransducer_t_std__allocatorT_std__pairT_hfst__HfstTransducer_hfst__HfstTransducer_t_t_t, SWIG_POINTER_NEW | 0 ); - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_HfstTransducerPairVector(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[3] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "new_HfstTransducerPairVector", 0, 2, argv))) SWIG_fail; - --argc; - if (argc == 0) { - return _wrap_new_HfstTransducerPairVector__SWIG_0(self, argc, argv); - } - if (argc == 1) { - int _v; - { - int res = SWIG_AsVal_size_t(argv[0], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_new_HfstTransducerPairVector__SWIG_2(self, argc, argv); - } - } - if (argc == 1) { - int _v; - int res = swig::asptr(argv[0], (std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer >,std::allocator< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_new_HfstTransducerPairVector__SWIG_1(self, argc, argv); - } - } - if (argc == 2) { - int _v; - { - int res = SWIG_AsVal_size_t(argv[0], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - int res = swig::asptr(argv[1], (std::pair< hfst::HfstTransducer,hfst::HfstTransducer >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_new_HfstTransducerPairVector__SWIG_3(self, argc, argv); - } - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'new_HfstTransducerPairVector'.\n" - " Possible C/C++ prototypes are:\n" - " std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::vector()\n" - " std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::vector(std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > const &)\n" - " std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::vector(std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::size_type)\n" - " std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::vector(std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::size_type,std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::value_type const &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducerPairVector_push_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > *arg1 = (std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > *) 0 ; - std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::value_type *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 = SWIG_OLDOBJ ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args, "HfstTransducerPairVector_push_back", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__pairT_hfst__HfstTransducer_hfst__HfstTransducer_t_std__allocatorT_std__pairT_hfst__HfstTransducer_hfst__HfstTransducer_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducerPairVector_push_back" "', argument " "1"" of type '" "std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > *""'"); - } - arg1 = reinterpret_cast< std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > * >(argp1); - { - std::pair< hfst::HfstTransducer,hfst::HfstTransducer > *ptr = (std::pair< hfst::HfstTransducer,hfst::HfstTransducer > *)0; - res2 = swig::asptr(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HfstTransducerPairVector_push_back" "', argument " "2"" of type '" "std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::value_type const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstTransducerPairVector_push_back" "', argument " "2"" of type '" "std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::value_type const &""'"); - } - arg2 = ptr; - } - (arg1)->push_back((std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::value_type const &)*arg2); - resultobj = SWIG_Py_Void(); - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducerPairVector_front(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > *arg1 = (std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::value_type *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__pairT_hfst__HfstTransducer_hfst__HfstTransducer_t_std__allocatorT_std__pairT_hfst__HfstTransducer_hfst__HfstTransducer_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducerPairVector_front" "', argument " "1"" of type '" "std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > const *""'"); - } - arg1 = reinterpret_cast< std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > * >(argp1); - result = (std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::value_type *) &((std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > const *)arg1)->front(); - resultobj = swig::from(static_cast< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >(*result)); - (void)swig::container_owner >::value_type>::category>::back_reference(resultobj, swig_obj[0]); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducerPairVector_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > *arg1 = (std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::value_type *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__pairT_hfst__HfstTransducer_hfst__HfstTransducer_t_std__allocatorT_std__pairT_hfst__HfstTransducer_hfst__HfstTransducer_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducerPairVector_back" "', argument " "1"" of type '" "std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > const *""'"); - } - arg1 = reinterpret_cast< std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > * >(argp1); - result = (std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::value_type *) &((std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > const *)arg1)->back(); - resultobj = swig::from(static_cast< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >(*result)); - (void)swig::container_owner >::value_type>::category>::back_reference(resultobj, swig_obj[0]); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducerPairVector_assign(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > *arg1 = (std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > *) 0 ; - std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::size_type arg2 ; - std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::value_type *arg3 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - size_t val2 ; - int ecode2 = 0 ; - int res3 = SWIG_OLDOBJ ; - PyObject *swig_obj[3] ; - - if (!SWIG_Python_UnpackTuple(args, "HfstTransducerPairVector_assign", 3, 3, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__pairT_hfst__HfstTransducer_hfst__HfstTransducer_t_std__allocatorT_std__pairT_hfst__HfstTransducer_hfst__HfstTransducer_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducerPairVector_assign" "', argument " "1"" of type '" "std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > *""'"); - } - arg1 = reinterpret_cast< std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > * >(argp1); - ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HfstTransducerPairVector_assign" "', argument " "2"" of type '" "std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::size_type""'"); - } - arg2 = static_cast< std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::size_type >(val2); - { - std::pair< hfst::HfstTransducer,hfst::HfstTransducer > *ptr = (std::pair< hfst::HfstTransducer,hfst::HfstTransducer > *)0; - res3 = swig::asptr(swig_obj[2], &ptr); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "HfstTransducerPairVector_assign" "', argument " "3"" of type '" "std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::value_type const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstTransducerPairVector_assign" "', argument " "3"" of type '" "std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::value_type const &""'"); - } - arg3 = ptr; - } - (arg1)->assign(arg2,(std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::value_type const &)*arg3); - resultobj = SWIG_Py_Void(); - if (SWIG_IsNewObj(res3)) delete arg3; - return resultobj; -fail: - if (SWIG_IsNewObj(res3)) delete arg3; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducerPairVector_resize__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > *arg1 = (std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > *) 0 ; - std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::size_type arg2 ; - std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::value_type *arg3 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - size_t val2 ; - int ecode2 = 0 ; - int res3 = SWIG_OLDOBJ ; - - if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__pairT_hfst__HfstTransducer_hfst__HfstTransducer_t_std__allocatorT_std__pairT_hfst__HfstTransducer_hfst__HfstTransducer_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducerPairVector_resize" "', argument " "1"" of type '" "std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > *""'"); - } - arg1 = reinterpret_cast< std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > * >(argp1); - ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HfstTransducerPairVector_resize" "', argument " "2"" of type '" "std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::size_type""'"); - } - arg2 = static_cast< std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::size_type >(val2); - { - std::pair< hfst::HfstTransducer,hfst::HfstTransducer > *ptr = (std::pair< hfst::HfstTransducer,hfst::HfstTransducer > *)0; - res3 = swig::asptr(swig_obj[2], &ptr); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "HfstTransducerPairVector_resize" "', argument " "3"" of type '" "std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::value_type const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstTransducerPairVector_resize" "', argument " "3"" of type '" "std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::value_type const &""'"); - } - arg3 = ptr; - } - (arg1)->resize(arg2,(std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::value_type const &)*arg3); - resultobj = SWIG_Py_Void(); - if (SWIG_IsNewObj(res3)) delete arg3; - return resultobj; -fail: - if (SWIG_IsNewObj(res3)) delete arg3; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducerPairVector_resize(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[4] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "HfstTransducerPairVector_resize", 0, 3, argv))) SWIG_fail; - --argc; - if (argc == 2) { - int _v; - int res = swig::asptr(argv[0], (std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer >,std::allocator< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_size_t(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_HfstTransducerPairVector_resize__SWIG_0(self, argc, argv); - } - } - } - if (argc == 3) { - int _v; - int res = swig::asptr(argv[0], (std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer >,std::allocator< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_size_t(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - int res = swig::asptr(argv[2], (std::pair< hfst::HfstTransducer,hfst::HfstTransducer >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_HfstTransducerPairVector_resize__SWIG_1(self, argc, argv); - } - } - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'HfstTransducerPairVector_resize'.\n" - " Possible C/C++ prototypes are:\n" - " std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::resize(std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::size_type)\n" - " std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::resize(std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::size_type,std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::value_type const &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducerPairVector_insert__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > *arg1 = (std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > *) 0 ; - std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::iterator arg2 ; - std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::value_type *arg3 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - swig::SwigPyIterator *iter2 = 0 ; - int res2 ; - int res3 = SWIG_OLDOBJ ; - std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::iterator result; - - if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__pairT_hfst__HfstTransducer_hfst__HfstTransducer_t_std__allocatorT_std__pairT_hfst__HfstTransducer_hfst__HfstTransducer_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducerPairVector_insert" "', argument " "1"" of type '" "std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > *""'"); - } - arg1 = reinterpret_cast< std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0); - if (!SWIG_IsOK(res2) || !iter2) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "HfstTransducerPairVector_insert" "', argument " "2"" of type '" "std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::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 '" "HfstTransducerPairVector_insert" "', argument " "2"" of type '" "std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::iterator""'"); - } - } - { - std::pair< hfst::HfstTransducer,hfst::HfstTransducer > *ptr = (std::pair< hfst::HfstTransducer,hfst::HfstTransducer > *)0; - res3 = swig::asptr(swig_obj[2], &ptr); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "HfstTransducerPairVector_insert" "', argument " "3"" of type '" "std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::value_type const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstTransducerPairVector_insert" "', argument " "3"" of type '" "std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::value_type const &""'"); - } - arg3 = ptr; - } - result = std_vector_Sl_std_pair_Sl_hfst_HfstTransducer_Sc_hfst_HfstTransducer_Sg__Sg__insert__SWIG_0(arg1,arg2,(std::pair< hfst::HfstTransducer,hfst::HfstTransducer > const &)*arg3); - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::iterator & >(result)), - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); - if (SWIG_IsNewObj(res3)) delete arg3; - return resultobj; -fail: - if (SWIG_IsNewObj(res3)) delete arg3; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducerPairVector_insert__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > *arg1 = (std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > *) 0 ; - std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::iterator arg2 ; - std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::size_type arg3 ; - std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::value_type *arg4 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - swig::SwigPyIterator *iter2 = 0 ; - int res2 ; - size_t val3 ; - int ecode3 = 0 ; - int res4 = SWIG_OLDOBJ ; - - if ((nobjs < 4) || (nobjs > 4)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__pairT_hfst__HfstTransducer_hfst__HfstTransducer_t_std__allocatorT_std__pairT_hfst__HfstTransducer_hfst__HfstTransducer_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducerPairVector_insert" "', argument " "1"" of type '" "std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > *""'"); - } - arg1 = reinterpret_cast< std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0); - if (!SWIG_IsOK(res2) || !iter2) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "HfstTransducerPairVector_insert" "', argument " "2"" of type '" "std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::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 '" "HfstTransducerPairVector_insert" "', argument " "2"" of type '" "std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::iterator""'"); - } - } - ecode3 = SWIG_AsVal_size_t(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "HfstTransducerPairVector_insert" "', argument " "3"" of type '" "std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::size_type""'"); - } - arg3 = static_cast< std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::size_type >(val3); - { - std::pair< hfst::HfstTransducer,hfst::HfstTransducer > *ptr = (std::pair< hfst::HfstTransducer,hfst::HfstTransducer > *)0; - res4 = swig::asptr(swig_obj[3], &ptr); - if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "HfstTransducerPairVector_insert" "', argument " "4"" of type '" "std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::value_type const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstTransducerPairVector_insert" "', argument " "4"" of type '" "std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::value_type const &""'"); - } - arg4 = ptr; - } - std_vector_Sl_std_pair_Sl_hfst_HfstTransducer_Sc_hfst_HfstTransducer_Sg__Sg__insert__SWIG_1(arg1,arg2,arg3,(std::pair< hfst::HfstTransducer,hfst::HfstTransducer > const &)*arg4); - resultobj = SWIG_Py_Void(); - if (SWIG_IsNewObj(res4)) delete arg4; - return resultobj; -fail: - if (SWIG_IsNewObj(res4)) delete arg4; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducerPairVector_insert(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[5] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "HfstTransducerPairVector_insert", 0, 4, argv))) SWIG_fail; - --argc; - if (argc == 3) { - int _v; - int res = swig::asptr(argv[0], (std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer >,std::allocator< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > >**)(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::asptr(argv[2], (std::pair< hfst::HfstTransducer,hfst::HfstTransducer >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_HfstTransducerPairVector_insert__SWIG_0(self, argc, argv); - } - } - } - } - if (argc == 4) { - int _v; - int res = swig::asptr(argv[0], (std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer >,std::allocator< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > >**)(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_size_t(argv[2], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - int res = swig::asptr(argv[3], (std::pair< hfst::HfstTransducer,hfst::HfstTransducer >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_HfstTransducerPairVector_insert__SWIG_1(self, argc, argv); - } - } - } - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'HfstTransducerPairVector_insert'.\n" - " Possible C/C++ prototypes are:\n" - " std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::insert(std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::iterator,std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::value_type const &)\n" - " std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::insert(std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::iterator,std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::size_type,std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::value_type const &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducerPairVector_reserve(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > *arg1 = (std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > *) 0 ; - std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::size_type arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - size_t val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args, "HfstTransducerPairVector_reserve", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__pairT_hfst__HfstTransducer_hfst__HfstTransducer_t_std__allocatorT_std__pairT_hfst__HfstTransducer_hfst__HfstTransducer_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducerPairVector_reserve" "', argument " "1"" of type '" "std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > *""'"); - } - arg1 = reinterpret_cast< std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > * >(argp1); - ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HfstTransducerPairVector_reserve" "', argument " "2"" of type '" "std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::size_type""'"); - } - arg2 = static_cast< std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::size_type >(val2); - (arg1)->reserve(arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducerPairVector_capacity(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > *arg1 = (std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::size_type result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__pairT_hfst__HfstTransducer_hfst__HfstTransducer_t_std__allocatorT_std__pairT_hfst__HfstTransducer_hfst__HfstTransducer_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducerPairVector_capacity" "', argument " "1"" of type '" "std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > const *""'"); - } - arg1 = reinterpret_cast< std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > * >(argp1); - result = ((std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > const *)arg1)->capacity(); - resultobj = SWIG_From_size_t(static_cast< size_t >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_HfstTransducerPairVector(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > *arg1 = (std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__pairT_hfst__HfstTransducer_hfst__HfstTransducer_t_std__allocatorT_std__pairT_hfst__HfstTransducer_hfst__HfstTransducer_t_t_t, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_HfstTransducerPairVector" "', argument " "1"" of type '" "std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > *""'"); - } - arg1 = reinterpret_cast< std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > * >(argp1); - delete arg1; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *HfstTransducerPairVector_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_std__vectorT_std__pairT_hfst__HfstTransducer_hfst__HfstTransducer_t_std__allocatorT_std__pairT_hfst__HfstTransducer_hfst__HfstTransducer_t_t_t, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *HfstTransducerPairVector_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_HfstRuleVector_iterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< hfst::xeroxRules::Rule > *arg1 = (std::vector< hfst::xeroxRules::Rule > *) 0 ; - PyObject **arg2 = (PyObject **) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - swig::SwigPyIterator *result = 0 ; - - arg2 = &swig_obj[0]; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst__xeroxRules__Rule_std__allocatorT_hfst__xeroxRules__Rule_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstRuleVector_iterator" "', argument " "1"" of type '" "std::vector< hfst::xeroxRules::Rule > *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst::xeroxRules::Rule > * >(argp1); - result = (swig::SwigPyIterator *)std_vector_Sl_hfst_xeroxRules_Rule_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_HfstRuleVector___nonzero__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< hfst::xeroxRules::Rule > *arg1 = (std::vector< hfst::xeroxRules::Rule > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - bool result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst__xeroxRules__Rule_std__allocatorT_hfst__xeroxRules__Rule_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstRuleVector___nonzero__" "', argument " "1"" of type '" "std::vector< hfst::xeroxRules::Rule > const *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst::xeroxRules::Rule > * >(argp1); - result = (bool)std_vector_Sl_hfst_xeroxRules_Rule_Sg____nonzero__((std::vector< hfst::xeroxRules::Rule > const *)arg1); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstRuleVector___bool__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< hfst::xeroxRules::Rule > *arg1 = (std::vector< hfst::xeroxRules::Rule > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - bool result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst__xeroxRules__Rule_std__allocatorT_hfst__xeroxRules__Rule_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstRuleVector___bool__" "', argument " "1"" of type '" "std::vector< hfst::xeroxRules::Rule > const *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst::xeroxRules::Rule > * >(argp1); - result = (bool)std_vector_Sl_hfst_xeroxRules_Rule_Sg____bool__((std::vector< hfst::xeroxRules::Rule > const *)arg1); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstRuleVector___len__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< hfst::xeroxRules::Rule > *arg1 = (std::vector< hfst::xeroxRules::Rule > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::vector< hfst::xeroxRules::Rule >::size_type result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst__xeroxRules__Rule_std__allocatorT_hfst__xeroxRules__Rule_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstRuleVector___len__" "', argument " "1"" of type '" "std::vector< hfst::xeroxRules::Rule > const *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst::xeroxRules::Rule > * >(argp1); - result = std_vector_Sl_hfst_xeroxRules_Rule_Sg____len__((std::vector< hfst::xeroxRules::Rule > const *)arg1); - resultobj = SWIG_From_size_t(static_cast< size_t >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstRuleVector___getslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< hfst::xeroxRules::Rule > *arg1 = (std::vector< hfst::xeroxRules::Rule > *) 0 ; - std::vector< hfst::xeroxRules::Rule >::difference_type arg2 ; - std::vector< hfst::xeroxRules::Rule >::difference_type arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - ptrdiff_t val2 ; - int ecode2 = 0 ; - ptrdiff_t val3 ; - int ecode3 = 0 ; - PyObject *swig_obj[3] ; - std::vector< hfst::xeroxRules::Rule,std::allocator< hfst::xeroxRules::Rule > > *result = 0 ; - - if (!SWIG_Python_UnpackTuple(args, "HfstRuleVector___getslice__", 3, 3, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst__xeroxRules__Rule_std__allocatorT_hfst__xeroxRules__Rule_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstRuleVector___getslice__" "', argument " "1"" of type '" "std::vector< hfst::xeroxRules::Rule > *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst::xeroxRules::Rule > * >(argp1); - ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HfstRuleVector___getslice__" "', argument " "2"" of type '" "std::vector< hfst::xeroxRules::Rule >::difference_type""'"); - } - arg2 = static_cast< std::vector< hfst::xeroxRules::Rule >::difference_type >(val2); - ecode3 = SWIG_AsVal_ptrdiff_t(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "HfstRuleVector___getslice__" "', argument " "3"" of type '" "std::vector< hfst::xeroxRules::Rule >::difference_type""'"); - } - arg3 = static_cast< std::vector< hfst::xeroxRules::Rule >::difference_type >(val3); - try { - result = (std::vector< hfst::xeroxRules::Rule,std::allocator< hfst::xeroxRules::Rule > > *)std_vector_Sl_hfst_xeroxRules_Rule_Sg____getslice__(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_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_hfst__xeroxRules__Rule_std__allocatorT_hfst__xeroxRules__Rule_t_t, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstRuleVector___setslice____SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< hfst::xeroxRules::Rule > *arg1 = (std::vector< hfst::xeroxRules::Rule > *) 0 ; - std::vector< hfst::xeroxRules::Rule >::difference_type arg2 ; - std::vector< hfst::xeroxRules::Rule >::difference_type arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - ptrdiff_t val2 ; - int ecode2 = 0 ; - ptrdiff_t val3 ; - int ecode3 = 0 ; - - if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst__xeroxRules__Rule_std__allocatorT_hfst__xeroxRules__Rule_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstRuleVector___setslice__" "', argument " "1"" of type '" "std::vector< hfst::xeroxRules::Rule > *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst::xeroxRules::Rule > * >(argp1); - ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HfstRuleVector___setslice__" "', argument " "2"" of type '" "std::vector< hfst::xeroxRules::Rule >::difference_type""'"); - } - arg2 = static_cast< std::vector< hfst::xeroxRules::Rule >::difference_type >(val2); - ecode3 = SWIG_AsVal_ptrdiff_t(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "HfstRuleVector___setslice__" "', argument " "3"" of type '" "std::vector< hfst::xeroxRules::Rule >::difference_type""'"); - } - arg3 = static_cast< std::vector< hfst::xeroxRules::Rule >::difference_type >(val3); - try { - std_vector_Sl_hfst_xeroxRules_Rule_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_HfstRuleVector___setslice____SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< hfst::xeroxRules::Rule > *arg1 = (std::vector< hfst::xeroxRules::Rule > *) 0 ; - std::vector< hfst::xeroxRules::Rule >::difference_type arg2 ; - std::vector< hfst::xeroxRules::Rule >::difference_type arg3 ; - std::vector< hfst::xeroxRules::Rule,std::allocator< hfst::xeroxRules::Rule > > *arg4 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - ptrdiff_t val2 ; - int ecode2 = 0 ; - ptrdiff_t val3 ; - int ecode3 = 0 ; - int res4 = SWIG_OLDOBJ ; - - if ((nobjs < 4) || (nobjs > 4)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst__xeroxRules__Rule_std__allocatorT_hfst__xeroxRules__Rule_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstRuleVector___setslice__" "', argument " "1"" of type '" "std::vector< hfst::xeroxRules::Rule > *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst::xeroxRules::Rule > * >(argp1); - ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HfstRuleVector___setslice__" "', argument " "2"" of type '" "std::vector< hfst::xeroxRules::Rule >::difference_type""'"); - } - arg2 = static_cast< std::vector< hfst::xeroxRules::Rule >::difference_type >(val2); - ecode3 = SWIG_AsVal_ptrdiff_t(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "HfstRuleVector___setslice__" "', argument " "3"" of type '" "std::vector< hfst::xeroxRules::Rule >::difference_type""'"); - } - arg3 = static_cast< std::vector< hfst::xeroxRules::Rule >::difference_type >(val3); - { - std::vector< hfst::xeroxRules::Rule,std::allocator< hfst::xeroxRules::Rule > > *ptr = (std::vector< hfst::xeroxRules::Rule,std::allocator< hfst::xeroxRules::Rule > > *)0; - res4 = swig::asptr(swig_obj[3], &ptr); - if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "HfstRuleVector___setslice__" "', argument " "4"" of type '" "std::vector< hfst::xeroxRules::Rule,std::allocator< hfst::xeroxRules::Rule > > const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstRuleVector___setslice__" "', argument " "4"" of type '" "std::vector< hfst::xeroxRules::Rule,std::allocator< hfst::xeroxRules::Rule > > const &""'"); - } - arg4 = ptr; - } - try { - std_vector_Sl_hfst_xeroxRules_Rule_Sg____setslice____SWIG_1(arg1,arg2,arg3,(std::vector< hfst::xeroxRules::Rule,std::allocator< hfst::xeroxRules::Rule > > 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_HfstRuleVector___setslice__(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[5] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "HfstRuleVector___setslice__", 0, 4, argv))) SWIG_fail; - --argc; - if (argc == 3) { - int _v; - int res = swig::asptr(argv[0], (std::vector< hfst::xeroxRules::Rule,std::allocator< hfst::xeroxRules::Rule > >**)(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_HfstRuleVector___setslice____SWIG_0(self, argc, argv); - } - } - } - } - if (argc == 4) { - int _v; - int res = swig::asptr(argv[0], (std::vector< hfst::xeroxRules::Rule,std::allocator< hfst::xeroxRules::Rule > >**)(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< hfst::xeroxRules::Rule,std::allocator< hfst::xeroxRules::Rule > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_HfstRuleVector___setslice____SWIG_1(self, argc, argv); - } - } - } - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'HfstRuleVector___setslice__'.\n" - " Possible C/C++ prototypes are:\n" - " std::vector< hfst::xeroxRules::Rule >::__setslice__(std::vector< hfst::xeroxRules::Rule >::difference_type,std::vector< hfst::xeroxRules::Rule >::difference_type)\n" - " std::vector< hfst::xeroxRules::Rule >::__setslice__(std::vector< hfst::xeroxRules::Rule >::difference_type,std::vector< hfst::xeroxRules::Rule >::difference_type,std::vector< hfst::xeroxRules::Rule,std::allocator< hfst::xeroxRules::Rule > > const &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_HfstRuleVector___delslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< hfst::xeroxRules::Rule > *arg1 = (std::vector< hfst::xeroxRules::Rule > *) 0 ; - std::vector< hfst::xeroxRules::Rule >::difference_type arg2 ; - std::vector< hfst::xeroxRules::Rule >::difference_type arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - ptrdiff_t val2 ; - int ecode2 = 0 ; - ptrdiff_t val3 ; - int ecode3 = 0 ; - PyObject *swig_obj[3] ; - - if (!SWIG_Python_UnpackTuple(args, "HfstRuleVector___delslice__", 3, 3, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst__xeroxRules__Rule_std__allocatorT_hfst__xeroxRules__Rule_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstRuleVector___delslice__" "', argument " "1"" of type '" "std::vector< hfst::xeroxRules::Rule > *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst::xeroxRules::Rule > * >(argp1); - ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HfstRuleVector___delslice__" "', argument " "2"" of type '" "std::vector< hfst::xeroxRules::Rule >::difference_type""'"); - } - arg2 = static_cast< std::vector< hfst::xeroxRules::Rule >::difference_type >(val2); - ecode3 = SWIG_AsVal_ptrdiff_t(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "HfstRuleVector___delslice__" "', argument " "3"" of type '" "std::vector< hfst::xeroxRules::Rule >::difference_type""'"); - } - arg3 = static_cast< std::vector< hfst::xeroxRules::Rule >::difference_type >(val3); - try { - std_vector_Sl_hfst_xeroxRules_Rule_Sg____delslice__(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_HfstRuleVector___delitem____SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< hfst::xeroxRules::Rule > *arg1 = (std::vector< hfst::xeroxRules::Rule > *) 0 ; - std::vector< hfst::xeroxRules::Rule >::difference_type arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - ptrdiff_t val2 ; - int ecode2 = 0 ; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst__xeroxRules__Rule_std__allocatorT_hfst__xeroxRules__Rule_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstRuleVector___delitem__" "', argument " "1"" of type '" "std::vector< hfst::xeroxRules::Rule > *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst::xeroxRules::Rule > * >(argp1); - ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HfstRuleVector___delitem__" "', argument " "2"" of type '" "std::vector< hfst::xeroxRules::Rule >::difference_type""'"); - } - arg2 = static_cast< std::vector< hfst::xeroxRules::Rule >::difference_type >(val2); - try { - std_vector_Sl_hfst_xeroxRules_Rule_Sg____delitem____SWIG_0(arg1,arg2); - } 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_HfstRuleVector___getitem____SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< hfst::xeroxRules::Rule > *arg1 = (std::vector< hfst::xeroxRules::Rule > *) 0 ; - PySliceObject *arg2 = (PySliceObject *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::vector< hfst::xeroxRules::Rule,std::allocator< hfst::xeroxRules::Rule > > *result = 0 ; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst__xeroxRules__Rule_std__allocatorT_hfst__xeroxRules__Rule_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstRuleVector___getitem__" "', argument " "1"" of type '" "std::vector< hfst::xeroxRules::Rule > *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst::xeroxRules::Rule > * >(argp1); - { - if (!PySlice_Check(swig_obj[1])) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "HfstRuleVector___getitem__" "', argument " "2"" of type '" "PySliceObject *""'"); - } - arg2 = (PySliceObject *) swig_obj[1]; - } - try { - result = (std::vector< hfst::xeroxRules::Rule,std::allocator< hfst::xeroxRules::Rule > > *)std_vector_Sl_hfst_xeroxRules_Rule_Sg____getitem____SWIG_0(arg1,arg2); - } 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_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_hfst__xeroxRules__Rule_std__allocatorT_hfst__xeroxRules__Rule_t_t, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstRuleVector___setitem____SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< hfst::xeroxRules::Rule > *arg1 = (std::vector< hfst::xeroxRules::Rule > *) 0 ; - PySliceObject *arg2 = (PySliceObject *) 0 ; - std::vector< hfst::xeroxRules::Rule,std::allocator< hfst::xeroxRules::Rule > > *arg3 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res3 = SWIG_OLDOBJ ; - - if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst__xeroxRules__Rule_std__allocatorT_hfst__xeroxRules__Rule_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstRuleVector___setitem__" "', argument " "1"" of type '" "std::vector< hfst::xeroxRules::Rule > *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst::xeroxRules::Rule > * >(argp1); - { - if (!PySlice_Check(swig_obj[1])) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "HfstRuleVector___setitem__" "', argument " "2"" of type '" "PySliceObject *""'"); - } - arg2 = (PySliceObject *) swig_obj[1]; - } - { - std::vector< hfst::xeroxRules::Rule,std::allocator< hfst::xeroxRules::Rule > > *ptr = (std::vector< hfst::xeroxRules::Rule,std::allocator< hfst::xeroxRules::Rule > > *)0; - res3 = swig::asptr(swig_obj[2], &ptr); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "HfstRuleVector___setitem__" "', argument " "3"" of type '" "std::vector< hfst::xeroxRules::Rule,std::allocator< hfst::xeroxRules::Rule > > const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstRuleVector___setitem__" "', argument " "3"" of type '" "std::vector< hfst::xeroxRules::Rule,std::allocator< hfst::xeroxRules::Rule > > const &""'"); - } - arg3 = ptr; - } - try { - std_vector_Sl_hfst_xeroxRules_Rule_Sg____setitem____SWIG_0(arg1,arg2,(std::vector< hfst::xeroxRules::Rule,std::allocator< hfst::xeroxRules::Rule > > 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_HfstRuleVector___setitem____SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< hfst::xeroxRules::Rule > *arg1 = (std::vector< hfst::xeroxRules::Rule > *) 0 ; - PySliceObject *arg2 = (PySliceObject *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst__xeroxRules__Rule_std__allocatorT_hfst__xeroxRules__Rule_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstRuleVector___setitem__" "', argument " "1"" of type '" "std::vector< hfst::xeroxRules::Rule > *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst::xeroxRules::Rule > * >(argp1); - { - if (!PySlice_Check(swig_obj[1])) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "HfstRuleVector___setitem__" "', argument " "2"" of type '" "PySliceObject *""'"); - } - arg2 = (PySliceObject *) swig_obj[1]; - } - try { - std_vector_Sl_hfst_xeroxRules_Rule_Sg____setitem____SWIG_1(arg1,arg2); - } 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_HfstRuleVector___delitem____SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< hfst::xeroxRules::Rule > *arg1 = (std::vector< hfst::xeroxRules::Rule > *) 0 ; - PySliceObject *arg2 = (PySliceObject *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst__xeroxRules__Rule_std__allocatorT_hfst__xeroxRules__Rule_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstRuleVector___delitem__" "', argument " "1"" of type '" "std::vector< hfst::xeroxRules::Rule > *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst::xeroxRules::Rule > * >(argp1); - { - if (!PySlice_Check(swig_obj[1])) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "HfstRuleVector___delitem__" "', argument " "2"" of type '" "PySliceObject *""'"); - } - arg2 = (PySliceObject *) swig_obj[1]; - } - try { - std_vector_Sl_hfst_xeroxRules_Rule_Sg____delitem____SWIG_1(arg1,arg2); - } 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_HfstRuleVector___delitem__(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[3] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "HfstRuleVector___delitem__", 0, 2, argv))) SWIG_fail; - --argc; - if (argc == 2) { - int _v; - int res = swig::asptr(argv[0], (std::vector< hfst::xeroxRules::Rule,std::allocator< hfst::xeroxRules::Rule > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - { - _v = PySlice_Check(argv[1]); - } - if (_v) { - return _wrap_HfstRuleVector___delitem____SWIG_1(self, argc, argv); - } - } - } - if (argc == 2) { - int _v; - int res = swig::asptr(argv[0], (std::vector< hfst::xeroxRules::Rule,std::allocator< hfst::xeroxRules::Rule > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_HfstRuleVector___delitem____SWIG_0(self, argc, argv); - } - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'HfstRuleVector___delitem__'.\n" - " Possible C/C++ prototypes are:\n" - " std::vector< hfst::xeroxRules::Rule >::__delitem__(std::vector< hfst::xeroxRules::Rule >::difference_type)\n" - " std::vector< hfst::xeroxRules::Rule >::__delitem__(PySliceObject *)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_HfstRuleVector___getitem____SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< hfst::xeroxRules::Rule > *arg1 = (std::vector< hfst::xeroxRules::Rule > *) 0 ; - std::vector< hfst::xeroxRules::Rule >::difference_type arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - ptrdiff_t val2 ; - int ecode2 = 0 ; - std::vector< hfst::xeroxRules::Rule >::value_type *result = 0 ; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst__xeroxRules__Rule_std__allocatorT_hfst__xeroxRules__Rule_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstRuleVector___getitem__" "', argument " "1"" of type '" "std::vector< hfst::xeroxRules::Rule > const *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst::xeroxRules::Rule > * >(argp1); - ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HfstRuleVector___getitem__" "', argument " "2"" of type '" "std::vector< hfst::xeroxRules::Rule >::difference_type""'"); - } - arg2 = static_cast< std::vector< hfst::xeroxRules::Rule >::difference_type >(val2); - try { - result = (std::vector< hfst::xeroxRules::Rule >::value_type *) &std_vector_Sl_hfst_xeroxRules_Rule_Sg____getitem____SWIG_1((std::vector< hfst::xeroxRules::Rule > const *)arg1,arg2); - } catch(std::out_of_range &_e) { - SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_hfst__xeroxRules__Rule, 0 | 0 ); - (void)swig::container_owner::value_type>::category>::back_reference(resultobj, swig_obj[0]); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstRuleVector___getitem__(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[3] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "HfstRuleVector___getitem__", 0, 2, argv))) SWIG_fail; - --argc; - if (argc == 2) { - int _v; - int res = swig::asptr(argv[0], (std::vector< hfst::xeroxRules::Rule,std::allocator< hfst::xeroxRules::Rule > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - { - _v = PySlice_Check(argv[1]); - } - if (_v) { - return _wrap_HfstRuleVector___getitem____SWIG_0(self, argc, argv); - } - } - } - if (argc == 2) { - int _v; - int res = swig::asptr(argv[0], (std::vector< hfst::xeroxRules::Rule,std::allocator< hfst::xeroxRules::Rule > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_HfstRuleVector___getitem____SWIG_1(self, argc, argv); - } - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'HfstRuleVector___getitem__'.\n" - " Possible C/C++ prototypes are:\n" - " std::vector< hfst::xeroxRules::Rule >::__getitem__(PySliceObject *)\n" - " std::vector< hfst::xeroxRules::Rule >::__getitem__(std::vector< hfst::xeroxRules::Rule >::difference_type) const\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_HfstRuleVector___setitem____SWIG_2(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< hfst::xeroxRules::Rule > *arg1 = (std::vector< hfst::xeroxRules::Rule > *) 0 ; - std::vector< hfst::xeroxRules::Rule >::difference_type arg2 ; - std::vector< hfst::xeroxRules::Rule >::value_type *arg3 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - ptrdiff_t val2 ; - int ecode2 = 0 ; - void *argp3 = 0 ; - int res3 = 0 ; - - if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst__xeroxRules__Rule_std__allocatorT_hfst__xeroxRules__Rule_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstRuleVector___setitem__" "', argument " "1"" of type '" "std::vector< hfst::xeroxRules::Rule > *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst::xeroxRules::Rule > * >(argp1); - ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HfstRuleVector___setitem__" "', argument " "2"" of type '" "std::vector< hfst::xeroxRules::Rule >::difference_type""'"); - } - arg2 = static_cast< std::vector< hfst::xeroxRules::Rule >::difference_type >(val2); - res3 = SWIG_ConvertPtr(swig_obj[2], &argp3, SWIGTYPE_p_hfst__xeroxRules__Rule, 0 | 0); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "HfstRuleVector___setitem__" "', argument " "3"" of type '" "std::vector< hfst::xeroxRules::Rule >::value_type const &""'"); - } - if (!argp3) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstRuleVector___setitem__" "', argument " "3"" of type '" "std::vector< hfst::xeroxRules::Rule >::value_type const &""'"); - } - arg3 = reinterpret_cast< std::vector< hfst::xeroxRules::Rule >::value_type * >(argp3); - try { - std_vector_Sl_hfst_xeroxRules_Rule_Sg____setitem____SWIG_2(arg1,arg2,(hfst::xeroxRules::Rule 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_HfstRuleVector___setitem__(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[4] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "HfstRuleVector___setitem__", 0, 3, argv))) SWIG_fail; - --argc; - if (argc == 2) { - int _v; - int res = swig::asptr(argv[0], (std::vector< hfst::xeroxRules::Rule,std::allocator< hfst::xeroxRules::Rule > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - { - _v = PySlice_Check(argv[1]); - } - if (_v) { - return _wrap_HfstRuleVector___setitem____SWIG_1(self, argc, argv); - } - } - } - if (argc == 3) { - int _v; - int res = swig::asptr(argv[0], (std::vector< hfst::xeroxRules::Rule,std::allocator< hfst::xeroxRules::Rule > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - { - _v = PySlice_Check(argv[1]); - } - if (_v) { - int res = swig::asptr(argv[2], (std::vector< hfst::xeroxRules::Rule,std::allocator< hfst::xeroxRules::Rule > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_HfstRuleVector___setitem____SWIG_0(self, argc, argv); - } - } - } - } - if (argc == 3) { - int _v; - int res = swig::asptr(argv[0], (std::vector< hfst::xeroxRules::Rule,std::allocator< hfst::xeroxRules::Rule > >**)(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_ConvertPtr(argv[2], 0, SWIGTYPE_p_hfst__xeroxRules__Rule, SWIG_POINTER_NO_NULL | 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_HfstRuleVector___setitem____SWIG_2(self, argc, argv); - } - } - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'HfstRuleVector___setitem__'.\n" - " Possible C/C++ prototypes are:\n" - " std::vector< hfst::xeroxRules::Rule >::__setitem__(PySliceObject *,std::vector< hfst::xeroxRules::Rule,std::allocator< hfst::xeroxRules::Rule > > const &)\n" - " std::vector< hfst::xeroxRules::Rule >::__setitem__(PySliceObject *)\n" - " std::vector< hfst::xeroxRules::Rule >::__setitem__(std::vector< hfst::xeroxRules::Rule >::difference_type,std::vector< hfst::xeroxRules::Rule >::value_type const &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_HfstRuleVector_pop(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< hfst::xeroxRules::Rule > *arg1 = (std::vector< hfst::xeroxRules::Rule > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::vector< hfst::xeroxRules::Rule >::value_type result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst__xeroxRules__Rule_std__allocatorT_hfst__xeroxRules__Rule_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstRuleVector_pop" "', argument " "1"" of type '" "std::vector< hfst::xeroxRules::Rule > *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst::xeroxRules::Rule > * >(argp1); - try { - result = std_vector_Sl_hfst_xeroxRules_Rule_Sg__pop(arg1); - } catch(std::out_of_range &_e) { - SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); - } - resultobj = SWIG_NewPointerObj((new std::vector< hfst::xeroxRules::Rule >::value_type(static_cast< const std::vector< hfst::xeroxRules::Rule >::value_type& >(result))), SWIGTYPE_p_hfst__xeroxRules__Rule, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstRuleVector_append(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< hfst::xeroxRules::Rule > *arg1 = (std::vector< hfst::xeroxRules::Rule > *) 0 ; - std::vector< hfst::xeroxRules::Rule >::value_type *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args, "HfstRuleVector_append", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst__xeroxRules__Rule_std__allocatorT_hfst__xeroxRules__Rule_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstRuleVector_append" "', argument " "1"" of type '" "std::vector< hfst::xeroxRules::Rule > *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst::xeroxRules::Rule > * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_hfst__xeroxRules__Rule, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HfstRuleVector_append" "', argument " "2"" of type '" "std::vector< hfst::xeroxRules::Rule >::value_type const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstRuleVector_append" "', argument " "2"" of type '" "std::vector< hfst::xeroxRules::Rule >::value_type const &""'"); - } - arg2 = reinterpret_cast< std::vector< hfst::xeroxRules::Rule >::value_type * >(argp2); - std_vector_Sl_hfst_xeroxRules_Rule_Sg__append(arg1,(hfst::xeroxRules::Rule const &)*arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_HfstRuleVector__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **SWIGUNUSEDPARM(swig_obj)) { - PyObject *resultobj = 0; - std::vector< hfst::xeroxRules::Rule > *result = 0 ; - - if ((nobjs < 0) || (nobjs > 0)) SWIG_fail; - result = (std::vector< hfst::xeroxRules::Rule > *)new std::vector< hfst::xeroxRules::Rule >(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_hfst__xeroxRules__Rule_std__allocatorT_hfst__xeroxRules__Rule_t_t, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_HfstRuleVector__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< hfst::xeroxRules::Rule > *arg1 = 0 ; - int res1 = SWIG_OLDOBJ ; - std::vector< hfst::xeroxRules::Rule > *result = 0 ; - - if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; - { - std::vector< hfst::xeroxRules::Rule,std::allocator< hfst::xeroxRules::Rule > > *ptr = (std::vector< hfst::xeroxRules::Rule,std::allocator< hfst::xeroxRules::Rule > > *)0; - res1 = swig::asptr(swig_obj[0], &ptr); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_HfstRuleVector" "', argument " "1"" of type '" "std::vector< hfst::xeroxRules::Rule > const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_HfstRuleVector" "', argument " "1"" of type '" "std::vector< hfst::xeroxRules::Rule > const &""'"); - } - arg1 = ptr; - } - result = (std::vector< hfst::xeroxRules::Rule > *)new std::vector< hfst::xeroxRules::Rule >((std::vector< hfst::xeroxRules::Rule > const &)*arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_hfst__xeroxRules__Rule_std__allocatorT_hfst__xeroxRules__Rule_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_HfstRuleVector_empty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< hfst::xeroxRules::Rule > *arg1 = (std::vector< hfst::xeroxRules::Rule > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - bool result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst__xeroxRules__Rule_std__allocatorT_hfst__xeroxRules__Rule_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstRuleVector_empty" "', argument " "1"" of type '" "std::vector< hfst::xeroxRules::Rule > const *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst::xeroxRules::Rule > * >(argp1); - result = (bool)((std::vector< hfst::xeroxRules::Rule > const *)arg1)->empty(); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstRuleVector_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< hfst::xeroxRules::Rule > *arg1 = (std::vector< hfst::xeroxRules::Rule > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::vector< hfst::xeroxRules::Rule >::size_type result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst__xeroxRules__Rule_std__allocatorT_hfst__xeroxRules__Rule_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstRuleVector_size" "', argument " "1"" of type '" "std::vector< hfst::xeroxRules::Rule > const *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst::xeroxRules::Rule > * >(argp1); - result = ((std::vector< hfst::xeroxRules::Rule > const *)arg1)->size(); - resultobj = SWIG_From_size_t(static_cast< size_t >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstRuleVector_swap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< hfst::xeroxRules::Rule > *arg1 = (std::vector< hfst::xeroxRules::Rule > *) 0 ; - std::vector< hfst::xeroxRules::Rule > *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args, "HfstRuleVector_swap", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst__xeroxRules__Rule_std__allocatorT_hfst__xeroxRules__Rule_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstRuleVector_swap" "', argument " "1"" of type '" "std::vector< hfst::xeroxRules::Rule > *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst::xeroxRules::Rule > * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_std__vectorT_hfst__xeroxRules__Rule_std__allocatorT_hfst__xeroxRules__Rule_t_t, 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HfstRuleVector_swap" "', argument " "2"" of type '" "std::vector< hfst::xeroxRules::Rule > &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstRuleVector_swap" "', argument " "2"" of type '" "std::vector< hfst::xeroxRules::Rule > &""'"); - } - arg2 = reinterpret_cast< std::vector< hfst::xeroxRules::Rule > * >(argp2); - (arg1)->swap(*arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstRuleVector_begin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< hfst::xeroxRules::Rule > *arg1 = (std::vector< hfst::xeroxRules::Rule > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::vector< hfst::xeroxRules::Rule >::iterator result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst__xeroxRules__Rule_std__allocatorT_hfst__xeroxRules__Rule_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstRuleVector_begin" "', argument " "1"" of type '" "std::vector< hfst::xeroxRules::Rule > *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst::xeroxRules::Rule > * >(argp1); - result = (arg1)->begin(); - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< hfst::xeroxRules::Rule >::iterator & >(result)), - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstRuleVector_end(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< hfst::xeroxRules::Rule > *arg1 = (std::vector< hfst::xeroxRules::Rule > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::vector< hfst::xeroxRules::Rule >::iterator result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst__xeroxRules__Rule_std__allocatorT_hfst__xeroxRules__Rule_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstRuleVector_end" "', argument " "1"" of type '" "std::vector< hfst::xeroxRules::Rule > *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst::xeroxRules::Rule > * >(argp1); - result = (arg1)->end(); - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< hfst::xeroxRules::Rule >::iterator & >(result)), - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstRuleVector_rbegin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< hfst::xeroxRules::Rule > *arg1 = (std::vector< hfst::xeroxRules::Rule > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::vector< hfst::xeroxRules::Rule >::reverse_iterator result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst__xeroxRules__Rule_std__allocatorT_hfst__xeroxRules__Rule_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstRuleVector_rbegin" "', argument " "1"" of type '" "std::vector< hfst::xeroxRules::Rule > *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst::xeroxRules::Rule > * >(argp1); - result = (arg1)->rbegin(); - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< hfst::xeroxRules::Rule >::reverse_iterator & >(result)), - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstRuleVector_rend(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< hfst::xeroxRules::Rule > *arg1 = (std::vector< hfst::xeroxRules::Rule > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::vector< hfst::xeroxRules::Rule >::reverse_iterator result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst__xeroxRules__Rule_std__allocatorT_hfst__xeroxRules__Rule_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstRuleVector_rend" "', argument " "1"" of type '" "std::vector< hfst::xeroxRules::Rule > *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst::xeroxRules::Rule > * >(argp1); - result = (arg1)->rend(); - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< hfst::xeroxRules::Rule >::reverse_iterator & >(result)), - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstRuleVector_clear(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< hfst::xeroxRules::Rule > *arg1 = (std::vector< hfst::xeroxRules::Rule > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst__xeroxRules__Rule_std__allocatorT_hfst__xeroxRules__Rule_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstRuleVector_clear" "', argument " "1"" of type '" "std::vector< hfst::xeroxRules::Rule > *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst::xeroxRules::Rule > * >(argp1); - (arg1)->clear(); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstRuleVector_get_allocator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< hfst::xeroxRules::Rule > *arg1 = (std::vector< hfst::xeroxRules::Rule > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - SwigValueWrapper< std::allocator< hfst::xeroxRules::Rule > > result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst__xeroxRules__Rule_std__allocatorT_hfst__xeroxRules__Rule_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstRuleVector_get_allocator" "', argument " "1"" of type '" "std::vector< hfst::xeroxRules::Rule > const *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst::xeroxRules::Rule > * >(argp1); - result = ((std::vector< hfst::xeroxRules::Rule > const *)arg1)->get_allocator(); - resultobj = SWIG_NewPointerObj((new std::vector< hfst::xeroxRules::Rule >::allocator_type(static_cast< const std::vector< hfst::xeroxRules::Rule >::allocator_type& >(result))), SWIGTYPE_p_std__allocatorT_hfst__xeroxRules__Rule_t, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_HfstRuleVector__SWIG_2(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< hfst::xeroxRules::Rule >::size_type arg1 ; - size_t val1 ; - int ecode1 = 0 ; - std::vector< hfst::xeroxRules::Rule > *result = 0 ; - - if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; - ecode1 = SWIG_AsVal_size_t(swig_obj[0], &val1); - if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_HfstRuleVector" "', argument " "1"" of type '" "std::vector< hfst::xeroxRules::Rule >::size_type""'"); - } - arg1 = static_cast< std::vector< hfst::xeroxRules::Rule >::size_type >(val1); - result = (std::vector< hfst::xeroxRules::Rule > *)new std::vector< hfst::xeroxRules::Rule >(arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_hfst__xeroxRules__Rule_std__allocatorT_hfst__xeroxRules__Rule_t_t, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstRuleVector_pop_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< hfst::xeroxRules::Rule > *arg1 = (std::vector< hfst::xeroxRules::Rule > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst__xeroxRules__Rule_std__allocatorT_hfst__xeroxRules__Rule_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstRuleVector_pop_back" "', argument " "1"" of type '" "std::vector< hfst::xeroxRules::Rule > *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst::xeroxRules::Rule > * >(argp1); - (arg1)->pop_back(); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstRuleVector_resize__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< hfst::xeroxRules::Rule > *arg1 = (std::vector< hfst::xeroxRules::Rule > *) 0 ; - std::vector< hfst::xeroxRules::Rule >::size_type arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - size_t val2 ; - int ecode2 = 0 ; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst__xeroxRules__Rule_std__allocatorT_hfst__xeroxRules__Rule_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstRuleVector_resize" "', argument " "1"" of type '" "std::vector< hfst::xeroxRules::Rule > *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst::xeroxRules::Rule > * >(argp1); - ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HfstRuleVector_resize" "', argument " "2"" of type '" "std::vector< hfst::xeroxRules::Rule >::size_type""'"); - } - arg2 = static_cast< std::vector< hfst::xeroxRules::Rule >::size_type >(val2); - (arg1)->resize(arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstRuleVector_erase__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< hfst::xeroxRules::Rule > *arg1 = (std::vector< hfst::xeroxRules::Rule > *) 0 ; - std::vector< hfst::xeroxRules::Rule >::iterator arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - swig::SwigPyIterator *iter2 = 0 ; - int res2 ; - std::vector< hfst::xeroxRules::Rule >::iterator result; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst__xeroxRules__Rule_std__allocatorT_hfst__xeroxRules__Rule_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstRuleVector_erase" "', argument " "1"" of type '" "std::vector< hfst::xeroxRules::Rule > *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst::xeroxRules::Rule > * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0); - if (!SWIG_IsOK(res2) || !iter2) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "HfstRuleVector_erase" "', argument " "2"" of type '" "std::vector< hfst::xeroxRules::Rule >::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 '" "HfstRuleVector_erase" "', argument " "2"" of type '" "std::vector< hfst::xeroxRules::Rule >::iterator""'"); - } - } - result = std_vector_Sl_hfst_xeroxRules_Rule_Sg__erase__SWIG_0(arg1,arg2); - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< hfst::xeroxRules::Rule >::iterator & >(result)), - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstRuleVector_erase__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< hfst::xeroxRules::Rule > *arg1 = (std::vector< hfst::xeroxRules::Rule > *) 0 ; - std::vector< hfst::xeroxRules::Rule >::iterator arg2 ; - std::vector< hfst::xeroxRules::Rule >::iterator arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - swig::SwigPyIterator *iter2 = 0 ; - int res2 ; - swig::SwigPyIterator *iter3 = 0 ; - int res3 ; - std::vector< hfst::xeroxRules::Rule >::iterator result; - - if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst__xeroxRules__Rule_std__allocatorT_hfst__xeroxRules__Rule_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstRuleVector_erase" "', argument " "1"" of type '" "std::vector< hfst::xeroxRules::Rule > *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst::xeroxRules::Rule > * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0); - if (!SWIG_IsOK(res2) || !iter2) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "HfstRuleVector_erase" "', argument " "2"" of type '" "std::vector< hfst::xeroxRules::Rule >::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 '" "HfstRuleVector_erase" "', argument " "2"" of type '" "std::vector< hfst::xeroxRules::Rule >::iterator""'"); - } - } - res3 = SWIG_ConvertPtr(swig_obj[2], SWIG_as_voidptrptr(&iter3), swig::SwigPyIterator::descriptor(), 0); - if (!SWIG_IsOK(res3) || !iter3) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "HfstRuleVector_erase" "', argument " "3"" of type '" "std::vector< hfst::xeroxRules::Rule >::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 '" "HfstRuleVector_erase" "', argument " "3"" of type '" "std::vector< hfst::xeroxRules::Rule >::iterator""'"); - } - } - result = std_vector_Sl_hfst_xeroxRules_Rule_Sg__erase__SWIG_1(arg1,arg2,arg3); - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< hfst::xeroxRules::Rule >::iterator & >(result)), - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstRuleVector_erase(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[4] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "HfstRuleVector_erase", 0, 3, argv))) SWIG_fail; - --argc; - if (argc == 2) { - int _v; - int res = swig::asptr(argv[0], (std::vector< hfst::xeroxRules::Rule,std::allocator< hfst::xeroxRules::Rule > >**)(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_HfstRuleVector_erase__SWIG_0(self, argc, argv); - } - } - } - if (argc == 3) { - int _v; - int res = swig::asptr(argv[0], (std::vector< hfst::xeroxRules::Rule,std::allocator< hfst::xeroxRules::Rule > >**)(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_HfstRuleVector_erase__SWIG_1(self, argc, argv); - } - } - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'HfstRuleVector_erase'.\n" - " Possible C/C++ prototypes are:\n" - " std::vector< hfst::xeroxRules::Rule >::erase(std::vector< hfst::xeroxRules::Rule >::iterator)\n" - " std::vector< hfst::xeroxRules::Rule >::erase(std::vector< hfst::xeroxRules::Rule >::iterator,std::vector< hfst::xeroxRules::Rule >::iterator)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_new_HfstRuleVector__SWIG_3(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< hfst::xeroxRules::Rule >::size_type arg1 ; - std::vector< hfst::xeroxRules::Rule >::value_type *arg2 = 0 ; - size_t val1 ; - int ecode1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - std::vector< hfst::xeroxRules::Rule > *result = 0 ; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - ecode1 = SWIG_AsVal_size_t(swig_obj[0], &val1); - if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_HfstRuleVector" "', argument " "1"" of type '" "std::vector< hfst::xeroxRules::Rule >::size_type""'"); - } - arg1 = static_cast< std::vector< hfst::xeroxRules::Rule >::size_type >(val1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_hfst__xeroxRules__Rule, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_HfstRuleVector" "', argument " "2"" of type '" "std::vector< hfst::xeroxRules::Rule >::value_type const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_HfstRuleVector" "', argument " "2"" of type '" "std::vector< hfst::xeroxRules::Rule >::value_type const &""'"); - } - arg2 = reinterpret_cast< std::vector< hfst::xeroxRules::Rule >::value_type * >(argp2); - result = (std::vector< hfst::xeroxRules::Rule > *)new std::vector< hfst::xeroxRules::Rule >(arg1,(std::vector< hfst::xeroxRules::Rule >::value_type const &)*arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_hfst__xeroxRules__Rule_std__allocatorT_hfst__xeroxRules__Rule_t_t, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_HfstRuleVector(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[3] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "new_HfstRuleVector", 0, 2, argv))) SWIG_fail; - --argc; - if (argc == 0) { - return _wrap_new_HfstRuleVector__SWIG_0(self, argc, argv); - } - if (argc == 1) { - int _v; - { - int res = SWIG_AsVal_size_t(argv[0], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_new_HfstRuleVector__SWIG_2(self, argc, argv); - } - } - if (argc == 1) { - int _v; - int res = swig::asptr(argv[0], (std::vector< hfst::xeroxRules::Rule,std::allocator< hfst::xeroxRules::Rule > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_new_HfstRuleVector__SWIG_1(self, argc, argv); - } - } - if (argc == 2) { - int _v; - { - int res = SWIG_AsVal_size_t(argv[0], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_hfst__xeroxRules__Rule, SWIG_POINTER_NO_NULL | 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_new_HfstRuleVector__SWIG_3(self, argc, argv); - } - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'new_HfstRuleVector'.\n" - " Possible C/C++ prototypes are:\n" - " std::vector< hfst::xeroxRules::Rule >::vector()\n" - " std::vector< hfst::xeroxRules::Rule >::vector(std::vector< hfst::xeroxRules::Rule > const &)\n" - " std::vector< hfst::xeroxRules::Rule >::vector(std::vector< hfst::xeroxRules::Rule >::size_type)\n" - " std::vector< hfst::xeroxRules::Rule >::vector(std::vector< hfst::xeroxRules::Rule >::size_type,std::vector< hfst::xeroxRules::Rule >::value_type const &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_HfstRuleVector_push_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< hfst::xeroxRules::Rule > *arg1 = (std::vector< hfst::xeroxRules::Rule > *) 0 ; - std::vector< hfst::xeroxRules::Rule >::value_type *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args, "HfstRuleVector_push_back", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst__xeroxRules__Rule_std__allocatorT_hfst__xeroxRules__Rule_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstRuleVector_push_back" "', argument " "1"" of type '" "std::vector< hfst::xeroxRules::Rule > *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst::xeroxRules::Rule > * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_hfst__xeroxRules__Rule, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HfstRuleVector_push_back" "', argument " "2"" of type '" "std::vector< hfst::xeroxRules::Rule >::value_type const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstRuleVector_push_back" "', argument " "2"" of type '" "std::vector< hfst::xeroxRules::Rule >::value_type const &""'"); - } - arg2 = reinterpret_cast< std::vector< hfst::xeroxRules::Rule >::value_type * >(argp2); - (arg1)->push_back((std::vector< hfst::xeroxRules::Rule >::value_type const &)*arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstRuleVector_front(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< hfst::xeroxRules::Rule > *arg1 = (std::vector< hfst::xeroxRules::Rule > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::vector< hfst::xeroxRules::Rule >::value_type *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst__xeroxRules__Rule_std__allocatorT_hfst__xeroxRules__Rule_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstRuleVector_front" "', argument " "1"" of type '" "std::vector< hfst::xeroxRules::Rule > const *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst::xeroxRules::Rule > * >(argp1); - result = (std::vector< hfst::xeroxRules::Rule >::value_type *) &((std::vector< hfst::xeroxRules::Rule > const *)arg1)->front(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_hfst__xeroxRules__Rule, 0 | 0 ); - (void)swig::container_owner::value_type>::category>::back_reference(resultobj, swig_obj[0]); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstRuleVector_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< hfst::xeroxRules::Rule > *arg1 = (std::vector< hfst::xeroxRules::Rule > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::vector< hfst::xeroxRules::Rule >::value_type *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst__xeroxRules__Rule_std__allocatorT_hfst__xeroxRules__Rule_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstRuleVector_back" "', argument " "1"" of type '" "std::vector< hfst::xeroxRules::Rule > const *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst::xeroxRules::Rule > * >(argp1); - result = (std::vector< hfst::xeroxRules::Rule >::value_type *) &((std::vector< hfst::xeroxRules::Rule > const *)arg1)->back(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_hfst__xeroxRules__Rule, 0 | 0 ); - (void)swig::container_owner::value_type>::category>::back_reference(resultobj, swig_obj[0]); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstRuleVector_assign(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< hfst::xeroxRules::Rule > *arg1 = (std::vector< hfst::xeroxRules::Rule > *) 0 ; - std::vector< hfst::xeroxRules::Rule >::size_type arg2 ; - std::vector< hfst::xeroxRules::Rule >::value_type *arg3 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - size_t val2 ; - int ecode2 = 0 ; - void *argp3 = 0 ; - int res3 = 0 ; - PyObject *swig_obj[3] ; - - if (!SWIG_Python_UnpackTuple(args, "HfstRuleVector_assign", 3, 3, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst__xeroxRules__Rule_std__allocatorT_hfst__xeroxRules__Rule_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstRuleVector_assign" "', argument " "1"" of type '" "std::vector< hfst::xeroxRules::Rule > *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst::xeroxRules::Rule > * >(argp1); - ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HfstRuleVector_assign" "', argument " "2"" of type '" "std::vector< hfst::xeroxRules::Rule >::size_type""'"); - } - arg2 = static_cast< std::vector< hfst::xeroxRules::Rule >::size_type >(val2); - res3 = SWIG_ConvertPtr(swig_obj[2], &argp3, SWIGTYPE_p_hfst__xeroxRules__Rule, 0 | 0); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "HfstRuleVector_assign" "', argument " "3"" of type '" "std::vector< hfst::xeroxRules::Rule >::value_type const &""'"); - } - if (!argp3) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstRuleVector_assign" "', argument " "3"" of type '" "std::vector< hfst::xeroxRules::Rule >::value_type const &""'"); - } - arg3 = reinterpret_cast< std::vector< hfst::xeroxRules::Rule >::value_type * >(argp3); - (arg1)->assign(arg2,(std::vector< hfst::xeroxRules::Rule >::value_type const &)*arg3); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstRuleVector_resize__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< hfst::xeroxRules::Rule > *arg1 = (std::vector< hfst::xeroxRules::Rule > *) 0 ; - std::vector< hfst::xeroxRules::Rule >::size_type arg2 ; - std::vector< hfst::xeroxRules::Rule >::value_type *arg3 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - size_t val2 ; - int ecode2 = 0 ; - void *argp3 = 0 ; - int res3 = 0 ; - - if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst__xeroxRules__Rule_std__allocatorT_hfst__xeroxRules__Rule_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstRuleVector_resize" "', argument " "1"" of type '" "std::vector< hfst::xeroxRules::Rule > *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst::xeroxRules::Rule > * >(argp1); - ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HfstRuleVector_resize" "', argument " "2"" of type '" "std::vector< hfst::xeroxRules::Rule >::size_type""'"); - } - arg2 = static_cast< std::vector< hfst::xeroxRules::Rule >::size_type >(val2); - res3 = SWIG_ConvertPtr(swig_obj[2], &argp3, SWIGTYPE_p_hfst__xeroxRules__Rule, 0 | 0); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "HfstRuleVector_resize" "', argument " "3"" of type '" "std::vector< hfst::xeroxRules::Rule >::value_type const &""'"); - } - if (!argp3) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstRuleVector_resize" "', argument " "3"" of type '" "std::vector< hfst::xeroxRules::Rule >::value_type const &""'"); - } - arg3 = reinterpret_cast< std::vector< hfst::xeroxRules::Rule >::value_type * >(argp3); - (arg1)->resize(arg2,(std::vector< hfst::xeroxRules::Rule >::value_type const &)*arg3); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstRuleVector_resize(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[4] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "HfstRuleVector_resize", 0, 3, argv))) SWIG_fail; - --argc; - if (argc == 2) { - int _v; - int res = swig::asptr(argv[0], (std::vector< hfst::xeroxRules::Rule,std::allocator< hfst::xeroxRules::Rule > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_size_t(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_HfstRuleVector_resize__SWIG_0(self, argc, argv); - } - } - } - if (argc == 3) { - int _v; - int res = swig::asptr(argv[0], (std::vector< hfst::xeroxRules::Rule,std::allocator< hfst::xeroxRules::Rule > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_size_t(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_hfst__xeroxRules__Rule, SWIG_POINTER_NO_NULL | 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_HfstRuleVector_resize__SWIG_1(self, argc, argv); - } - } - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'HfstRuleVector_resize'.\n" - " Possible C/C++ prototypes are:\n" - " std::vector< hfst::xeroxRules::Rule >::resize(std::vector< hfst::xeroxRules::Rule >::size_type)\n" - " std::vector< hfst::xeroxRules::Rule >::resize(std::vector< hfst::xeroxRules::Rule >::size_type,std::vector< hfst::xeroxRules::Rule >::value_type const &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_HfstRuleVector_insert__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< hfst::xeroxRules::Rule > *arg1 = (std::vector< hfst::xeroxRules::Rule > *) 0 ; - std::vector< hfst::xeroxRules::Rule >::iterator arg2 ; - std::vector< hfst::xeroxRules::Rule >::value_type *arg3 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - swig::SwigPyIterator *iter2 = 0 ; - int res2 ; - void *argp3 = 0 ; - int res3 = 0 ; - std::vector< hfst::xeroxRules::Rule >::iterator result; - - if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst__xeroxRules__Rule_std__allocatorT_hfst__xeroxRules__Rule_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstRuleVector_insert" "', argument " "1"" of type '" "std::vector< hfst::xeroxRules::Rule > *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst::xeroxRules::Rule > * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0); - if (!SWIG_IsOK(res2) || !iter2) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "HfstRuleVector_insert" "', argument " "2"" of type '" "std::vector< hfst::xeroxRules::Rule >::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 '" "HfstRuleVector_insert" "', argument " "2"" of type '" "std::vector< hfst::xeroxRules::Rule >::iterator""'"); - } - } - res3 = SWIG_ConvertPtr(swig_obj[2], &argp3, SWIGTYPE_p_hfst__xeroxRules__Rule, 0 | 0); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "HfstRuleVector_insert" "', argument " "3"" of type '" "std::vector< hfst::xeroxRules::Rule >::value_type const &""'"); - } - if (!argp3) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstRuleVector_insert" "', argument " "3"" of type '" "std::vector< hfst::xeroxRules::Rule >::value_type const &""'"); - } - arg3 = reinterpret_cast< std::vector< hfst::xeroxRules::Rule >::value_type * >(argp3); - result = std_vector_Sl_hfst_xeroxRules_Rule_Sg__insert__SWIG_0(arg1,arg2,(hfst::xeroxRules::Rule const &)*arg3); - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< hfst::xeroxRules::Rule >::iterator & >(result)), - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstRuleVector_insert__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< hfst::xeroxRules::Rule > *arg1 = (std::vector< hfst::xeroxRules::Rule > *) 0 ; - std::vector< hfst::xeroxRules::Rule >::iterator arg2 ; - std::vector< hfst::xeroxRules::Rule >::size_type arg3 ; - std::vector< hfst::xeroxRules::Rule >::value_type *arg4 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - swig::SwigPyIterator *iter2 = 0 ; - int res2 ; - size_t val3 ; - int ecode3 = 0 ; - void *argp4 = 0 ; - int res4 = 0 ; - - if ((nobjs < 4) || (nobjs > 4)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst__xeroxRules__Rule_std__allocatorT_hfst__xeroxRules__Rule_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstRuleVector_insert" "', argument " "1"" of type '" "std::vector< hfst::xeroxRules::Rule > *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst::xeroxRules::Rule > * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0); - if (!SWIG_IsOK(res2) || !iter2) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "HfstRuleVector_insert" "', argument " "2"" of type '" "std::vector< hfst::xeroxRules::Rule >::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 '" "HfstRuleVector_insert" "', argument " "2"" of type '" "std::vector< hfst::xeroxRules::Rule >::iterator""'"); - } - } - ecode3 = SWIG_AsVal_size_t(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "HfstRuleVector_insert" "', argument " "3"" of type '" "std::vector< hfst::xeroxRules::Rule >::size_type""'"); - } - arg3 = static_cast< std::vector< hfst::xeroxRules::Rule >::size_type >(val3); - res4 = SWIG_ConvertPtr(swig_obj[3], &argp4, SWIGTYPE_p_hfst__xeroxRules__Rule, 0 | 0); - if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "HfstRuleVector_insert" "', argument " "4"" of type '" "std::vector< hfst::xeroxRules::Rule >::value_type const &""'"); - } - if (!argp4) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstRuleVector_insert" "', argument " "4"" of type '" "std::vector< hfst::xeroxRules::Rule >::value_type const &""'"); - } - arg4 = reinterpret_cast< std::vector< hfst::xeroxRules::Rule >::value_type * >(argp4); - std_vector_Sl_hfst_xeroxRules_Rule_Sg__insert__SWIG_1(arg1,arg2,arg3,(hfst::xeroxRules::Rule const &)*arg4); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstRuleVector_insert(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[5] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "HfstRuleVector_insert", 0, 4, argv))) SWIG_fail; - --argc; - if (argc == 3) { - int _v; - int res = swig::asptr(argv[0], (std::vector< hfst::xeroxRules::Rule,std::allocator< hfst::xeroxRules::Rule > >**)(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_ConvertPtr(argv[2], 0, SWIGTYPE_p_hfst__xeroxRules__Rule, SWIG_POINTER_NO_NULL | 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_HfstRuleVector_insert__SWIG_0(self, argc, argv); - } - } - } - } - if (argc == 4) { - int _v; - int res = swig::asptr(argv[0], (std::vector< hfst::xeroxRules::Rule,std::allocator< hfst::xeroxRules::Rule > >**)(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_size_t(argv[2], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - int res = SWIG_ConvertPtr(argv[3], 0, SWIGTYPE_p_hfst__xeroxRules__Rule, SWIG_POINTER_NO_NULL | 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_HfstRuleVector_insert__SWIG_1(self, argc, argv); - } - } - } - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'HfstRuleVector_insert'.\n" - " Possible C/C++ prototypes are:\n" - " std::vector< hfst::xeroxRules::Rule >::insert(std::vector< hfst::xeroxRules::Rule >::iterator,std::vector< hfst::xeroxRules::Rule >::value_type const &)\n" - " std::vector< hfst::xeroxRules::Rule >::insert(std::vector< hfst::xeroxRules::Rule >::iterator,std::vector< hfst::xeroxRules::Rule >::size_type,std::vector< hfst::xeroxRules::Rule >::value_type const &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_HfstRuleVector_reserve(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< hfst::xeroxRules::Rule > *arg1 = (std::vector< hfst::xeroxRules::Rule > *) 0 ; - std::vector< hfst::xeroxRules::Rule >::size_type arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - size_t val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args, "HfstRuleVector_reserve", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst__xeroxRules__Rule_std__allocatorT_hfst__xeroxRules__Rule_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstRuleVector_reserve" "', argument " "1"" of type '" "std::vector< hfst::xeroxRules::Rule > *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst::xeroxRules::Rule > * >(argp1); - ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HfstRuleVector_reserve" "', argument " "2"" of type '" "std::vector< hfst::xeroxRules::Rule >::size_type""'"); - } - arg2 = static_cast< std::vector< hfst::xeroxRules::Rule >::size_type >(val2); - (arg1)->reserve(arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstRuleVector_capacity(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< hfst::xeroxRules::Rule > *arg1 = (std::vector< hfst::xeroxRules::Rule > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::vector< hfst::xeroxRules::Rule >::size_type result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst__xeroxRules__Rule_std__allocatorT_hfst__xeroxRules__Rule_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstRuleVector_capacity" "', argument " "1"" of type '" "std::vector< hfst::xeroxRules::Rule > const *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst::xeroxRules::Rule > * >(argp1); - result = ((std::vector< hfst::xeroxRules::Rule > const *)arg1)->capacity(); - resultobj = SWIG_From_size_t(static_cast< size_t >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_HfstRuleVector(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< hfst::xeroxRules::Rule > *arg1 = (std::vector< hfst::xeroxRules::Rule > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst__xeroxRules__Rule_std__allocatorT_hfst__xeroxRules__Rule_t_t, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_HfstRuleVector" "', argument " "1"" of type '" "std::vector< hfst::xeroxRules::Rule > *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst::xeroxRules::Rule > * >(argp1); - delete arg1; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *HfstRuleVector_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_std__vectorT_hfst__xeroxRules__Rule_std__allocatorT_hfst__xeroxRules__Rule_t_t, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *HfstRuleVector_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_new_HfstTransducerUIntPair__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **SWIGUNUSEDPARM(swig_obj)) { - PyObject *resultobj = 0; - std::pair< hfst::HfstTransducer *,unsigned int > *result = 0 ; - - if ((nobjs < 0) || (nobjs > 0)) SWIG_fail; - result = (std::pair< hfst::HfstTransducer *,unsigned int > *)new std::pair< hfst::HfstTransducer *,unsigned int >(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__pairT_hfst__HfstTransducer_p_unsigned_int_t, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_HfstTransducerUIntPair__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - hfst::HfstTransducer *arg1 = (hfst::HfstTransducer *) 0 ; - unsigned int arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - unsigned int val2 ; - int ecode2 = 0 ; - std::pair< hfst::HfstTransducer *,unsigned int > *result = 0 ; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__HfstTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_HfstTransducerUIntPair" "', argument " "1"" of type '" "hfst::HfstTransducer *""'"); - } - arg1 = reinterpret_cast< hfst::HfstTransducer * >(argp1); - ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_HfstTransducerUIntPair" "', argument " "2"" of type '" "unsigned int""'"); - } - arg2 = static_cast< unsigned int >(val2); - result = (std::pair< hfst::HfstTransducer *,unsigned int > *)new std::pair< hfst::HfstTransducer *,unsigned int >(arg1,arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__pairT_hfst__HfstTransducer_p_unsigned_int_t, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_HfstTransducerUIntPair__SWIG_2(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::pair< hfst::HfstTransducer *,unsigned int > *arg1 = 0 ; - int res1 = SWIG_OLDOBJ ; - std::pair< hfst::HfstTransducer *,unsigned int > *result = 0 ; - - if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; - { - std::pair< hfst::HfstTransducer*,unsigned int > *ptr = (std::pair< hfst::HfstTransducer*,unsigned int > *)0; - res1 = swig::asptr(swig_obj[0], &ptr); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_HfstTransducerUIntPair" "', argument " "1"" of type '" "std::pair< hfst::HfstTransducer *,unsigned int > const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_HfstTransducerUIntPair" "', argument " "1"" of type '" "std::pair< hfst::HfstTransducer *,unsigned int > const &""'"); - } - arg1 = ptr; - } - result = (std::pair< hfst::HfstTransducer *,unsigned int > *)new std::pair< hfst::HfstTransducer *,unsigned int >((std::pair< hfst::HfstTransducer *,unsigned int > const &)*arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__pairT_hfst__HfstTransducer_p_unsigned_int_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_new_HfstTransducerUIntPair(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[3] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "new_HfstTransducerUIntPair", 0, 2, argv))) SWIG_fail; - --argc; - if (argc == 0) { - return _wrap_new_HfstTransducerUIntPair__SWIG_0(self, argc, argv); - } - if (argc == 1) { - int _v; - int res = swig::asptr(argv[0], (std::pair< hfst::HfstTransducer*,unsigned int >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_new_HfstTransducerUIntPair__SWIG_2(self, argc, argv); - } - } - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_hfst__HfstTransducer, 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_new_HfstTransducerUIntPair__SWIG_1(self, argc, argv); - } - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'new_HfstTransducerUIntPair'.\n" - " Possible C/C++ prototypes are:\n" - " std::pair< hfst::HfstTransducer *,unsigned int >::pair()\n" - " std::pair< hfst::HfstTransducer *,unsigned int >::pair(hfst::HfstTransducer *,unsigned int)\n" - " std::pair< hfst::HfstTransducer *,unsigned int >::pair(std::pair< hfst::HfstTransducer *,unsigned int > const &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducerUIntPair_first_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::pair< hfst::HfstTransducer *,unsigned int > *arg1 = (std::pair< hfst::HfstTransducer *,unsigned int > *) 0 ; - hfst::HfstTransducer *arg2 = (hfst::HfstTransducer *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args, "HfstTransducerUIntPair_first_set", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__pairT_hfst__HfstTransducer_p_unsigned_int_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducerUIntPair_first_set" "', argument " "1"" of type '" "std::pair< hfst::HfstTransducer *,unsigned int > *""'"); - } - arg1 = reinterpret_cast< std::pair< hfst::HfstTransducer *,unsigned int > * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_hfst__HfstTransducer, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HfstTransducerUIntPair_first_set" "', argument " "2"" of type '" "hfst::HfstTransducer *""'"); - } - arg2 = reinterpret_cast< hfst::HfstTransducer * >(argp2); - if (arg1) (arg1)->first = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducerUIntPair_first_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::pair< hfst::HfstTransducer *,unsigned int > *arg1 = (std::pair< hfst::HfstTransducer *,unsigned int > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - hfst::HfstTransducer *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__pairT_hfst__HfstTransducer_p_unsigned_int_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducerUIntPair_first_get" "', argument " "1"" of type '" "std::pair< hfst::HfstTransducer *,unsigned int > *""'"); - } - arg1 = reinterpret_cast< std::pair< hfst::HfstTransducer *,unsigned int > * >(argp1); - result = (hfst::HfstTransducer *) ((arg1)->first); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_hfst__HfstTransducer, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducerUIntPair_second_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::pair< hfst::HfstTransducer *,unsigned int > *arg1 = (std::pair< hfst::HfstTransducer *,unsigned int > *) 0 ; - unsigned int arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - unsigned int val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args, "HfstTransducerUIntPair_second_set", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__pairT_hfst__HfstTransducer_p_unsigned_int_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducerUIntPair_second_set" "', argument " "1"" of type '" "std::pair< hfst::HfstTransducer *,unsigned int > *""'"); - } - arg1 = reinterpret_cast< std::pair< hfst::HfstTransducer *,unsigned int > * >(argp1); - ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HfstTransducerUIntPair_second_set" "', argument " "2"" of type '" "unsigned int""'"); - } - arg2 = static_cast< unsigned int >(val2); - if (arg1) (arg1)->second = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducerUIntPair_second_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::pair< hfst::HfstTransducer *,unsigned int > *arg1 = (std::pair< hfst::HfstTransducer *,unsigned int > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - unsigned int result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__pairT_hfst__HfstTransducer_p_unsigned_int_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducerUIntPair_second_get" "', argument " "1"" of type '" "std::pair< hfst::HfstTransducer *,unsigned int > *""'"); - } - arg1 = reinterpret_cast< std::pair< hfst::HfstTransducer *,unsigned int > * >(argp1); - result = (unsigned int) ((arg1)->second); - resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_HfstTransducerUIntPair(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::pair< hfst::HfstTransducer *,unsigned int > *arg1 = (std::pair< hfst::HfstTransducer *,unsigned int > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__pairT_hfst__HfstTransducer_p_unsigned_int_t, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_HfstTransducerUIntPair" "', argument " "1"" of type '" "std::pair< hfst::HfstTransducer *,unsigned int > *""'"); - } - arg1 = reinterpret_cast< std::pair< hfst::HfstTransducer *,unsigned int > * >(argp1); - delete arg1; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *HfstTransducerUIntPair_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_std__pairT_hfst__HfstTransducer_p_unsigned_int_t, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *HfstTransducerUIntPair_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_LocationVector_iterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< hfst_ol::Location > *arg1 = (std::vector< hfst_ol::Location > *) 0 ; - PyObject **arg2 = (PyObject **) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - swig::SwigPyIterator *result = 0 ; - - arg2 = &swig_obj[0]; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LocationVector_iterator" "', argument " "1"" of type '" "std::vector< hfst_ol::Location > *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst_ol::Location > * >(argp1); - result = (swig::SwigPyIterator *)std_vector_Sl_hfst_ol_Location_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_LocationVector___nonzero__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< hfst_ol::Location > *arg1 = (std::vector< hfst_ol::Location > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - bool result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LocationVector___nonzero__" "', argument " "1"" of type '" "std::vector< hfst_ol::Location > const *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst_ol::Location > * >(argp1); - result = (bool)std_vector_Sl_hfst_ol_Location_Sg____nonzero__((std::vector< hfst_ol::Location > const *)arg1); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_LocationVector___bool__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< hfst_ol::Location > *arg1 = (std::vector< hfst_ol::Location > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - bool result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LocationVector___bool__" "', argument " "1"" of type '" "std::vector< hfst_ol::Location > const *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst_ol::Location > * >(argp1); - result = (bool)std_vector_Sl_hfst_ol_Location_Sg____bool__((std::vector< hfst_ol::Location > const *)arg1); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_LocationVector___len__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< hfst_ol::Location > *arg1 = (std::vector< hfst_ol::Location > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::vector< hfst_ol::Location >::size_type result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LocationVector___len__" "', argument " "1"" of type '" "std::vector< hfst_ol::Location > const *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst_ol::Location > * >(argp1); - result = std_vector_Sl_hfst_ol_Location_Sg____len__((std::vector< hfst_ol::Location > const *)arg1); - resultobj = SWIG_From_size_t(static_cast< size_t >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_LocationVector___getslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< hfst_ol::Location > *arg1 = (std::vector< hfst_ol::Location > *) 0 ; - std::vector< hfst_ol::Location >::difference_type arg2 ; - std::vector< hfst_ol::Location >::difference_type arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - ptrdiff_t val2 ; - int ecode2 = 0 ; - ptrdiff_t val3 ; - int ecode3 = 0 ; - PyObject *swig_obj[3] ; - std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > > *result = 0 ; - - if (!SWIG_Python_UnpackTuple(args, "LocationVector___getslice__", 3, 3, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LocationVector___getslice__" "', argument " "1"" of type '" "std::vector< hfst_ol::Location > *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst_ol::Location > * >(argp1); - ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "LocationVector___getslice__" "', argument " "2"" of type '" "std::vector< hfst_ol::Location >::difference_type""'"); - } - arg2 = static_cast< std::vector< hfst_ol::Location >::difference_type >(val2); - ecode3 = SWIG_AsVal_ptrdiff_t(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "LocationVector___getslice__" "', argument " "3"" of type '" "std::vector< hfst_ol::Location >::difference_type""'"); - } - arg3 = static_cast< std::vector< hfst_ol::Location >::difference_type >(val3); - try { - result = (std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > > *)std_vector_Sl_hfst_ol_Location_Sg____getslice__(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_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_LocationVector___setslice____SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< hfst_ol::Location > *arg1 = (std::vector< hfst_ol::Location > *) 0 ; - std::vector< hfst_ol::Location >::difference_type arg2 ; - std::vector< hfst_ol::Location >::difference_type arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - ptrdiff_t val2 ; - int ecode2 = 0 ; - ptrdiff_t val3 ; - int ecode3 = 0 ; - - if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LocationVector___setslice__" "', argument " "1"" of type '" "std::vector< hfst_ol::Location > *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst_ol::Location > * >(argp1); - ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "LocationVector___setslice__" "', argument " "2"" of type '" "std::vector< hfst_ol::Location >::difference_type""'"); - } - arg2 = static_cast< std::vector< hfst_ol::Location >::difference_type >(val2); - ecode3 = SWIG_AsVal_ptrdiff_t(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "LocationVector___setslice__" "', argument " "3"" of type '" "std::vector< hfst_ol::Location >::difference_type""'"); - } - arg3 = static_cast< std::vector< hfst_ol::Location >::difference_type >(val3); - try { - std_vector_Sl_hfst_ol_Location_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_LocationVector___setslice____SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< hfst_ol::Location > *arg1 = (std::vector< hfst_ol::Location > *) 0 ; - std::vector< hfst_ol::Location >::difference_type arg2 ; - std::vector< hfst_ol::Location >::difference_type arg3 ; - std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > > *arg4 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - ptrdiff_t val2 ; - int ecode2 = 0 ; - ptrdiff_t val3 ; - int ecode3 = 0 ; - int res4 = SWIG_OLDOBJ ; - - if ((nobjs < 4) || (nobjs > 4)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LocationVector___setslice__" "', argument " "1"" of type '" "std::vector< hfst_ol::Location > *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst_ol::Location > * >(argp1); - ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "LocationVector___setslice__" "', argument " "2"" of type '" "std::vector< hfst_ol::Location >::difference_type""'"); - } - arg2 = static_cast< std::vector< hfst_ol::Location >::difference_type >(val2); - ecode3 = SWIG_AsVal_ptrdiff_t(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "LocationVector___setslice__" "', argument " "3"" of type '" "std::vector< hfst_ol::Location >::difference_type""'"); - } - arg3 = static_cast< std::vector< hfst_ol::Location >::difference_type >(val3); - { - std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > > *ptr = (std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > > *)0; - res4 = swig::asptr(swig_obj[3], &ptr); - if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "LocationVector___setslice__" "', argument " "4"" of type '" "std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > > const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "LocationVector___setslice__" "', argument " "4"" of type '" "std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > > const &""'"); - } - arg4 = ptr; - } - try { - std_vector_Sl_hfst_ol_Location_Sg____setslice____SWIG_1(arg1,arg2,arg3,(std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > > 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_LocationVector___setslice__(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[5] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "LocationVector___setslice__", 0, 4, argv))) SWIG_fail; - --argc; - if (argc == 3) { - int _v; - int res = swig::asptr(argv[0], (std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > >**)(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_LocationVector___setslice____SWIG_0(self, argc, argv); - } - } - } - } - if (argc == 4) { - int _v; - int res = swig::asptr(argv[0], (std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > >**)(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< hfst_ol::Location,std::allocator< hfst_ol::Location > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_LocationVector___setslice____SWIG_1(self, argc, argv); - } - } - } - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'LocationVector___setslice__'.\n" - " Possible C/C++ prototypes are:\n" - " std::vector< hfst_ol::Location >::__setslice__(std::vector< hfst_ol::Location >::difference_type,std::vector< hfst_ol::Location >::difference_type)\n" - " std::vector< hfst_ol::Location >::__setslice__(std::vector< hfst_ol::Location >::difference_type,std::vector< hfst_ol::Location >::difference_type,std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > > const &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_LocationVector___delslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< hfst_ol::Location > *arg1 = (std::vector< hfst_ol::Location > *) 0 ; - std::vector< hfst_ol::Location >::difference_type arg2 ; - std::vector< hfst_ol::Location >::difference_type arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - ptrdiff_t val2 ; - int ecode2 = 0 ; - ptrdiff_t val3 ; - int ecode3 = 0 ; - PyObject *swig_obj[3] ; - - if (!SWIG_Python_UnpackTuple(args, "LocationVector___delslice__", 3, 3, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LocationVector___delslice__" "', argument " "1"" of type '" "std::vector< hfst_ol::Location > *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst_ol::Location > * >(argp1); - ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "LocationVector___delslice__" "', argument " "2"" of type '" "std::vector< hfst_ol::Location >::difference_type""'"); - } - arg2 = static_cast< std::vector< hfst_ol::Location >::difference_type >(val2); - ecode3 = SWIG_AsVal_ptrdiff_t(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "LocationVector___delslice__" "', argument " "3"" of type '" "std::vector< hfst_ol::Location >::difference_type""'"); - } - arg3 = static_cast< std::vector< hfst_ol::Location >::difference_type >(val3); - try { - std_vector_Sl_hfst_ol_Location_Sg____delslice__(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_LocationVector___delitem____SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< hfst_ol::Location > *arg1 = (std::vector< hfst_ol::Location > *) 0 ; - std::vector< hfst_ol::Location >::difference_type arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - ptrdiff_t val2 ; - int ecode2 = 0 ; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LocationVector___delitem__" "', argument " "1"" of type '" "std::vector< hfst_ol::Location > *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst_ol::Location > * >(argp1); - ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "LocationVector___delitem__" "', argument " "2"" of type '" "std::vector< hfst_ol::Location >::difference_type""'"); - } - arg2 = static_cast< std::vector< hfst_ol::Location >::difference_type >(val2); - try { - std_vector_Sl_hfst_ol_Location_Sg____delitem____SWIG_0(arg1,arg2); - } 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_LocationVector___getitem____SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< hfst_ol::Location > *arg1 = (std::vector< hfst_ol::Location > *) 0 ; - PySliceObject *arg2 = (PySliceObject *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > > *result = 0 ; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LocationVector___getitem__" "', argument " "1"" of type '" "std::vector< hfst_ol::Location > *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst_ol::Location > * >(argp1); - { - if (!PySlice_Check(swig_obj[1])) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "LocationVector___getitem__" "', argument " "2"" of type '" "PySliceObject *""'"); - } - arg2 = (PySliceObject *) swig_obj[1]; - } - try { - result = (std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > > *)std_vector_Sl_hfst_ol_Location_Sg____getitem____SWIG_0(arg1,arg2); - } 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_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_LocationVector___setitem____SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< hfst_ol::Location > *arg1 = (std::vector< hfst_ol::Location > *) 0 ; - PySliceObject *arg2 = (PySliceObject *) 0 ; - std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > > *arg3 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res3 = SWIG_OLDOBJ ; - - if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LocationVector___setitem__" "', argument " "1"" of type '" "std::vector< hfst_ol::Location > *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst_ol::Location > * >(argp1); - { - if (!PySlice_Check(swig_obj[1])) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "LocationVector___setitem__" "', argument " "2"" of type '" "PySliceObject *""'"); - } - arg2 = (PySliceObject *) swig_obj[1]; - } - { - std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > > *ptr = (std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > > *)0; - res3 = swig::asptr(swig_obj[2], &ptr); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "LocationVector___setitem__" "', argument " "3"" of type '" "std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > > const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "LocationVector___setitem__" "', argument " "3"" of type '" "std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > > const &""'"); - } - arg3 = ptr; - } - try { - std_vector_Sl_hfst_ol_Location_Sg____setitem____SWIG_0(arg1,arg2,(std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > > 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_LocationVector___setitem____SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< hfst_ol::Location > *arg1 = (std::vector< hfst_ol::Location > *) 0 ; - PySliceObject *arg2 = (PySliceObject *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LocationVector___setitem__" "', argument " "1"" of type '" "std::vector< hfst_ol::Location > *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst_ol::Location > * >(argp1); - { - if (!PySlice_Check(swig_obj[1])) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "LocationVector___setitem__" "', argument " "2"" of type '" "PySliceObject *""'"); - } - arg2 = (PySliceObject *) swig_obj[1]; - } - try { - std_vector_Sl_hfst_ol_Location_Sg____setitem____SWIG_1(arg1,arg2); - } 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_LocationVector___delitem____SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< hfst_ol::Location > *arg1 = (std::vector< hfst_ol::Location > *) 0 ; - PySliceObject *arg2 = (PySliceObject *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LocationVector___delitem__" "', argument " "1"" of type '" "std::vector< hfst_ol::Location > *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst_ol::Location > * >(argp1); - { - if (!PySlice_Check(swig_obj[1])) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "LocationVector___delitem__" "', argument " "2"" of type '" "PySliceObject *""'"); - } - arg2 = (PySliceObject *) swig_obj[1]; - } - try { - std_vector_Sl_hfst_ol_Location_Sg____delitem____SWIG_1(arg1,arg2); - } 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_LocationVector___delitem__(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[3] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "LocationVector___delitem__", 0, 2, argv))) SWIG_fail; - --argc; - if (argc == 2) { - int _v; - int res = swig::asptr(argv[0], (std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - { - _v = PySlice_Check(argv[1]); - } - if (_v) { - return _wrap_LocationVector___delitem____SWIG_1(self, argc, argv); - } - } - } - if (argc == 2) { - int _v; - int res = swig::asptr(argv[0], (std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_LocationVector___delitem____SWIG_0(self, argc, argv); - } - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'LocationVector___delitem__'.\n" - " Possible C/C++ prototypes are:\n" - " std::vector< hfst_ol::Location >::__delitem__(std::vector< hfst_ol::Location >::difference_type)\n" - " std::vector< hfst_ol::Location >::__delitem__(PySliceObject *)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_LocationVector___getitem____SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< hfst_ol::Location > *arg1 = (std::vector< hfst_ol::Location > *) 0 ; - std::vector< hfst_ol::Location >::difference_type arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - ptrdiff_t val2 ; - int ecode2 = 0 ; - std::vector< hfst_ol::Location >::value_type *result = 0 ; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LocationVector___getitem__" "', argument " "1"" of type '" "std::vector< hfst_ol::Location > const *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst_ol::Location > * >(argp1); - ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "LocationVector___getitem__" "', argument " "2"" of type '" "std::vector< hfst_ol::Location >::difference_type""'"); - } - arg2 = static_cast< std::vector< hfst_ol::Location >::difference_type >(val2); - try { - result = (std::vector< hfst_ol::Location >::value_type *) &std_vector_Sl_hfst_ol_Location_Sg____getitem____SWIG_1((std::vector< hfst_ol::Location > const *)arg1,arg2); - } catch(std::out_of_range &_e) { - SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_hfst_ol__Location, 0 | 0 ); - (void)swig::container_owner::value_type>::category>::back_reference(resultobj, swig_obj[0]); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_LocationVector___getitem__(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[3] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "LocationVector___getitem__", 0, 2, argv))) SWIG_fail; - --argc; - if (argc == 2) { - int _v; - int res = swig::asptr(argv[0], (std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - { - _v = PySlice_Check(argv[1]); - } - if (_v) { - return _wrap_LocationVector___getitem____SWIG_0(self, argc, argv); - } - } - } - if (argc == 2) { - int _v; - int res = swig::asptr(argv[0], (std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_LocationVector___getitem____SWIG_1(self, argc, argv); - } - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'LocationVector___getitem__'.\n" - " Possible C/C++ prototypes are:\n" - " std::vector< hfst_ol::Location >::__getitem__(PySliceObject *)\n" - " std::vector< hfst_ol::Location >::__getitem__(std::vector< hfst_ol::Location >::difference_type) const\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_LocationVector___setitem____SWIG_2(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< hfst_ol::Location > *arg1 = (std::vector< hfst_ol::Location > *) 0 ; - std::vector< hfst_ol::Location >::difference_type arg2 ; - std::vector< hfst_ol::Location >::value_type *arg3 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - ptrdiff_t val2 ; - int ecode2 = 0 ; - void *argp3 = 0 ; - int res3 = 0 ; - - if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LocationVector___setitem__" "', argument " "1"" of type '" "std::vector< hfst_ol::Location > *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst_ol::Location > * >(argp1); - ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "LocationVector___setitem__" "', argument " "2"" of type '" "std::vector< hfst_ol::Location >::difference_type""'"); - } - arg2 = static_cast< std::vector< hfst_ol::Location >::difference_type >(val2); - res3 = SWIG_ConvertPtr(swig_obj[2], &argp3, SWIGTYPE_p_hfst_ol__Location, 0 | 0); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "LocationVector___setitem__" "', argument " "3"" of type '" "std::vector< hfst_ol::Location >::value_type const &""'"); - } - if (!argp3) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "LocationVector___setitem__" "', argument " "3"" of type '" "std::vector< hfst_ol::Location >::value_type const &""'"); - } - arg3 = reinterpret_cast< std::vector< hfst_ol::Location >::value_type * >(argp3); - try { - std_vector_Sl_hfst_ol_Location_Sg____setitem____SWIG_2(arg1,arg2,(hfst_ol::Location 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_LocationVector___setitem__(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[4] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "LocationVector___setitem__", 0, 3, argv))) SWIG_fail; - --argc; - if (argc == 2) { - int _v; - int res = swig::asptr(argv[0], (std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - { - _v = PySlice_Check(argv[1]); - } - if (_v) { - return _wrap_LocationVector___setitem____SWIG_1(self, argc, argv); - } - } - } - if (argc == 3) { - int _v; - int res = swig::asptr(argv[0], (std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - { - _v = PySlice_Check(argv[1]); - } - if (_v) { - int res = swig::asptr(argv[2], (std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_LocationVector___setitem____SWIG_0(self, argc, argv); - } - } - } - } - if (argc == 3) { - int _v; - int res = swig::asptr(argv[0], (std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > >**)(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_ConvertPtr(argv[2], 0, SWIGTYPE_p_hfst_ol__Location, SWIG_POINTER_NO_NULL | 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_LocationVector___setitem____SWIG_2(self, argc, argv); - } - } - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'LocationVector___setitem__'.\n" - " Possible C/C++ prototypes are:\n" - " std::vector< hfst_ol::Location >::__setitem__(PySliceObject *,std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > > const &)\n" - " std::vector< hfst_ol::Location >::__setitem__(PySliceObject *)\n" - " std::vector< hfst_ol::Location >::__setitem__(std::vector< hfst_ol::Location >::difference_type,std::vector< hfst_ol::Location >::value_type const &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_LocationVector_pop(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< hfst_ol::Location > *arg1 = (std::vector< hfst_ol::Location > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::vector< hfst_ol::Location >::value_type result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LocationVector_pop" "', argument " "1"" of type '" "std::vector< hfst_ol::Location > *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst_ol::Location > * >(argp1); - try { - result = std_vector_Sl_hfst_ol_Location_Sg__pop(arg1); - } catch(std::out_of_range &_e) { - SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); - } - resultobj = SWIG_NewPointerObj((new std::vector< hfst_ol::Location >::value_type(static_cast< const std::vector< hfst_ol::Location >::value_type& >(result))), SWIGTYPE_p_hfst_ol__Location, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_LocationVector_append(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< hfst_ol::Location > *arg1 = (std::vector< hfst_ol::Location > *) 0 ; - std::vector< hfst_ol::Location >::value_type *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args, "LocationVector_append", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LocationVector_append" "', argument " "1"" of type '" "std::vector< hfst_ol::Location > *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst_ol::Location > * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_hfst_ol__Location, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "LocationVector_append" "', argument " "2"" of type '" "std::vector< hfst_ol::Location >::value_type const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "LocationVector_append" "', argument " "2"" of type '" "std::vector< hfst_ol::Location >::value_type const &""'"); - } - arg2 = reinterpret_cast< std::vector< hfst_ol::Location >::value_type * >(argp2); - std_vector_Sl_hfst_ol_Location_Sg__append(arg1,(hfst_ol::Location const &)*arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_LocationVector__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **SWIGUNUSEDPARM(swig_obj)) { - PyObject *resultobj = 0; - std::vector< hfst_ol::Location > *result = 0 ; - - if ((nobjs < 0) || (nobjs > 0)) SWIG_fail; - result = (std::vector< hfst_ol::Location > *)new std::vector< hfst_ol::Location >(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_LocationVector__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< hfst_ol::Location > *arg1 = 0 ; - int res1 = SWIG_OLDOBJ ; - std::vector< hfst_ol::Location > *result = 0 ; - - if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; - { - std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > > *ptr = (std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > > *)0; - res1 = swig::asptr(swig_obj[0], &ptr); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_LocationVector" "', argument " "1"" of type '" "std::vector< hfst_ol::Location > const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_LocationVector" "', argument " "1"" of type '" "std::vector< hfst_ol::Location > const &""'"); - } - arg1 = ptr; - } - result = (std::vector< hfst_ol::Location > *)new std::vector< hfst_ol::Location >((std::vector< hfst_ol::Location > const &)*arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_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_LocationVector_empty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< hfst_ol::Location > *arg1 = (std::vector< hfst_ol::Location > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - bool result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LocationVector_empty" "', argument " "1"" of type '" "std::vector< hfst_ol::Location > const *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst_ol::Location > * >(argp1); - result = (bool)((std::vector< hfst_ol::Location > const *)arg1)->empty(); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_LocationVector_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< hfst_ol::Location > *arg1 = (std::vector< hfst_ol::Location > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::vector< hfst_ol::Location >::size_type result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LocationVector_size" "', argument " "1"" of type '" "std::vector< hfst_ol::Location > const *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst_ol::Location > * >(argp1); - result = ((std::vector< hfst_ol::Location > const *)arg1)->size(); - resultobj = SWIG_From_size_t(static_cast< size_t >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_LocationVector_swap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< hfst_ol::Location > *arg1 = (std::vector< hfst_ol::Location > *) 0 ; - std::vector< hfst_ol::Location > *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args, "LocationVector_swap", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LocationVector_swap" "', argument " "1"" of type '" "std::vector< hfst_ol::Location > *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst_ol::Location > * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t, 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "LocationVector_swap" "', argument " "2"" of type '" "std::vector< hfst_ol::Location > &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "LocationVector_swap" "', argument " "2"" of type '" "std::vector< hfst_ol::Location > &""'"); - } - arg2 = reinterpret_cast< std::vector< hfst_ol::Location > * >(argp2); - (arg1)->swap(*arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_LocationVector_begin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< hfst_ol::Location > *arg1 = (std::vector< hfst_ol::Location > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::vector< hfst_ol::Location >::iterator result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LocationVector_begin" "', argument " "1"" of type '" "std::vector< hfst_ol::Location > *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst_ol::Location > * >(argp1); - result = (arg1)->begin(); - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< hfst_ol::Location >::iterator & >(result)), - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_LocationVector_end(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< hfst_ol::Location > *arg1 = (std::vector< hfst_ol::Location > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::vector< hfst_ol::Location >::iterator result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LocationVector_end" "', argument " "1"" of type '" "std::vector< hfst_ol::Location > *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst_ol::Location > * >(argp1); - result = (arg1)->end(); - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< hfst_ol::Location >::iterator & >(result)), - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_LocationVector_rbegin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< hfst_ol::Location > *arg1 = (std::vector< hfst_ol::Location > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::vector< hfst_ol::Location >::reverse_iterator result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LocationVector_rbegin" "', argument " "1"" of type '" "std::vector< hfst_ol::Location > *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst_ol::Location > * >(argp1); - result = (arg1)->rbegin(); - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< hfst_ol::Location >::reverse_iterator & >(result)), - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_LocationVector_rend(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< hfst_ol::Location > *arg1 = (std::vector< hfst_ol::Location > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::vector< hfst_ol::Location >::reverse_iterator result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LocationVector_rend" "', argument " "1"" of type '" "std::vector< hfst_ol::Location > *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst_ol::Location > * >(argp1); - result = (arg1)->rend(); - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< hfst_ol::Location >::reverse_iterator & >(result)), - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_LocationVector_clear(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< hfst_ol::Location > *arg1 = (std::vector< hfst_ol::Location > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LocationVector_clear" "', argument " "1"" of type '" "std::vector< hfst_ol::Location > *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst_ol::Location > * >(argp1); - (arg1)->clear(); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_LocationVector_get_allocator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< hfst_ol::Location > *arg1 = (std::vector< hfst_ol::Location > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - SwigValueWrapper< std::allocator< hfst_ol::Location > > result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LocationVector_get_allocator" "', argument " "1"" of type '" "std::vector< hfst_ol::Location > const *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst_ol::Location > * >(argp1); - result = ((std::vector< hfst_ol::Location > const *)arg1)->get_allocator(); - resultobj = SWIG_NewPointerObj((new std::vector< hfst_ol::Location >::allocator_type(static_cast< const std::vector< hfst_ol::Location >::allocator_type& >(result))), SWIGTYPE_p_std__allocatorT_hfst_ol__Location_t, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_LocationVector__SWIG_2(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< hfst_ol::Location >::size_type arg1 ; - size_t val1 ; - int ecode1 = 0 ; - std::vector< hfst_ol::Location > *result = 0 ; - - if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; - ecode1 = SWIG_AsVal_size_t(swig_obj[0], &val1); - if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_LocationVector" "', argument " "1"" of type '" "std::vector< hfst_ol::Location >::size_type""'"); - } - arg1 = static_cast< std::vector< hfst_ol::Location >::size_type >(val1); - result = (std::vector< hfst_ol::Location > *)new std::vector< hfst_ol::Location >(arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_LocationVector_pop_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< hfst_ol::Location > *arg1 = (std::vector< hfst_ol::Location > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LocationVector_pop_back" "', argument " "1"" of type '" "std::vector< hfst_ol::Location > *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst_ol::Location > * >(argp1); - (arg1)->pop_back(); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_LocationVector_resize__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< hfst_ol::Location > *arg1 = (std::vector< hfst_ol::Location > *) 0 ; - std::vector< hfst_ol::Location >::size_type arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - size_t val2 ; - int ecode2 = 0 ; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LocationVector_resize" "', argument " "1"" of type '" "std::vector< hfst_ol::Location > *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst_ol::Location > * >(argp1); - ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "LocationVector_resize" "', argument " "2"" of type '" "std::vector< hfst_ol::Location >::size_type""'"); - } - arg2 = static_cast< std::vector< hfst_ol::Location >::size_type >(val2); - (arg1)->resize(arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_LocationVector_erase__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< hfst_ol::Location > *arg1 = (std::vector< hfst_ol::Location > *) 0 ; - std::vector< hfst_ol::Location >::iterator arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - swig::SwigPyIterator *iter2 = 0 ; - int res2 ; - std::vector< hfst_ol::Location >::iterator result; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LocationVector_erase" "', argument " "1"" of type '" "std::vector< hfst_ol::Location > *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst_ol::Location > * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0); - if (!SWIG_IsOK(res2) || !iter2) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "LocationVector_erase" "', argument " "2"" of type '" "std::vector< hfst_ol::Location >::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 '" "LocationVector_erase" "', argument " "2"" of type '" "std::vector< hfst_ol::Location >::iterator""'"); - } - } - result = std_vector_Sl_hfst_ol_Location_Sg__erase__SWIG_0(arg1,arg2); - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< hfst_ol::Location >::iterator & >(result)), - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_LocationVector_erase__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< hfst_ol::Location > *arg1 = (std::vector< hfst_ol::Location > *) 0 ; - std::vector< hfst_ol::Location >::iterator arg2 ; - std::vector< hfst_ol::Location >::iterator arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - swig::SwigPyIterator *iter2 = 0 ; - int res2 ; - swig::SwigPyIterator *iter3 = 0 ; - int res3 ; - std::vector< hfst_ol::Location >::iterator result; - - if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LocationVector_erase" "', argument " "1"" of type '" "std::vector< hfst_ol::Location > *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst_ol::Location > * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0); - if (!SWIG_IsOK(res2) || !iter2) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "LocationVector_erase" "', argument " "2"" of type '" "std::vector< hfst_ol::Location >::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 '" "LocationVector_erase" "', argument " "2"" of type '" "std::vector< hfst_ol::Location >::iterator""'"); - } - } - res3 = SWIG_ConvertPtr(swig_obj[2], SWIG_as_voidptrptr(&iter3), swig::SwigPyIterator::descriptor(), 0); - if (!SWIG_IsOK(res3) || !iter3) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "LocationVector_erase" "', argument " "3"" of type '" "std::vector< hfst_ol::Location >::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 '" "LocationVector_erase" "', argument " "3"" of type '" "std::vector< hfst_ol::Location >::iterator""'"); - } - } - result = std_vector_Sl_hfst_ol_Location_Sg__erase__SWIG_1(arg1,arg2,arg3); - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< hfst_ol::Location >::iterator & >(result)), - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_LocationVector_erase(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[4] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "LocationVector_erase", 0, 3, argv))) SWIG_fail; - --argc; - if (argc == 2) { - int _v; - int res = swig::asptr(argv[0], (std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > >**)(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_LocationVector_erase__SWIG_0(self, argc, argv); - } - } - } - if (argc == 3) { - int _v; - int res = swig::asptr(argv[0], (std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > >**)(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_LocationVector_erase__SWIG_1(self, argc, argv); - } - } - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'LocationVector_erase'.\n" - " Possible C/C++ prototypes are:\n" - " std::vector< hfst_ol::Location >::erase(std::vector< hfst_ol::Location >::iterator)\n" - " std::vector< hfst_ol::Location >::erase(std::vector< hfst_ol::Location >::iterator,std::vector< hfst_ol::Location >::iterator)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_new_LocationVector__SWIG_3(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< hfst_ol::Location >::size_type arg1 ; - std::vector< hfst_ol::Location >::value_type *arg2 = 0 ; - size_t val1 ; - int ecode1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - std::vector< hfst_ol::Location > *result = 0 ; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - ecode1 = SWIG_AsVal_size_t(swig_obj[0], &val1); - if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_LocationVector" "', argument " "1"" of type '" "std::vector< hfst_ol::Location >::size_type""'"); - } - arg1 = static_cast< std::vector< hfst_ol::Location >::size_type >(val1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_hfst_ol__Location, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_LocationVector" "', argument " "2"" of type '" "std::vector< hfst_ol::Location >::value_type const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_LocationVector" "', argument " "2"" of type '" "std::vector< hfst_ol::Location >::value_type const &""'"); - } - arg2 = reinterpret_cast< std::vector< hfst_ol::Location >::value_type * >(argp2); - result = (std::vector< hfst_ol::Location > *)new std::vector< hfst_ol::Location >(arg1,(std::vector< hfst_ol::Location >::value_type const &)*arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_LocationVector(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[3] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "new_LocationVector", 0, 2, argv))) SWIG_fail; - --argc; - if (argc == 0) { - return _wrap_new_LocationVector__SWIG_0(self, argc, argv); - } - if (argc == 1) { - int _v; - { - int res = SWIG_AsVal_size_t(argv[0], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_new_LocationVector__SWIG_2(self, argc, argv); - } - } - if (argc == 1) { - int _v; - int res = swig::asptr(argv[0], (std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_new_LocationVector__SWIG_1(self, argc, argv); - } - } - if (argc == 2) { - int _v; - { - int res = SWIG_AsVal_size_t(argv[0], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_hfst_ol__Location, SWIG_POINTER_NO_NULL | 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_new_LocationVector__SWIG_3(self, argc, argv); - } - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'new_LocationVector'.\n" - " Possible C/C++ prototypes are:\n" - " std::vector< hfst_ol::Location >::vector()\n" - " std::vector< hfst_ol::Location >::vector(std::vector< hfst_ol::Location > const &)\n" - " std::vector< hfst_ol::Location >::vector(std::vector< hfst_ol::Location >::size_type)\n" - " std::vector< hfst_ol::Location >::vector(std::vector< hfst_ol::Location >::size_type,std::vector< hfst_ol::Location >::value_type const &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_LocationVector_push_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< hfst_ol::Location > *arg1 = (std::vector< hfst_ol::Location > *) 0 ; - std::vector< hfst_ol::Location >::value_type *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args, "LocationVector_push_back", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LocationVector_push_back" "', argument " "1"" of type '" "std::vector< hfst_ol::Location > *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst_ol::Location > * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_hfst_ol__Location, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "LocationVector_push_back" "', argument " "2"" of type '" "std::vector< hfst_ol::Location >::value_type const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "LocationVector_push_back" "', argument " "2"" of type '" "std::vector< hfst_ol::Location >::value_type const &""'"); - } - arg2 = reinterpret_cast< std::vector< hfst_ol::Location >::value_type * >(argp2); - (arg1)->push_back((std::vector< hfst_ol::Location >::value_type const &)*arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_LocationVector_front(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< hfst_ol::Location > *arg1 = (std::vector< hfst_ol::Location > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::vector< hfst_ol::Location >::value_type *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LocationVector_front" "', argument " "1"" of type '" "std::vector< hfst_ol::Location > const *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst_ol::Location > * >(argp1); - result = (std::vector< hfst_ol::Location >::value_type *) &((std::vector< hfst_ol::Location > const *)arg1)->front(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_hfst_ol__Location, 0 | 0 ); - (void)swig::container_owner::value_type>::category>::back_reference(resultobj, swig_obj[0]); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_LocationVector_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< hfst_ol::Location > *arg1 = (std::vector< hfst_ol::Location > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::vector< hfst_ol::Location >::value_type *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LocationVector_back" "', argument " "1"" of type '" "std::vector< hfst_ol::Location > const *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst_ol::Location > * >(argp1); - result = (std::vector< hfst_ol::Location >::value_type *) &((std::vector< hfst_ol::Location > const *)arg1)->back(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_hfst_ol__Location, 0 | 0 ); - (void)swig::container_owner::value_type>::category>::back_reference(resultobj, swig_obj[0]); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_LocationVector_assign(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< hfst_ol::Location > *arg1 = (std::vector< hfst_ol::Location > *) 0 ; - std::vector< hfst_ol::Location >::size_type arg2 ; - std::vector< hfst_ol::Location >::value_type *arg3 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - size_t val2 ; - int ecode2 = 0 ; - void *argp3 = 0 ; - int res3 = 0 ; - PyObject *swig_obj[3] ; - - if (!SWIG_Python_UnpackTuple(args, "LocationVector_assign", 3, 3, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LocationVector_assign" "', argument " "1"" of type '" "std::vector< hfst_ol::Location > *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst_ol::Location > * >(argp1); - ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "LocationVector_assign" "', argument " "2"" of type '" "std::vector< hfst_ol::Location >::size_type""'"); - } - arg2 = static_cast< std::vector< hfst_ol::Location >::size_type >(val2); - res3 = SWIG_ConvertPtr(swig_obj[2], &argp3, SWIGTYPE_p_hfst_ol__Location, 0 | 0); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "LocationVector_assign" "', argument " "3"" of type '" "std::vector< hfst_ol::Location >::value_type const &""'"); - } - if (!argp3) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "LocationVector_assign" "', argument " "3"" of type '" "std::vector< hfst_ol::Location >::value_type const &""'"); - } - arg3 = reinterpret_cast< std::vector< hfst_ol::Location >::value_type * >(argp3); - (arg1)->assign(arg2,(std::vector< hfst_ol::Location >::value_type const &)*arg3); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_LocationVector_resize__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< hfst_ol::Location > *arg1 = (std::vector< hfst_ol::Location > *) 0 ; - std::vector< hfst_ol::Location >::size_type arg2 ; - std::vector< hfst_ol::Location >::value_type *arg3 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - size_t val2 ; - int ecode2 = 0 ; - void *argp3 = 0 ; - int res3 = 0 ; - - if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LocationVector_resize" "', argument " "1"" of type '" "std::vector< hfst_ol::Location > *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst_ol::Location > * >(argp1); - ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "LocationVector_resize" "', argument " "2"" of type '" "std::vector< hfst_ol::Location >::size_type""'"); - } - arg2 = static_cast< std::vector< hfst_ol::Location >::size_type >(val2); - res3 = SWIG_ConvertPtr(swig_obj[2], &argp3, SWIGTYPE_p_hfst_ol__Location, 0 | 0); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "LocationVector_resize" "', argument " "3"" of type '" "std::vector< hfst_ol::Location >::value_type const &""'"); - } - if (!argp3) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "LocationVector_resize" "', argument " "3"" of type '" "std::vector< hfst_ol::Location >::value_type const &""'"); - } - arg3 = reinterpret_cast< std::vector< hfst_ol::Location >::value_type * >(argp3); - (arg1)->resize(arg2,(std::vector< hfst_ol::Location >::value_type const &)*arg3); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_LocationVector_resize(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[4] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "LocationVector_resize", 0, 3, argv))) SWIG_fail; - --argc; - if (argc == 2) { - int _v; - int res = swig::asptr(argv[0], (std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_size_t(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_LocationVector_resize__SWIG_0(self, argc, argv); - } - } - } - if (argc == 3) { - int _v; - int res = swig::asptr(argv[0], (std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_size_t(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_hfst_ol__Location, SWIG_POINTER_NO_NULL | 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_LocationVector_resize__SWIG_1(self, argc, argv); - } - } - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'LocationVector_resize'.\n" - " Possible C/C++ prototypes are:\n" - " std::vector< hfst_ol::Location >::resize(std::vector< hfst_ol::Location >::size_type)\n" - " std::vector< hfst_ol::Location >::resize(std::vector< hfst_ol::Location >::size_type,std::vector< hfst_ol::Location >::value_type const &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_LocationVector_insert__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< hfst_ol::Location > *arg1 = (std::vector< hfst_ol::Location > *) 0 ; - std::vector< hfst_ol::Location >::iterator arg2 ; - std::vector< hfst_ol::Location >::value_type *arg3 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - swig::SwigPyIterator *iter2 = 0 ; - int res2 ; - void *argp3 = 0 ; - int res3 = 0 ; - std::vector< hfst_ol::Location >::iterator result; - - if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LocationVector_insert" "', argument " "1"" of type '" "std::vector< hfst_ol::Location > *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst_ol::Location > * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0); - if (!SWIG_IsOK(res2) || !iter2) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "LocationVector_insert" "', argument " "2"" of type '" "std::vector< hfst_ol::Location >::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 '" "LocationVector_insert" "', argument " "2"" of type '" "std::vector< hfst_ol::Location >::iterator""'"); - } - } - res3 = SWIG_ConvertPtr(swig_obj[2], &argp3, SWIGTYPE_p_hfst_ol__Location, 0 | 0); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "LocationVector_insert" "', argument " "3"" of type '" "std::vector< hfst_ol::Location >::value_type const &""'"); - } - if (!argp3) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "LocationVector_insert" "', argument " "3"" of type '" "std::vector< hfst_ol::Location >::value_type const &""'"); - } - arg3 = reinterpret_cast< std::vector< hfst_ol::Location >::value_type * >(argp3); - result = std_vector_Sl_hfst_ol_Location_Sg__insert__SWIG_0(arg1,arg2,(hfst_ol::Location const &)*arg3); - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< hfst_ol::Location >::iterator & >(result)), - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_LocationVector_insert__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< hfst_ol::Location > *arg1 = (std::vector< hfst_ol::Location > *) 0 ; - std::vector< hfst_ol::Location >::iterator arg2 ; - std::vector< hfst_ol::Location >::size_type arg3 ; - std::vector< hfst_ol::Location >::value_type *arg4 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - swig::SwigPyIterator *iter2 = 0 ; - int res2 ; - size_t val3 ; - int ecode3 = 0 ; - void *argp4 = 0 ; - int res4 = 0 ; - - if ((nobjs < 4) || (nobjs > 4)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LocationVector_insert" "', argument " "1"" of type '" "std::vector< hfst_ol::Location > *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst_ol::Location > * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0); - if (!SWIG_IsOK(res2) || !iter2) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "LocationVector_insert" "', argument " "2"" of type '" "std::vector< hfst_ol::Location >::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 '" "LocationVector_insert" "', argument " "2"" of type '" "std::vector< hfst_ol::Location >::iterator""'"); - } - } - ecode3 = SWIG_AsVal_size_t(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "LocationVector_insert" "', argument " "3"" of type '" "std::vector< hfst_ol::Location >::size_type""'"); - } - arg3 = static_cast< std::vector< hfst_ol::Location >::size_type >(val3); - res4 = SWIG_ConvertPtr(swig_obj[3], &argp4, SWIGTYPE_p_hfst_ol__Location, 0 | 0); - if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "LocationVector_insert" "', argument " "4"" of type '" "std::vector< hfst_ol::Location >::value_type const &""'"); - } - if (!argp4) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "LocationVector_insert" "', argument " "4"" of type '" "std::vector< hfst_ol::Location >::value_type const &""'"); - } - arg4 = reinterpret_cast< std::vector< hfst_ol::Location >::value_type * >(argp4); - std_vector_Sl_hfst_ol_Location_Sg__insert__SWIG_1(arg1,arg2,arg3,(hfst_ol::Location const &)*arg4); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_LocationVector_insert(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[5] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "LocationVector_insert", 0, 4, argv))) SWIG_fail; - --argc; - if (argc == 3) { - int _v; - int res = swig::asptr(argv[0], (std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > >**)(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_ConvertPtr(argv[2], 0, SWIGTYPE_p_hfst_ol__Location, SWIG_POINTER_NO_NULL | 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_LocationVector_insert__SWIG_0(self, argc, argv); - } - } - } - } - if (argc == 4) { - int _v; - int res = swig::asptr(argv[0], (std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > >**)(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_size_t(argv[2], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - int res = SWIG_ConvertPtr(argv[3], 0, SWIGTYPE_p_hfst_ol__Location, SWIG_POINTER_NO_NULL | 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_LocationVector_insert__SWIG_1(self, argc, argv); - } - } - } - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'LocationVector_insert'.\n" - " Possible C/C++ prototypes are:\n" - " std::vector< hfst_ol::Location >::insert(std::vector< hfst_ol::Location >::iterator,std::vector< hfst_ol::Location >::value_type const &)\n" - " std::vector< hfst_ol::Location >::insert(std::vector< hfst_ol::Location >::iterator,std::vector< hfst_ol::Location >::size_type,std::vector< hfst_ol::Location >::value_type const &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_LocationVector_reserve(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< hfst_ol::Location > *arg1 = (std::vector< hfst_ol::Location > *) 0 ; - std::vector< hfst_ol::Location >::size_type arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - size_t val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args, "LocationVector_reserve", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LocationVector_reserve" "', argument " "1"" of type '" "std::vector< hfst_ol::Location > *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst_ol::Location > * >(argp1); - ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "LocationVector_reserve" "', argument " "2"" of type '" "std::vector< hfst_ol::Location >::size_type""'"); - } - arg2 = static_cast< std::vector< hfst_ol::Location >::size_type >(val2); - (arg1)->reserve(arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_LocationVector_capacity(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< hfst_ol::Location > *arg1 = (std::vector< hfst_ol::Location > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::vector< hfst_ol::Location >::size_type result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LocationVector_capacity" "', argument " "1"" of type '" "std::vector< hfst_ol::Location > const *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst_ol::Location > * >(argp1); - result = ((std::vector< hfst_ol::Location > const *)arg1)->capacity(); - resultobj = SWIG_From_size_t(static_cast< size_t >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_LocationVector(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< hfst_ol::Location > *arg1 = (std::vector< hfst_ol::Location > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_LocationVector" "', argument " "1"" of type '" "std::vector< hfst_ol::Location > *""'"); - } - arg1 = reinterpret_cast< std::vector< hfst_ol::Location > * >(argp1); - delete arg1; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *LocationVector_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *LocationVector_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_LocationVectorVector_iterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< std::vector< hfst_ol::Location > > *arg1 = (std::vector< std::vector< hfst_ol::Location > > *) 0 ; - PyObject **arg2 = (PyObject **) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - swig::SwigPyIterator *result = 0 ; - - arg2 = &swig_obj[0]; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t_std__allocatorT_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LocationVectorVector_iterator" "', argument " "1"" of type '" "std::vector< std::vector< hfst_ol::Location > > *""'"); - } - arg1 = reinterpret_cast< std::vector< std::vector< hfst_ol::Location > > * >(argp1); - result = (swig::SwigPyIterator *)std_vector_Sl_std_vector_Sl_hfst_ol_Location_Sg__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_LocationVectorVector___nonzero__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< std::vector< hfst_ol::Location > > *arg1 = (std::vector< std::vector< hfst_ol::Location > > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - bool result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t_std__allocatorT_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LocationVectorVector___nonzero__" "', argument " "1"" of type '" "std::vector< std::vector< hfst_ol::Location > > const *""'"); - } - arg1 = reinterpret_cast< std::vector< std::vector< hfst_ol::Location > > * >(argp1); - result = (bool)std_vector_Sl_std_vector_Sl_hfst_ol_Location_Sg__Sg____nonzero__((std::vector< std::vector< hfst_ol::Location > > const *)arg1); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_LocationVectorVector___bool__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< std::vector< hfst_ol::Location > > *arg1 = (std::vector< std::vector< hfst_ol::Location > > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - bool result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t_std__allocatorT_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LocationVectorVector___bool__" "', argument " "1"" of type '" "std::vector< std::vector< hfst_ol::Location > > const *""'"); - } - arg1 = reinterpret_cast< std::vector< std::vector< hfst_ol::Location > > * >(argp1); - result = (bool)std_vector_Sl_std_vector_Sl_hfst_ol_Location_Sg__Sg____bool__((std::vector< std::vector< hfst_ol::Location > > const *)arg1); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_LocationVectorVector___len__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< std::vector< hfst_ol::Location > > *arg1 = (std::vector< std::vector< hfst_ol::Location > > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::vector< std::vector< hfst_ol::Location > >::size_type result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t_std__allocatorT_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LocationVectorVector___len__" "', argument " "1"" of type '" "std::vector< std::vector< hfst_ol::Location > > const *""'"); - } - arg1 = reinterpret_cast< std::vector< std::vector< hfst_ol::Location > > * >(argp1); - result = std_vector_Sl_std_vector_Sl_hfst_ol_Location_Sg__Sg____len__((std::vector< std::vector< hfst_ol::Location > > const *)arg1); - resultobj = SWIG_From_size_t(static_cast< size_t >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_LocationVectorVector___getslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< std::vector< hfst_ol::Location > > *arg1 = (std::vector< std::vector< hfst_ol::Location > > *) 0 ; - std::vector< std::vector< hfst_ol::Location > >::difference_type arg2 ; - std::vector< std::vector< hfst_ol::Location > >::difference_type arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - ptrdiff_t val2 ; - int ecode2 = 0 ; - ptrdiff_t val3 ; - int ecode3 = 0 ; - PyObject *swig_obj[3] ; - std::vector< std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > >,std::allocator< std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > > > > *result = 0 ; - - if (!SWIG_Python_UnpackTuple(args, "LocationVectorVector___getslice__", 3, 3, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t_std__allocatorT_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LocationVectorVector___getslice__" "', argument " "1"" of type '" "std::vector< std::vector< hfst_ol::Location > > *""'"); - } - arg1 = reinterpret_cast< std::vector< std::vector< hfst_ol::Location > > * >(argp1); - ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "LocationVectorVector___getslice__" "', argument " "2"" of type '" "std::vector< std::vector< hfst_ol::Location > >::difference_type""'"); - } - arg2 = static_cast< std::vector< std::vector< hfst_ol::Location > >::difference_type >(val2); - ecode3 = SWIG_AsVal_ptrdiff_t(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "LocationVectorVector___getslice__" "', argument " "3"" of type '" "std::vector< std::vector< hfst_ol::Location > >::difference_type""'"); - } - arg3 = static_cast< std::vector< std::vector< hfst_ol::Location > >::difference_type >(val3); - try { - result = (std::vector< std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > >,std::allocator< std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > > > > *)std_vector_Sl_std_vector_Sl_hfst_ol_Location_Sg__Sg____getslice__(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_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t_std__allocatorT_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t_t_t, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_LocationVectorVector___setslice____SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< std::vector< hfst_ol::Location > > *arg1 = (std::vector< std::vector< hfst_ol::Location > > *) 0 ; - std::vector< std::vector< hfst_ol::Location > >::difference_type arg2 ; - std::vector< std::vector< hfst_ol::Location > >::difference_type arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - ptrdiff_t val2 ; - int ecode2 = 0 ; - ptrdiff_t val3 ; - int ecode3 = 0 ; - - if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t_std__allocatorT_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LocationVectorVector___setslice__" "', argument " "1"" of type '" "std::vector< std::vector< hfst_ol::Location > > *""'"); - } - arg1 = reinterpret_cast< std::vector< std::vector< hfst_ol::Location > > * >(argp1); - ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "LocationVectorVector___setslice__" "', argument " "2"" of type '" "std::vector< std::vector< hfst_ol::Location > >::difference_type""'"); - } - arg2 = static_cast< std::vector< std::vector< hfst_ol::Location > >::difference_type >(val2); - ecode3 = SWIG_AsVal_ptrdiff_t(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "LocationVectorVector___setslice__" "', argument " "3"" of type '" "std::vector< std::vector< hfst_ol::Location > >::difference_type""'"); - } - arg3 = static_cast< std::vector< std::vector< hfst_ol::Location > >::difference_type >(val3); - try { - std_vector_Sl_std_vector_Sl_hfst_ol_Location_Sg__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_LocationVectorVector___setslice____SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< std::vector< hfst_ol::Location > > *arg1 = (std::vector< std::vector< hfst_ol::Location > > *) 0 ; - std::vector< std::vector< hfst_ol::Location > >::difference_type arg2 ; - std::vector< std::vector< hfst_ol::Location > >::difference_type arg3 ; - std::vector< std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > >,std::allocator< std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > > > > *arg4 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - ptrdiff_t val2 ; - int ecode2 = 0 ; - ptrdiff_t val3 ; - int ecode3 = 0 ; - int res4 = SWIG_OLDOBJ ; - - if ((nobjs < 4) || (nobjs > 4)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t_std__allocatorT_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LocationVectorVector___setslice__" "', argument " "1"" of type '" "std::vector< std::vector< hfst_ol::Location > > *""'"); - } - arg1 = reinterpret_cast< std::vector< std::vector< hfst_ol::Location > > * >(argp1); - ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "LocationVectorVector___setslice__" "', argument " "2"" of type '" "std::vector< std::vector< hfst_ol::Location > >::difference_type""'"); - } - arg2 = static_cast< std::vector< std::vector< hfst_ol::Location > >::difference_type >(val2); - ecode3 = SWIG_AsVal_ptrdiff_t(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "LocationVectorVector___setslice__" "', argument " "3"" of type '" "std::vector< std::vector< hfst_ol::Location > >::difference_type""'"); - } - arg3 = static_cast< std::vector< std::vector< hfst_ol::Location > >::difference_type >(val3); - { - std::vector< std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > >,std::allocator< std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > > > > *ptr = (std::vector< std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > >,std::allocator< std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > > > > *)0; - res4 = swig::asptr(swig_obj[3], &ptr); - if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "LocationVectorVector___setslice__" "', argument " "4"" of type '" "std::vector< std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > >,std::allocator< std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > > > > const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "LocationVectorVector___setslice__" "', argument " "4"" of type '" "std::vector< std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > >,std::allocator< std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > > > > const &""'"); - } - arg4 = ptr; - } - try { - std_vector_Sl_std_vector_Sl_hfst_ol_Location_Sg__Sg____setslice____SWIG_1(arg1,arg2,arg3,(std::vector< std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > >,std::allocator< std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > > > > 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_LocationVectorVector___setslice__(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[5] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "LocationVectorVector___setslice__", 0, 4, argv))) SWIG_fail; - --argc; - if (argc == 3) { - int _v; - int res = swig::asptr(argv[0], (std::vector< std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > >,std::allocator< std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > > > >**)(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_LocationVectorVector___setslice____SWIG_0(self, argc, argv); - } - } - } - } - if (argc == 4) { - int _v; - int res = swig::asptr(argv[0], (std::vector< std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > >,std::allocator< std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > > > >**)(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< std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > >,std::allocator< std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > > > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_LocationVectorVector___setslice____SWIG_1(self, argc, argv); - } - } - } - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'LocationVectorVector___setslice__'.\n" - " Possible C/C++ prototypes are:\n" - " std::vector< std::vector< hfst_ol::Location > >::__setslice__(std::vector< std::vector< hfst_ol::Location > >::difference_type,std::vector< std::vector< hfst_ol::Location > >::difference_type)\n" - " std::vector< std::vector< hfst_ol::Location > >::__setslice__(std::vector< std::vector< hfst_ol::Location > >::difference_type,std::vector< std::vector< hfst_ol::Location > >::difference_type,std::vector< std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > >,std::allocator< std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > > > > const &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_LocationVectorVector___delslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< std::vector< hfst_ol::Location > > *arg1 = (std::vector< std::vector< hfst_ol::Location > > *) 0 ; - std::vector< std::vector< hfst_ol::Location > >::difference_type arg2 ; - std::vector< std::vector< hfst_ol::Location > >::difference_type arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - ptrdiff_t val2 ; - int ecode2 = 0 ; - ptrdiff_t val3 ; - int ecode3 = 0 ; - PyObject *swig_obj[3] ; - - if (!SWIG_Python_UnpackTuple(args, "LocationVectorVector___delslice__", 3, 3, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t_std__allocatorT_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LocationVectorVector___delslice__" "', argument " "1"" of type '" "std::vector< std::vector< hfst_ol::Location > > *""'"); - } - arg1 = reinterpret_cast< std::vector< std::vector< hfst_ol::Location > > * >(argp1); - ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "LocationVectorVector___delslice__" "', argument " "2"" of type '" "std::vector< std::vector< hfst_ol::Location > >::difference_type""'"); - } - arg2 = static_cast< std::vector< std::vector< hfst_ol::Location > >::difference_type >(val2); - ecode3 = SWIG_AsVal_ptrdiff_t(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "LocationVectorVector___delslice__" "', argument " "3"" of type '" "std::vector< std::vector< hfst_ol::Location > >::difference_type""'"); - } - arg3 = static_cast< std::vector< std::vector< hfst_ol::Location > >::difference_type >(val3); - try { - std_vector_Sl_std_vector_Sl_hfst_ol_Location_Sg__Sg____delslice__(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_LocationVectorVector___delitem____SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< std::vector< hfst_ol::Location > > *arg1 = (std::vector< std::vector< hfst_ol::Location > > *) 0 ; - std::vector< std::vector< hfst_ol::Location > >::difference_type arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - ptrdiff_t val2 ; - int ecode2 = 0 ; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t_std__allocatorT_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LocationVectorVector___delitem__" "', argument " "1"" of type '" "std::vector< std::vector< hfst_ol::Location > > *""'"); - } - arg1 = reinterpret_cast< std::vector< std::vector< hfst_ol::Location > > * >(argp1); - ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "LocationVectorVector___delitem__" "', argument " "2"" of type '" "std::vector< std::vector< hfst_ol::Location > >::difference_type""'"); - } - arg2 = static_cast< std::vector< std::vector< hfst_ol::Location > >::difference_type >(val2); - try { - std_vector_Sl_std_vector_Sl_hfst_ol_Location_Sg__Sg____delitem____SWIG_0(arg1,arg2); - } 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_LocationVectorVector___getitem____SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< std::vector< hfst_ol::Location > > *arg1 = (std::vector< std::vector< hfst_ol::Location > > *) 0 ; - PySliceObject *arg2 = (PySliceObject *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::vector< std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > >,std::allocator< std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > > > > *result = 0 ; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t_std__allocatorT_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LocationVectorVector___getitem__" "', argument " "1"" of type '" "std::vector< std::vector< hfst_ol::Location > > *""'"); - } - arg1 = reinterpret_cast< std::vector< std::vector< hfst_ol::Location > > * >(argp1); - { - if (!PySlice_Check(swig_obj[1])) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "LocationVectorVector___getitem__" "', argument " "2"" of type '" "PySliceObject *""'"); - } - arg2 = (PySliceObject *) swig_obj[1]; - } - try { - result = (std::vector< std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > >,std::allocator< std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > > > > *)std_vector_Sl_std_vector_Sl_hfst_ol_Location_Sg__Sg____getitem____SWIG_0(arg1,arg2); - } 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_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t_std__allocatorT_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t_t_t, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_LocationVectorVector___setitem____SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< std::vector< hfst_ol::Location > > *arg1 = (std::vector< std::vector< hfst_ol::Location > > *) 0 ; - PySliceObject *arg2 = (PySliceObject *) 0 ; - std::vector< std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > >,std::allocator< std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > > > > *arg3 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res3 = SWIG_OLDOBJ ; - - if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t_std__allocatorT_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LocationVectorVector___setitem__" "', argument " "1"" of type '" "std::vector< std::vector< hfst_ol::Location > > *""'"); - } - arg1 = reinterpret_cast< std::vector< std::vector< hfst_ol::Location > > * >(argp1); - { - if (!PySlice_Check(swig_obj[1])) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "LocationVectorVector___setitem__" "', argument " "2"" of type '" "PySliceObject *""'"); - } - arg2 = (PySliceObject *) swig_obj[1]; - } - { - std::vector< std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > >,std::allocator< std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > > > > *ptr = (std::vector< std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > >,std::allocator< std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > > > > *)0; - res3 = swig::asptr(swig_obj[2], &ptr); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "LocationVectorVector___setitem__" "', argument " "3"" of type '" "std::vector< std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > >,std::allocator< std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > > > > const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "LocationVectorVector___setitem__" "', argument " "3"" of type '" "std::vector< std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > >,std::allocator< std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > > > > const &""'"); - } - arg3 = ptr; - } - try { - std_vector_Sl_std_vector_Sl_hfst_ol_Location_Sg__Sg____setitem____SWIG_0(arg1,arg2,(std::vector< std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > >,std::allocator< std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > > > > 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_LocationVectorVector___setitem____SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< std::vector< hfst_ol::Location > > *arg1 = (std::vector< std::vector< hfst_ol::Location > > *) 0 ; - PySliceObject *arg2 = (PySliceObject *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t_std__allocatorT_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LocationVectorVector___setitem__" "', argument " "1"" of type '" "std::vector< std::vector< hfst_ol::Location > > *""'"); - } - arg1 = reinterpret_cast< std::vector< std::vector< hfst_ol::Location > > * >(argp1); - { - if (!PySlice_Check(swig_obj[1])) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "LocationVectorVector___setitem__" "', argument " "2"" of type '" "PySliceObject *""'"); - } - arg2 = (PySliceObject *) swig_obj[1]; - } - try { - std_vector_Sl_std_vector_Sl_hfst_ol_Location_Sg__Sg____setitem____SWIG_1(arg1,arg2); - } 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_LocationVectorVector___delitem____SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< std::vector< hfst_ol::Location > > *arg1 = (std::vector< std::vector< hfst_ol::Location > > *) 0 ; - PySliceObject *arg2 = (PySliceObject *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t_std__allocatorT_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LocationVectorVector___delitem__" "', argument " "1"" of type '" "std::vector< std::vector< hfst_ol::Location > > *""'"); - } - arg1 = reinterpret_cast< std::vector< std::vector< hfst_ol::Location > > * >(argp1); - { - if (!PySlice_Check(swig_obj[1])) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "LocationVectorVector___delitem__" "', argument " "2"" of type '" "PySliceObject *""'"); - } - arg2 = (PySliceObject *) swig_obj[1]; - } - try { - std_vector_Sl_std_vector_Sl_hfst_ol_Location_Sg__Sg____delitem____SWIG_1(arg1,arg2); - } 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_LocationVectorVector___delitem__(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[3] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "LocationVectorVector___delitem__", 0, 2, argv))) SWIG_fail; - --argc; - if (argc == 2) { - int _v; - int res = swig::asptr(argv[0], (std::vector< std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > >,std::allocator< std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > > > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - { - _v = PySlice_Check(argv[1]); - } - if (_v) { - return _wrap_LocationVectorVector___delitem____SWIG_1(self, argc, argv); - } - } - } - if (argc == 2) { - int _v; - int res = swig::asptr(argv[0], (std::vector< std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > >,std::allocator< std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > > > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_LocationVectorVector___delitem____SWIG_0(self, argc, argv); - } - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'LocationVectorVector___delitem__'.\n" - " Possible C/C++ prototypes are:\n" - " std::vector< std::vector< hfst_ol::Location > >::__delitem__(std::vector< std::vector< hfst_ol::Location > >::difference_type)\n" - " std::vector< std::vector< hfst_ol::Location > >::__delitem__(PySliceObject *)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_LocationVectorVector___getitem____SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< std::vector< hfst_ol::Location > > *arg1 = (std::vector< std::vector< hfst_ol::Location > > *) 0 ; - std::vector< std::vector< hfst_ol::Location > >::difference_type arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - ptrdiff_t val2 ; - int ecode2 = 0 ; - std::vector< std::vector< hfst_ol::Location > >::value_type *result = 0 ; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t_std__allocatorT_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LocationVectorVector___getitem__" "', argument " "1"" of type '" "std::vector< std::vector< hfst_ol::Location > > const *""'"); - } - arg1 = reinterpret_cast< std::vector< std::vector< hfst_ol::Location > > * >(argp1); - ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "LocationVectorVector___getitem__" "', argument " "2"" of type '" "std::vector< std::vector< hfst_ol::Location > >::difference_type""'"); - } - arg2 = static_cast< std::vector< std::vector< hfst_ol::Location > >::difference_type >(val2); - try { - result = (std::vector< std::vector< hfst_ol::Location > >::value_type *) &std_vector_Sl_std_vector_Sl_hfst_ol_Location_Sg__Sg____getitem____SWIG_1((std::vector< std::vector< hfst_ol::Location > > const *)arg1,arg2); - } catch(std::out_of_range &_e) { - SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); - } - resultobj = swig::from(static_cast< std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > > >(*result)); - (void)swig::container_owner >::value_type>::category>::back_reference(resultobj, swig_obj[0]); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_LocationVectorVector___getitem__(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[3] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "LocationVectorVector___getitem__", 0, 2, argv))) SWIG_fail; - --argc; - if (argc == 2) { - int _v; - int res = swig::asptr(argv[0], (std::vector< std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > >,std::allocator< std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > > > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - { - _v = PySlice_Check(argv[1]); - } - if (_v) { - return _wrap_LocationVectorVector___getitem____SWIG_0(self, argc, argv); - } - } - } - if (argc == 2) { - int _v; - int res = swig::asptr(argv[0], (std::vector< std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > >,std::allocator< std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > > > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_LocationVectorVector___getitem____SWIG_1(self, argc, argv); - } - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'LocationVectorVector___getitem__'.\n" - " Possible C/C++ prototypes are:\n" - " std::vector< std::vector< hfst_ol::Location > >::__getitem__(PySliceObject *)\n" - " std::vector< std::vector< hfst_ol::Location > >::__getitem__(std::vector< std::vector< hfst_ol::Location > >::difference_type) const\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_LocationVectorVector___setitem____SWIG_2(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< std::vector< hfst_ol::Location > > *arg1 = (std::vector< std::vector< hfst_ol::Location > > *) 0 ; - std::vector< std::vector< hfst_ol::Location > >::difference_type arg2 ; - std::vector< std::vector< hfst_ol::Location > >::value_type *arg3 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - ptrdiff_t val2 ; - int ecode2 = 0 ; - int res3 = SWIG_OLDOBJ ; - - if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t_std__allocatorT_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LocationVectorVector___setitem__" "', argument " "1"" of type '" "std::vector< std::vector< hfst_ol::Location > > *""'"); - } - arg1 = reinterpret_cast< std::vector< std::vector< hfst_ol::Location > > * >(argp1); - ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "LocationVectorVector___setitem__" "', argument " "2"" of type '" "std::vector< std::vector< hfst_ol::Location > >::difference_type""'"); - } - arg2 = static_cast< std::vector< std::vector< hfst_ol::Location > >::difference_type >(val2); - { - std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > > *ptr = (std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > > *)0; - res3 = swig::asptr(swig_obj[2], &ptr); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "LocationVectorVector___setitem__" "', argument " "3"" of type '" "std::vector< std::vector< hfst_ol::Location > >::value_type const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "LocationVectorVector___setitem__" "', argument " "3"" of type '" "std::vector< std::vector< hfst_ol::Location > >::value_type const &""'"); - } - arg3 = ptr; - } - try { - std_vector_Sl_std_vector_Sl_hfst_ol_Location_Sg__Sg____setitem____SWIG_2(arg1,arg2,(std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > > const &)*arg3); - } catch(std::out_of_range &_e) { - SWIG_exception_fail(SWIG_IndexError, (&_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_LocationVectorVector___setitem__(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[4] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "LocationVectorVector___setitem__", 0, 3, argv))) SWIG_fail; - --argc; - if (argc == 2) { - int _v; - int res = swig::asptr(argv[0], (std::vector< std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > >,std::allocator< std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > > > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - { - _v = PySlice_Check(argv[1]); - } - if (_v) { - return _wrap_LocationVectorVector___setitem____SWIG_1(self, argc, argv); - } - } - } - if (argc == 3) { - int _v; - int res = swig::asptr(argv[0], (std::vector< std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > >,std::allocator< std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > > > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - { - _v = PySlice_Check(argv[1]); - } - if (_v) { - int res = swig::asptr(argv[2], (std::vector< std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > >,std::allocator< std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > > > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_LocationVectorVector___setitem____SWIG_0(self, argc, argv); - } - } - } - } - if (argc == 3) { - int _v; - int res = swig::asptr(argv[0], (std::vector< std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > >,std::allocator< std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > > > >**)(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::asptr(argv[2], (std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_LocationVectorVector___setitem____SWIG_2(self, argc, argv); - } - } - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'LocationVectorVector___setitem__'.\n" - " Possible C/C++ prototypes are:\n" - " std::vector< std::vector< hfst_ol::Location > >::__setitem__(PySliceObject *,std::vector< std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > >,std::allocator< std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > > > > const &)\n" - " std::vector< std::vector< hfst_ol::Location > >::__setitem__(PySliceObject *)\n" - " std::vector< std::vector< hfst_ol::Location > >::__setitem__(std::vector< std::vector< hfst_ol::Location > >::difference_type,std::vector< std::vector< hfst_ol::Location > >::value_type const &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_LocationVectorVector_pop(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< std::vector< hfst_ol::Location > > *arg1 = (std::vector< std::vector< hfst_ol::Location > > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::vector< std::vector< hfst_ol::Location > >::value_type result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t_std__allocatorT_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LocationVectorVector_pop" "', argument " "1"" of type '" "std::vector< std::vector< hfst_ol::Location > > *""'"); - } - arg1 = reinterpret_cast< std::vector< std::vector< hfst_ol::Location > > * >(argp1); - try { - result = std_vector_Sl_std_vector_Sl_hfst_ol_Location_Sg__Sg__pop(arg1); - } catch(std::out_of_range &_e) { - SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); - } - resultobj = swig::from(static_cast< std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > > >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_LocationVectorVector_append(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< std::vector< hfst_ol::Location > > *arg1 = (std::vector< std::vector< hfst_ol::Location > > *) 0 ; - std::vector< std::vector< hfst_ol::Location > >::value_type *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 = SWIG_OLDOBJ ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args, "LocationVectorVector_append", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t_std__allocatorT_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LocationVectorVector_append" "', argument " "1"" of type '" "std::vector< std::vector< hfst_ol::Location > > *""'"); - } - arg1 = reinterpret_cast< std::vector< std::vector< hfst_ol::Location > > * >(argp1); - { - std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > > *ptr = (std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > > *)0; - res2 = swig::asptr(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "LocationVectorVector_append" "', argument " "2"" of type '" "std::vector< std::vector< hfst_ol::Location > >::value_type const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "LocationVectorVector_append" "', argument " "2"" of type '" "std::vector< std::vector< hfst_ol::Location > >::value_type const &""'"); - } - arg2 = ptr; - } - std_vector_Sl_std_vector_Sl_hfst_ol_Location_Sg__Sg__append(arg1,(std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > > const &)*arg2); - resultobj = SWIG_Py_Void(); - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_LocationVectorVector__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **SWIGUNUSEDPARM(swig_obj)) { - PyObject *resultobj = 0; - std::vector< std::vector< hfst_ol::Location > > *result = 0 ; - - if ((nobjs < 0) || (nobjs > 0)) SWIG_fail; - result = (std::vector< std::vector< hfst_ol::Location > > *)new std::vector< std::vector< hfst_ol::Location > >(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t_std__allocatorT_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t_t_t, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_LocationVectorVector__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > > > *arg1 = 0 ; - int res1 = SWIG_OLDOBJ ; - std::vector< std::vector< hfst_ol::Location > > *result = 0 ; - - if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; - { - std::vector< std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > >,std::allocator< std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > > > > *ptr = (std::vector< std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > >,std::allocator< std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > > > > *)0; - res1 = swig::asptr(swig_obj[0], &ptr); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_LocationVectorVector" "', argument " "1"" of type '" "std::vector< std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > > > const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_LocationVectorVector" "', argument " "1"" of type '" "std::vector< std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > > > const &""'"); - } - arg1 = ptr; - } - result = (std::vector< std::vector< hfst_ol::Location > > *)new std::vector< std::vector< hfst_ol::Location > >((std::vector< std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > > > const &)*arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t_std__allocatorT_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t_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_LocationVectorVector_empty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< std::vector< hfst_ol::Location > > *arg1 = (std::vector< std::vector< hfst_ol::Location > > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - bool result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t_std__allocatorT_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LocationVectorVector_empty" "', argument " "1"" of type '" "std::vector< std::vector< hfst_ol::Location > > const *""'"); - } - arg1 = reinterpret_cast< std::vector< std::vector< hfst_ol::Location > > * >(argp1); - result = (bool)((std::vector< std::vector< hfst_ol::Location > > const *)arg1)->empty(); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_LocationVectorVector_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< std::vector< hfst_ol::Location > > *arg1 = (std::vector< std::vector< hfst_ol::Location > > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::vector< std::vector< hfst_ol::Location > >::size_type result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t_std__allocatorT_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LocationVectorVector_size" "', argument " "1"" of type '" "std::vector< std::vector< hfst_ol::Location > > const *""'"); - } - arg1 = reinterpret_cast< std::vector< std::vector< hfst_ol::Location > > * >(argp1); - result = ((std::vector< std::vector< hfst_ol::Location > > const *)arg1)->size(); - resultobj = SWIG_From_size_t(static_cast< size_t >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_LocationVectorVector_swap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< std::vector< hfst_ol::Location > > *arg1 = (std::vector< std::vector< hfst_ol::Location > > *) 0 ; - std::vector< std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > > > *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args, "LocationVectorVector_swap", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t_std__allocatorT_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LocationVectorVector_swap" "', argument " "1"" of type '" "std::vector< std::vector< hfst_ol::Location > > *""'"); - } - arg1 = reinterpret_cast< std::vector< std::vector< hfst_ol::Location > > * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_std__vectorT_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t_std__allocatorT_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t_t_t, 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "LocationVectorVector_swap" "', argument " "2"" of type '" "std::vector< std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > > > &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "LocationVectorVector_swap" "', argument " "2"" of type '" "std::vector< std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > > > &""'"); - } - arg2 = reinterpret_cast< std::vector< std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > > > * >(argp2); - (arg1)->swap(*arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_LocationVectorVector_begin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< std::vector< hfst_ol::Location > > *arg1 = (std::vector< std::vector< hfst_ol::Location > > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::vector< std::vector< hfst_ol::Location > >::iterator result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t_std__allocatorT_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LocationVectorVector_begin" "', argument " "1"" of type '" "std::vector< std::vector< hfst_ol::Location > > *""'"); - } - arg1 = reinterpret_cast< std::vector< std::vector< hfst_ol::Location > > * >(argp1); - result = (arg1)->begin(); - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< std::vector< hfst_ol::Location > >::iterator & >(result)), - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_LocationVectorVector_end(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< std::vector< hfst_ol::Location > > *arg1 = (std::vector< std::vector< hfst_ol::Location > > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::vector< std::vector< hfst_ol::Location > >::iterator result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t_std__allocatorT_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LocationVectorVector_end" "', argument " "1"" of type '" "std::vector< std::vector< hfst_ol::Location > > *""'"); - } - arg1 = reinterpret_cast< std::vector< std::vector< hfst_ol::Location > > * >(argp1); - result = (arg1)->end(); - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< std::vector< hfst_ol::Location > >::iterator & >(result)), - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_LocationVectorVector_rbegin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< std::vector< hfst_ol::Location > > *arg1 = (std::vector< std::vector< hfst_ol::Location > > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::vector< std::vector< hfst_ol::Location > >::reverse_iterator result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t_std__allocatorT_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LocationVectorVector_rbegin" "', argument " "1"" of type '" "std::vector< std::vector< hfst_ol::Location > > *""'"); - } - arg1 = reinterpret_cast< std::vector< std::vector< hfst_ol::Location > > * >(argp1); - result = (arg1)->rbegin(); - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< std::vector< hfst_ol::Location > >::reverse_iterator & >(result)), - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_LocationVectorVector_rend(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< std::vector< hfst_ol::Location > > *arg1 = (std::vector< std::vector< hfst_ol::Location > > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::vector< std::vector< hfst_ol::Location > >::reverse_iterator result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t_std__allocatorT_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LocationVectorVector_rend" "', argument " "1"" of type '" "std::vector< std::vector< hfst_ol::Location > > *""'"); - } - arg1 = reinterpret_cast< std::vector< std::vector< hfst_ol::Location > > * >(argp1); - result = (arg1)->rend(); - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< std::vector< hfst_ol::Location > >::reverse_iterator & >(result)), - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_LocationVectorVector_clear(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< std::vector< hfst_ol::Location > > *arg1 = (std::vector< std::vector< hfst_ol::Location > > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t_std__allocatorT_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LocationVectorVector_clear" "', argument " "1"" of type '" "std::vector< std::vector< hfst_ol::Location > > *""'"); - } - arg1 = reinterpret_cast< std::vector< std::vector< hfst_ol::Location > > * >(argp1); - (arg1)->clear(); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_LocationVectorVector_get_allocator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< std::vector< hfst_ol::Location > > *arg1 = (std::vector< std::vector< hfst_ol::Location > > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - SwigValueWrapper< std::allocator< std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > > > > result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t_std__allocatorT_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LocationVectorVector_get_allocator" "', argument " "1"" of type '" "std::vector< std::vector< hfst_ol::Location > > const *""'"); - } - arg1 = reinterpret_cast< std::vector< std::vector< hfst_ol::Location > > * >(argp1); - result = ((std::vector< std::vector< hfst_ol::Location > > const *)arg1)->get_allocator(); - resultobj = SWIG_NewPointerObj((new std::vector< std::vector< hfst_ol::Location > >::allocator_type(static_cast< const std::vector< std::vector< hfst_ol::Location > >::allocator_type& >(result))), SWIGTYPE_p_std__allocatorT_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t_t, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_LocationVectorVector__SWIG_2(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< std::vector< hfst_ol::Location > >::size_type arg1 ; - size_t val1 ; - int ecode1 = 0 ; - std::vector< std::vector< hfst_ol::Location > > *result = 0 ; - - if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; - ecode1 = SWIG_AsVal_size_t(swig_obj[0], &val1); - if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_LocationVectorVector" "', argument " "1"" of type '" "std::vector< std::vector< hfst_ol::Location > >::size_type""'"); - } - arg1 = static_cast< std::vector< std::vector< hfst_ol::Location > >::size_type >(val1); - result = (std::vector< std::vector< hfst_ol::Location > > *)new std::vector< std::vector< hfst_ol::Location > >(arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t_std__allocatorT_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t_t_t, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_LocationVectorVector_pop_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< std::vector< hfst_ol::Location > > *arg1 = (std::vector< std::vector< hfst_ol::Location > > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t_std__allocatorT_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LocationVectorVector_pop_back" "', argument " "1"" of type '" "std::vector< std::vector< hfst_ol::Location > > *""'"); - } - arg1 = reinterpret_cast< std::vector< std::vector< hfst_ol::Location > > * >(argp1); - (arg1)->pop_back(); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_LocationVectorVector_resize__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< std::vector< hfst_ol::Location > > *arg1 = (std::vector< std::vector< hfst_ol::Location > > *) 0 ; - std::vector< std::vector< hfst_ol::Location > >::size_type arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - size_t val2 ; - int ecode2 = 0 ; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t_std__allocatorT_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LocationVectorVector_resize" "', argument " "1"" of type '" "std::vector< std::vector< hfst_ol::Location > > *""'"); - } - arg1 = reinterpret_cast< std::vector< std::vector< hfst_ol::Location > > * >(argp1); - ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "LocationVectorVector_resize" "', argument " "2"" of type '" "std::vector< std::vector< hfst_ol::Location > >::size_type""'"); - } - arg2 = static_cast< std::vector< std::vector< hfst_ol::Location > >::size_type >(val2); - (arg1)->resize(arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_LocationVectorVector_erase__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< std::vector< hfst_ol::Location > > *arg1 = (std::vector< std::vector< hfst_ol::Location > > *) 0 ; - std::vector< std::vector< hfst_ol::Location > >::iterator arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - swig::SwigPyIterator *iter2 = 0 ; - int res2 ; - std::vector< std::vector< hfst_ol::Location > >::iterator result; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t_std__allocatorT_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LocationVectorVector_erase" "', argument " "1"" of type '" "std::vector< std::vector< hfst_ol::Location > > *""'"); - } - arg1 = reinterpret_cast< std::vector< std::vector< hfst_ol::Location > > * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0); - if (!SWIG_IsOK(res2) || !iter2) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "LocationVectorVector_erase" "', argument " "2"" of type '" "std::vector< std::vector< hfst_ol::Location > >::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 '" "LocationVectorVector_erase" "', argument " "2"" of type '" "std::vector< std::vector< hfst_ol::Location > >::iterator""'"); - } - } - result = std_vector_Sl_std_vector_Sl_hfst_ol_Location_Sg__Sg__erase__SWIG_0(arg1,arg2); - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< std::vector< hfst_ol::Location > >::iterator & >(result)), - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_LocationVectorVector_erase__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< std::vector< hfst_ol::Location > > *arg1 = (std::vector< std::vector< hfst_ol::Location > > *) 0 ; - std::vector< std::vector< hfst_ol::Location > >::iterator arg2 ; - std::vector< std::vector< hfst_ol::Location > >::iterator arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - swig::SwigPyIterator *iter2 = 0 ; - int res2 ; - swig::SwigPyIterator *iter3 = 0 ; - int res3 ; - std::vector< std::vector< hfst_ol::Location > >::iterator result; - - if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t_std__allocatorT_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LocationVectorVector_erase" "', argument " "1"" of type '" "std::vector< std::vector< hfst_ol::Location > > *""'"); - } - arg1 = reinterpret_cast< std::vector< std::vector< hfst_ol::Location > > * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0); - if (!SWIG_IsOK(res2) || !iter2) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "LocationVectorVector_erase" "', argument " "2"" of type '" "std::vector< std::vector< hfst_ol::Location > >::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 '" "LocationVectorVector_erase" "', argument " "2"" of type '" "std::vector< std::vector< hfst_ol::Location > >::iterator""'"); - } - } - res3 = SWIG_ConvertPtr(swig_obj[2], SWIG_as_voidptrptr(&iter3), swig::SwigPyIterator::descriptor(), 0); - if (!SWIG_IsOK(res3) || !iter3) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "LocationVectorVector_erase" "', argument " "3"" of type '" "std::vector< std::vector< hfst_ol::Location > >::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 '" "LocationVectorVector_erase" "', argument " "3"" of type '" "std::vector< std::vector< hfst_ol::Location > >::iterator""'"); - } - } - result = std_vector_Sl_std_vector_Sl_hfst_ol_Location_Sg__Sg__erase__SWIG_1(arg1,arg2,arg3); - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< std::vector< hfst_ol::Location > >::iterator & >(result)), - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_LocationVectorVector_erase(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[4] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "LocationVectorVector_erase", 0, 3, argv))) SWIG_fail; - --argc; - if (argc == 2) { - int _v; - int res = swig::asptr(argv[0], (std::vector< std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > >,std::allocator< std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > > > >**)(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_LocationVectorVector_erase__SWIG_0(self, argc, argv); - } - } - } - if (argc == 3) { - int _v; - int res = swig::asptr(argv[0], (std::vector< std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > >,std::allocator< std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > > > >**)(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_LocationVectorVector_erase__SWIG_1(self, argc, argv); - } - } - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'LocationVectorVector_erase'.\n" - " Possible C/C++ prototypes are:\n" - " std::vector< std::vector< hfst_ol::Location > >::erase(std::vector< std::vector< hfst_ol::Location > >::iterator)\n" - " std::vector< std::vector< hfst_ol::Location > >::erase(std::vector< std::vector< hfst_ol::Location > >::iterator,std::vector< std::vector< hfst_ol::Location > >::iterator)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_new_LocationVectorVector__SWIG_3(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< std::vector< hfst_ol::Location > >::size_type arg1 ; - std::vector< std::vector< hfst_ol::Location > >::value_type *arg2 = 0 ; - size_t val1 ; - int ecode1 = 0 ; - int res2 = SWIG_OLDOBJ ; - std::vector< std::vector< hfst_ol::Location > > *result = 0 ; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - ecode1 = SWIG_AsVal_size_t(swig_obj[0], &val1); - if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_LocationVectorVector" "', argument " "1"" of type '" "std::vector< std::vector< hfst_ol::Location > >::size_type""'"); - } - arg1 = static_cast< std::vector< std::vector< hfst_ol::Location > >::size_type >(val1); - { - std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > > *ptr = (std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > > *)0; - res2 = swig::asptr(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_LocationVectorVector" "', argument " "2"" of type '" "std::vector< std::vector< hfst_ol::Location > >::value_type const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_LocationVectorVector" "', argument " "2"" of type '" "std::vector< std::vector< hfst_ol::Location > >::value_type const &""'"); - } - arg2 = ptr; - } - result = (std::vector< std::vector< hfst_ol::Location > > *)new std::vector< std::vector< hfst_ol::Location > >(arg1,(std::vector< std::vector< hfst_ol::Location > >::value_type const &)*arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t_std__allocatorT_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t_t_t, SWIG_POINTER_NEW | 0 ); - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_LocationVectorVector(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[3] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "new_LocationVectorVector", 0, 2, argv))) SWIG_fail; - --argc; - if (argc == 0) { - return _wrap_new_LocationVectorVector__SWIG_0(self, argc, argv); - } - if (argc == 1) { - int _v; - { - int res = SWIG_AsVal_size_t(argv[0], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_new_LocationVectorVector__SWIG_2(self, argc, argv); - } - } - if (argc == 1) { - int _v; - int res = swig::asptr(argv[0], (std::vector< std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > >,std::allocator< std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > > > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_new_LocationVectorVector__SWIG_1(self, argc, argv); - } - } - if (argc == 2) { - int _v; - { - int res = SWIG_AsVal_size_t(argv[0], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - int res = swig::asptr(argv[1], (std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_new_LocationVectorVector__SWIG_3(self, argc, argv); - } - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'new_LocationVectorVector'.\n" - " Possible C/C++ prototypes are:\n" - " std::vector< std::vector< hfst_ol::Location > >::vector()\n" - " std::vector< std::vector< hfst_ol::Location > >::vector(std::vector< std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > > > const &)\n" - " std::vector< std::vector< hfst_ol::Location > >::vector(std::vector< std::vector< hfst_ol::Location > >::size_type)\n" - " std::vector< std::vector< hfst_ol::Location > >::vector(std::vector< std::vector< hfst_ol::Location > >::size_type,std::vector< std::vector< hfst_ol::Location > >::value_type const &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_LocationVectorVector_push_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< std::vector< hfst_ol::Location > > *arg1 = (std::vector< std::vector< hfst_ol::Location > > *) 0 ; - std::vector< std::vector< hfst_ol::Location > >::value_type *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 = SWIG_OLDOBJ ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args, "LocationVectorVector_push_back", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t_std__allocatorT_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LocationVectorVector_push_back" "', argument " "1"" of type '" "std::vector< std::vector< hfst_ol::Location > > *""'"); - } - arg1 = reinterpret_cast< std::vector< std::vector< hfst_ol::Location > > * >(argp1); - { - std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > > *ptr = (std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > > *)0; - res2 = swig::asptr(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "LocationVectorVector_push_back" "', argument " "2"" of type '" "std::vector< std::vector< hfst_ol::Location > >::value_type const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "LocationVectorVector_push_back" "', argument " "2"" of type '" "std::vector< std::vector< hfst_ol::Location > >::value_type const &""'"); - } - arg2 = ptr; - } - (arg1)->push_back((std::vector< std::vector< hfst_ol::Location > >::value_type const &)*arg2); - resultobj = SWIG_Py_Void(); - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_LocationVectorVector_front(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< std::vector< hfst_ol::Location > > *arg1 = (std::vector< std::vector< hfst_ol::Location > > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::vector< std::vector< hfst_ol::Location > >::value_type *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t_std__allocatorT_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LocationVectorVector_front" "', argument " "1"" of type '" "std::vector< std::vector< hfst_ol::Location > > const *""'"); - } - arg1 = reinterpret_cast< std::vector< std::vector< hfst_ol::Location > > * >(argp1); - result = (std::vector< std::vector< hfst_ol::Location > >::value_type *) &((std::vector< std::vector< hfst_ol::Location > > const *)arg1)->front(); - resultobj = swig::from(static_cast< std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > > >(*result)); - (void)swig::container_owner >::value_type>::category>::back_reference(resultobj, swig_obj[0]); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_LocationVectorVector_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< std::vector< hfst_ol::Location > > *arg1 = (std::vector< std::vector< hfst_ol::Location > > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::vector< std::vector< hfst_ol::Location > >::value_type *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t_std__allocatorT_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LocationVectorVector_back" "', argument " "1"" of type '" "std::vector< std::vector< hfst_ol::Location > > const *""'"); - } - arg1 = reinterpret_cast< std::vector< std::vector< hfst_ol::Location > > * >(argp1); - result = (std::vector< std::vector< hfst_ol::Location > >::value_type *) &((std::vector< std::vector< hfst_ol::Location > > const *)arg1)->back(); - resultobj = swig::from(static_cast< std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > > >(*result)); - (void)swig::container_owner >::value_type>::category>::back_reference(resultobj, swig_obj[0]); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_LocationVectorVector_assign(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< std::vector< hfst_ol::Location > > *arg1 = (std::vector< std::vector< hfst_ol::Location > > *) 0 ; - std::vector< std::vector< hfst_ol::Location > >::size_type arg2 ; - std::vector< std::vector< hfst_ol::Location > >::value_type *arg3 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - size_t val2 ; - int ecode2 = 0 ; - int res3 = SWIG_OLDOBJ ; - PyObject *swig_obj[3] ; - - if (!SWIG_Python_UnpackTuple(args, "LocationVectorVector_assign", 3, 3, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t_std__allocatorT_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LocationVectorVector_assign" "', argument " "1"" of type '" "std::vector< std::vector< hfst_ol::Location > > *""'"); - } - arg1 = reinterpret_cast< std::vector< std::vector< hfst_ol::Location > > * >(argp1); - ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "LocationVectorVector_assign" "', argument " "2"" of type '" "std::vector< std::vector< hfst_ol::Location > >::size_type""'"); - } - arg2 = static_cast< std::vector< std::vector< hfst_ol::Location > >::size_type >(val2); - { - std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > > *ptr = (std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > > *)0; - res3 = swig::asptr(swig_obj[2], &ptr); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "LocationVectorVector_assign" "', argument " "3"" of type '" "std::vector< std::vector< hfst_ol::Location > >::value_type const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "LocationVectorVector_assign" "', argument " "3"" of type '" "std::vector< std::vector< hfst_ol::Location > >::value_type const &""'"); - } - arg3 = ptr; - } - (arg1)->assign(arg2,(std::vector< std::vector< hfst_ol::Location > >::value_type const &)*arg3); - resultobj = SWIG_Py_Void(); - if (SWIG_IsNewObj(res3)) delete arg3; - return resultobj; -fail: - if (SWIG_IsNewObj(res3)) delete arg3; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_LocationVectorVector_resize__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< std::vector< hfst_ol::Location > > *arg1 = (std::vector< std::vector< hfst_ol::Location > > *) 0 ; - std::vector< std::vector< hfst_ol::Location > >::size_type arg2 ; - std::vector< std::vector< hfst_ol::Location > >::value_type *arg3 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - size_t val2 ; - int ecode2 = 0 ; - int res3 = SWIG_OLDOBJ ; - - if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t_std__allocatorT_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LocationVectorVector_resize" "', argument " "1"" of type '" "std::vector< std::vector< hfst_ol::Location > > *""'"); - } - arg1 = reinterpret_cast< std::vector< std::vector< hfst_ol::Location > > * >(argp1); - ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "LocationVectorVector_resize" "', argument " "2"" of type '" "std::vector< std::vector< hfst_ol::Location > >::size_type""'"); - } - arg2 = static_cast< std::vector< std::vector< hfst_ol::Location > >::size_type >(val2); - { - std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > > *ptr = (std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > > *)0; - res3 = swig::asptr(swig_obj[2], &ptr); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "LocationVectorVector_resize" "', argument " "3"" of type '" "std::vector< std::vector< hfst_ol::Location > >::value_type const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "LocationVectorVector_resize" "', argument " "3"" of type '" "std::vector< std::vector< hfst_ol::Location > >::value_type const &""'"); - } - arg3 = ptr; - } - (arg1)->resize(arg2,(std::vector< std::vector< hfst_ol::Location > >::value_type const &)*arg3); - resultobj = SWIG_Py_Void(); - if (SWIG_IsNewObj(res3)) delete arg3; - return resultobj; -fail: - if (SWIG_IsNewObj(res3)) delete arg3; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_LocationVectorVector_resize(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[4] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "LocationVectorVector_resize", 0, 3, argv))) SWIG_fail; - --argc; - if (argc == 2) { - int _v; - int res = swig::asptr(argv[0], (std::vector< std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > >,std::allocator< std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > > > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_size_t(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_LocationVectorVector_resize__SWIG_0(self, argc, argv); - } - } - } - if (argc == 3) { - int _v; - int res = swig::asptr(argv[0], (std::vector< std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > >,std::allocator< std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > > > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_size_t(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - int res = swig::asptr(argv[2], (std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_LocationVectorVector_resize__SWIG_1(self, argc, argv); - } - } - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'LocationVectorVector_resize'.\n" - " Possible C/C++ prototypes are:\n" - " std::vector< std::vector< hfst_ol::Location > >::resize(std::vector< std::vector< hfst_ol::Location > >::size_type)\n" - " std::vector< std::vector< hfst_ol::Location > >::resize(std::vector< std::vector< hfst_ol::Location > >::size_type,std::vector< std::vector< hfst_ol::Location > >::value_type const &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_LocationVectorVector_insert__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< std::vector< hfst_ol::Location > > *arg1 = (std::vector< std::vector< hfst_ol::Location > > *) 0 ; - std::vector< std::vector< hfst_ol::Location > >::iterator arg2 ; - std::vector< std::vector< hfst_ol::Location > >::value_type *arg3 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - swig::SwigPyIterator *iter2 = 0 ; - int res2 ; - int res3 = SWIG_OLDOBJ ; - std::vector< std::vector< hfst_ol::Location > >::iterator result; - - if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t_std__allocatorT_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LocationVectorVector_insert" "', argument " "1"" of type '" "std::vector< std::vector< hfst_ol::Location > > *""'"); - } - arg1 = reinterpret_cast< std::vector< std::vector< hfst_ol::Location > > * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0); - if (!SWIG_IsOK(res2) || !iter2) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "LocationVectorVector_insert" "', argument " "2"" of type '" "std::vector< std::vector< hfst_ol::Location > >::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 '" "LocationVectorVector_insert" "', argument " "2"" of type '" "std::vector< std::vector< hfst_ol::Location > >::iterator""'"); - } - } - { - std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > > *ptr = (std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > > *)0; - res3 = swig::asptr(swig_obj[2], &ptr); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "LocationVectorVector_insert" "', argument " "3"" of type '" "std::vector< std::vector< hfst_ol::Location > >::value_type const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "LocationVectorVector_insert" "', argument " "3"" of type '" "std::vector< std::vector< hfst_ol::Location > >::value_type const &""'"); - } - arg3 = ptr; - } - result = std_vector_Sl_std_vector_Sl_hfst_ol_Location_Sg__Sg__insert__SWIG_0(arg1,arg2,(std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > > const &)*arg3); - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< std::vector< hfst_ol::Location > >::iterator & >(result)), - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); - if (SWIG_IsNewObj(res3)) delete arg3; - return resultobj; -fail: - if (SWIG_IsNewObj(res3)) delete arg3; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_LocationVectorVector_insert__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< std::vector< hfst_ol::Location > > *arg1 = (std::vector< std::vector< hfst_ol::Location > > *) 0 ; - std::vector< std::vector< hfst_ol::Location > >::iterator arg2 ; - std::vector< std::vector< hfst_ol::Location > >::size_type arg3 ; - std::vector< std::vector< hfst_ol::Location > >::value_type *arg4 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - swig::SwigPyIterator *iter2 = 0 ; - int res2 ; - size_t val3 ; - int ecode3 = 0 ; - int res4 = SWIG_OLDOBJ ; - - if ((nobjs < 4) || (nobjs > 4)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t_std__allocatorT_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LocationVectorVector_insert" "', argument " "1"" of type '" "std::vector< std::vector< hfst_ol::Location > > *""'"); - } - arg1 = reinterpret_cast< std::vector< std::vector< hfst_ol::Location > > * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0); - if (!SWIG_IsOK(res2) || !iter2) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "LocationVectorVector_insert" "', argument " "2"" of type '" "std::vector< std::vector< hfst_ol::Location > >::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 '" "LocationVectorVector_insert" "', argument " "2"" of type '" "std::vector< std::vector< hfst_ol::Location > >::iterator""'"); - } - } - ecode3 = SWIG_AsVal_size_t(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "LocationVectorVector_insert" "', argument " "3"" of type '" "std::vector< std::vector< hfst_ol::Location > >::size_type""'"); - } - arg3 = static_cast< std::vector< std::vector< hfst_ol::Location > >::size_type >(val3); - { - std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > > *ptr = (std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > > *)0; - res4 = swig::asptr(swig_obj[3], &ptr); - if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "LocationVectorVector_insert" "', argument " "4"" of type '" "std::vector< std::vector< hfst_ol::Location > >::value_type const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "LocationVectorVector_insert" "', argument " "4"" of type '" "std::vector< std::vector< hfst_ol::Location > >::value_type const &""'"); - } - arg4 = ptr; - } - std_vector_Sl_std_vector_Sl_hfst_ol_Location_Sg__Sg__insert__SWIG_1(arg1,arg2,arg3,(std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > > const &)*arg4); - resultobj = SWIG_Py_Void(); - if (SWIG_IsNewObj(res4)) delete arg4; - return resultobj; -fail: - if (SWIG_IsNewObj(res4)) delete arg4; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_LocationVectorVector_insert(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[5] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "LocationVectorVector_insert", 0, 4, argv))) SWIG_fail; - --argc; - if (argc == 3) { - int _v; - int res = swig::asptr(argv[0], (std::vector< std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > >,std::allocator< std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > > > >**)(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::asptr(argv[2], (std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_LocationVectorVector_insert__SWIG_0(self, argc, argv); - } - } - } - } - if (argc == 4) { - int _v; - int res = swig::asptr(argv[0], (std::vector< std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > >,std::allocator< std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > > > >**)(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_size_t(argv[2], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - int res = swig::asptr(argv[3], (std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_LocationVectorVector_insert__SWIG_1(self, argc, argv); - } - } - } - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'LocationVectorVector_insert'.\n" - " Possible C/C++ prototypes are:\n" - " std::vector< std::vector< hfst_ol::Location > >::insert(std::vector< std::vector< hfst_ol::Location > >::iterator,std::vector< std::vector< hfst_ol::Location > >::value_type const &)\n" - " std::vector< std::vector< hfst_ol::Location > >::insert(std::vector< std::vector< hfst_ol::Location > >::iterator,std::vector< std::vector< hfst_ol::Location > >::size_type,std::vector< std::vector< hfst_ol::Location > >::value_type const &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_LocationVectorVector_reserve(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< std::vector< hfst_ol::Location > > *arg1 = (std::vector< std::vector< hfst_ol::Location > > *) 0 ; - std::vector< std::vector< hfst_ol::Location > >::size_type arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - size_t val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args, "LocationVectorVector_reserve", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t_std__allocatorT_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LocationVectorVector_reserve" "', argument " "1"" of type '" "std::vector< std::vector< hfst_ol::Location > > *""'"); - } - arg1 = reinterpret_cast< std::vector< std::vector< hfst_ol::Location > > * >(argp1); - ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "LocationVectorVector_reserve" "', argument " "2"" of type '" "std::vector< std::vector< hfst_ol::Location > >::size_type""'"); - } - arg2 = static_cast< std::vector< std::vector< hfst_ol::Location > >::size_type >(val2); - (arg1)->reserve(arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_LocationVectorVector_capacity(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< std::vector< hfst_ol::Location > > *arg1 = (std::vector< std::vector< hfst_ol::Location > > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::vector< std::vector< hfst_ol::Location > >::size_type result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t_std__allocatorT_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LocationVectorVector_capacity" "', argument " "1"" of type '" "std::vector< std::vector< hfst_ol::Location > > const *""'"); - } - arg1 = reinterpret_cast< std::vector< std::vector< hfst_ol::Location > > * >(argp1); - result = ((std::vector< std::vector< hfst_ol::Location > > const *)arg1)->capacity(); - resultobj = SWIG_From_size_t(static_cast< size_t >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_LocationVectorVector(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector< std::vector< hfst_ol::Location > > *arg1 = (std::vector< std::vector< hfst_ol::Location > > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t_std__allocatorT_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t_t_t, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_LocationVectorVector" "', argument " "1"" of type '" "std::vector< std::vector< hfst_ol::Location > > *""'"); - } - arg1 = reinterpret_cast< std::vector< std::vector< hfst_ol::Location > > * >(argp1); - delete arg1; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *LocationVectorVector_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_std__vectorT_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t_std__allocatorT_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t_t_t, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *LocationVectorVector_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_new_HfstException__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **SWIGUNUSEDPARM(swig_obj)) { - PyObject *resultobj = 0; - HfstException *result = 0 ; - - if ((nobjs < 0) || (nobjs > 0)) SWIG_fail; - result = (HfstException *)new HfstException(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_HfstException, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_HfstException__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::string *arg1 = 0 ; - std::string *arg2 = 0 ; - size_t arg3 ; - int res1 = SWIG_OLDOBJ ; - int res2 = SWIG_OLDOBJ ; - size_t val3 ; - int ecode3 = 0 ; - HfstException *result = 0 ; - - if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; - { - std::string *ptr = (std::string *)0; - res1 = SWIG_AsPtr_std_string(swig_obj[0], &ptr); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_HfstException" "', argument " "1"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_HfstException" "', argument " "1"" of type '" "std::string const &""'"); - } - arg1 = ptr; - } - { - std::string *ptr = (std::string *)0; - res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_HfstException" "', argument " "2"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_HfstException" "', argument " "2"" of type '" "std::string const &""'"); - } - arg2 = ptr; - } - ecode3 = SWIG_AsVal_size_t(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_HfstException" "', argument " "3"" of type '" "size_t""'"); - } - arg3 = static_cast< size_t >(val3); - result = (HfstException *)new HfstException((std::string const &)*arg1,(std::string const &)*arg2,arg3); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_HfstException, SWIG_POINTER_NEW | 0 ); - if (SWIG_IsNewObj(res1)) delete arg1; - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res1)) delete arg1; - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_HfstException(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[4] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "new_HfstException", 0, 3, argv))) SWIG_fail; - --argc; - if (argc == 0) { - return _wrap_new_HfstException__SWIG_0(self, argc, argv); - } - if (argc == 3) { - int _v; - int res = SWIG_AsPtr_std_string(argv[0], (std::string**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_AsPtr_std_string(argv[1], (std::string**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_size_t(argv[2], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_new_HfstException__SWIG_1(self, argc, argv); - } - } - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'new_HfstException'.\n" - " Possible C/C++ prototypes are:\n" - " HfstException::HfstException()\n" - " HfstException::HfstException(std::string const &,std::string const &,size_t)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_delete_HfstException(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - HfstException *arg1 = (HfstException *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_HfstException, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_HfstException" "', argument " "1"" of type '" "HfstException *""'"); - } - arg1 = reinterpret_cast< HfstException * >(argp1); - delete arg1; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstException_what(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - HfstException *arg1 = (HfstException *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::string result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_HfstException, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstException_what" "', argument " "1"" of type '" "HfstException const *""'"); - } - arg1 = reinterpret_cast< HfstException * >(argp1); - result = ((HfstException const *)arg1)->what(); - resultobj = SWIG_From_std_string(static_cast< std::string >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *HfstException_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_HfstException, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *HfstException_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_new_HfstTransducerTypeMismatchException(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::string *arg1 = 0 ; - std::string *arg2 = 0 ; - size_t arg3 ; - int res1 = SWIG_OLDOBJ ; - int res2 = SWIG_OLDOBJ ; - size_t val3 ; - int ecode3 = 0 ; - PyObject *swig_obj[3] ; - HfstTransducerTypeMismatchException *result = 0 ; - - if (!SWIG_Python_UnpackTuple(args, "new_HfstTransducerTypeMismatchException", 3, 3, swig_obj)) SWIG_fail; - { - std::string *ptr = (std::string *)0; - res1 = SWIG_AsPtr_std_string(swig_obj[0], &ptr); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_HfstTransducerTypeMismatchException" "', argument " "1"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_HfstTransducerTypeMismatchException" "', argument " "1"" of type '" "std::string const &""'"); - } - arg1 = ptr; - } - { - std::string *ptr = (std::string *)0; - res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_HfstTransducerTypeMismatchException" "', argument " "2"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_HfstTransducerTypeMismatchException" "', argument " "2"" of type '" "std::string const &""'"); - } - arg2 = ptr; - } - ecode3 = SWIG_AsVal_size_t(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_HfstTransducerTypeMismatchException" "', argument " "3"" of type '" "size_t""'"); - } - arg3 = static_cast< size_t >(val3); - result = (HfstTransducerTypeMismatchException *)new HfstTransducerTypeMismatchException((std::string const &)*arg1,(std::string const &)*arg2,arg3); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_HfstTransducerTypeMismatchException, SWIG_POINTER_NEW | 0 ); - if (SWIG_IsNewObj(res1)) delete arg1; - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res1)) delete arg1; - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_HfstTransducerTypeMismatchException(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - HfstTransducerTypeMismatchException *arg1 = (HfstTransducerTypeMismatchException *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_HfstTransducerTypeMismatchException, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_HfstTransducerTypeMismatchException" "', argument " "1"" of type '" "HfstTransducerTypeMismatchException *""'"); - } - arg1 = reinterpret_cast< HfstTransducerTypeMismatchException * >(argp1); - delete arg1; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducerTypeMismatchException_what(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - HfstTransducerTypeMismatchException *arg1 = (HfstTransducerTypeMismatchException *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::string result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_HfstTransducerTypeMismatchException, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducerTypeMismatchException_what" "', argument " "1"" of type '" "HfstTransducerTypeMismatchException const *""'"); - } - arg1 = reinterpret_cast< HfstTransducerTypeMismatchException * >(argp1); - result = ((HfstTransducerTypeMismatchException const *)arg1)->what(); - resultobj = SWIG_From_std_string(static_cast< std::string >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *HfstTransducerTypeMismatchException_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_HfstTransducerTypeMismatchException, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *HfstTransducerTypeMismatchException_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_new_ImplementationTypeNotAvailableException(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::string *arg1 = 0 ; - std::string *arg2 = 0 ; - size_t arg3 ; - hfst::ImplementationType arg4 ; - int res1 = SWIG_OLDOBJ ; - int res2 = SWIG_OLDOBJ ; - size_t val3 ; - int ecode3 = 0 ; - int val4 ; - int ecode4 = 0 ; - PyObject *swig_obj[4] ; - ImplementationTypeNotAvailableException *result = 0 ; - - if (!SWIG_Python_UnpackTuple(args, "new_ImplementationTypeNotAvailableException", 4, 4, swig_obj)) SWIG_fail; - { - std::string *ptr = (std::string *)0; - res1 = SWIG_AsPtr_std_string(swig_obj[0], &ptr); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ImplementationTypeNotAvailableException" "', argument " "1"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ImplementationTypeNotAvailableException" "', argument " "1"" of type '" "std::string const &""'"); - } - arg1 = ptr; - } - { - std::string *ptr = (std::string *)0; - res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_ImplementationTypeNotAvailableException" "', argument " "2"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ImplementationTypeNotAvailableException" "', argument " "2"" of type '" "std::string const &""'"); - } - arg2 = ptr; - } - ecode3 = SWIG_AsVal_size_t(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_ImplementationTypeNotAvailableException" "', argument " "3"" of type '" "size_t""'"); - } - arg3 = static_cast< size_t >(val3); - ecode4 = SWIG_AsVal_int(swig_obj[3], &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_ImplementationTypeNotAvailableException" "', argument " "4"" of type '" "hfst::ImplementationType""'"); - } - arg4 = static_cast< hfst::ImplementationType >(val4); - result = (ImplementationTypeNotAvailableException *)new ImplementationTypeNotAvailableException((std::string const &)*arg1,(std::string const &)*arg2,arg3,arg4); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ImplementationTypeNotAvailableException, SWIG_POINTER_NEW | 0 ); - if (SWIG_IsNewObj(res1)) delete arg1; - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res1)) delete arg1; - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_ImplementationTypeNotAvailableException(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - ImplementationTypeNotAvailableException *arg1 = (ImplementationTypeNotAvailableException *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_ImplementationTypeNotAvailableException, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ImplementationTypeNotAvailableException" "', argument " "1"" of type '" "ImplementationTypeNotAvailableException *""'"); - } - arg1 = reinterpret_cast< ImplementationTypeNotAvailableException * >(argp1); - delete arg1; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_ImplementationTypeNotAvailableException_what(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - ImplementationTypeNotAvailableException *arg1 = (ImplementationTypeNotAvailableException *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::string result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_ImplementationTypeNotAvailableException, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ImplementationTypeNotAvailableException_what" "', argument " "1"" of type '" "ImplementationTypeNotAvailableException const *""'"); - } - arg1 = reinterpret_cast< ImplementationTypeNotAvailableException * >(argp1); - result = ((ImplementationTypeNotAvailableException const *)arg1)->what(); - resultobj = SWIG_From_std_string(static_cast< std::string >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_ImplementationTypeNotAvailableException_get_type(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - ImplementationTypeNotAvailableException *arg1 = (ImplementationTypeNotAvailableException *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - hfst::ImplementationType result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_ImplementationTypeNotAvailableException, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ImplementationTypeNotAvailableException_get_type" "', argument " "1"" of type '" "ImplementationTypeNotAvailableException const *""'"); - } - arg1 = reinterpret_cast< ImplementationTypeNotAvailableException * >(argp1); - result = (hfst::ImplementationType)((ImplementationTypeNotAvailableException const *)arg1)->get_type(); - resultobj = SWIG_From_int(static_cast< int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *ImplementationTypeNotAvailableException_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_ImplementationTypeNotAvailableException, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *ImplementationTypeNotAvailableException_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_new_FunctionNotImplementedException(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::string *arg1 = 0 ; - std::string *arg2 = 0 ; - size_t arg3 ; - int res1 = SWIG_OLDOBJ ; - int res2 = SWIG_OLDOBJ ; - size_t val3 ; - int ecode3 = 0 ; - PyObject *swig_obj[3] ; - FunctionNotImplementedException *result = 0 ; - - if (!SWIG_Python_UnpackTuple(args, "new_FunctionNotImplementedException", 3, 3, swig_obj)) SWIG_fail; - { - std::string *ptr = (std::string *)0; - res1 = SWIG_AsPtr_std_string(swig_obj[0], &ptr); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FunctionNotImplementedException" "', argument " "1"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FunctionNotImplementedException" "', argument " "1"" of type '" "std::string const &""'"); - } - arg1 = ptr; - } - { - std::string *ptr = (std::string *)0; - res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_FunctionNotImplementedException" "', argument " "2"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FunctionNotImplementedException" "', argument " "2"" of type '" "std::string const &""'"); - } - arg2 = ptr; - } - ecode3 = SWIG_AsVal_size_t(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_FunctionNotImplementedException" "', argument " "3"" of type '" "size_t""'"); - } - arg3 = static_cast< size_t >(val3); - result = (FunctionNotImplementedException *)new FunctionNotImplementedException((std::string const &)*arg1,(std::string const &)*arg2,arg3); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FunctionNotImplementedException, SWIG_POINTER_NEW | 0 ); - if (SWIG_IsNewObj(res1)) delete arg1; - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res1)) delete arg1; - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_FunctionNotImplementedException(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - FunctionNotImplementedException *arg1 = (FunctionNotImplementedException *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_FunctionNotImplementedException, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_FunctionNotImplementedException" "', argument " "1"" of type '" "FunctionNotImplementedException *""'"); - } - arg1 = reinterpret_cast< FunctionNotImplementedException * >(argp1); - delete arg1; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FunctionNotImplementedException_what(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - FunctionNotImplementedException *arg1 = (FunctionNotImplementedException *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::string result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_FunctionNotImplementedException, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FunctionNotImplementedException_what" "', argument " "1"" of type '" "FunctionNotImplementedException const *""'"); - } - arg1 = reinterpret_cast< FunctionNotImplementedException * >(argp1); - result = ((FunctionNotImplementedException const *)arg1)->what(); - resultobj = SWIG_From_std_string(static_cast< std::string >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *FunctionNotImplementedException_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_FunctionNotImplementedException, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *FunctionNotImplementedException_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_new_StreamNotReadableException(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::string *arg1 = 0 ; - std::string *arg2 = 0 ; - size_t arg3 ; - int res1 = SWIG_OLDOBJ ; - int res2 = SWIG_OLDOBJ ; - size_t val3 ; - int ecode3 = 0 ; - PyObject *swig_obj[3] ; - StreamNotReadableException *result = 0 ; - - if (!SWIG_Python_UnpackTuple(args, "new_StreamNotReadableException", 3, 3, swig_obj)) SWIG_fail; - { - std::string *ptr = (std::string *)0; - res1 = SWIG_AsPtr_std_string(swig_obj[0], &ptr); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_StreamNotReadableException" "', argument " "1"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_StreamNotReadableException" "', argument " "1"" of type '" "std::string const &""'"); - } - arg1 = ptr; - } - { - std::string *ptr = (std::string *)0; - res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_StreamNotReadableException" "', argument " "2"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_StreamNotReadableException" "', argument " "2"" of type '" "std::string const &""'"); - } - arg2 = ptr; - } - ecode3 = SWIG_AsVal_size_t(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_StreamNotReadableException" "', argument " "3"" of type '" "size_t""'"); - } - arg3 = static_cast< size_t >(val3); - result = (StreamNotReadableException *)new StreamNotReadableException((std::string const &)*arg1,(std::string const &)*arg2,arg3); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_StreamNotReadableException, SWIG_POINTER_NEW | 0 ); - if (SWIG_IsNewObj(res1)) delete arg1; - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res1)) delete arg1; - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_StreamNotReadableException(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - StreamNotReadableException *arg1 = (StreamNotReadableException *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_StreamNotReadableException, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_StreamNotReadableException" "', argument " "1"" of type '" "StreamNotReadableException *""'"); - } - arg1 = reinterpret_cast< StreamNotReadableException * >(argp1); - delete arg1; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_StreamNotReadableException_what(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - StreamNotReadableException *arg1 = (StreamNotReadableException *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::string result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_StreamNotReadableException, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StreamNotReadableException_what" "', argument " "1"" of type '" "StreamNotReadableException const *""'"); - } - arg1 = reinterpret_cast< StreamNotReadableException * >(argp1); - result = ((StreamNotReadableException const *)arg1)->what(); - resultobj = SWIG_From_std_string(static_cast< std::string >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *StreamNotReadableException_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_StreamNotReadableException, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *StreamNotReadableException_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_new_StreamCannotBeWrittenException(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::string *arg1 = 0 ; - std::string *arg2 = 0 ; - size_t arg3 ; - int res1 = SWIG_OLDOBJ ; - int res2 = SWIG_OLDOBJ ; - size_t val3 ; - int ecode3 = 0 ; - PyObject *swig_obj[3] ; - StreamCannotBeWrittenException *result = 0 ; - - if (!SWIG_Python_UnpackTuple(args, "new_StreamCannotBeWrittenException", 3, 3, swig_obj)) SWIG_fail; - { - std::string *ptr = (std::string *)0; - res1 = SWIG_AsPtr_std_string(swig_obj[0], &ptr); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_StreamCannotBeWrittenException" "', argument " "1"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_StreamCannotBeWrittenException" "', argument " "1"" of type '" "std::string const &""'"); - } - arg1 = ptr; - } - { - std::string *ptr = (std::string *)0; - res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_StreamCannotBeWrittenException" "', argument " "2"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_StreamCannotBeWrittenException" "', argument " "2"" of type '" "std::string const &""'"); - } - arg2 = ptr; - } - ecode3 = SWIG_AsVal_size_t(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_StreamCannotBeWrittenException" "', argument " "3"" of type '" "size_t""'"); - } - arg3 = static_cast< size_t >(val3); - result = (StreamCannotBeWrittenException *)new StreamCannotBeWrittenException((std::string const &)*arg1,(std::string const &)*arg2,arg3); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_StreamCannotBeWrittenException, SWIG_POINTER_NEW | 0 ); - if (SWIG_IsNewObj(res1)) delete arg1; - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res1)) delete arg1; - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_StreamCannotBeWrittenException(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - StreamCannotBeWrittenException *arg1 = (StreamCannotBeWrittenException *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_StreamCannotBeWrittenException, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_StreamCannotBeWrittenException" "', argument " "1"" of type '" "StreamCannotBeWrittenException *""'"); - } - arg1 = reinterpret_cast< StreamCannotBeWrittenException * >(argp1); - delete arg1; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_StreamCannotBeWrittenException_what(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - StreamCannotBeWrittenException *arg1 = (StreamCannotBeWrittenException *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::string result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_StreamCannotBeWrittenException, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StreamCannotBeWrittenException_what" "', argument " "1"" of type '" "StreamCannotBeWrittenException const *""'"); - } - arg1 = reinterpret_cast< StreamCannotBeWrittenException * >(argp1); - result = ((StreamCannotBeWrittenException const *)arg1)->what(); - resultobj = SWIG_From_std_string(static_cast< std::string >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *StreamCannotBeWrittenException_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_StreamCannotBeWrittenException, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *StreamCannotBeWrittenException_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_new_StreamIsClosedException(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::string *arg1 = 0 ; - std::string *arg2 = 0 ; - size_t arg3 ; - int res1 = SWIG_OLDOBJ ; - int res2 = SWIG_OLDOBJ ; - size_t val3 ; - int ecode3 = 0 ; - PyObject *swig_obj[3] ; - StreamIsClosedException *result = 0 ; - - if (!SWIG_Python_UnpackTuple(args, "new_StreamIsClosedException", 3, 3, swig_obj)) SWIG_fail; - { - std::string *ptr = (std::string *)0; - res1 = SWIG_AsPtr_std_string(swig_obj[0], &ptr); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_StreamIsClosedException" "', argument " "1"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_StreamIsClosedException" "', argument " "1"" of type '" "std::string const &""'"); - } - arg1 = ptr; - } - { - std::string *ptr = (std::string *)0; - res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_StreamIsClosedException" "', argument " "2"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_StreamIsClosedException" "', argument " "2"" of type '" "std::string const &""'"); - } - arg2 = ptr; - } - ecode3 = SWIG_AsVal_size_t(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_StreamIsClosedException" "', argument " "3"" of type '" "size_t""'"); - } - arg3 = static_cast< size_t >(val3); - result = (StreamIsClosedException *)new StreamIsClosedException((std::string const &)*arg1,(std::string const &)*arg2,arg3); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_StreamIsClosedException, SWIG_POINTER_NEW | 0 ); - if (SWIG_IsNewObj(res1)) delete arg1; - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res1)) delete arg1; - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_StreamIsClosedException(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - StreamIsClosedException *arg1 = (StreamIsClosedException *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_StreamIsClosedException, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_StreamIsClosedException" "', argument " "1"" of type '" "StreamIsClosedException *""'"); - } - arg1 = reinterpret_cast< StreamIsClosedException * >(argp1); - delete arg1; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_StreamIsClosedException_what(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - StreamIsClosedException *arg1 = (StreamIsClosedException *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::string result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_StreamIsClosedException, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StreamIsClosedException_what" "', argument " "1"" of type '" "StreamIsClosedException const *""'"); - } - arg1 = reinterpret_cast< StreamIsClosedException * >(argp1); - result = ((StreamIsClosedException const *)arg1)->what(); - resultobj = SWIG_From_std_string(static_cast< std::string >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *StreamIsClosedException_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_StreamIsClosedException, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *StreamIsClosedException_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_new_EndOfStreamException(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::string *arg1 = 0 ; - std::string *arg2 = 0 ; - size_t arg3 ; - int res1 = SWIG_OLDOBJ ; - int res2 = SWIG_OLDOBJ ; - size_t val3 ; - int ecode3 = 0 ; - PyObject *swig_obj[3] ; - EndOfStreamException *result = 0 ; - - if (!SWIG_Python_UnpackTuple(args, "new_EndOfStreamException", 3, 3, swig_obj)) SWIG_fail; - { - std::string *ptr = (std::string *)0; - res1 = SWIG_AsPtr_std_string(swig_obj[0], &ptr); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_EndOfStreamException" "', argument " "1"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_EndOfStreamException" "', argument " "1"" of type '" "std::string const &""'"); - } - arg1 = ptr; - } - { - std::string *ptr = (std::string *)0; - res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_EndOfStreamException" "', argument " "2"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_EndOfStreamException" "', argument " "2"" of type '" "std::string const &""'"); - } - arg2 = ptr; - } - ecode3 = SWIG_AsVal_size_t(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_EndOfStreamException" "', argument " "3"" of type '" "size_t""'"); - } - arg3 = static_cast< size_t >(val3); - result = (EndOfStreamException *)new EndOfStreamException((std::string const &)*arg1,(std::string const &)*arg2,arg3); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EndOfStreamException, SWIG_POINTER_NEW | 0 ); - if (SWIG_IsNewObj(res1)) delete arg1; - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res1)) delete arg1; - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_EndOfStreamException(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - EndOfStreamException *arg1 = (EndOfStreamException *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_EndOfStreamException, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_EndOfStreamException" "', argument " "1"" of type '" "EndOfStreamException *""'"); - } - arg1 = reinterpret_cast< EndOfStreamException * >(argp1); - delete arg1; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_EndOfStreamException_what(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - EndOfStreamException *arg1 = (EndOfStreamException *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::string result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_EndOfStreamException, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "EndOfStreamException_what" "', argument " "1"" of type '" "EndOfStreamException const *""'"); - } - arg1 = reinterpret_cast< EndOfStreamException * >(argp1); - result = ((EndOfStreamException const *)arg1)->what(); - resultobj = SWIG_From_std_string(static_cast< std::string >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *EndOfStreamException_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_EndOfStreamException, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *EndOfStreamException_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_new_TransducerIsCyclicException(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::string *arg1 = 0 ; - std::string *arg2 = 0 ; - size_t arg3 ; - int res1 = SWIG_OLDOBJ ; - int res2 = SWIG_OLDOBJ ; - size_t val3 ; - int ecode3 = 0 ; - PyObject *swig_obj[3] ; - TransducerIsCyclicException *result = 0 ; - - if (!SWIG_Python_UnpackTuple(args, "new_TransducerIsCyclicException", 3, 3, swig_obj)) SWIG_fail; - { - std::string *ptr = (std::string *)0; - res1 = SWIG_AsPtr_std_string(swig_obj[0], &ptr); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_TransducerIsCyclicException" "', argument " "1"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_TransducerIsCyclicException" "', argument " "1"" of type '" "std::string const &""'"); - } - arg1 = ptr; - } - { - std::string *ptr = (std::string *)0; - res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_TransducerIsCyclicException" "', argument " "2"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_TransducerIsCyclicException" "', argument " "2"" of type '" "std::string const &""'"); - } - arg2 = ptr; - } - ecode3 = SWIG_AsVal_size_t(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_TransducerIsCyclicException" "', argument " "3"" of type '" "size_t""'"); - } - arg3 = static_cast< size_t >(val3); - result = (TransducerIsCyclicException *)new TransducerIsCyclicException((std::string const &)*arg1,(std::string const &)*arg2,arg3); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_TransducerIsCyclicException, SWIG_POINTER_NEW | 0 ); - if (SWIG_IsNewObj(res1)) delete arg1; - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res1)) delete arg1; - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_TransducerIsCyclicException(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - TransducerIsCyclicException *arg1 = (TransducerIsCyclicException *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_TransducerIsCyclicException, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_TransducerIsCyclicException" "', argument " "1"" of type '" "TransducerIsCyclicException *""'"); - } - arg1 = reinterpret_cast< TransducerIsCyclicException * >(argp1); - delete arg1; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_TransducerIsCyclicException_what(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - TransducerIsCyclicException *arg1 = (TransducerIsCyclicException *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::string result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_TransducerIsCyclicException, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TransducerIsCyclicException_what" "', argument " "1"" of type '" "TransducerIsCyclicException const *""'"); - } - arg1 = reinterpret_cast< TransducerIsCyclicException * >(argp1); - result = ((TransducerIsCyclicException const *)arg1)->what(); - resultobj = SWIG_From_std_string(static_cast< std::string >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *TransducerIsCyclicException_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_TransducerIsCyclicException, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *TransducerIsCyclicException_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_new_NotTransducerStreamException(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::string *arg1 = 0 ; - std::string *arg2 = 0 ; - size_t arg3 ; - int res1 = SWIG_OLDOBJ ; - int res2 = SWIG_OLDOBJ ; - size_t val3 ; - int ecode3 = 0 ; - PyObject *swig_obj[3] ; - NotTransducerStreamException *result = 0 ; - - if (!SWIG_Python_UnpackTuple(args, "new_NotTransducerStreamException", 3, 3, swig_obj)) SWIG_fail; - { - std::string *ptr = (std::string *)0; - res1 = SWIG_AsPtr_std_string(swig_obj[0], &ptr); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_NotTransducerStreamException" "', argument " "1"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_NotTransducerStreamException" "', argument " "1"" of type '" "std::string const &""'"); - } - arg1 = ptr; - } - { - std::string *ptr = (std::string *)0; - res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_NotTransducerStreamException" "', argument " "2"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_NotTransducerStreamException" "', argument " "2"" of type '" "std::string const &""'"); - } - arg2 = ptr; - } - ecode3 = SWIG_AsVal_size_t(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_NotTransducerStreamException" "', argument " "3"" of type '" "size_t""'"); - } - arg3 = static_cast< size_t >(val3); - result = (NotTransducerStreamException *)new NotTransducerStreamException((std::string const &)*arg1,(std::string const &)*arg2,arg3); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_NotTransducerStreamException, SWIG_POINTER_NEW | 0 ); - if (SWIG_IsNewObj(res1)) delete arg1; - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res1)) delete arg1; - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_NotTransducerStreamException(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - NotTransducerStreamException *arg1 = (NotTransducerStreamException *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_NotTransducerStreamException, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_NotTransducerStreamException" "', argument " "1"" of type '" "NotTransducerStreamException *""'"); - } - arg1 = reinterpret_cast< NotTransducerStreamException * >(argp1); - delete arg1; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_NotTransducerStreamException_what(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - NotTransducerStreamException *arg1 = (NotTransducerStreamException *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::string result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_NotTransducerStreamException, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "NotTransducerStreamException_what" "', argument " "1"" of type '" "NotTransducerStreamException const *""'"); - } - arg1 = reinterpret_cast< NotTransducerStreamException * >(argp1); - result = ((NotTransducerStreamException const *)arg1)->what(); - resultobj = SWIG_From_std_string(static_cast< std::string >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *NotTransducerStreamException_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_NotTransducerStreamException, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *NotTransducerStreamException_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_new_NotValidAttFormatException(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::string *arg1 = 0 ; - std::string *arg2 = 0 ; - size_t arg3 ; - int res1 = SWIG_OLDOBJ ; - int res2 = SWIG_OLDOBJ ; - size_t val3 ; - int ecode3 = 0 ; - PyObject *swig_obj[3] ; - NotValidAttFormatException *result = 0 ; - - if (!SWIG_Python_UnpackTuple(args, "new_NotValidAttFormatException", 3, 3, swig_obj)) SWIG_fail; - { - std::string *ptr = (std::string *)0; - res1 = SWIG_AsPtr_std_string(swig_obj[0], &ptr); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_NotValidAttFormatException" "', argument " "1"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_NotValidAttFormatException" "', argument " "1"" of type '" "std::string const &""'"); - } - arg1 = ptr; - } - { - std::string *ptr = (std::string *)0; - res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_NotValidAttFormatException" "', argument " "2"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_NotValidAttFormatException" "', argument " "2"" of type '" "std::string const &""'"); - } - arg2 = ptr; - } - ecode3 = SWIG_AsVal_size_t(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_NotValidAttFormatException" "', argument " "3"" of type '" "size_t""'"); - } - arg3 = static_cast< size_t >(val3); - result = (NotValidAttFormatException *)new NotValidAttFormatException((std::string const &)*arg1,(std::string const &)*arg2,arg3); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_NotValidAttFormatException, SWIG_POINTER_NEW | 0 ); - if (SWIG_IsNewObj(res1)) delete arg1; - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res1)) delete arg1; - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_NotValidAttFormatException(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - NotValidAttFormatException *arg1 = (NotValidAttFormatException *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_NotValidAttFormatException, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_NotValidAttFormatException" "', argument " "1"" of type '" "NotValidAttFormatException *""'"); - } - arg1 = reinterpret_cast< NotValidAttFormatException * >(argp1); - delete arg1; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_NotValidAttFormatException_what(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - NotValidAttFormatException *arg1 = (NotValidAttFormatException *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::string result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_NotValidAttFormatException, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "NotValidAttFormatException_what" "', argument " "1"" of type '" "NotValidAttFormatException const *""'"); - } - arg1 = reinterpret_cast< NotValidAttFormatException * >(argp1); - result = ((NotValidAttFormatException const *)arg1)->what(); - resultobj = SWIG_From_std_string(static_cast< std::string >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *NotValidAttFormatException_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_NotValidAttFormatException, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *NotValidAttFormatException_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_new_NotValidPrologFormatException(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::string *arg1 = 0 ; - std::string *arg2 = 0 ; - size_t arg3 ; - int res1 = SWIG_OLDOBJ ; - int res2 = SWIG_OLDOBJ ; - size_t val3 ; - int ecode3 = 0 ; - PyObject *swig_obj[3] ; - NotValidPrologFormatException *result = 0 ; - - if (!SWIG_Python_UnpackTuple(args, "new_NotValidPrologFormatException", 3, 3, swig_obj)) SWIG_fail; - { - std::string *ptr = (std::string *)0; - res1 = SWIG_AsPtr_std_string(swig_obj[0], &ptr); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_NotValidPrologFormatException" "', argument " "1"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_NotValidPrologFormatException" "', argument " "1"" of type '" "std::string const &""'"); - } - arg1 = ptr; - } - { - std::string *ptr = (std::string *)0; - res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_NotValidPrologFormatException" "', argument " "2"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_NotValidPrologFormatException" "', argument " "2"" of type '" "std::string const &""'"); - } - arg2 = ptr; - } - ecode3 = SWIG_AsVal_size_t(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_NotValidPrologFormatException" "', argument " "3"" of type '" "size_t""'"); - } - arg3 = static_cast< size_t >(val3); - result = (NotValidPrologFormatException *)new NotValidPrologFormatException((std::string const &)*arg1,(std::string const &)*arg2,arg3); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_NotValidPrologFormatException, SWIG_POINTER_NEW | 0 ); - if (SWIG_IsNewObj(res1)) delete arg1; - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res1)) delete arg1; - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_NotValidPrologFormatException(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - NotValidPrologFormatException *arg1 = (NotValidPrologFormatException *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_NotValidPrologFormatException, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_NotValidPrologFormatException" "', argument " "1"" of type '" "NotValidPrologFormatException *""'"); - } - arg1 = reinterpret_cast< NotValidPrologFormatException * >(argp1); - delete arg1; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_NotValidPrologFormatException_what(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - NotValidPrologFormatException *arg1 = (NotValidPrologFormatException *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::string result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_NotValidPrologFormatException, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "NotValidPrologFormatException_what" "', argument " "1"" of type '" "NotValidPrologFormatException const *""'"); - } - arg1 = reinterpret_cast< NotValidPrologFormatException * >(argp1); - result = ((NotValidPrologFormatException const *)arg1)->what(); - resultobj = SWIG_From_std_string(static_cast< std::string >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *NotValidPrologFormatException_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_NotValidPrologFormatException, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *NotValidPrologFormatException_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_new_NotValidLexcFormatException(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::string *arg1 = 0 ; - std::string *arg2 = 0 ; - size_t arg3 ; - int res1 = SWIG_OLDOBJ ; - int res2 = SWIG_OLDOBJ ; - size_t val3 ; - int ecode3 = 0 ; - PyObject *swig_obj[3] ; - NotValidLexcFormatException *result = 0 ; - - if (!SWIG_Python_UnpackTuple(args, "new_NotValidLexcFormatException", 3, 3, swig_obj)) SWIG_fail; - { - std::string *ptr = (std::string *)0; - res1 = SWIG_AsPtr_std_string(swig_obj[0], &ptr); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_NotValidLexcFormatException" "', argument " "1"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_NotValidLexcFormatException" "', argument " "1"" of type '" "std::string const &""'"); - } - arg1 = ptr; - } - { - std::string *ptr = (std::string *)0; - res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_NotValidLexcFormatException" "', argument " "2"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_NotValidLexcFormatException" "', argument " "2"" of type '" "std::string const &""'"); - } - arg2 = ptr; - } - ecode3 = SWIG_AsVal_size_t(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_NotValidLexcFormatException" "', argument " "3"" of type '" "size_t""'"); - } - arg3 = static_cast< size_t >(val3); - result = (NotValidLexcFormatException *)new NotValidLexcFormatException((std::string const &)*arg1,(std::string const &)*arg2,arg3); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_NotValidLexcFormatException, SWIG_POINTER_NEW | 0 ); - if (SWIG_IsNewObj(res1)) delete arg1; - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res1)) delete arg1; - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_NotValidLexcFormatException(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - NotValidLexcFormatException *arg1 = (NotValidLexcFormatException *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_NotValidLexcFormatException, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_NotValidLexcFormatException" "', argument " "1"" of type '" "NotValidLexcFormatException *""'"); - } - arg1 = reinterpret_cast< NotValidLexcFormatException * >(argp1); - delete arg1; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_NotValidLexcFormatException_what(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - NotValidLexcFormatException *arg1 = (NotValidLexcFormatException *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::string result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_NotValidLexcFormatException, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "NotValidLexcFormatException_what" "', argument " "1"" of type '" "NotValidLexcFormatException const *""'"); - } - arg1 = reinterpret_cast< NotValidLexcFormatException * >(argp1); - result = ((NotValidLexcFormatException const *)arg1)->what(); - resultobj = SWIG_From_std_string(static_cast< std::string >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *NotValidLexcFormatException_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_NotValidLexcFormatException, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *NotValidLexcFormatException_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_new_StateIsNotFinalException(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::string *arg1 = 0 ; - std::string *arg2 = 0 ; - size_t arg3 ; - int res1 = SWIG_OLDOBJ ; - int res2 = SWIG_OLDOBJ ; - size_t val3 ; - int ecode3 = 0 ; - PyObject *swig_obj[3] ; - StateIsNotFinalException *result = 0 ; - - if (!SWIG_Python_UnpackTuple(args, "new_StateIsNotFinalException", 3, 3, swig_obj)) SWIG_fail; - { - std::string *ptr = (std::string *)0; - res1 = SWIG_AsPtr_std_string(swig_obj[0], &ptr); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_StateIsNotFinalException" "', argument " "1"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_StateIsNotFinalException" "', argument " "1"" of type '" "std::string const &""'"); - } - arg1 = ptr; - } - { - std::string *ptr = (std::string *)0; - res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_StateIsNotFinalException" "', argument " "2"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_StateIsNotFinalException" "', argument " "2"" of type '" "std::string const &""'"); - } - arg2 = ptr; - } - ecode3 = SWIG_AsVal_size_t(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_StateIsNotFinalException" "', argument " "3"" of type '" "size_t""'"); - } - arg3 = static_cast< size_t >(val3); - result = (StateIsNotFinalException *)new StateIsNotFinalException((std::string const &)*arg1,(std::string const &)*arg2,arg3); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_StateIsNotFinalException, SWIG_POINTER_NEW | 0 ); - if (SWIG_IsNewObj(res1)) delete arg1; - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res1)) delete arg1; - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_StateIsNotFinalException(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - StateIsNotFinalException *arg1 = (StateIsNotFinalException *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_StateIsNotFinalException, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_StateIsNotFinalException" "', argument " "1"" of type '" "StateIsNotFinalException *""'"); - } - arg1 = reinterpret_cast< StateIsNotFinalException * >(argp1); - delete arg1; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_StateIsNotFinalException_what(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - StateIsNotFinalException *arg1 = (StateIsNotFinalException *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::string result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_StateIsNotFinalException, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StateIsNotFinalException_what" "', argument " "1"" of type '" "StateIsNotFinalException const *""'"); - } - arg1 = reinterpret_cast< StateIsNotFinalException * >(argp1); - result = ((StateIsNotFinalException const *)arg1)->what(); - resultobj = SWIG_From_std_string(static_cast< std::string >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *StateIsNotFinalException_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_StateIsNotFinalException, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *StateIsNotFinalException_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_new_ContextTransducersAreNotAutomataException(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::string *arg1 = 0 ; - std::string *arg2 = 0 ; - size_t arg3 ; - int res1 = SWIG_OLDOBJ ; - int res2 = SWIG_OLDOBJ ; - size_t val3 ; - int ecode3 = 0 ; - PyObject *swig_obj[3] ; - ContextTransducersAreNotAutomataException *result = 0 ; - - if (!SWIG_Python_UnpackTuple(args, "new_ContextTransducersAreNotAutomataException", 3, 3, swig_obj)) SWIG_fail; - { - std::string *ptr = (std::string *)0; - res1 = SWIG_AsPtr_std_string(swig_obj[0], &ptr); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ContextTransducersAreNotAutomataException" "', argument " "1"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ContextTransducersAreNotAutomataException" "', argument " "1"" of type '" "std::string const &""'"); - } - arg1 = ptr; - } - { - std::string *ptr = (std::string *)0; - res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_ContextTransducersAreNotAutomataException" "', argument " "2"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ContextTransducersAreNotAutomataException" "', argument " "2"" of type '" "std::string const &""'"); - } - arg2 = ptr; - } - ecode3 = SWIG_AsVal_size_t(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_ContextTransducersAreNotAutomataException" "', argument " "3"" of type '" "size_t""'"); - } - arg3 = static_cast< size_t >(val3); - result = (ContextTransducersAreNotAutomataException *)new ContextTransducersAreNotAutomataException((std::string const &)*arg1,(std::string const &)*arg2,arg3); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ContextTransducersAreNotAutomataException, SWIG_POINTER_NEW | 0 ); - if (SWIG_IsNewObj(res1)) delete arg1; - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res1)) delete arg1; - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_ContextTransducersAreNotAutomataException(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - ContextTransducersAreNotAutomataException *arg1 = (ContextTransducersAreNotAutomataException *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_ContextTransducersAreNotAutomataException, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ContextTransducersAreNotAutomataException" "', argument " "1"" of type '" "ContextTransducersAreNotAutomataException *""'"); - } - arg1 = reinterpret_cast< ContextTransducersAreNotAutomataException * >(argp1); - delete arg1; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_ContextTransducersAreNotAutomataException_what(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - ContextTransducersAreNotAutomataException *arg1 = (ContextTransducersAreNotAutomataException *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::string result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_ContextTransducersAreNotAutomataException, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContextTransducersAreNotAutomataException_what" "', argument " "1"" of type '" "ContextTransducersAreNotAutomataException const *""'"); - } - arg1 = reinterpret_cast< ContextTransducersAreNotAutomataException * >(argp1); - result = ((ContextTransducersAreNotAutomataException const *)arg1)->what(); - resultobj = SWIG_From_std_string(static_cast< std::string >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *ContextTransducersAreNotAutomataException_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_ContextTransducersAreNotAutomataException, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *ContextTransducersAreNotAutomataException_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_new_TransducersAreNotAutomataException(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::string *arg1 = 0 ; - std::string *arg2 = 0 ; - size_t arg3 ; - int res1 = SWIG_OLDOBJ ; - int res2 = SWIG_OLDOBJ ; - size_t val3 ; - int ecode3 = 0 ; - PyObject *swig_obj[3] ; - TransducersAreNotAutomataException *result = 0 ; - - if (!SWIG_Python_UnpackTuple(args, "new_TransducersAreNotAutomataException", 3, 3, swig_obj)) SWIG_fail; - { - std::string *ptr = (std::string *)0; - res1 = SWIG_AsPtr_std_string(swig_obj[0], &ptr); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_TransducersAreNotAutomataException" "', argument " "1"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_TransducersAreNotAutomataException" "', argument " "1"" of type '" "std::string const &""'"); - } - arg1 = ptr; - } - { - std::string *ptr = (std::string *)0; - res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_TransducersAreNotAutomataException" "', argument " "2"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_TransducersAreNotAutomataException" "', argument " "2"" of type '" "std::string const &""'"); - } - arg2 = ptr; - } - ecode3 = SWIG_AsVal_size_t(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_TransducersAreNotAutomataException" "', argument " "3"" of type '" "size_t""'"); - } - arg3 = static_cast< size_t >(val3); - result = (TransducersAreNotAutomataException *)new TransducersAreNotAutomataException((std::string const &)*arg1,(std::string const &)*arg2,arg3); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_TransducersAreNotAutomataException, SWIG_POINTER_NEW | 0 ); - if (SWIG_IsNewObj(res1)) delete arg1; - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res1)) delete arg1; - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_TransducersAreNotAutomataException(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - TransducersAreNotAutomataException *arg1 = (TransducersAreNotAutomataException *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_TransducersAreNotAutomataException, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_TransducersAreNotAutomataException" "', argument " "1"" of type '" "TransducersAreNotAutomataException *""'"); - } - arg1 = reinterpret_cast< TransducersAreNotAutomataException * >(argp1); - delete arg1; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_TransducersAreNotAutomataException_what(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - TransducersAreNotAutomataException *arg1 = (TransducersAreNotAutomataException *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::string result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_TransducersAreNotAutomataException, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TransducersAreNotAutomataException_what" "', argument " "1"" of type '" "TransducersAreNotAutomataException const *""'"); - } - arg1 = reinterpret_cast< TransducersAreNotAutomataException * >(argp1); - result = ((TransducersAreNotAutomataException const *)arg1)->what(); - resultobj = SWIG_From_std_string(static_cast< std::string >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *TransducersAreNotAutomataException_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_TransducersAreNotAutomataException, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *TransducersAreNotAutomataException_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_new_StateIndexOutOfBoundsException(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::string *arg1 = 0 ; - std::string *arg2 = 0 ; - size_t arg3 ; - int res1 = SWIG_OLDOBJ ; - int res2 = SWIG_OLDOBJ ; - size_t val3 ; - int ecode3 = 0 ; - PyObject *swig_obj[3] ; - StateIndexOutOfBoundsException *result = 0 ; - - if (!SWIG_Python_UnpackTuple(args, "new_StateIndexOutOfBoundsException", 3, 3, swig_obj)) SWIG_fail; - { - std::string *ptr = (std::string *)0; - res1 = SWIG_AsPtr_std_string(swig_obj[0], &ptr); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_StateIndexOutOfBoundsException" "', argument " "1"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_StateIndexOutOfBoundsException" "', argument " "1"" of type '" "std::string const &""'"); - } - arg1 = ptr; - } - { - std::string *ptr = (std::string *)0; - res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_StateIndexOutOfBoundsException" "', argument " "2"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_StateIndexOutOfBoundsException" "', argument " "2"" of type '" "std::string const &""'"); - } - arg2 = ptr; - } - ecode3 = SWIG_AsVal_size_t(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_StateIndexOutOfBoundsException" "', argument " "3"" of type '" "size_t""'"); - } - arg3 = static_cast< size_t >(val3); - result = (StateIndexOutOfBoundsException *)new StateIndexOutOfBoundsException((std::string const &)*arg1,(std::string const &)*arg2,arg3); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_StateIndexOutOfBoundsException, SWIG_POINTER_NEW | 0 ); - if (SWIG_IsNewObj(res1)) delete arg1; - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res1)) delete arg1; - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_StateIndexOutOfBoundsException(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - StateIndexOutOfBoundsException *arg1 = (StateIndexOutOfBoundsException *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_StateIndexOutOfBoundsException, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_StateIndexOutOfBoundsException" "', argument " "1"" of type '" "StateIndexOutOfBoundsException *""'"); - } - arg1 = reinterpret_cast< StateIndexOutOfBoundsException * >(argp1); - delete arg1; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_StateIndexOutOfBoundsException_what(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - StateIndexOutOfBoundsException *arg1 = (StateIndexOutOfBoundsException *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::string result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_StateIndexOutOfBoundsException, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StateIndexOutOfBoundsException_what" "', argument " "1"" of type '" "StateIndexOutOfBoundsException const *""'"); - } - arg1 = reinterpret_cast< StateIndexOutOfBoundsException * >(argp1); - result = ((StateIndexOutOfBoundsException const *)arg1)->what(); - resultobj = SWIG_From_std_string(static_cast< std::string >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *StateIndexOutOfBoundsException_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_StateIndexOutOfBoundsException, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *StateIndexOutOfBoundsException_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_new_TransducerHeaderException(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::string *arg1 = 0 ; - std::string *arg2 = 0 ; - size_t arg3 ; - int res1 = SWIG_OLDOBJ ; - int res2 = SWIG_OLDOBJ ; - size_t val3 ; - int ecode3 = 0 ; - PyObject *swig_obj[3] ; - TransducerHeaderException *result = 0 ; - - if (!SWIG_Python_UnpackTuple(args, "new_TransducerHeaderException", 3, 3, swig_obj)) SWIG_fail; - { - std::string *ptr = (std::string *)0; - res1 = SWIG_AsPtr_std_string(swig_obj[0], &ptr); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_TransducerHeaderException" "', argument " "1"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_TransducerHeaderException" "', argument " "1"" of type '" "std::string const &""'"); - } - arg1 = ptr; - } - { - std::string *ptr = (std::string *)0; - res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_TransducerHeaderException" "', argument " "2"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_TransducerHeaderException" "', argument " "2"" of type '" "std::string const &""'"); - } - arg2 = ptr; - } - ecode3 = SWIG_AsVal_size_t(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_TransducerHeaderException" "', argument " "3"" of type '" "size_t""'"); - } - arg3 = static_cast< size_t >(val3); - result = (TransducerHeaderException *)new TransducerHeaderException((std::string const &)*arg1,(std::string const &)*arg2,arg3); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_TransducerHeaderException, SWIG_POINTER_NEW | 0 ); - if (SWIG_IsNewObj(res1)) delete arg1; - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res1)) delete arg1; - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_TransducerHeaderException(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - TransducerHeaderException *arg1 = (TransducerHeaderException *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_TransducerHeaderException, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_TransducerHeaderException" "', argument " "1"" of type '" "TransducerHeaderException *""'"); - } - arg1 = reinterpret_cast< TransducerHeaderException * >(argp1); - delete arg1; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_TransducerHeaderException_what(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - TransducerHeaderException *arg1 = (TransducerHeaderException *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::string result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_TransducerHeaderException, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TransducerHeaderException_what" "', argument " "1"" of type '" "TransducerHeaderException const *""'"); - } - arg1 = reinterpret_cast< TransducerHeaderException * >(argp1); - result = ((TransducerHeaderException const *)arg1)->what(); - resultobj = SWIG_From_std_string(static_cast< std::string >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *TransducerHeaderException_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_TransducerHeaderException, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *TransducerHeaderException_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_new_MissingOpenFstInputSymbolTableException(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::string *arg1 = 0 ; - std::string *arg2 = 0 ; - size_t arg3 ; - int res1 = SWIG_OLDOBJ ; - int res2 = SWIG_OLDOBJ ; - size_t val3 ; - int ecode3 = 0 ; - PyObject *swig_obj[3] ; - MissingOpenFstInputSymbolTableException *result = 0 ; - - if (!SWIG_Python_UnpackTuple(args, "new_MissingOpenFstInputSymbolTableException", 3, 3, swig_obj)) SWIG_fail; - { - std::string *ptr = (std::string *)0; - res1 = SWIG_AsPtr_std_string(swig_obj[0], &ptr); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_MissingOpenFstInputSymbolTableException" "', argument " "1"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MissingOpenFstInputSymbolTableException" "', argument " "1"" of type '" "std::string const &""'"); - } - arg1 = ptr; - } - { - std::string *ptr = (std::string *)0; - res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_MissingOpenFstInputSymbolTableException" "', argument " "2"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MissingOpenFstInputSymbolTableException" "', argument " "2"" of type '" "std::string const &""'"); - } - arg2 = ptr; - } - ecode3 = SWIG_AsVal_size_t(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_MissingOpenFstInputSymbolTableException" "', argument " "3"" of type '" "size_t""'"); - } - arg3 = static_cast< size_t >(val3); - result = (MissingOpenFstInputSymbolTableException *)new MissingOpenFstInputSymbolTableException((std::string const &)*arg1,(std::string const &)*arg2,arg3); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MissingOpenFstInputSymbolTableException, SWIG_POINTER_NEW | 0 ); - if (SWIG_IsNewObj(res1)) delete arg1; - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res1)) delete arg1; - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_MissingOpenFstInputSymbolTableException(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - MissingOpenFstInputSymbolTableException *arg1 = (MissingOpenFstInputSymbolTableException *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_MissingOpenFstInputSymbolTableException, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_MissingOpenFstInputSymbolTableException" "', argument " "1"" of type '" "MissingOpenFstInputSymbolTableException *""'"); - } - arg1 = reinterpret_cast< MissingOpenFstInputSymbolTableException * >(argp1); - delete arg1; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MissingOpenFstInputSymbolTableException_what(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - MissingOpenFstInputSymbolTableException *arg1 = (MissingOpenFstInputSymbolTableException *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::string result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_MissingOpenFstInputSymbolTableException, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MissingOpenFstInputSymbolTableException_what" "', argument " "1"" of type '" "MissingOpenFstInputSymbolTableException const *""'"); - } - arg1 = reinterpret_cast< MissingOpenFstInputSymbolTableException * >(argp1); - result = ((MissingOpenFstInputSymbolTableException const *)arg1)->what(); - resultobj = SWIG_From_std_string(static_cast< std::string >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *MissingOpenFstInputSymbolTableException_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_MissingOpenFstInputSymbolTableException, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *MissingOpenFstInputSymbolTableException_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_new_TransducerTypeMismatchException(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::string *arg1 = 0 ; - std::string *arg2 = 0 ; - size_t arg3 ; - int res1 = SWIG_OLDOBJ ; - int res2 = SWIG_OLDOBJ ; - size_t val3 ; - int ecode3 = 0 ; - PyObject *swig_obj[3] ; - TransducerTypeMismatchException *result = 0 ; - - if (!SWIG_Python_UnpackTuple(args, "new_TransducerTypeMismatchException", 3, 3, swig_obj)) SWIG_fail; - { - std::string *ptr = (std::string *)0; - res1 = SWIG_AsPtr_std_string(swig_obj[0], &ptr); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_TransducerTypeMismatchException" "', argument " "1"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_TransducerTypeMismatchException" "', argument " "1"" of type '" "std::string const &""'"); - } - arg1 = ptr; - } - { - std::string *ptr = (std::string *)0; - res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_TransducerTypeMismatchException" "', argument " "2"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_TransducerTypeMismatchException" "', argument " "2"" of type '" "std::string const &""'"); - } - arg2 = ptr; - } - ecode3 = SWIG_AsVal_size_t(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_TransducerTypeMismatchException" "', argument " "3"" of type '" "size_t""'"); - } - arg3 = static_cast< size_t >(val3); - result = (TransducerTypeMismatchException *)new TransducerTypeMismatchException((std::string const &)*arg1,(std::string const &)*arg2,arg3); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_TransducerTypeMismatchException, SWIG_POINTER_NEW | 0 ); - if (SWIG_IsNewObj(res1)) delete arg1; - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res1)) delete arg1; - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_TransducerTypeMismatchException(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - TransducerTypeMismatchException *arg1 = (TransducerTypeMismatchException *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_TransducerTypeMismatchException, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_TransducerTypeMismatchException" "', argument " "1"" of type '" "TransducerTypeMismatchException *""'"); - } - arg1 = reinterpret_cast< TransducerTypeMismatchException * >(argp1); - delete arg1; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_TransducerTypeMismatchException_what(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - TransducerTypeMismatchException *arg1 = (TransducerTypeMismatchException *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::string result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_TransducerTypeMismatchException, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TransducerTypeMismatchException_what" "', argument " "1"" of type '" "TransducerTypeMismatchException const *""'"); - } - arg1 = reinterpret_cast< TransducerTypeMismatchException * >(argp1); - result = ((TransducerTypeMismatchException const *)arg1)->what(); - resultobj = SWIG_From_std_string(static_cast< std::string >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *TransducerTypeMismatchException_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_TransducerTypeMismatchException, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *TransducerTypeMismatchException_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_new_EmptySetOfContextsException(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::string *arg1 = 0 ; - std::string *arg2 = 0 ; - size_t arg3 ; - int res1 = SWIG_OLDOBJ ; - int res2 = SWIG_OLDOBJ ; - size_t val3 ; - int ecode3 = 0 ; - PyObject *swig_obj[3] ; - EmptySetOfContextsException *result = 0 ; - - if (!SWIG_Python_UnpackTuple(args, "new_EmptySetOfContextsException", 3, 3, swig_obj)) SWIG_fail; - { - std::string *ptr = (std::string *)0; - res1 = SWIG_AsPtr_std_string(swig_obj[0], &ptr); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_EmptySetOfContextsException" "', argument " "1"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_EmptySetOfContextsException" "', argument " "1"" of type '" "std::string const &""'"); - } - arg1 = ptr; - } - { - std::string *ptr = (std::string *)0; - res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_EmptySetOfContextsException" "', argument " "2"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_EmptySetOfContextsException" "', argument " "2"" of type '" "std::string const &""'"); - } - arg2 = ptr; - } - ecode3 = SWIG_AsVal_size_t(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_EmptySetOfContextsException" "', argument " "3"" of type '" "size_t""'"); - } - arg3 = static_cast< size_t >(val3); - result = (EmptySetOfContextsException *)new EmptySetOfContextsException((std::string const &)*arg1,(std::string const &)*arg2,arg3); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EmptySetOfContextsException, SWIG_POINTER_NEW | 0 ); - if (SWIG_IsNewObj(res1)) delete arg1; - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res1)) delete arg1; - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_EmptySetOfContextsException(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - EmptySetOfContextsException *arg1 = (EmptySetOfContextsException *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_EmptySetOfContextsException, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_EmptySetOfContextsException" "', argument " "1"" of type '" "EmptySetOfContextsException *""'"); - } - arg1 = reinterpret_cast< EmptySetOfContextsException * >(argp1); - delete arg1; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_EmptySetOfContextsException_what(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - EmptySetOfContextsException *arg1 = (EmptySetOfContextsException *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::string result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_EmptySetOfContextsException, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "EmptySetOfContextsException_what" "', argument " "1"" of type '" "EmptySetOfContextsException const *""'"); - } - arg1 = reinterpret_cast< EmptySetOfContextsException * >(argp1); - result = ((EmptySetOfContextsException const *)arg1)->what(); - resultobj = SWIG_From_std_string(static_cast< std::string >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *EmptySetOfContextsException_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_EmptySetOfContextsException, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *EmptySetOfContextsException_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_new_SpecifiedTypeRequiredException(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::string *arg1 = 0 ; - std::string *arg2 = 0 ; - size_t arg3 ; - int res1 = SWIG_OLDOBJ ; - int res2 = SWIG_OLDOBJ ; - size_t val3 ; - int ecode3 = 0 ; - PyObject *swig_obj[3] ; - SpecifiedTypeRequiredException *result = 0 ; - - if (!SWIG_Python_UnpackTuple(args, "new_SpecifiedTypeRequiredException", 3, 3, swig_obj)) SWIG_fail; - { - std::string *ptr = (std::string *)0; - res1 = SWIG_AsPtr_std_string(swig_obj[0], &ptr); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_SpecifiedTypeRequiredException" "', argument " "1"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SpecifiedTypeRequiredException" "', argument " "1"" of type '" "std::string const &""'"); - } - arg1 = ptr; - } - { - std::string *ptr = (std::string *)0; - res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_SpecifiedTypeRequiredException" "', argument " "2"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SpecifiedTypeRequiredException" "', argument " "2"" of type '" "std::string const &""'"); - } - arg2 = ptr; - } - ecode3 = SWIG_AsVal_size_t(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_SpecifiedTypeRequiredException" "', argument " "3"" of type '" "size_t""'"); - } - arg3 = static_cast< size_t >(val3); - result = (SpecifiedTypeRequiredException *)new SpecifiedTypeRequiredException((std::string const &)*arg1,(std::string const &)*arg2,arg3); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SpecifiedTypeRequiredException, SWIG_POINTER_NEW | 0 ); - if (SWIG_IsNewObj(res1)) delete arg1; - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res1)) delete arg1; - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_SpecifiedTypeRequiredException(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - SpecifiedTypeRequiredException *arg1 = (SpecifiedTypeRequiredException *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_SpecifiedTypeRequiredException, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_SpecifiedTypeRequiredException" "', argument " "1"" of type '" "SpecifiedTypeRequiredException *""'"); - } - arg1 = reinterpret_cast< SpecifiedTypeRequiredException * >(argp1); - delete arg1; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SpecifiedTypeRequiredException_what(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - SpecifiedTypeRequiredException *arg1 = (SpecifiedTypeRequiredException *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::string result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_SpecifiedTypeRequiredException, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpecifiedTypeRequiredException_what" "', argument " "1"" of type '" "SpecifiedTypeRequiredException const *""'"); - } - arg1 = reinterpret_cast< SpecifiedTypeRequiredException * >(argp1); - result = ((SpecifiedTypeRequiredException const *)arg1)->what(); - resultobj = SWIG_From_std_string(static_cast< std::string >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *SpecifiedTypeRequiredException_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_SpecifiedTypeRequiredException, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *SpecifiedTypeRequiredException_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_new_HfstFatalException(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::string *arg1 = 0 ; - std::string *arg2 = 0 ; - size_t arg3 ; - int res1 = SWIG_OLDOBJ ; - int res2 = SWIG_OLDOBJ ; - size_t val3 ; - int ecode3 = 0 ; - PyObject *swig_obj[3] ; - HfstFatalException *result = 0 ; - - if (!SWIG_Python_UnpackTuple(args, "new_HfstFatalException", 3, 3, swig_obj)) SWIG_fail; - { - std::string *ptr = (std::string *)0; - res1 = SWIG_AsPtr_std_string(swig_obj[0], &ptr); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_HfstFatalException" "', argument " "1"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_HfstFatalException" "', argument " "1"" of type '" "std::string const &""'"); - } - arg1 = ptr; - } - { - std::string *ptr = (std::string *)0; - res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_HfstFatalException" "', argument " "2"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_HfstFatalException" "', argument " "2"" of type '" "std::string const &""'"); - } - arg2 = ptr; - } - ecode3 = SWIG_AsVal_size_t(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_HfstFatalException" "', argument " "3"" of type '" "size_t""'"); - } - arg3 = static_cast< size_t >(val3); - result = (HfstFatalException *)new HfstFatalException((std::string const &)*arg1,(std::string const &)*arg2,arg3); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_HfstFatalException, SWIG_POINTER_NEW | 0 ); - if (SWIG_IsNewObj(res1)) delete arg1; - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res1)) delete arg1; - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_HfstFatalException(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - HfstFatalException *arg1 = (HfstFatalException *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_HfstFatalException, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_HfstFatalException" "', argument " "1"" of type '" "HfstFatalException *""'"); - } - arg1 = reinterpret_cast< HfstFatalException * >(argp1); - delete arg1; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstFatalException_what(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - HfstFatalException *arg1 = (HfstFatalException *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::string result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_HfstFatalException, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstFatalException_what" "', argument " "1"" of type '" "HfstFatalException const *""'"); - } - arg1 = reinterpret_cast< HfstFatalException * >(argp1); - result = ((HfstFatalException const *)arg1)->what(); - resultobj = SWIG_From_std_string(static_cast< std::string >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *HfstFatalException_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_HfstFatalException, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *HfstFatalException_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_new_TransducerHasWrongTypeException(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::string *arg1 = 0 ; - std::string *arg2 = 0 ; - size_t arg3 ; - int res1 = SWIG_OLDOBJ ; - int res2 = SWIG_OLDOBJ ; - size_t val3 ; - int ecode3 = 0 ; - PyObject *swig_obj[3] ; - TransducerHasWrongTypeException *result = 0 ; - - if (!SWIG_Python_UnpackTuple(args, "new_TransducerHasWrongTypeException", 3, 3, swig_obj)) SWIG_fail; - { - std::string *ptr = (std::string *)0; - res1 = SWIG_AsPtr_std_string(swig_obj[0], &ptr); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_TransducerHasWrongTypeException" "', argument " "1"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_TransducerHasWrongTypeException" "', argument " "1"" of type '" "std::string const &""'"); - } - arg1 = ptr; - } - { - std::string *ptr = (std::string *)0; - res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_TransducerHasWrongTypeException" "', argument " "2"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_TransducerHasWrongTypeException" "', argument " "2"" of type '" "std::string const &""'"); - } - arg2 = ptr; - } - ecode3 = SWIG_AsVal_size_t(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_TransducerHasWrongTypeException" "', argument " "3"" of type '" "size_t""'"); - } - arg3 = static_cast< size_t >(val3); - result = (TransducerHasWrongTypeException *)new TransducerHasWrongTypeException((std::string const &)*arg1,(std::string const &)*arg2,arg3); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_TransducerHasWrongTypeException, SWIG_POINTER_NEW | 0 ); - if (SWIG_IsNewObj(res1)) delete arg1; - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res1)) delete arg1; - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_TransducerHasWrongTypeException(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - TransducerHasWrongTypeException *arg1 = (TransducerHasWrongTypeException *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_TransducerHasWrongTypeException, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_TransducerHasWrongTypeException" "', argument " "1"" of type '" "TransducerHasWrongTypeException *""'"); - } - arg1 = reinterpret_cast< TransducerHasWrongTypeException * >(argp1); - delete arg1; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_TransducerHasWrongTypeException_what(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - TransducerHasWrongTypeException *arg1 = (TransducerHasWrongTypeException *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::string result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_TransducerHasWrongTypeException, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TransducerHasWrongTypeException_what" "', argument " "1"" of type '" "TransducerHasWrongTypeException const *""'"); - } - arg1 = reinterpret_cast< TransducerHasWrongTypeException * >(argp1); - result = ((TransducerHasWrongTypeException const *)arg1)->what(); - resultobj = SWIG_From_std_string(static_cast< std::string >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *TransducerHasWrongTypeException_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_TransducerHasWrongTypeException, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *TransducerHasWrongTypeException_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_new_IncorrectUtf8CodingException(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::string *arg1 = 0 ; - std::string *arg2 = 0 ; - size_t arg3 ; - int res1 = SWIG_OLDOBJ ; - int res2 = SWIG_OLDOBJ ; - size_t val3 ; - int ecode3 = 0 ; - PyObject *swig_obj[3] ; - IncorrectUtf8CodingException *result = 0 ; - - if (!SWIG_Python_UnpackTuple(args, "new_IncorrectUtf8CodingException", 3, 3, swig_obj)) SWIG_fail; - { - std::string *ptr = (std::string *)0; - res1 = SWIG_AsPtr_std_string(swig_obj[0], &ptr); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_IncorrectUtf8CodingException" "', argument " "1"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_IncorrectUtf8CodingException" "', argument " "1"" of type '" "std::string const &""'"); - } - arg1 = ptr; - } - { - std::string *ptr = (std::string *)0; - res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_IncorrectUtf8CodingException" "', argument " "2"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_IncorrectUtf8CodingException" "', argument " "2"" of type '" "std::string const &""'"); - } - arg2 = ptr; - } - ecode3 = SWIG_AsVal_size_t(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_IncorrectUtf8CodingException" "', argument " "3"" of type '" "size_t""'"); - } - arg3 = static_cast< size_t >(val3); - result = (IncorrectUtf8CodingException *)new IncorrectUtf8CodingException((std::string const &)*arg1,(std::string const &)*arg2,arg3); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_IncorrectUtf8CodingException, SWIG_POINTER_NEW | 0 ); - if (SWIG_IsNewObj(res1)) delete arg1; - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res1)) delete arg1; - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_IncorrectUtf8CodingException(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - IncorrectUtf8CodingException *arg1 = (IncorrectUtf8CodingException *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_IncorrectUtf8CodingException, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IncorrectUtf8CodingException" "', argument " "1"" of type '" "IncorrectUtf8CodingException *""'"); - } - arg1 = reinterpret_cast< IncorrectUtf8CodingException * >(argp1); - delete arg1; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_IncorrectUtf8CodingException_what(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - IncorrectUtf8CodingException *arg1 = (IncorrectUtf8CodingException *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::string result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_IncorrectUtf8CodingException, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IncorrectUtf8CodingException_what" "', argument " "1"" of type '" "IncorrectUtf8CodingException const *""'"); - } - arg1 = reinterpret_cast< IncorrectUtf8CodingException * >(argp1); - result = ((IncorrectUtf8CodingException const *)arg1)->what(); - resultobj = SWIG_From_std_string(static_cast< std::string >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *IncorrectUtf8CodingException_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_IncorrectUtf8CodingException, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *IncorrectUtf8CodingException_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_new_EmptyStringException(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::string *arg1 = 0 ; - std::string *arg2 = 0 ; - size_t arg3 ; - int res1 = SWIG_OLDOBJ ; - int res2 = SWIG_OLDOBJ ; - size_t val3 ; - int ecode3 = 0 ; - PyObject *swig_obj[3] ; - EmptyStringException *result = 0 ; - - if (!SWIG_Python_UnpackTuple(args, "new_EmptyStringException", 3, 3, swig_obj)) SWIG_fail; - { - std::string *ptr = (std::string *)0; - res1 = SWIG_AsPtr_std_string(swig_obj[0], &ptr); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_EmptyStringException" "', argument " "1"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_EmptyStringException" "', argument " "1"" of type '" "std::string const &""'"); - } - arg1 = ptr; - } - { - std::string *ptr = (std::string *)0; - res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_EmptyStringException" "', argument " "2"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_EmptyStringException" "', argument " "2"" of type '" "std::string const &""'"); - } - arg2 = ptr; - } - ecode3 = SWIG_AsVal_size_t(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_EmptyStringException" "', argument " "3"" of type '" "size_t""'"); - } - arg3 = static_cast< size_t >(val3); - result = (EmptyStringException *)new EmptyStringException((std::string const &)*arg1,(std::string const &)*arg2,arg3); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EmptyStringException, SWIG_POINTER_NEW | 0 ); - if (SWIG_IsNewObj(res1)) delete arg1; - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res1)) delete arg1; - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_EmptyStringException(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - EmptyStringException *arg1 = (EmptyStringException *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_EmptyStringException, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_EmptyStringException" "', argument " "1"" of type '" "EmptyStringException *""'"); - } - arg1 = reinterpret_cast< EmptyStringException * >(argp1); - delete arg1; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_EmptyStringException_what(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - EmptyStringException *arg1 = (EmptyStringException *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::string result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_EmptyStringException, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "EmptyStringException_what" "', argument " "1"" of type '" "EmptyStringException const *""'"); - } - arg1 = reinterpret_cast< EmptyStringException * >(argp1); - result = ((EmptyStringException const *)arg1)->what(); - resultobj = SWIG_From_std_string(static_cast< std::string >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *EmptyStringException_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_EmptyStringException, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *EmptyStringException_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_new_SymbolNotFoundException(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::string *arg1 = 0 ; - std::string *arg2 = 0 ; - size_t arg3 ; - int res1 = SWIG_OLDOBJ ; - int res2 = SWIG_OLDOBJ ; - size_t val3 ; - int ecode3 = 0 ; - PyObject *swig_obj[3] ; - SymbolNotFoundException *result = 0 ; - - if (!SWIG_Python_UnpackTuple(args, "new_SymbolNotFoundException", 3, 3, swig_obj)) SWIG_fail; - { - std::string *ptr = (std::string *)0; - res1 = SWIG_AsPtr_std_string(swig_obj[0], &ptr); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_SymbolNotFoundException" "', argument " "1"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SymbolNotFoundException" "', argument " "1"" of type '" "std::string const &""'"); - } - arg1 = ptr; - } - { - std::string *ptr = (std::string *)0; - res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_SymbolNotFoundException" "', argument " "2"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SymbolNotFoundException" "', argument " "2"" of type '" "std::string const &""'"); - } - arg2 = ptr; - } - ecode3 = SWIG_AsVal_size_t(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_SymbolNotFoundException" "', argument " "3"" of type '" "size_t""'"); - } - arg3 = static_cast< size_t >(val3); - result = (SymbolNotFoundException *)new SymbolNotFoundException((std::string const &)*arg1,(std::string const &)*arg2,arg3); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SymbolNotFoundException, SWIG_POINTER_NEW | 0 ); - if (SWIG_IsNewObj(res1)) delete arg1; - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res1)) delete arg1; - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_SymbolNotFoundException(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - SymbolNotFoundException *arg1 = (SymbolNotFoundException *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_SymbolNotFoundException, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_SymbolNotFoundException" "', argument " "1"" of type '" "SymbolNotFoundException *""'"); - } - arg1 = reinterpret_cast< SymbolNotFoundException * >(argp1); - delete arg1; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SymbolNotFoundException_what(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - SymbolNotFoundException *arg1 = (SymbolNotFoundException *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::string result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_SymbolNotFoundException, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SymbolNotFoundException_what" "', argument " "1"" of type '" "SymbolNotFoundException const *""'"); - } - arg1 = reinterpret_cast< SymbolNotFoundException * >(argp1); - result = ((SymbolNotFoundException const *)arg1)->what(); - resultobj = SWIG_From_std_string(static_cast< std::string >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *SymbolNotFoundException_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_SymbolNotFoundException, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *SymbolNotFoundException_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_new_MetadataException(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::string *arg1 = 0 ; - std::string *arg2 = 0 ; - size_t arg3 ; - int res1 = SWIG_OLDOBJ ; - int res2 = SWIG_OLDOBJ ; - size_t val3 ; - int ecode3 = 0 ; - PyObject *swig_obj[3] ; - MetadataException *result = 0 ; - - if (!SWIG_Python_UnpackTuple(args, "new_MetadataException", 3, 3, swig_obj)) SWIG_fail; - { - std::string *ptr = (std::string *)0; - res1 = SWIG_AsPtr_std_string(swig_obj[0], &ptr); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_MetadataException" "', argument " "1"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MetadataException" "', argument " "1"" of type '" "std::string const &""'"); - } - arg1 = ptr; - } - { - std::string *ptr = (std::string *)0; - res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_MetadataException" "', argument " "2"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MetadataException" "', argument " "2"" of type '" "std::string const &""'"); - } - arg2 = ptr; - } - ecode3 = SWIG_AsVal_size_t(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_MetadataException" "', argument " "3"" of type '" "size_t""'"); - } - arg3 = static_cast< size_t >(val3); - result = (MetadataException *)new MetadataException((std::string const &)*arg1,(std::string const &)*arg2,arg3); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MetadataException, SWIG_POINTER_NEW | 0 ); - if (SWIG_IsNewObj(res1)) delete arg1; - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res1)) delete arg1; - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_MetadataException(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - MetadataException *arg1 = (MetadataException *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_MetadataException, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_MetadataException" "', argument " "1"" of type '" "MetadataException *""'"); - } - arg1 = reinterpret_cast< MetadataException * >(argp1); - delete arg1; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MetadataException_what(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - MetadataException *arg1 = (MetadataException *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::string result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_MetadataException, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MetadataException_what" "', argument " "1"" of type '" "MetadataException const *""'"); - } - arg1 = reinterpret_cast< MetadataException * >(argp1); - result = ((MetadataException const *)arg1)->what(); - resultobj = SWIG_From_std_string(static_cast< std::string >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *MetadataException_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_MetadataException, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *MetadataException_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_new_FlagDiacriticsAreNotIdentitiesException(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::string *arg1 = 0 ; - std::string *arg2 = 0 ; - size_t arg3 ; - int res1 = SWIG_OLDOBJ ; - int res2 = SWIG_OLDOBJ ; - size_t val3 ; - int ecode3 = 0 ; - PyObject *swig_obj[3] ; - FlagDiacriticsAreNotIdentitiesException *result = 0 ; - - if (!SWIG_Python_UnpackTuple(args, "new_FlagDiacriticsAreNotIdentitiesException", 3, 3, swig_obj)) SWIG_fail; - { - std::string *ptr = (std::string *)0; - res1 = SWIG_AsPtr_std_string(swig_obj[0], &ptr); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FlagDiacriticsAreNotIdentitiesException" "', argument " "1"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FlagDiacriticsAreNotIdentitiesException" "', argument " "1"" of type '" "std::string const &""'"); - } - arg1 = ptr; - } - { - std::string *ptr = (std::string *)0; - res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_FlagDiacriticsAreNotIdentitiesException" "', argument " "2"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FlagDiacriticsAreNotIdentitiesException" "', argument " "2"" of type '" "std::string const &""'"); - } - arg2 = ptr; - } - ecode3 = SWIG_AsVal_size_t(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_FlagDiacriticsAreNotIdentitiesException" "', argument " "3"" of type '" "size_t""'"); - } - arg3 = static_cast< size_t >(val3); - result = (FlagDiacriticsAreNotIdentitiesException *)new FlagDiacriticsAreNotIdentitiesException((std::string const &)*arg1,(std::string const &)*arg2,arg3); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FlagDiacriticsAreNotIdentitiesException, SWIG_POINTER_NEW | 0 ); - if (SWIG_IsNewObj(res1)) delete arg1; - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res1)) delete arg1; - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_FlagDiacriticsAreNotIdentitiesException(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - FlagDiacriticsAreNotIdentitiesException *arg1 = (FlagDiacriticsAreNotIdentitiesException *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_FlagDiacriticsAreNotIdentitiesException, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_FlagDiacriticsAreNotIdentitiesException" "', argument " "1"" of type '" "FlagDiacriticsAreNotIdentitiesException *""'"); - } - arg1 = reinterpret_cast< FlagDiacriticsAreNotIdentitiesException * >(argp1); - delete arg1; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FlagDiacriticsAreNotIdentitiesException_what(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - FlagDiacriticsAreNotIdentitiesException *arg1 = (FlagDiacriticsAreNotIdentitiesException *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::string result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_FlagDiacriticsAreNotIdentitiesException, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FlagDiacriticsAreNotIdentitiesException_what" "', argument " "1"" of type '" "FlagDiacriticsAreNotIdentitiesException const *""'"); - } - arg1 = reinterpret_cast< FlagDiacriticsAreNotIdentitiesException * >(argp1); - result = ((FlagDiacriticsAreNotIdentitiesException const *)arg1)->what(); - resultobj = SWIG_From_std_string(static_cast< std::string >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *FlagDiacriticsAreNotIdentitiesException_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_FlagDiacriticsAreNotIdentitiesException, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *FlagDiacriticsAreNotIdentitiesException_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_Location_start_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst_ol::Location *arg1 = (hfst_ol::Location *) 0 ; - unsigned int arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - unsigned int val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args, "Location_start_set", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst_ol__Location, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Location_start_set" "', argument " "1"" of type '" "hfst_ol::Location *""'"); - } - arg1 = reinterpret_cast< hfst_ol::Location * >(argp1); - ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Location_start_set" "', argument " "2"" of type '" "unsigned int""'"); - } - arg2 = static_cast< unsigned int >(val2); - if (arg1) (arg1)->start = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Location_start_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst_ol::Location *arg1 = (hfst_ol::Location *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - unsigned int result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst_ol__Location, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Location_start_get" "', argument " "1"" of type '" "hfst_ol::Location *""'"); - } - arg1 = reinterpret_cast< hfst_ol::Location * >(argp1); - result = (unsigned int) ((arg1)->start); - resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Location_length_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst_ol::Location *arg1 = (hfst_ol::Location *) 0 ; - unsigned int arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - unsigned int val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args, "Location_length_set", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst_ol__Location, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Location_length_set" "', argument " "1"" of type '" "hfst_ol::Location *""'"); - } - arg1 = reinterpret_cast< hfst_ol::Location * >(argp1); - ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Location_length_set" "', argument " "2"" of type '" "unsigned int""'"); - } - arg2 = static_cast< unsigned int >(val2); - if (arg1) (arg1)->length = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Location_length_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst_ol::Location *arg1 = (hfst_ol::Location *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - unsigned int result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst_ol__Location, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Location_length_get" "', argument " "1"" of type '" "hfst_ol::Location *""'"); - } - arg1 = reinterpret_cast< hfst_ol::Location * >(argp1); - result = (unsigned int) ((arg1)->length); - resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Location_input_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst_ol::Location *arg1 = (hfst_ol::Location *) 0 ; - std::string *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 = SWIG_OLDOBJ ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args, "Location_input_set", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst_ol__Location, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Location_input_set" "', argument " "1"" of type '" "hfst_ol::Location *""'"); - } - arg1 = reinterpret_cast< hfst_ol::Location * >(argp1); - { - std::string *ptr = (std::string *)0; - res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Location_input_set" "', argument " "2"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Location_input_set" "', argument " "2"" of type '" "std::string const &""'"); - } - arg2 = ptr; - } - if (arg1) (arg1)->input = *arg2; - resultobj = SWIG_Py_Void(); - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Location_input_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst_ol::Location *arg1 = (hfst_ol::Location *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::string *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst_ol__Location, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Location_input_get" "', argument " "1"" of type '" "hfst_ol::Location *""'"); - } - arg1 = reinterpret_cast< hfst_ol::Location * >(argp1); - result = (std::string *) & ((arg1)->input); - resultobj = SWIG_From_std_string(static_cast< std::string >(*result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Location_output_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst_ol::Location *arg1 = (hfst_ol::Location *) 0 ; - std::string *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 = SWIG_OLDOBJ ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args, "Location_output_set", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst_ol__Location, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Location_output_set" "', argument " "1"" of type '" "hfst_ol::Location *""'"); - } - arg1 = reinterpret_cast< hfst_ol::Location * >(argp1); - { - std::string *ptr = (std::string *)0; - res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Location_output_set" "', argument " "2"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Location_output_set" "', argument " "2"" of type '" "std::string const &""'"); - } - arg2 = ptr; - } - if (arg1) (arg1)->output = *arg2; - resultobj = SWIG_Py_Void(); - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Location_output_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst_ol::Location *arg1 = (hfst_ol::Location *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::string *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst_ol__Location, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Location_output_get" "', argument " "1"" of type '" "hfst_ol::Location *""'"); - } - arg1 = reinterpret_cast< hfst_ol::Location * >(argp1); - result = (std::string *) & ((arg1)->output); - resultobj = SWIG_From_std_string(static_cast< std::string >(*result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Location_tag_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst_ol::Location *arg1 = (hfst_ol::Location *) 0 ; - std::string *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 = SWIG_OLDOBJ ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args, "Location_tag_set", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst_ol__Location, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Location_tag_set" "', argument " "1"" of type '" "hfst_ol::Location *""'"); - } - arg1 = reinterpret_cast< hfst_ol::Location * >(argp1); - { - std::string *ptr = (std::string *)0; - res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Location_tag_set" "', argument " "2"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Location_tag_set" "', argument " "2"" of type '" "std::string const &""'"); - } - arg2 = ptr; - } - if (arg1) (arg1)->tag = *arg2; - resultobj = SWIG_Py_Void(); - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Location_tag_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst_ol::Location *arg1 = (hfst_ol::Location *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::string *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst_ol__Location, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Location_tag_get" "', argument " "1"" of type '" "hfst_ol::Location *""'"); - } - arg1 = reinterpret_cast< hfst_ol::Location * >(argp1); - result = (std::string *) & ((arg1)->tag); - resultobj = SWIG_From_std_string(static_cast< std::string >(*result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Location_weight_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst_ol::Location *arg1 = (hfst_ol::Location *) 0 ; - float arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - float val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args, "Location_weight_set", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst_ol__Location, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Location_weight_set" "', argument " "1"" of type '" "hfst_ol::Location *""'"); - } - arg1 = reinterpret_cast< hfst_ol::Location * >(argp1); - ecode2 = SWIG_AsVal_float(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Location_weight_set" "', argument " "2"" of type '" "float""'"); - } - arg2 = static_cast< float >(val2); - if (arg1) (arg1)->weight = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Location_weight_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst_ol::Location *arg1 = (hfst_ol::Location *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - float result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst_ol__Location, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Location_weight_get" "', argument " "1"" of type '" "hfst_ol::Location *""'"); - } - arg1 = reinterpret_cast< hfst_ol::Location * >(argp1); - result = (float) ((arg1)->weight); - resultobj = SWIG_From_float(static_cast< float >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Location_input_parts_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst_ol::Location *arg1 = (hfst_ol::Location *) 0 ; - std::vector< size_t,std::allocator< size_t > > *arg2 = (std::vector< size_t,std::allocator< size_t > > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args, "Location_input_parts_set", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst_ol__Location, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Location_input_parts_set" "', argument " "1"" of type '" "hfst_ol::Location *""'"); - } - arg1 = reinterpret_cast< hfst_ol::Location * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_std__vectorT_size_t_std__allocatorT_size_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Location_input_parts_set" "', argument " "2"" of type '" "std::vector< size_t,std::allocator< size_t > > *""'"); - } - arg2 = reinterpret_cast< std::vector< size_t,std::allocator< size_t > > * >(argp2); - if (arg1) (arg1)->input_parts = *arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Location_input_parts_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst_ol::Location *arg1 = (hfst_ol::Location *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::vector< size_t,std::allocator< size_t > > *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst_ol__Location, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Location_input_parts_get" "', argument " "1"" of type '" "hfst_ol::Location *""'"); - } - arg1 = reinterpret_cast< hfst_ol::Location * >(argp1); - result = (std::vector< size_t,std::allocator< size_t > > *)& ((arg1)->input_parts); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_size_t_std__allocatorT_size_t_t_t, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Location_output_parts_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst_ol::Location *arg1 = (hfst_ol::Location *) 0 ; - std::vector< size_t,std::allocator< size_t > > *arg2 = (std::vector< size_t,std::allocator< size_t > > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args, "Location_output_parts_set", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst_ol__Location, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Location_output_parts_set" "', argument " "1"" of type '" "hfst_ol::Location *""'"); - } - arg1 = reinterpret_cast< hfst_ol::Location * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_std__vectorT_size_t_std__allocatorT_size_t_t_t, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Location_output_parts_set" "', argument " "2"" of type '" "std::vector< size_t,std::allocator< size_t > > *""'"); - } - arg2 = reinterpret_cast< std::vector< size_t,std::allocator< size_t > > * >(argp2); - if (arg1) (arg1)->output_parts = *arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Location_output_parts_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst_ol::Location *arg1 = (hfst_ol::Location *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::vector< size_t,std::allocator< size_t > > *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst_ol__Location, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Location_output_parts_get" "', argument " "1"" of type '" "hfst_ol::Location *""'"); - } - arg1 = reinterpret_cast< hfst_ol::Location * >(argp1); - result = (std::vector< size_t,std::allocator< size_t > > *)& ((arg1)->output_parts); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_size_t_std__allocatorT_size_t_t_t, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Location_input_symbol_strings_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst_ol::Location *arg1 = (hfst_ol::Location *) 0 ; - std::vector< std::string,std::allocator< std::string > > *arg2 = (std::vector< std::string,std::allocator< std::string > > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args, "Location_input_symbol_strings_set", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst_ol__Location, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Location_input_symbol_strings_set" "', argument " "1"" of type '" "hfst_ol::Location *""'"); - } - arg1 = reinterpret_cast< hfst_ol::Location * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Location_input_symbol_strings_set" "', argument " "2"" of type '" "std::vector< std::string,std::allocator< std::string > > *""'"); - } - arg2 = reinterpret_cast< std::vector< std::string,std::allocator< std::string > > * >(argp2); - if (arg1) (arg1)->input_symbol_strings = *arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Location_input_symbol_strings_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst_ol::Location *arg1 = (hfst_ol::Location *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::vector< std::string,std::allocator< std::string > > *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst_ol__Location, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Location_input_symbol_strings_get" "', argument " "1"" of type '" "hfst_ol::Location *""'"); - } - arg1 = reinterpret_cast< hfst_ol::Location * >(argp1); - result = (std::vector< std::string,std::allocator< std::string > > *)& ((arg1)->input_symbol_strings); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Location_output_symbol_strings_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst_ol::Location *arg1 = (hfst_ol::Location *) 0 ; - std::vector< std::string,std::allocator< std::string > > *arg2 = (std::vector< std::string,std::allocator< std::string > > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args, "Location_output_symbol_strings_set", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst_ol__Location, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Location_output_symbol_strings_set" "', argument " "1"" of type '" "hfst_ol::Location *""'"); - } - arg1 = reinterpret_cast< hfst_ol::Location * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Location_output_symbol_strings_set" "', argument " "2"" of type '" "std::vector< std::string,std::allocator< std::string > > *""'"); - } - arg2 = reinterpret_cast< std::vector< std::string,std::allocator< std::string > > * >(argp2); - if (arg1) (arg1)->output_symbol_strings = *arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Location_output_symbol_strings_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst_ol::Location *arg1 = (hfst_ol::Location *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::vector< std::string,std::allocator< std::string > > *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst_ol__Location, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Location_output_symbol_strings_get" "', argument " "1"" of type '" "hfst_ol::Location *""'"); - } - arg1 = reinterpret_cast< hfst_ol::Location * >(argp1); - result = (std::vector< std::string,std::allocator< std::string > > *)& ((arg1)->output_symbol_strings); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_Location(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst_ol::Location *result = 0 ; - - if (!SWIG_Python_UnpackTuple(args, "new_Location", 0, 0, 0)) SWIG_fail; - result = (hfst_ol::Location *)new hfst_ol::Location(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_hfst_ol__Location, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_Location(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst_ol::Location *arg1 = (hfst_ol::Location *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst_ol__Location, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Location" "', argument " "1"" of type '" "hfst_ol::Location *""'"); - } - arg1 = reinterpret_cast< hfst_ol::Location * >(argp1); - delete arg1; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *Location_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_hfst_ol__Location, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *Location_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_new_Rule__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **SWIGUNUSEDPARM(swig_obj)) { - PyObject *resultobj = 0; - hfst::xeroxRules::Rule *result = 0 ; - - if ((nobjs < 0) || (nobjs > 0)) SWIG_fail; - result = (hfst::xeroxRules::Rule *)new hfst::xeroxRules::Rule(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_hfst__xeroxRules__Rule, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_Rule__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - hfst::HfstTransducerPairVector *arg1 = 0 ; - int res1 = SWIG_OLDOBJ ; - hfst::xeroxRules::Rule *result = 0 ; - - if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; - { - std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer >,std::allocator< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > > *ptr = (std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer >,std::allocator< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > > *)0; - res1 = swig::asptr(swig_obj[0], &ptr); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Rule" "', argument " "1"" of type '" "hfst::HfstTransducerPairVector const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Rule" "', argument " "1"" of type '" "hfst::HfstTransducerPairVector const &""'"); - } - arg1 = ptr; - } - result = (hfst::xeroxRules::Rule *)new hfst::xeroxRules::Rule((hfst::HfstTransducerPairVector const &)*arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_hfst__xeroxRules__Rule, SWIG_POINTER_NEW | 0 ); - if (SWIG_IsNewObj(res1)) delete arg1; - return resultobj; -fail: - if (SWIG_IsNewObj(res1)) delete arg1; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_Rule__SWIG_2(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - hfst::HfstTransducerPairVector *arg1 = 0 ; - hfst::HfstTransducerPairVector *arg2 = 0 ; - hfst::xeroxRules::ReplaceType arg3 ; - int res1 = SWIG_OLDOBJ ; - int res2 = SWIG_OLDOBJ ; - int val3 ; - int ecode3 = 0 ; - hfst::xeroxRules::Rule *result = 0 ; - - if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; - { - std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer >,std::allocator< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > > *ptr = (std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer >,std::allocator< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > > *)0; - res1 = swig::asptr(swig_obj[0], &ptr); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Rule" "', argument " "1"" of type '" "hfst::HfstTransducerPairVector const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Rule" "', argument " "1"" of type '" "hfst::HfstTransducerPairVector const &""'"); - } - arg1 = ptr; - } - { - std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer >,std::allocator< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > > *ptr = (std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer >,std::allocator< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > > *)0; - res2 = swig::asptr(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_Rule" "', argument " "2"" of type '" "hfst::HfstTransducerPairVector const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Rule" "', argument " "2"" of type '" "hfst::HfstTransducerPairVector const &""'"); - } - arg2 = ptr; - } - ecode3 = SWIG_AsVal_int(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_Rule" "', argument " "3"" of type '" "hfst::xeroxRules::ReplaceType""'"); - } - arg3 = static_cast< hfst::xeroxRules::ReplaceType >(val3); - result = (hfst::xeroxRules::Rule *)new hfst::xeroxRules::Rule((hfst::HfstTransducerPairVector const &)*arg1,(hfst::HfstTransducerPairVector const &)*arg2,arg3); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_hfst__xeroxRules__Rule, SWIG_POINTER_NEW | 0 ); - if (SWIG_IsNewObj(res1)) delete arg1; - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res1)) delete arg1; - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_Rule__SWIG_3(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - hfst::xeroxRules::Rule *arg1 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - hfst::xeroxRules::Rule *result = 0 ; - - if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_hfst__xeroxRules__Rule, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Rule" "', argument " "1"" of type '" "hfst::xeroxRules::Rule const &""'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Rule" "', argument " "1"" of type '" "hfst::xeroxRules::Rule const &""'"); - } - arg1 = reinterpret_cast< hfst::xeroxRules::Rule * >(argp1); - result = (hfst::xeroxRules::Rule *)new hfst::xeroxRules::Rule((hfst::xeroxRules::Rule const &)*arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_hfst__xeroxRules__Rule, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_Rule(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[4] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "new_Rule", 0, 3, argv))) SWIG_fail; - --argc; - if (argc == 0) { - return _wrap_new_Rule__SWIG_0(self, argc, argv); - } - if (argc == 1) { - int _v; - int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_hfst__xeroxRules__Rule, SWIG_POINTER_NO_NULL | 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_new_Rule__SWIG_3(self, argc, argv); - } - } - if (argc == 1) { - int _v; - int res = swig::asptr(argv[0], (std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer >,std::allocator< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_new_Rule__SWIG_1(self, argc, argv); - } - } - if (argc == 3) { - int _v; - int res = swig::asptr(argv[0], (std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer >,std::allocator< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - int res = swig::asptr(argv[1], (std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer >,std::allocator< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_int(argv[2], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_new_Rule__SWIG_2(self, argc, argv); - } - } - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'new_Rule'.\n" - " Possible C/C++ prototypes are:\n" - " hfst::xeroxRules::Rule::Rule()\n" - " hfst::xeroxRules::Rule::Rule(hfst::HfstTransducerPairVector const &)\n" - " hfst::xeroxRules::Rule::Rule(hfst::HfstTransducerPairVector const &,hfst::HfstTransducerPairVector const &,hfst::xeroxRules::ReplaceType)\n" - " hfst::xeroxRules::Rule::Rule(hfst::xeroxRules::Rule const &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_Rule_get_mapping(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::xeroxRules::Rule *arg1 = (hfst::xeroxRules::Rule *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - hfst::HfstTransducerPairVector result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__xeroxRules__Rule, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Rule_get_mapping" "', argument " "1"" of type '" "hfst::xeroxRules::Rule const *""'"); - } - arg1 = reinterpret_cast< hfst::xeroxRules::Rule * >(argp1); - result = ((hfst::xeroxRules::Rule const *)arg1)->get_mapping(); - resultobj = swig::from(static_cast< std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer >,std::allocator< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > > >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Rule_get_context(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::xeroxRules::Rule *arg1 = (hfst::xeroxRules::Rule *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - hfst::HfstTransducerPairVector result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__xeroxRules__Rule, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Rule_get_context" "', argument " "1"" of type '" "hfst::xeroxRules::Rule const *""'"); - } - arg1 = reinterpret_cast< hfst::xeroxRules::Rule * >(argp1); - result = ((hfst::xeroxRules::Rule const *)arg1)->get_context(); - resultobj = swig::from(static_cast< std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer >,std::allocator< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > > >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Rule_get_replType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::xeroxRules::Rule *arg1 = (hfst::xeroxRules::Rule *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - hfst::xeroxRules::ReplaceType result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__xeroxRules__Rule, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Rule_get_replType" "', argument " "1"" of type '" "hfst::xeroxRules::Rule const *""'"); - } - arg1 = reinterpret_cast< hfst::xeroxRules::Rule * >(argp1); - result = (hfst::xeroxRules::ReplaceType)((hfst::xeroxRules::Rule const *)arg1)->get_replType(); - resultobj = SWIG_From_int(static_cast< int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Rule_encodeFlags(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::xeroxRules::Rule *arg1 = (hfst::xeroxRules::Rule *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__xeroxRules__Rule, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Rule_encodeFlags" "', argument " "1"" of type '" "hfst::xeroxRules::Rule *""'"); - } - arg1 = reinterpret_cast< hfst::xeroxRules::Rule * >(argp1); - (arg1)->encodeFlags(); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_Rule(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::xeroxRules::Rule *arg1 = (hfst::xeroxRules::Rule *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__xeroxRules__Rule, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Rule" "', argument " "1"" of type '" "hfst::xeroxRules::Rule *""'"); - } - arg1 = reinterpret_cast< hfst::xeroxRules::Rule * >(argp1); - delete arg1; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *Rule_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_hfst__xeroxRules__Rule, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *Rule_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_replace__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - hfst::xeroxRules::Rule *arg1 = 0 ; - bool arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - bool val2 ; - int ecode2 = 0 ; - SwigValueWrapper< hfst::HfstTransducer > result; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_hfst__xeroxRules__Rule, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "replace" "', argument " "1"" of type '" "hfst::xeroxRules::Rule const &""'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "replace" "', argument " "1"" of type '" "hfst::xeroxRules::Rule const &""'"); - } - arg1 = reinterpret_cast< hfst::xeroxRules::Rule * >(argp1); - ecode2 = SWIG_AsVal_bool(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "replace" "', argument " "2"" of type '" "bool""'"); - } - arg2 = static_cast< bool >(val2); - result = hfst::xeroxRules::replace((hfst::xeroxRules::Rule const &)*arg1,arg2); - resultobj = SWIG_NewPointerObj((new hfst::HfstTransducer(static_cast< const hfst::HfstTransducer& >(result))), SWIGTYPE_p_hfst__HfstTransducer, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_replace__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - hfst::HfstRuleVector *arg1 = 0 ; - bool arg2 ; - int res1 = SWIG_OLDOBJ ; - bool val2 ; - int ecode2 = 0 ; - SwigValueWrapper< hfst::HfstTransducer > result; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - { - std::vector< hfst::xeroxRules::Rule,std::allocator< hfst::xeroxRules::Rule > > *ptr = (std::vector< hfst::xeroxRules::Rule,std::allocator< hfst::xeroxRules::Rule > > *)0; - res1 = swig::asptr(swig_obj[0], &ptr); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "replace" "', argument " "1"" of type '" "hfst::HfstRuleVector const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "replace" "', argument " "1"" of type '" "hfst::HfstRuleVector const &""'"); - } - arg1 = ptr; - } - ecode2 = SWIG_AsVal_bool(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "replace" "', argument " "2"" of type '" "bool""'"); - } - arg2 = static_cast< bool >(val2); - result = hfst::xeroxRules::replace((std::vector< hfst::xeroxRules::Rule,std::allocator< hfst::xeroxRules::Rule > > const &)*arg1,arg2); - resultobj = SWIG_NewPointerObj((new hfst::HfstTransducer(static_cast< const hfst::HfstTransducer& >(result))), SWIGTYPE_p_hfst__HfstTransducer, SWIG_POINTER_OWN | 0 ); - if (SWIG_IsNewObj(res1)) delete arg1; - return resultobj; -fail: - if (SWIG_IsNewObj(res1)) delete arg1; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_replace(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[3] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "replace", 0, 2, argv))) SWIG_fail; - --argc; - if (argc == 2) { - int _v; - int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_hfst__xeroxRules__Rule, SWIG_POINTER_NO_NULL | 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_bool(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_replace__SWIG_0(self, argc, argv); - } - } - } - if (argc == 2) { - int _v; - int res = swig::asptr(argv[0], (std::vector< hfst::xeroxRules::Rule,std::allocator< hfst::xeroxRules::Rule > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_bool(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_replace__SWIG_1(self, argc, argv); - } - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'replace'.\n" - " Possible C/C++ prototypes are:\n" - " hfst::xeroxRules::replace(hfst::xeroxRules::Rule const &,bool)\n" - " hfst::xeroxRules::replace(hfst::HfstRuleVector const &,bool)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_xerox_replace_left__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - hfst::xeroxRules::Rule *arg1 = 0 ; - bool arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - bool val2 ; - int ecode2 = 0 ; - SwigValueWrapper< hfst::HfstTransducer > result; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_hfst__xeroxRules__Rule, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "xerox_replace_left" "', argument " "1"" of type '" "hfst::xeroxRules::Rule const &""'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "xerox_replace_left" "', argument " "1"" of type '" "hfst::xeroxRules::Rule const &""'"); - } - arg1 = reinterpret_cast< hfst::xeroxRules::Rule * >(argp1); - ecode2 = SWIG_AsVal_bool(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "xerox_replace_left" "', argument " "2"" of type '" "bool""'"); - } - arg2 = static_cast< bool >(val2); - result = hfst::xeroxRules::replace_left((hfst::xeroxRules::Rule const &)*arg1,arg2); - resultobj = SWIG_NewPointerObj((new hfst::HfstTransducer(static_cast< const hfst::HfstTransducer& >(result))), SWIGTYPE_p_hfst__HfstTransducer, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_xerox_replace_left__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - hfst::HfstRuleVector *arg1 = 0 ; - bool arg2 ; - int res1 = SWIG_OLDOBJ ; - bool val2 ; - int ecode2 = 0 ; - SwigValueWrapper< hfst::HfstTransducer > result; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - { - std::vector< hfst::xeroxRules::Rule,std::allocator< hfst::xeroxRules::Rule > > *ptr = (std::vector< hfst::xeroxRules::Rule,std::allocator< hfst::xeroxRules::Rule > > *)0; - res1 = swig::asptr(swig_obj[0], &ptr); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "xerox_replace_left" "', argument " "1"" of type '" "hfst::HfstRuleVector const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "xerox_replace_left" "', argument " "1"" of type '" "hfst::HfstRuleVector const &""'"); - } - arg1 = ptr; - } - ecode2 = SWIG_AsVal_bool(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "xerox_replace_left" "', argument " "2"" of type '" "bool""'"); - } - arg2 = static_cast< bool >(val2); - result = hfst::xeroxRules::replace_left((std::vector< hfst::xeroxRules::Rule,std::allocator< hfst::xeroxRules::Rule > > const &)*arg1,arg2); - resultobj = SWIG_NewPointerObj((new hfst::HfstTransducer(static_cast< const hfst::HfstTransducer& >(result))), SWIGTYPE_p_hfst__HfstTransducer, SWIG_POINTER_OWN | 0 ); - if (SWIG_IsNewObj(res1)) delete arg1; - return resultobj; -fail: - if (SWIG_IsNewObj(res1)) delete arg1; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_xerox_replace_left(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[3] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "xerox_replace_left", 0, 2, argv))) SWIG_fail; - --argc; - if (argc == 2) { - int _v; - int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_hfst__xeroxRules__Rule, SWIG_POINTER_NO_NULL | 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_bool(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_xerox_replace_left__SWIG_0(self, argc, argv); - } - } - } - if (argc == 2) { - int _v; - int res = swig::asptr(argv[0], (std::vector< hfst::xeroxRules::Rule,std::allocator< hfst::xeroxRules::Rule > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_bool(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_xerox_replace_left__SWIG_1(self, argc, argv); - } - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'xerox_replace_left'.\n" - " Possible C/C++ prototypes are:\n" - " hfst::xeroxRules::replace_left(hfst::xeroxRules::Rule const &,bool)\n" - " hfst::xeroxRules::replace_left(hfst::HfstRuleVector const &,bool)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_replace_leftmost_longest_match__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - hfst::xeroxRules::Rule *arg1 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - SwigValueWrapper< hfst::HfstTransducer > result; - - if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_hfst__xeroxRules__Rule, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "replace_leftmost_longest_match" "', argument " "1"" of type '" "hfst::xeroxRules::Rule const &""'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "replace_leftmost_longest_match" "', argument " "1"" of type '" "hfst::xeroxRules::Rule const &""'"); - } - arg1 = reinterpret_cast< hfst::xeroxRules::Rule * >(argp1); - result = hfst::xeroxRules::replace_leftmost_longest_match((hfst::xeroxRules::Rule const &)*arg1); - resultobj = SWIG_NewPointerObj((new hfst::HfstTransducer(static_cast< const hfst::HfstTransducer& >(result))), SWIGTYPE_p_hfst__HfstTransducer, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_replace_leftmost_longest_match__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - hfst::HfstRuleVector *arg1 = 0 ; - int res1 = SWIG_OLDOBJ ; - SwigValueWrapper< hfst::HfstTransducer > result; - - if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; - { - std::vector< hfst::xeroxRules::Rule,std::allocator< hfst::xeroxRules::Rule > > *ptr = (std::vector< hfst::xeroxRules::Rule,std::allocator< hfst::xeroxRules::Rule > > *)0; - res1 = swig::asptr(swig_obj[0], &ptr); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "replace_leftmost_longest_match" "', argument " "1"" of type '" "hfst::HfstRuleVector const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "replace_leftmost_longest_match" "', argument " "1"" of type '" "hfst::HfstRuleVector const &""'"); - } - arg1 = ptr; - } - result = hfst::xeroxRules::replace_leftmost_longest_match((std::vector< hfst::xeroxRules::Rule,std::allocator< hfst::xeroxRules::Rule > > const &)*arg1); - resultobj = SWIG_NewPointerObj((new hfst::HfstTransducer(static_cast< const hfst::HfstTransducer& >(result))), SWIGTYPE_p_hfst__HfstTransducer, SWIG_POINTER_OWN | 0 ); - if (SWIG_IsNewObj(res1)) delete arg1; - return resultobj; -fail: - if (SWIG_IsNewObj(res1)) delete arg1; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_replace_leftmost_longest_match(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[2] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "replace_leftmost_longest_match", 0, 1, argv))) SWIG_fail; - --argc; - if (argc == 1) { - int _v; - int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_hfst__xeroxRules__Rule, SWIG_POINTER_NO_NULL | 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_replace_leftmost_longest_match__SWIG_0(self, argc, argv); - } - } - if (argc == 1) { - int _v; - int res = swig::asptr(argv[0], (std::vector< hfst::xeroxRules::Rule,std::allocator< hfst::xeroxRules::Rule > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_replace_leftmost_longest_match__SWIG_1(self, argc, argv); - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'replace_leftmost_longest_match'.\n" - " Possible C/C++ prototypes are:\n" - " hfst::xeroxRules::replace_leftmost_longest_match(hfst::xeroxRules::Rule const &)\n" - " hfst::xeroxRules::replace_leftmost_longest_match(hfst::HfstRuleVector const &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_replace_rightmost_longest_match__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - hfst::xeroxRules::Rule *arg1 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - SwigValueWrapper< hfst::HfstTransducer > result; - - if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_hfst__xeroxRules__Rule, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "replace_rightmost_longest_match" "', argument " "1"" of type '" "hfst::xeroxRules::Rule const &""'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "replace_rightmost_longest_match" "', argument " "1"" of type '" "hfst::xeroxRules::Rule const &""'"); - } - arg1 = reinterpret_cast< hfst::xeroxRules::Rule * >(argp1); - result = hfst::xeroxRules::replace_rightmost_longest_match((hfst::xeroxRules::Rule const &)*arg1); - resultobj = SWIG_NewPointerObj((new hfst::HfstTransducer(static_cast< const hfst::HfstTransducer& >(result))), SWIGTYPE_p_hfst__HfstTransducer, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_replace_rightmost_longest_match__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - hfst::HfstRuleVector *arg1 = 0 ; - int res1 = SWIG_OLDOBJ ; - SwigValueWrapper< hfst::HfstTransducer > result; - - if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; - { - std::vector< hfst::xeroxRules::Rule,std::allocator< hfst::xeroxRules::Rule > > *ptr = (std::vector< hfst::xeroxRules::Rule,std::allocator< hfst::xeroxRules::Rule > > *)0; - res1 = swig::asptr(swig_obj[0], &ptr); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "replace_rightmost_longest_match" "', argument " "1"" of type '" "hfst::HfstRuleVector const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "replace_rightmost_longest_match" "', argument " "1"" of type '" "hfst::HfstRuleVector const &""'"); - } - arg1 = ptr; - } - result = hfst::xeroxRules::replace_rightmost_longest_match((std::vector< hfst::xeroxRules::Rule,std::allocator< hfst::xeroxRules::Rule > > const &)*arg1); - resultobj = SWIG_NewPointerObj((new hfst::HfstTransducer(static_cast< const hfst::HfstTransducer& >(result))), SWIGTYPE_p_hfst__HfstTransducer, SWIG_POINTER_OWN | 0 ); - if (SWIG_IsNewObj(res1)) delete arg1; - return resultobj; -fail: - if (SWIG_IsNewObj(res1)) delete arg1; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_replace_rightmost_longest_match(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[2] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "replace_rightmost_longest_match", 0, 1, argv))) SWIG_fail; - --argc; - if (argc == 1) { - int _v; - int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_hfst__xeroxRules__Rule, SWIG_POINTER_NO_NULL | 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_replace_rightmost_longest_match__SWIG_0(self, argc, argv); - } - } - if (argc == 1) { - int _v; - int res = swig::asptr(argv[0], (std::vector< hfst::xeroxRules::Rule,std::allocator< hfst::xeroxRules::Rule > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_replace_rightmost_longest_match__SWIG_1(self, argc, argv); - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'replace_rightmost_longest_match'.\n" - " Possible C/C++ prototypes are:\n" - " hfst::xeroxRules::replace_rightmost_longest_match(hfst::xeroxRules::Rule const &)\n" - " hfst::xeroxRules::replace_rightmost_longest_match(hfst::HfstRuleVector const &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_replace_leftmost_shortest_match__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - hfst::xeroxRules::Rule *arg1 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - SwigValueWrapper< hfst::HfstTransducer > result; - - if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_hfst__xeroxRules__Rule, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "replace_leftmost_shortest_match" "', argument " "1"" of type '" "hfst::xeroxRules::Rule const &""'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "replace_leftmost_shortest_match" "', argument " "1"" of type '" "hfst::xeroxRules::Rule const &""'"); - } - arg1 = reinterpret_cast< hfst::xeroxRules::Rule * >(argp1); - result = hfst::xeroxRules::replace_leftmost_shortest_match((hfst::xeroxRules::Rule const &)*arg1); - resultobj = SWIG_NewPointerObj((new hfst::HfstTransducer(static_cast< const hfst::HfstTransducer& >(result))), SWIGTYPE_p_hfst__HfstTransducer, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_replace_leftmost_shortest_match__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - hfst::HfstRuleVector *arg1 = 0 ; - int res1 = SWIG_OLDOBJ ; - SwigValueWrapper< hfst::HfstTransducer > result; - - if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; - { - std::vector< hfst::xeroxRules::Rule,std::allocator< hfst::xeroxRules::Rule > > *ptr = (std::vector< hfst::xeroxRules::Rule,std::allocator< hfst::xeroxRules::Rule > > *)0; - res1 = swig::asptr(swig_obj[0], &ptr); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "replace_leftmost_shortest_match" "', argument " "1"" of type '" "hfst::HfstRuleVector const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "replace_leftmost_shortest_match" "', argument " "1"" of type '" "hfst::HfstRuleVector const &""'"); - } - arg1 = ptr; - } - result = hfst::xeroxRules::replace_leftmost_shortest_match((std::vector< hfst::xeroxRules::Rule,std::allocator< hfst::xeroxRules::Rule > > const &)*arg1); - resultobj = SWIG_NewPointerObj((new hfst::HfstTransducer(static_cast< const hfst::HfstTransducer& >(result))), SWIGTYPE_p_hfst__HfstTransducer, SWIG_POINTER_OWN | 0 ); - if (SWIG_IsNewObj(res1)) delete arg1; - return resultobj; -fail: - if (SWIG_IsNewObj(res1)) delete arg1; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_replace_leftmost_shortest_match(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[2] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "replace_leftmost_shortest_match", 0, 1, argv))) SWIG_fail; - --argc; - if (argc == 1) { - int _v; - int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_hfst__xeroxRules__Rule, SWIG_POINTER_NO_NULL | 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_replace_leftmost_shortest_match__SWIG_0(self, argc, argv); - } - } - if (argc == 1) { - int _v; - int res = swig::asptr(argv[0], (std::vector< hfst::xeroxRules::Rule,std::allocator< hfst::xeroxRules::Rule > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_replace_leftmost_shortest_match__SWIG_1(self, argc, argv); - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'replace_leftmost_shortest_match'.\n" - " Possible C/C++ prototypes are:\n" - " hfst::xeroxRules::replace_leftmost_shortest_match(hfst::xeroxRules::Rule const &)\n" - " hfst::xeroxRules::replace_leftmost_shortest_match(hfst::HfstRuleVector const &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_replace_rightmost_shortest_match__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - hfst::xeroxRules::Rule *arg1 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - SwigValueWrapper< hfst::HfstTransducer > result; - - if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_hfst__xeroxRules__Rule, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "replace_rightmost_shortest_match" "', argument " "1"" of type '" "hfst::xeroxRules::Rule const &""'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "replace_rightmost_shortest_match" "', argument " "1"" of type '" "hfst::xeroxRules::Rule const &""'"); - } - arg1 = reinterpret_cast< hfst::xeroxRules::Rule * >(argp1); - result = hfst::xeroxRules::replace_rightmost_shortest_match((hfst::xeroxRules::Rule const &)*arg1); - resultobj = SWIG_NewPointerObj((new hfst::HfstTransducer(static_cast< const hfst::HfstTransducer& >(result))), SWIGTYPE_p_hfst__HfstTransducer, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_replace_rightmost_shortest_match__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - hfst::HfstRuleVector *arg1 = 0 ; - int res1 = SWIG_OLDOBJ ; - SwigValueWrapper< hfst::HfstTransducer > result; - - if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; - { - std::vector< hfst::xeroxRules::Rule,std::allocator< hfst::xeroxRules::Rule > > *ptr = (std::vector< hfst::xeroxRules::Rule,std::allocator< hfst::xeroxRules::Rule > > *)0; - res1 = swig::asptr(swig_obj[0], &ptr); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "replace_rightmost_shortest_match" "', argument " "1"" of type '" "hfst::HfstRuleVector const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "replace_rightmost_shortest_match" "', argument " "1"" of type '" "hfst::HfstRuleVector const &""'"); - } - arg1 = ptr; - } - result = hfst::xeroxRules::replace_rightmost_shortest_match((std::vector< hfst::xeroxRules::Rule,std::allocator< hfst::xeroxRules::Rule > > const &)*arg1); - resultobj = SWIG_NewPointerObj((new hfst::HfstTransducer(static_cast< const hfst::HfstTransducer& >(result))), SWIGTYPE_p_hfst__HfstTransducer, SWIG_POINTER_OWN | 0 ); - if (SWIG_IsNewObj(res1)) delete arg1; - return resultobj; -fail: - if (SWIG_IsNewObj(res1)) delete arg1; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_replace_rightmost_shortest_match(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[2] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "replace_rightmost_shortest_match", 0, 1, argv))) SWIG_fail; - --argc; - if (argc == 1) { - int _v; - int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_hfst__xeroxRules__Rule, SWIG_POINTER_NO_NULL | 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_replace_rightmost_shortest_match__SWIG_0(self, argc, argv); - } - } - if (argc == 1) { - int _v; - int res = swig::asptr(argv[0], (std::vector< hfst::xeroxRules::Rule,std::allocator< hfst::xeroxRules::Rule > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_replace_rightmost_shortest_match__SWIG_1(self, argc, argv); - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'replace_rightmost_shortest_match'.\n" - " Possible C/C++ prototypes are:\n" - " hfst::xeroxRules::replace_rightmost_shortest_match(hfst::xeroxRules::Rule const &)\n" - " hfst::xeroxRules::replace_rightmost_shortest_match(hfst::HfstRuleVector const &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_replace_epenthesis__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - hfst::xeroxRules::Rule *arg1 = 0 ; - bool arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - bool val2 ; - int ecode2 = 0 ; - SwigValueWrapper< hfst::HfstTransducer > result; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_hfst__xeroxRules__Rule, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "replace_epenthesis" "', argument " "1"" of type '" "hfst::xeroxRules::Rule const &""'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "replace_epenthesis" "', argument " "1"" of type '" "hfst::xeroxRules::Rule const &""'"); - } - arg1 = reinterpret_cast< hfst::xeroxRules::Rule * >(argp1); - ecode2 = SWIG_AsVal_bool(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "replace_epenthesis" "', argument " "2"" of type '" "bool""'"); - } - arg2 = static_cast< bool >(val2); - result = hfst::xeroxRules::replace_epenthesis((hfst::xeroxRules::Rule const &)*arg1,arg2); - resultobj = SWIG_NewPointerObj((new hfst::HfstTransducer(static_cast< const hfst::HfstTransducer& >(result))), SWIGTYPE_p_hfst__HfstTransducer, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_replace_epenthesis__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - hfst::HfstRuleVector *arg1 = 0 ; - bool arg2 ; - int res1 = SWIG_OLDOBJ ; - bool val2 ; - int ecode2 = 0 ; - SwigValueWrapper< hfst::HfstTransducer > result; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - { - std::vector< hfst::xeroxRules::Rule,std::allocator< hfst::xeroxRules::Rule > > *ptr = (std::vector< hfst::xeroxRules::Rule,std::allocator< hfst::xeroxRules::Rule > > *)0; - res1 = swig::asptr(swig_obj[0], &ptr); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "replace_epenthesis" "', argument " "1"" of type '" "hfst::HfstRuleVector const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "replace_epenthesis" "', argument " "1"" of type '" "hfst::HfstRuleVector const &""'"); - } - arg1 = ptr; - } - ecode2 = SWIG_AsVal_bool(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "replace_epenthesis" "', argument " "2"" of type '" "bool""'"); - } - arg2 = static_cast< bool >(val2); - result = hfst::xeroxRules::replace_epenthesis((std::vector< hfst::xeroxRules::Rule,std::allocator< hfst::xeroxRules::Rule > > const &)*arg1,arg2); - resultobj = SWIG_NewPointerObj((new hfst::HfstTransducer(static_cast< const hfst::HfstTransducer& >(result))), SWIGTYPE_p_hfst__HfstTransducer, SWIG_POINTER_OWN | 0 ); - if (SWIG_IsNewObj(res1)) delete arg1; - return resultobj; -fail: - if (SWIG_IsNewObj(res1)) delete arg1; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_replace_epenthesis(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[3] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "replace_epenthesis", 0, 2, argv))) SWIG_fail; - --argc; - if (argc == 2) { - int _v; - int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_hfst__xeroxRules__Rule, SWIG_POINTER_NO_NULL | 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_bool(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_replace_epenthesis__SWIG_0(self, argc, argv); - } - } - } - if (argc == 2) { - int _v; - int res = swig::asptr(argv[0], (std::vector< hfst::xeroxRules::Rule,std::allocator< hfst::xeroxRules::Rule > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_bool(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_replace_epenthesis__SWIG_1(self, argc, argv); - } - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'replace_epenthesis'.\n" - " Possible C/C++ prototypes are:\n" - " hfst::xeroxRules::replace_epenthesis(hfst::xeroxRules::Rule const &,bool)\n" - " hfst::xeroxRules::replace_epenthesis(hfst::HfstRuleVector const &,bool)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_xerox_restriction(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::HfstTransducer *arg1 = 0 ; - hfst::HfstTransducerPairVector *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 = SWIG_OLDOBJ ; - PyObject *swig_obj[2] ; - SwigValueWrapper< hfst::HfstTransducer > result; - - if (!SWIG_Python_UnpackTuple(args, "xerox_restriction", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_hfst__HfstTransducer, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "xerox_restriction" "', argument " "1"" of type '" "hfst::HfstTransducer const &""'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "xerox_restriction" "', argument " "1"" of type '" "hfst::HfstTransducer const &""'"); - } - arg1 = reinterpret_cast< hfst::HfstTransducer * >(argp1); - { - std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer >,std::allocator< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > > *ptr = (std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer >,std::allocator< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > > *)0; - res2 = swig::asptr(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "xerox_restriction" "', argument " "2"" of type '" "hfst::HfstTransducerPairVector const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "xerox_restriction" "', argument " "2"" of type '" "hfst::HfstTransducerPairVector const &""'"); - } - arg2 = ptr; - } - result = hfst::xeroxRules::restriction((hfst::HfstTransducer const &)*arg1,(std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer >,std::allocator< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > > const &)*arg2); - resultobj = SWIG_NewPointerObj((new hfst::HfstTransducer(static_cast< const hfst::HfstTransducer& >(result))), SWIGTYPE_p_hfst__HfstTransducer, SWIG_POINTER_OWN | 0 ); - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_before(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::HfstTransducer *arg1 = 0 ; - hfst::HfstTransducer *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject *swig_obj[2] ; - SwigValueWrapper< hfst::HfstTransducer > result; - - if (!SWIG_Python_UnpackTuple(args, "before", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_hfst__HfstTransducer, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "before" "', argument " "1"" of type '" "hfst::HfstTransducer const &""'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "before" "', argument " "1"" of type '" "hfst::HfstTransducer const &""'"); - } - arg1 = reinterpret_cast< hfst::HfstTransducer * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_hfst__HfstTransducer, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "before" "', argument " "2"" of type '" "hfst::HfstTransducer const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "before" "', argument " "2"" of type '" "hfst::HfstTransducer const &""'"); - } - arg2 = reinterpret_cast< hfst::HfstTransducer * >(argp2); - result = hfst::xeroxRules::before((hfst::HfstTransducer const &)*arg1,(hfst::HfstTransducer const &)*arg2); - resultobj = SWIG_NewPointerObj((new hfst::HfstTransducer(static_cast< const hfst::HfstTransducer& >(result))), SWIGTYPE_p_hfst__HfstTransducer, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_after(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::HfstTransducer *arg1 = 0 ; - hfst::HfstTransducer *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject *swig_obj[2] ; - SwigValueWrapper< hfst::HfstTransducer > result; - - if (!SWIG_Python_UnpackTuple(args, "after", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_hfst__HfstTransducer, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "after" "', argument " "1"" of type '" "hfst::HfstTransducer const &""'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "after" "', argument " "1"" of type '" "hfst::HfstTransducer const &""'"); - } - arg1 = reinterpret_cast< hfst::HfstTransducer * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_hfst__HfstTransducer, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "after" "', argument " "2"" of type '" "hfst::HfstTransducer const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "after" "', argument " "2"" of type '" "hfst::HfstTransducer const &""'"); - } - arg2 = reinterpret_cast< hfst::HfstTransducer * >(argp2); - result = hfst::xeroxRules::after((hfst::HfstTransducer const &)*arg1,(hfst::HfstTransducer const &)*arg2); - resultobj = SWIG_NewPointerObj((new hfst::HfstTransducer(static_cast< const hfst::HfstTransducer& >(result))), SWIGTYPE_p_hfst__HfstTransducer, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_is_diacritic(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::string *arg1 = 0 ; - int res1 = SWIG_OLDOBJ ; - PyObject *swig_obj[1] ; - bool result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - std::string *ptr = (std::string *)0; - res1 = SWIG_AsPtr_std_string(swig_obj[0], &ptr); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "is_diacritic" "', argument " "1"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "is_diacritic" "', argument " "1"" of type '" "std::string const &""'"); - } - arg1 = ptr; - } - result = (bool)hfst::is_diacritic((std::string const &)*arg1); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - if (SWIG_IsNewObj(res1)) delete arg1; - return resultobj; -fail: - if (SWIG_IsNewObj(res1)) delete arg1; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_compile_pmatch_expression(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::string *arg1 = 0 ; - int res1 = SWIG_OLDOBJ ; - PyObject *swig_obj[1] ; - hfst::HfstTransducerVector result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - std::string *ptr = (std::string *)0; - res1 = SWIG_AsPtr_std_string(swig_obj[0], &ptr); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "compile_pmatch_expression" "', argument " "1"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "compile_pmatch_expression" "', argument " "1"" of type '" "std::string const &""'"); - } - arg1 = ptr; - } - try { - result = hfst::compile_pmatch_expression((std::string const &)*arg1); - } catch(HfstException &_e) { - SWIG_Python_Raise(SWIG_NewPointerObj((new HfstException(static_cast< const HfstException& >(_e))),SWIGTYPE_p_HfstException,SWIG_POINTER_OWN), "HfstException", SWIGTYPE_p_HfstException); SWIG_fail; - } - resultobj = swig::from(static_cast< std::vector< hfst::HfstTransducer,std::allocator< hfst::HfstTransducer > > >(result)); - if (SWIG_IsNewObj(res1)) delete arg1; - return resultobj; -fail: - if (SWIG_IsNewObj(res1)) delete arg1; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducer_set_name(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::HfstTransducer *arg1 = (hfst::HfstTransducer *) 0 ; - std::string *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 = SWIG_OLDOBJ ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args, "HfstTransducer_set_name", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__HfstTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducer_set_name" "', argument " "1"" of type '" "hfst::HfstTransducer *""'"); - } - arg1 = reinterpret_cast< hfst::HfstTransducer * >(argp1); - { - std::string *ptr = (std::string *)0; - res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HfstTransducer_set_name" "', argument " "2"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstTransducer_set_name" "', argument " "2"" of type '" "std::string const &""'"); - } - arg2 = ptr; - } - (arg1)->set_name((std::string const &)*arg2); - resultobj = SWIG_Py_Void(); - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducer_get_name(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::HfstTransducer *arg1 = (hfst::HfstTransducer *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::string result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__HfstTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducer_get_name" "', argument " "1"" of type '" "hfst::HfstTransducer const *""'"); - } - arg1 = reinterpret_cast< hfst::HfstTransducer * >(argp1); - result = ((hfst::HfstTransducer const *)arg1)->get_name(); - resultobj = SWIG_From_std_string(static_cast< std::string >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducer_get_type(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::HfstTransducer *arg1 = (hfst::HfstTransducer *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - hfst::ImplementationType result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__HfstTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducer_get_type" "', argument " "1"" of type '" "hfst::HfstTransducer const *""'"); - } - arg1 = reinterpret_cast< hfst::HfstTransducer * >(argp1); - result = (hfst::ImplementationType)((hfst::HfstTransducer const *)arg1)->get_type(); - resultobj = SWIG_From_int(static_cast< int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducer_set_property(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::HfstTransducer *arg1 = (hfst::HfstTransducer *) 0 ; - std::string *arg2 = 0 ; - std::string *arg3 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 = SWIG_OLDOBJ ; - int res3 = SWIG_OLDOBJ ; - PyObject *swig_obj[3] ; - - if (!SWIG_Python_UnpackTuple(args, "HfstTransducer_set_property", 3, 3, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__HfstTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducer_set_property" "', argument " "1"" of type '" "hfst::HfstTransducer *""'"); - } - arg1 = reinterpret_cast< hfst::HfstTransducer * >(argp1); - { - std::string *ptr = (std::string *)0; - res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HfstTransducer_set_property" "', argument " "2"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstTransducer_set_property" "', argument " "2"" of type '" "std::string const &""'"); - } - arg2 = ptr; - } - { - std::string *ptr = (std::string *)0; - res3 = SWIG_AsPtr_std_string(swig_obj[2], &ptr); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "HfstTransducer_set_property" "', argument " "3"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstTransducer_set_property" "', argument " "3"" of type '" "std::string const &""'"); - } - arg3 = ptr; - } - (arg1)->set_property((std::string const &)*arg2,(std::string const &)*arg3); - resultobj = SWIG_Py_Void(); - if (SWIG_IsNewObj(res2)) delete arg2; - if (SWIG_IsNewObj(res3)) delete arg3; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - if (SWIG_IsNewObj(res3)) delete arg3; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducer_get_property(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::HfstTransducer *arg1 = (hfst::HfstTransducer *) 0 ; - std::string *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 = SWIG_OLDOBJ ; - PyObject *swig_obj[2] ; - std::string result; - - if (!SWIG_Python_UnpackTuple(args, "HfstTransducer_get_property", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__HfstTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducer_get_property" "', argument " "1"" of type '" "hfst::HfstTransducer const *""'"); - } - arg1 = reinterpret_cast< hfst::HfstTransducer * >(argp1); - { - std::string *ptr = (std::string *)0; - res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HfstTransducer_get_property" "', argument " "2"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstTransducer_get_property" "', argument " "2"" of type '" "std::string const &""'"); - } - arg2 = ptr; - } - result = ((hfst::HfstTransducer const *)arg1)->get_property((std::string const &)*arg2); - resultobj = SWIG_From_std_string(static_cast< std::string >(result)); - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducer_get_properties(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::HfstTransducer *arg1 = (hfst::HfstTransducer *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::map< std::string,std::string,std::less< std::string >,std::allocator< std::pair< std::string const,std::string > > > *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__HfstTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducer_get_properties" "', argument " "1"" of type '" "hfst::HfstTransducer const *""'"); - } - arg1 = reinterpret_cast< hfst::HfstTransducer * >(argp1); - result = (std::map< std::string,std::string,std::less< std::string >,std::allocator< std::pair< std::string const,std::string > > > *) &((hfst::HfstTransducer const *)arg1)->get_properties(); - resultobj = swig::from(static_cast< std::map< std::string,std::string,std::less< std::string >,std::allocator< std::pair< std::string const,std::string > > > >(*result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducer_compare__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - hfst::HfstTransducer *arg1 = (hfst::HfstTransducer *) 0 ; - hfst::HfstTransducer *arg2 = 0 ; - bool arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - bool val3 ; - int ecode3 = 0 ; - bool result; - - if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__HfstTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducer_compare" "', argument " "1"" of type '" "hfst::HfstTransducer const *""'"); - } - arg1 = reinterpret_cast< hfst::HfstTransducer * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_hfst__HfstTransducer, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HfstTransducer_compare" "', argument " "2"" of type '" "hfst::HfstTransducer const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstTransducer_compare" "', argument " "2"" of type '" "hfst::HfstTransducer const &""'"); - } - arg2 = reinterpret_cast< hfst::HfstTransducer * >(argp2); - ecode3 = SWIG_AsVal_bool(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "HfstTransducer_compare" "', argument " "3"" of type '" "bool""'"); - } - arg3 = static_cast< bool >(val3); - try { - result = (bool)((hfst::HfstTransducer const *)arg1)->compare((hfst::HfstTransducer const &)*arg2,arg3); - } catch(TransducerTypeMismatchException &_e) { - SWIG_Python_Raise(SWIG_NewPointerObj((new TransducerTypeMismatchException(static_cast< const TransducerTypeMismatchException& >(_e))),SWIGTYPE_p_TransducerTypeMismatchException,SWIG_POINTER_OWN), "TransducerTypeMismatchException", SWIGTYPE_p_TransducerTypeMismatchException); SWIG_fail; - } - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducer_compare__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - hfst::HfstTransducer *arg1 = (hfst::HfstTransducer *) 0 ; - hfst::HfstTransducer *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - bool result; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__HfstTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducer_compare" "', argument " "1"" of type '" "hfst::HfstTransducer const *""'"); - } - arg1 = reinterpret_cast< hfst::HfstTransducer * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_hfst__HfstTransducer, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HfstTransducer_compare" "', argument " "2"" of type '" "hfst::HfstTransducer const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstTransducer_compare" "', argument " "2"" of type '" "hfst::HfstTransducer const &""'"); - } - arg2 = reinterpret_cast< hfst::HfstTransducer * >(argp2); - try { - result = (bool)((hfst::HfstTransducer const *)arg1)->compare((hfst::HfstTransducer const &)*arg2); - } catch(TransducerTypeMismatchException &_e) { - SWIG_Python_Raise(SWIG_NewPointerObj((new TransducerTypeMismatchException(static_cast< const TransducerTypeMismatchException& >(_e))),SWIGTYPE_p_TransducerTypeMismatchException,SWIG_POINTER_OWN), "TransducerTypeMismatchException", SWIGTYPE_p_TransducerTypeMismatchException); SWIG_fail; - } - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducer_compare(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[4] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "HfstTransducer_compare", 0, 3, argv))) SWIG_fail; - --argc; - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_hfst__HfstTransducer, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_hfst__HfstTransducer, SWIG_POINTER_NO_NULL | 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_HfstTransducer_compare__SWIG_1(self, argc, argv); - } - } - } - if (argc == 3) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_hfst__HfstTransducer, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_hfst__HfstTransducer, SWIG_POINTER_NO_NULL | 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_bool(argv[2], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_HfstTransducer_compare__SWIG_0(self, argc, argv); - } - } - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'HfstTransducer_compare'.\n" - " Possible C/C++ prototypes are:\n" - " hfst::HfstTransducer::compare(hfst::HfstTransducer const &,bool) const\n" - " hfst::HfstTransducer::compare(hfst::HfstTransducer const &) const\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducer_number_of_states(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::HfstTransducer *arg1 = (hfst::HfstTransducer *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - unsigned int result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__HfstTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducer_number_of_states" "', argument " "1"" of type '" "hfst::HfstTransducer const *""'"); - } - arg1 = reinterpret_cast< hfst::HfstTransducer * >(argp1); - result = (unsigned int)((hfst::HfstTransducer const *)arg1)->number_of_states(); - resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducer_number_of_arcs(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::HfstTransducer *arg1 = (hfst::HfstTransducer *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - unsigned int result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__HfstTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducer_number_of_arcs" "', argument " "1"" of type '" "hfst::HfstTransducer const *""'"); - } - arg1 = reinterpret_cast< hfst::HfstTransducer * >(argp1); - result = (unsigned int)((hfst::HfstTransducer const *)arg1)->number_of_arcs(); - resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducer_get_alphabet(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::HfstTransducer *arg1 = (hfst::HfstTransducer *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - hfst::StringSet result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__HfstTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducer_get_alphabet" "', argument " "1"" of type '" "hfst::HfstTransducer const *""'"); - } - arg1 = reinterpret_cast< hfst::HfstTransducer * >(argp1); - result = ((hfst::HfstTransducer const *)arg1)->get_alphabet(); - resultobj = swig::from(static_cast< std::set< std::string,std::less< std::string >,std::allocator< std::string > > >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducer_is_cyclic(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::HfstTransducer *arg1 = (hfst::HfstTransducer *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - bool result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__HfstTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducer_is_cyclic" "', argument " "1"" of type '" "hfst::HfstTransducer const *""'"); - } - arg1 = reinterpret_cast< hfst::HfstTransducer * >(argp1); - result = (bool)((hfst::HfstTransducer const *)arg1)->is_cyclic(); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducer_is_automaton(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::HfstTransducer *arg1 = (hfst::HfstTransducer *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - bool result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__HfstTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducer_is_automaton" "', argument " "1"" of type '" "hfst::HfstTransducer const *""'"); - } - arg1 = reinterpret_cast< hfst::HfstTransducer * >(argp1); - result = (bool)((hfst::HfstTransducer const *)arg1)->is_automaton(); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducer_is_infinitely_ambiguous(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::HfstTransducer *arg1 = (hfst::HfstTransducer *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - bool result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__HfstTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducer_is_infinitely_ambiguous" "', argument " "1"" of type '" "hfst::HfstTransducer const *""'"); - } - arg1 = reinterpret_cast< hfst::HfstTransducer * >(argp1); - result = (bool)((hfst::HfstTransducer const *)arg1)->is_infinitely_ambiguous(); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducer_is_lookup_infinitely_ambiguous(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::HfstTransducer *arg1 = (hfst::HfstTransducer *) 0 ; - std::string *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 = SWIG_OLDOBJ ; - PyObject *swig_obj[2] ; - bool result; - - if (!SWIG_Python_UnpackTuple(args, "HfstTransducer_is_lookup_infinitely_ambiguous", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__HfstTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducer_is_lookup_infinitely_ambiguous" "', argument " "1"" of type '" "hfst::HfstTransducer const *""'"); - } - arg1 = reinterpret_cast< hfst::HfstTransducer * >(argp1); - { - std::string *ptr = (std::string *)0; - res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HfstTransducer_is_lookup_infinitely_ambiguous" "', argument " "2"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstTransducer_is_lookup_infinitely_ambiguous" "', argument " "2"" of type '" "std::string const &""'"); - } - arg2 = ptr; - } - result = (bool)((hfst::HfstTransducer const *)arg1)->is_lookup_infinitely_ambiguous((std::string const &)*arg2); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducer_has_flag_diacritics(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::HfstTransducer *arg1 = (hfst::HfstTransducer *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - bool result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__HfstTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducer_has_flag_diacritics" "', argument " "1"" of type '" "hfst::HfstTransducer const *""'"); - } - arg1 = reinterpret_cast< hfst::HfstTransducer * >(argp1); - result = (bool)((hfst::HfstTransducer const *)arg1)->has_flag_diacritics(); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducer_insert_to_alphabet(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::HfstTransducer *arg1 = (hfst::HfstTransducer *) 0 ; - std::string *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 = SWIG_OLDOBJ ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args, "HfstTransducer_insert_to_alphabet", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__HfstTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducer_insert_to_alphabet" "', argument " "1"" of type '" "hfst::HfstTransducer *""'"); - } - arg1 = reinterpret_cast< hfst::HfstTransducer * >(argp1); - { - std::string *ptr = (std::string *)0; - res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HfstTransducer_insert_to_alphabet" "', argument " "2"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstTransducer_insert_to_alphabet" "', argument " "2"" of type '" "std::string const &""'"); - } - arg2 = ptr; - } - (arg1)->insert_to_alphabet((std::string const &)*arg2); - resultobj = SWIG_Py_Void(); - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducer_remove_from_alphabet(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::HfstTransducer *arg1 = (hfst::HfstTransducer *) 0 ; - std::string *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 = SWIG_OLDOBJ ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args, "HfstTransducer_remove_from_alphabet", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__HfstTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducer_remove_from_alphabet" "', argument " "1"" of type '" "hfst::HfstTransducer *""'"); - } - arg1 = reinterpret_cast< hfst::HfstTransducer * >(argp1); - { - std::string *ptr = (std::string *)0; - res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HfstTransducer_remove_from_alphabet" "', argument " "2"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstTransducer_remove_from_alphabet" "', argument " "2"" of type '" "std::string const &""'"); - } - arg2 = ptr; - } - (arg1)->remove_from_alphabet((std::string const &)*arg2); - resultobj = SWIG_Py_Void(); - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducer_is_implementation_type_available(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::ImplementationType arg1 ; - int val1 ; - int ecode1 = 0 ; - PyObject *swig_obj[1] ; - bool result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - ecode1 = SWIG_AsVal_int(swig_obj[0], &val1); - if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "HfstTransducer_is_implementation_type_available" "', argument " "1"" of type '" "hfst::ImplementationType""'"); - } - arg1 = static_cast< hfst::ImplementationType >(val1); - result = (bool)hfst::HfstTransducer::is_implementation_type_available(arg1); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducer_longest_path_size__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - hfst::HfstTransducer *arg1 = (hfst::HfstTransducer *) 0 ; - bool arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - bool val2 ; - int ecode2 = 0 ; - int result; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__HfstTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducer_longest_path_size" "', argument " "1"" of type '" "hfst::HfstTransducer const *""'"); - } - arg1 = reinterpret_cast< hfst::HfstTransducer * >(argp1); - ecode2 = SWIG_AsVal_bool(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HfstTransducer_longest_path_size" "', argument " "2"" of type '" "bool""'"); - } - arg2 = static_cast< bool >(val2); - result = (int)((hfst::HfstTransducer const *)arg1)->longest_path_size(arg2); - resultobj = SWIG_From_int(static_cast< int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducer_longest_path_size__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - hfst::HfstTransducer *arg1 = (hfst::HfstTransducer *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int result; - - if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__HfstTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducer_longest_path_size" "', argument " "1"" of type '" "hfst::HfstTransducer const *""'"); - } - arg1 = reinterpret_cast< hfst::HfstTransducer * >(argp1); - result = (int)((hfst::HfstTransducer const *)arg1)->longest_path_size(); - resultobj = SWIG_From_int(static_cast< int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducer_longest_path_size(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[3] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "HfstTransducer_longest_path_size", 0, 2, argv))) SWIG_fail; - --argc; - if (argc == 1) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_hfst__HfstTransducer, 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_HfstTransducer_longest_path_size__SWIG_1(self, argc, argv); - } - } - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_hfst__HfstTransducer, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_bool(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_HfstTransducer_longest_path_size__SWIG_0(self, argc, argv); - } - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'HfstTransducer_longest_path_size'.\n" - " Possible C/C++ prototypes are:\n" - " hfst::HfstTransducer::longest_path_size(bool) const\n" - " hfst::HfstTransducer::longest_path_size() const\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducer_concatenate__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - hfst::HfstTransducer *arg1 = (hfst::HfstTransducer *) 0 ; - hfst::HfstTransducer *arg2 = 0 ; - bool arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - bool val3 ; - int ecode3 = 0 ; - - if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__HfstTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducer_concatenate" "', argument " "1"" of type '" "hfst::HfstTransducer *""'"); - } - arg1 = reinterpret_cast< hfst::HfstTransducer * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_hfst__HfstTransducer, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HfstTransducer_concatenate" "', argument " "2"" of type '" "hfst::HfstTransducer const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstTransducer_concatenate" "', argument " "2"" of type '" "hfst::HfstTransducer const &""'"); - } - arg2 = reinterpret_cast< hfst::HfstTransducer * >(argp2); - ecode3 = SWIG_AsVal_bool(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "HfstTransducer_concatenate" "', argument " "3"" of type '" "bool""'"); - } - arg3 = static_cast< bool >(val3); - try { - hfst_HfstTransducer_concatenate__SWIG_0(arg1,(hfst::HfstTransducer const &)*arg2,arg3); - } catch(TransducerTypeMismatchException &_e) { - SWIG_Python_Raise(SWIG_NewPointerObj((new TransducerTypeMismatchException(static_cast< const TransducerTypeMismatchException& >(_e))),SWIGTYPE_p_TransducerTypeMismatchException,SWIG_POINTER_OWN), "TransducerTypeMismatchException", SWIGTYPE_p_TransducerTypeMismatchException); SWIG_fail; - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducer_concatenate__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - hfst::HfstTransducer *arg1 = (hfst::HfstTransducer *) 0 ; - hfst::HfstTransducer *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__HfstTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducer_concatenate" "', argument " "1"" of type '" "hfst::HfstTransducer *""'"); - } - arg1 = reinterpret_cast< hfst::HfstTransducer * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_hfst__HfstTransducer, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HfstTransducer_concatenate" "', argument " "2"" of type '" "hfst::HfstTransducer const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstTransducer_concatenate" "', argument " "2"" of type '" "hfst::HfstTransducer const &""'"); - } - arg2 = reinterpret_cast< hfst::HfstTransducer * >(argp2); - try { - hfst_HfstTransducer_concatenate__SWIG_0(arg1,(hfst::HfstTransducer const &)*arg2); - } catch(TransducerTypeMismatchException &_e) { - SWIG_Python_Raise(SWIG_NewPointerObj((new TransducerTypeMismatchException(static_cast< const TransducerTypeMismatchException& >(_e))),SWIGTYPE_p_TransducerTypeMismatchException,SWIG_POINTER_OWN), "TransducerTypeMismatchException", SWIGTYPE_p_TransducerTypeMismatchException); SWIG_fail; - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducer_concatenate(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[4] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "HfstTransducer_concatenate", 0, 3, argv))) SWIG_fail; - --argc; - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_hfst__HfstTransducer, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_hfst__HfstTransducer, SWIG_POINTER_NO_NULL | 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_HfstTransducer_concatenate__SWIG_1(self, argc, argv); - } - } - } - if (argc == 3) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_hfst__HfstTransducer, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_hfst__HfstTransducer, SWIG_POINTER_NO_NULL | 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_bool(argv[2], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_HfstTransducer_concatenate__SWIG_0(self, argc, argv); - } - } - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'HfstTransducer_concatenate'.\n" - " Possible C/C++ prototypes are:\n" - " hfst::HfstTransducer::concatenate(hfst::HfstTransducer const &,bool)\n" - " hfst::HfstTransducer::concatenate(hfst::HfstTransducer const &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducer_disjunct__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - hfst::HfstTransducer *arg1 = (hfst::HfstTransducer *) 0 ; - hfst::HfstTransducer *arg2 = 0 ; - bool arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - bool val3 ; - int ecode3 = 0 ; - - if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__HfstTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducer_disjunct" "', argument " "1"" of type '" "hfst::HfstTransducer *""'"); - } - arg1 = reinterpret_cast< hfst::HfstTransducer * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_hfst__HfstTransducer, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HfstTransducer_disjunct" "', argument " "2"" of type '" "hfst::HfstTransducer const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstTransducer_disjunct" "', argument " "2"" of type '" "hfst::HfstTransducer const &""'"); - } - arg2 = reinterpret_cast< hfst::HfstTransducer * >(argp2); - ecode3 = SWIG_AsVal_bool(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "HfstTransducer_disjunct" "', argument " "3"" of type '" "bool""'"); - } - arg3 = static_cast< bool >(val3); - try { - hfst_HfstTransducer_disjunct__SWIG_0(arg1,(hfst::HfstTransducer const &)*arg2,arg3); - } catch(TransducerTypeMismatchException &_e) { - SWIG_Python_Raise(SWIG_NewPointerObj((new TransducerTypeMismatchException(static_cast< const TransducerTypeMismatchException& >(_e))),SWIGTYPE_p_TransducerTypeMismatchException,SWIG_POINTER_OWN), "TransducerTypeMismatchException", SWIGTYPE_p_TransducerTypeMismatchException); SWIG_fail; - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducer_disjunct__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - hfst::HfstTransducer *arg1 = (hfst::HfstTransducer *) 0 ; - hfst::HfstTransducer *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__HfstTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducer_disjunct" "', argument " "1"" of type '" "hfst::HfstTransducer *""'"); - } - arg1 = reinterpret_cast< hfst::HfstTransducer * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_hfst__HfstTransducer, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HfstTransducer_disjunct" "', argument " "2"" of type '" "hfst::HfstTransducer const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstTransducer_disjunct" "', argument " "2"" of type '" "hfst::HfstTransducer const &""'"); - } - arg2 = reinterpret_cast< hfst::HfstTransducer * >(argp2); - try { - hfst_HfstTransducer_disjunct__SWIG_0(arg1,(hfst::HfstTransducer const &)*arg2); - } catch(TransducerTypeMismatchException &_e) { - SWIG_Python_Raise(SWIG_NewPointerObj((new TransducerTypeMismatchException(static_cast< const TransducerTypeMismatchException& >(_e))),SWIGTYPE_p_TransducerTypeMismatchException,SWIG_POINTER_OWN), "TransducerTypeMismatchException", SWIGTYPE_p_TransducerTypeMismatchException); SWIG_fail; - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducer_disjunct(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[4] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "HfstTransducer_disjunct", 0, 3, argv))) SWIG_fail; - --argc; - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_hfst__HfstTransducer, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_hfst__HfstTransducer, SWIG_POINTER_NO_NULL | 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_HfstTransducer_disjunct__SWIG_1(self, argc, argv); - } - } - } - if (argc == 3) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_hfst__HfstTransducer, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_hfst__HfstTransducer, SWIG_POINTER_NO_NULL | 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_bool(argv[2], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_HfstTransducer_disjunct__SWIG_0(self, argc, argv); - } - } - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'HfstTransducer_disjunct'.\n" - " Possible C/C++ prototypes are:\n" - " hfst::HfstTransducer::disjunct(hfst::HfstTransducer const &,bool)\n" - " hfst::HfstTransducer::disjunct(hfst::HfstTransducer const &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducer_subtract__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - hfst::HfstTransducer *arg1 = (hfst::HfstTransducer *) 0 ; - hfst::HfstTransducer *arg2 = 0 ; - bool arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - bool val3 ; - int ecode3 = 0 ; - - if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__HfstTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducer_subtract" "', argument " "1"" of type '" "hfst::HfstTransducer *""'"); - } - arg1 = reinterpret_cast< hfst::HfstTransducer * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_hfst__HfstTransducer, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HfstTransducer_subtract" "', argument " "2"" of type '" "hfst::HfstTransducer const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstTransducer_subtract" "', argument " "2"" of type '" "hfst::HfstTransducer const &""'"); - } - arg2 = reinterpret_cast< hfst::HfstTransducer * >(argp2); - ecode3 = SWIG_AsVal_bool(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "HfstTransducer_subtract" "', argument " "3"" of type '" "bool""'"); - } - arg3 = static_cast< bool >(val3); - try { - hfst_HfstTransducer_subtract__SWIG_0(arg1,(hfst::HfstTransducer const &)*arg2,arg3); - } catch(TransducerTypeMismatchException &_e) { - SWIG_Python_Raise(SWIG_NewPointerObj((new TransducerTypeMismatchException(static_cast< const TransducerTypeMismatchException& >(_e))),SWIGTYPE_p_TransducerTypeMismatchException,SWIG_POINTER_OWN), "TransducerTypeMismatchException", SWIGTYPE_p_TransducerTypeMismatchException); SWIG_fail; - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducer_subtract__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - hfst::HfstTransducer *arg1 = (hfst::HfstTransducer *) 0 ; - hfst::HfstTransducer *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__HfstTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducer_subtract" "', argument " "1"" of type '" "hfst::HfstTransducer *""'"); - } - arg1 = reinterpret_cast< hfst::HfstTransducer * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_hfst__HfstTransducer, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HfstTransducer_subtract" "', argument " "2"" of type '" "hfst::HfstTransducer const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstTransducer_subtract" "', argument " "2"" of type '" "hfst::HfstTransducer const &""'"); - } - arg2 = reinterpret_cast< hfst::HfstTransducer * >(argp2); - try { - hfst_HfstTransducer_subtract__SWIG_0(arg1,(hfst::HfstTransducer const &)*arg2); - } catch(TransducerTypeMismatchException &_e) { - SWIG_Python_Raise(SWIG_NewPointerObj((new TransducerTypeMismatchException(static_cast< const TransducerTypeMismatchException& >(_e))),SWIGTYPE_p_TransducerTypeMismatchException,SWIG_POINTER_OWN), "TransducerTypeMismatchException", SWIGTYPE_p_TransducerTypeMismatchException); SWIG_fail; - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducer_subtract(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[4] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "HfstTransducer_subtract", 0, 3, argv))) SWIG_fail; - --argc; - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_hfst__HfstTransducer, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_hfst__HfstTransducer, SWIG_POINTER_NO_NULL | 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_HfstTransducer_subtract__SWIG_1(self, argc, argv); - } - } - } - if (argc == 3) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_hfst__HfstTransducer, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_hfst__HfstTransducer, SWIG_POINTER_NO_NULL | 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_bool(argv[2], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_HfstTransducer_subtract__SWIG_0(self, argc, argv); - } - } - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'HfstTransducer_subtract'.\n" - " Possible C/C++ prototypes are:\n" - " hfst::HfstTransducer::subtract(hfst::HfstTransducer const &,bool)\n" - " hfst::HfstTransducer::subtract(hfst::HfstTransducer const &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducer_intersect__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - hfst::HfstTransducer *arg1 = (hfst::HfstTransducer *) 0 ; - hfst::HfstTransducer *arg2 = 0 ; - bool arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - bool val3 ; - int ecode3 = 0 ; - - if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__HfstTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducer_intersect" "', argument " "1"" of type '" "hfst::HfstTransducer *""'"); - } - arg1 = reinterpret_cast< hfst::HfstTransducer * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_hfst__HfstTransducer, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HfstTransducer_intersect" "', argument " "2"" of type '" "hfst::HfstTransducer const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstTransducer_intersect" "', argument " "2"" of type '" "hfst::HfstTransducer const &""'"); - } - arg2 = reinterpret_cast< hfst::HfstTransducer * >(argp2); - ecode3 = SWIG_AsVal_bool(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "HfstTransducer_intersect" "', argument " "3"" of type '" "bool""'"); - } - arg3 = static_cast< bool >(val3); - try { - hfst_HfstTransducer_intersect__SWIG_0(arg1,(hfst::HfstTransducer const &)*arg2,arg3); - } catch(TransducerTypeMismatchException &_e) { - SWIG_Python_Raise(SWIG_NewPointerObj((new TransducerTypeMismatchException(static_cast< const TransducerTypeMismatchException& >(_e))),SWIGTYPE_p_TransducerTypeMismatchException,SWIG_POINTER_OWN), "TransducerTypeMismatchException", SWIGTYPE_p_TransducerTypeMismatchException); SWIG_fail; - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducer_intersect__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - hfst::HfstTransducer *arg1 = (hfst::HfstTransducer *) 0 ; - hfst::HfstTransducer *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__HfstTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducer_intersect" "', argument " "1"" of type '" "hfst::HfstTransducer *""'"); - } - arg1 = reinterpret_cast< hfst::HfstTransducer * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_hfst__HfstTransducer, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HfstTransducer_intersect" "', argument " "2"" of type '" "hfst::HfstTransducer const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstTransducer_intersect" "', argument " "2"" of type '" "hfst::HfstTransducer const &""'"); - } - arg2 = reinterpret_cast< hfst::HfstTransducer * >(argp2); - try { - hfst_HfstTransducer_intersect__SWIG_0(arg1,(hfst::HfstTransducer const &)*arg2); - } catch(TransducerTypeMismatchException &_e) { - SWIG_Python_Raise(SWIG_NewPointerObj((new TransducerTypeMismatchException(static_cast< const TransducerTypeMismatchException& >(_e))),SWIGTYPE_p_TransducerTypeMismatchException,SWIG_POINTER_OWN), "TransducerTypeMismatchException", SWIGTYPE_p_TransducerTypeMismatchException); SWIG_fail; - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducer_intersect(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[4] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "HfstTransducer_intersect", 0, 3, argv))) SWIG_fail; - --argc; - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_hfst__HfstTransducer, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_hfst__HfstTransducer, SWIG_POINTER_NO_NULL | 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_HfstTransducer_intersect__SWIG_1(self, argc, argv); - } - } - } - if (argc == 3) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_hfst__HfstTransducer, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_hfst__HfstTransducer, SWIG_POINTER_NO_NULL | 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_bool(argv[2], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_HfstTransducer_intersect__SWIG_0(self, argc, argv); - } - } - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'HfstTransducer_intersect'.\n" - " Possible C/C++ prototypes are:\n" - " hfst::HfstTransducer::intersect(hfst::HfstTransducer const &,bool)\n" - " hfst::HfstTransducer::intersect(hfst::HfstTransducer const &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducer_compose__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - hfst::HfstTransducer *arg1 = (hfst::HfstTransducer *) 0 ; - hfst::HfstTransducer *arg2 = 0 ; - bool arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - bool val3 ; - int ecode3 = 0 ; - - if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__HfstTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducer_compose" "', argument " "1"" of type '" "hfst::HfstTransducer *""'"); - } - arg1 = reinterpret_cast< hfst::HfstTransducer * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_hfst__HfstTransducer, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HfstTransducer_compose" "', argument " "2"" of type '" "hfst::HfstTransducer const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstTransducer_compose" "', argument " "2"" of type '" "hfst::HfstTransducer const &""'"); - } - arg2 = reinterpret_cast< hfst::HfstTransducer * >(argp2); - ecode3 = SWIG_AsVal_bool(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "HfstTransducer_compose" "', argument " "3"" of type '" "bool""'"); - } - arg3 = static_cast< bool >(val3); - try { - hfst_HfstTransducer_compose__SWIG_0(arg1,(hfst::HfstTransducer const &)*arg2,arg3); - } catch(TransducerTypeMismatchException &_e) { - SWIG_Python_Raise(SWIG_NewPointerObj((new TransducerTypeMismatchException(static_cast< const TransducerTypeMismatchException& >(_e))),SWIGTYPE_p_TransducerTypeMismatchException,SWIG_POINTER_OWN), "TransducerTypeMismatchException", SWIGTYPE_p_TransducerTypeMismatchException); SWIG_fail; - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducer_compose__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - hfst::HfstTransducer *arg1 = (hfst::HfstTransducer *) 0 ; - hfst::HfstTransducer *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__HfstTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducer_compose" "', argument " "1"" of type '" "hfst::HfstTransducer *""'"); - } - arg1 = reinterpret_cast< hfst::HfstTransducer * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_hfst__HfstTransducer, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HfstTransducer_compose" "', argument " "2"" of type '" "hfst::HfstTransducer const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstTransducer_compose" "', argument " "2"" of type '" "hfst::HfstTransducer const &""'"); - } - arg2 = reinterpret_cast< hfst::HfstTransducer * >(argp2); - try { - hfst_HfstTransducer_compose__SWIG_0(arg1,(hfst::HfstTransducer const &)*arg2); - } catch(TransducerTypeMismatchException &_e) { - SWIG_Python_Raise(SWIG_NewPointerObj((new TransducerTypeMismatchException(static_cast< const TransducerTypeMismatchException& >(_e))),SWIGTYPE_p_TransducerTypeMismatchException,SWIG_POINTER_OWN), "TransducerTypeMismatchException", SWIGTYPE_p_TransducerTypeMismatchException); SWIG_fail; - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducer_compose(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[4] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "HfstTransducer_compose", 0, 3, argv))) SWIG_fail; - --argc; - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_hfst__HfstTransducer, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_hfst__HfstTransducer, SWIG_POINTER_NO_NULL | 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_HfstTransducer_compose__SWIG_1(self, argc, argv); - } - } - } - if (argc == 3) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_hfst__HfstTransducer, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_hfst__HfstTransducer, SWIG_POINTER_NO_NULL | 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_bool(argv[2], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_HfstTransducer_compose__SWIG_0(self, argc, argv); - } - } - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'HfstTransducer_compose'.\n" - " Possible C/C++ prototypes are:\n" - " hfst::HfstTransducer::compose(hfst::HfstTransducer const &,bool)\n" - " hfst::HfstTransducer::compose(hfst::HfstTransducer const &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducer_compose_intersect__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - hfst::HfstTransducer *arg1 = (hfst::HfstTransducer *) 0 ; - hfst::HfstTransducerVector *arg2 = 0 ; - bool arg3 ; - bool arg4 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 = SWIG_OLDOBJ ; - bool val3 ; - int ecode3 = 0 ; - bool val4 ; - int ecode4 = 0 ; - - if ((nobjs < 4) || (nobjs > 4)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__HfstTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducer_compose_intersect" "', argument " "1"" of type '" "hfst::HfstTransducer *""'"); - } - arg1 = reinterpret_cast< hfst::HfstTransducer * >(argp1); - { - std::vector< hfst::HfstTransducer,std::allocator< hfst::HfstTransducer > > *ptr = (std::vector< hfst::HfstTransducer,std::allocator< hfst::HfstTransducer > > *)0; - res2 = swig::asptr(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HfstTransducer_compose_intersect" "', argument " "2"" of type '" "hfst::HfstTransducerVector const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstTransducer_compose_intersect" "', argument " "2"" of type '" "hfst::HfstTransducerVector const &""'"); - } - arg2 = ptr; - } - ecode3 = SWIG_AsVal_bool(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "HfstTransducer_compose_intersect" "', argument " "3"" of type '" "bool""'"); - } - arg3 = static_cast< bool >(val3); - ecode4 = SWIG_AsVal_bool(swig_obj[3], &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "HfstTransducer_compose_intersect" "', argument " "4"" of type '" "bool""'"); - } - arg4 = static_cast< bool >(val4); - hfst_HfstTransducer_compose_intersect__SWIG_0(arg1,(std::vector< hfst::HfstTransducer,std::allocator< hfst::HfstTransducer > > const &)*arg2,arg3,arg4); - resultobj = SWIG_Py_Void(); - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducer_compose_intersect__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - hfst::HfstTransducer *arg1 = (hfst::HfstTransducer *) 0 ; - hfst::HfstTransducerVector *arg2 = 0 ; - bool arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 = SWIG_OLDOBJ ; - bool val3 ; - int ecode3 = 0 ; - - if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__HfstTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducer_compose_intersect" "', argument " "1"" of type '" "hfst::HfstTransducer *""'"); - } - arg1 = reinterpret_cast< hfst::HfstTransducer * >(argp1); - { - std::vector< hfst::HfstTransducer,std::allocator< hfst::HfstTransducer > > *ptr = (std::vector< hfst::HfstTransducer,std::allocator< hfst::HfstTransducer > > *)0; - res2 = swig::asptr(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HfstTransducer_compose_intersect" "', argument " "2"" of type '" "hfst::HfstTransducerVector const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstTransducer_compose_intersect" "', argument " "2"" of type '" "hfst::HfstTransducerVector const &""'"); - } - arg2 = ptr; - } - ecode3 = SWIG_AsVal_bool(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "HfstTransducer_compose_intersect" "', argument " "3"" of type '" "bool""'"); - } - arg3 = static_cast< bool >(val3); - hfst_HfstTransducer_compose_intersect__SWIG_0(arg1,(std::vector< hfst::HfstTransducer,std::allocator< hfst::HfstTransducer > > const &)*arg2,arg3); - resultobj = SWIG_Py_Void(); - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducer_compose_intersect__SWIG_2(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - hfst::HfstTransducer *arg1 = (hfst::HfstTransducer *) 0 ; - hfst::HfstTransducerVector *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 = SWIG_OLDOBJ ; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__HfstTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducer_compose_intersect" "', argument " "1"" of type '" "hfst::HfstTransducer *""'"); - } - arg1 = reinterpret_cast< hfst::HfstTransducer * >(argp1); - { - std::vector< hfst::HfstTransducer,std::allocator< hfst::HfstTransducer > > *ptr = (std::vector< hfst::HfstTransducer,std::allocator< hfst::HfstTransducer > > *)0; - res2 = swig::asptr(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HfstTransducer_compose_intersect" "', argument " "2"" of type '" "hfst::HfstTransducerVector const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstTransducer_compose_intersect" "', argument " "2"" of type '" "hfst::HfstTransducerVector const &""'"); - } - arg2 = ptr; - } - hfst_HfstTransducer_compose_intersect__SWIG_0(arg1,(std::vector< hfst::HfstTransducer,std::allocator< hfst::HfstTransducer > > const &)*arg2); - resultobj = SWIG_Py_Void(); - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducer_compose_intersect(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[5] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "HfstTransducer_compose_intersect", 0, 4, argv))) SWIG_fail; - --argc; - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_hfst__HfstTransducer, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = swig::asptr(argv[1], (std::vector< hfst::HfstTransducer,std::allocator< hfst::HfstTransducer > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_HfstTransducer_compose_intersect__SWIG_2(self, argc, argv); - } - } - } - if (argc == 3) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_hfst__HfstTransducer, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = swig::asptr(argv[1], (std::vector< hfst::HfstTransducer,std::allocator< hfst::HfstTransducer > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_bool(argv[2], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_HfstTransducer_compose_intersect__SWIG_1(self, argc, argv); - } - } - } - } - if (argc == 4) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_hfst__HfstTransducer, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = swig::asptr(argv[1], (std::vector< hfst::HfstTransducer,std::allocator< hfst::HfstTransducer > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_bool(argv[2], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - { - int res = SWIG_AsVal_bool(argv[3], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_HfstTransducer_compose_intersect__SWIG_0(self, argc, argv); - } - } - } - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'HfstTransducer_compose_intersect'.\n" - " Possible C/C++ prototypes are:\n" - " hfst::HfstTransducer::compose_intersect(hfst::HfstTransducerVector const &,bool,bool)\n" - " hfst::HfstTransducer::compose_intersect(hfst::HfstTransducerVector const &,bool)\n" - " hfst::HfstTransducer::compose_intersect(hfst::HfstTransducerVector const &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducer_priority_union(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::HfstTransducer *arg1 = (hfst::HfstTransducer *) 0 ; - hfst::HfstTransducer *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args, "HfstTransducer_priority_union", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__HfstTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducer_priority_union" "', argument " "1"" of type '" "hfst::HfstTransducer *""'"); - } - arg1 = reinterpret_cast< hfst::HfstTransducer * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_hfst__HfstTransducer, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HfstTransducer_priority_union" "', argument " "2"" of type '" "hfst::HfstTransducer const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstTransducer_priority_union" "', argument " "2"" of type '" "hfst::HfstTransducer const &""'"); - } - arg2 = reinterpret_cast< hfst::HfstTransducer * >(argp2); - hfst_HfstTransducer_priority_union(arg1,(hfst::HfstTransducer const &)*arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducer_lenient_composition__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - hfst::HfstTransducer *arg1 = (hfst::HfstTransducer *) 0 ; - hfst::HfstTransducer *arg2 = 0 ; - bool arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - bool val3 ; - int ecode3 = 0 ; - - if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__HfstTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducer_lenient_composition" "', argument " "1"" of type '" "hfst::HfstTransducer *""'"); - } - arg1 = reinterpret_cast< hfst::HfstTransducer * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_hfst__HfstTransducer, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HfstTransducer_lenient_composition" "', argument " "2"" of type '" "hfst::HfstTransducer const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstTransducer_lenient_composition" "', argument " "2"" of type '" "hfst::HfstTransducer const &""'"); - } - arg2 = reinterpret_cast< hfst::HfstTransducer * >(argp2); - ecode3 = SWIG_AsVal_bool(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "HfstTransducer_lenient_composition" "', argument " "3"" of type '" "bool""'"); - } - arg3 = static_cast< bool >(val3); - hfst_HfstTransducer_lenient_composition__SWIG_0(arg1,(hfst::HfstTransducer const &)*arg2,arg3); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducer_lenient_composition__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - hfst::HfstTransducer *arg1 = (hfst::HfstTransducer *) 0 ; - hfst::HfstTransducer *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__HfstTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducer_lenient_composition" "', argument " "1"" of type '" "hfst::HfstTransducer *""'"); - } - arg1 = reinterpret_cast< hfst::HfstTransducer * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_hfst__HfstTransducer, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HfstTransducer_lenient_composition" "', argument " "2"" of type '" "hfst::HfstTransducer const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstTransducer_lenient_composition" "', argument " "2"" of type '" "hfst::HfstTransducer const &""'"); - } - arg2 = reinterpret_cast< hfst::HfstTransducer * >(argp2); - hfst_HfstTransducer_lenient_composition__SWIG_0(arg1,(hfst::HfstTransducer const &)*arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducer_lenient_composition(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[4] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "HfstTransducer_lenient_composition", 0, 3, argv))) SWIG_fail; - --argc; - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_hfst__HfstTransducer, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_hfst__HfstTransducer, SWIG_POINTER_NO_NULL | 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_HfstTransducer_lenient_composition__SWIG_1(self, argc, argv); - } - } - } - if (argc == 3) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_hfst__HfstTransducer, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_hfst__HfstTransducer, SWIG_POINTER_NO_NULL | 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_bool(argv[2], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_HfstTransducer_lenient_composition__SWIG_0(self, argc, argv); - } - } - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'HfstTransducer_lenient_composition'.\n" - " Possible C/C++ prototypes are:\n" - " hfst::HfstTransducer::lenient_composition(hfst::HfstTransducer const &,bool)\n" - " hfst::HfstTransducer::lenient_composition(hfst::HfstTransducer const &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducer_cross_product__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - hfst::HfstTransducer *arg1 = (hfst::HfstTransducer *) 0 ; - hfst::HfstTransducer *arg2 = 0 ; - bool arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - bool val3 ; - int ecode3 = 0 ; - - if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__HfstTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducer_cross_product" "', argument " "1"" of type '" "hfst::HfstTransducer *""'"); - } - arg1 = reinterpret_cast< hfst::HfstTransducer * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_hfst__HfstTransducer, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HfstTransducer_cross_product" "', argument " "2"" of type '" "hfst::HfstTransducer const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstTransducer_cross_product" "', argument " "2"" of type '" "hfst::HfstTransducer const &""'"); - } - arg2 = reinterpret_cast< hfst::HfstTransducer * >(argp2); - ecode3 = SWIG_AsVal_bool(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "HfstTransducer_cross_product" "', argument " "3"" of type '" "bool""'"); - } - arg3 = static_cast< bool >(val3); - try { - hfst_HfstTransducer_cross_product__SWIG_0(arg1,(hfst::HfstTransducer const &)*arg2,arg3); - } catch(TransducersAreNotAutomataException &_e) { - SWIG_Python_Raise(SWIG_NewPointerObj((new TransducersAreNotAutomataException(static_cast< const TransducersAreNotAutomataException& >(_e))),SWIGTYPE_p_TransducersAreNotAutomataException,SWIG_POINTER_OWN), "TransducersAreNotAutomataException", SWIGTYPE_p_TransducersAreNotAutomataException); SWIG_fail; - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducer_cross_product__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - hfst::HfstTransducer *arg1 = (hfst::HfstTransducer *) 0 ; - hfst::HfstTransducer *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__HfstTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducer_cross_product" "', argument " "1"" of type '" "hfst::HfstTransducer *""'"); - } - arg1 = reinterpret_cast< hfst::HfstTransducer * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_hfst__HfstTransducer, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HfstTransducer_cross_product" "', argument " "2"" of type '" "hfst::HfstTransducer const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstTransducer_cross_product" "', argument " "2"" of type '" "hfst::HfstTransducer const &""'"); - } - arg2 = reinterpret_cast< hfst::HfstTransducer * >(argp2); - try { - hfst_HfstTransducer_cross_product__SWIG_0(arg1,(hfst::HfstTransducer const &)*arg2); - } catch(TransducersAreNotAutomataException &_e) { - SWIG_Python_Raise(SWIG_NewPointerObj((new TransducersAreNotAutomataException(static_cast< const TransducersAreNotAutomataException& >(_e))),SWIGTYPE_p_TransducersAreNotAutomataException,SWIG_POINTER_OWN), "TransducersAreNotAutomataException", SWIGTYPE_p_TransducersAreNotAutomataException); SWIG_fail; - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducer_cross_product(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[4] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "HfstTransducer_cross_product", 0, 3, argv))) SWIG_fail; - --argc; - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_hfst__HfstTransducer, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_hfst__HfstTransducer, SWIG_POINTER_NO_NULL | 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_HfstTransducer_cross_product__SWIG_1(self, argc, argv); - } - } - } - if (argc == 3) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_hfst__HfstTransducer, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_hfst__HfstTransducer, SWIG_POINTER_NO_NULL | 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_bool(argv[2], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_HfstTransducer_cross_product__SWIG_0(self, argc, argv); - } - } - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'HfstTransducer_cross_product'.\n" - " Possible C/C++ prototypes are:\n" - " hfst::HfstTransducer::cross_product(hfst::HfstTransducer const &,bool)\n" - " hfst::HfstTransducer::cross_product(hfst::HfstTransducer const &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducer_shuffle__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - hfst::HfstTransducer *arg1 = (hfst::HfstTransducer *) 0 ; - hfst::HfstTransducer *arg2 = 0 ; - bool arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - bool val3 ; - int ecode3 = 0 ; - - if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__HfstTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducer_shuffle" "', argument " "1"" of type '" "hfst::HfstTransducer *""'"); - } - arg1 = reinterpret_cast< hfst::HfstTransducer * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_hfst__HfstTransducer, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HfstTransducer_shuffle" "', argument " "2"" of type '" "hfst::HfstTransducer const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstTransducer_shuffle" "', argument " "2"" of type '" "hfst::HfstTransducer const &""'"); - } - arg2 = reinterpret_cast< hfst::HfstTransducer * >(argp2); - ecode3 = SWIG_AsVal_bool(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "HfstTransducer_shuffle" "', argument " "3"" of type '" "bool""'"); - } - arg3 = static_cast< bool >(val3); - hfst_HfstTransducer_shuffle__SWIG_0(arg1,(hfst::HfstTransducer const &)*arg2,arg3); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducer_shuffle__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - hfst::HfstTransducer *arg1 = (hfst::HfstTransducer *) 0 ; - hfst::HfstTransducer *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__HfstTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducer_shuffle" "', argument " "1"" of type '" "hfst::HfstTransducer *""'"); - } - arg1 = reinterpret_cast< hfst::HfstTransducer * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_hfst__HfstTransducer, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HfstTransducer_shuffle" "', argument " "2"" of type '" "hfst::HfstTransducer const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstTransducer_shuffle" "', argument " "2"" of type '" "hfst::HfstTransducer const &""'"); - } - arg2 = reinterpret_cast< hfst::HfstTransducer * >(argp2); - hfst_HfstTransducer_shuffle__SWIG_0(arg1,(hfst::HfstTransducer const &)*arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducer_shuffle(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[4] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "HfstTransducer_shuffle", 0, 3, argv))) SWIG_fail; - --argc; - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_hfst__HfstTransducer, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_hfst__HfstTransducer, SWIG_POINTER_NO_NULL | 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_HfstTransducer_shuffle__SWIG_1(self, argc, argv); - } - } - } - if (argc == 3) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_hfst__HfstTransducer, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_hfst__HfstTransducer, SWIG_POINTER_NO_NULL | 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_bool(argv[2], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_HfstTransducer_shuffle__SWIG_0(self, argc, argv); - } - } - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'HfstTransducer_shuffle'.\n" - " Possible C/C++ prototypes are:\n" - " hfst::HfstTransducer::shuffle(hfst::HfstTransducer const &,bool)\n" - " hfst::HfstTransducer::shuffle(hfst::HfstTransducer const &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducer_remove_epsilons(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::HfstTransducer *arg1 = (hfst::HfstTransducer *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__HfstTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducer_remove_epsilons" "', argument " "1"" of type '" "hfst::HfstTransducer *""'"); - } - arg1 = reinterpret_cast< hfst::HfstTransducer * >(argp1); - hfst_HfstTransducer_remove_epsilons(arg1); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducer_determinize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::HfstTransducer *arg1 = (hfst::HfstTransducer *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__HfstTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducer_determinize" "', argument " "1"" of type '" "hfst::HfstTransducer *""'"); - } - arg1 = reinterpret_cast< hfst::HfstTransducer * >(argp1); - hfst_HfstTransducer_determinize(arg1); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducer_minimize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::HfstTransducer *arg1 = (hfst::HfstTransducer *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__HfstTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducer_minimize" "', argument " "1"" of type '" "hfst::HfstTransducer *""'"); - } - arg1 = reinterpret_cast< hfst::HfstTransducer * >(argp1); - hfst_HfstTransducer_minimize(arg1); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducer_prune(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::HfstTransducer *arg1 = (hfst::HfstTransducer *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__HfstTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducer_prune" "', argument " "1"" of type '" "hfst::HfstTransducer *""'"); - } - arg1 = reinterpret_cast< hfst::HfstTransducer * >(argp1); - hfst_HfstTransducer_prune(arg1); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducer_eliminate_flags(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::HfstTransducer *arg1 = (hfst::HfstTransducer *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__HfstTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducer_eliminate_flags" "', argument " "1"" of type '" "hfst::HfstTransducer *""'"); - } - arg1 = reinterpret_cast< hfst::HfstTransducer * >(argp1); - hfst_HfstTransducer_eliminate_flags(arg1); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducer_eliminate_flag(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::HfstTransducer *arg1 = (hfst::HfstTransducer *) 0 ; - std::string *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 = SWIG_OLDOBJ ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args, "HfstTransducer_eliminate_flag", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__HfstTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducer_eliminate_flag" "', argument " "1"" of type '" "hfst::HfstTransducer *""'"); - } - arg1 = reinterpret_cast< hfst::HfstTransducer * >(argp1); - { - std::string *ptr = (std::string *)0; - res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HfstTransducer_eliminate_flag" "', argument " "2"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstTransducer_eliminate_flag" "', argument " "2"" of type '" "std::string const &""'"); - } - arg2 = ptr; - } - try { - hfst_HfstTransducer_eliminate_flag(arg1,(std::string const &)*arg2); - } catch(HfstException &_e) { - SWIG_Python_Raise(SWIG_NewPointerObj((new HfstException(static_cast< const HfstException& >(_e))),SWIGTYPE_p_HfstException,SWIG_POINTER_OWN), "HfstException", SWIGTYPE_p_HfstException); SWIG_fail; - } - resultobj = SWIG_Py_Void(); - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducer_n_best(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::HfstTransducer *arg1 = (hfst::HfstTransducer *) 0 ; - unsigned int arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - unsigned int val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args, "HfstTransducer_n_best", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__HfstTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducer_n_best" "', argument " "1"" of type '" "hfst::HfstTransducer *""'"); - } - arg1 = reinterpret_cast< hfst::HfstTransducer * >(argp1); - ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HfstTransducer_n_best" "', argument " "2"" of type '" "unsigned int""'"); - } - arg2 = static_cast< unsigned int >(val2); - hfst_HfstTransducer_n_best(arg1,arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducer_convert(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::HfstTransducer *arg1 = (hfst::HfstTransducer *) 0 ; - hfst::ImplementationType arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args, "HfstTransducer_convert", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__HfstTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducer_convert" "', argument " "1"" of type '" "hfst::HfstTransducer *""'"); - } - arg1 = reinterpret_cast< hfst::HfstTransducer * >(argp1); - ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HfstTransducer_convert" "', argument " "2"" of type '" "hfst::ImplementationType""'"); - } - arg2 = static_cast< hfst::ImplementationType >(val2); - hfst_HfstTransducer_convert(arg1,arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducer_repeat_star(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::HfstTransducer *arg1 = (hfst::HfstTransducer *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__HfstTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducer_repeat_star" "', argument " "1"" of type '" "hfst::HfstTransducer *""'"); - } - arg1 = reinterpret_cast< hfst::HfstTransducer * >(argp1); - hfst_HfstTransducer_repeat_star(arg1); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducer_repeat_plus(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::HfstTransducer *arg1 = (hfst::HfstTransducer *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__HfstTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducer_repeat_plus" "', argument " "1"" of type '" "hfst::HfstTransducer *""'"); - } - arg1 = reinterpret_cast< hfst::HfstTransducer * >(argp1); - hfst_HfstTransducer_repeat_plus(arg1); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducer_repeat_n(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::HfstTransducer *arg1 = (hfst::HfstTransducer *) 0 ; - unsigned int arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - unsigned int val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args, "HfstTransducer_repeat_n", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__HfstTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducer_repeat_n" "', argument " "1"" of type '" "hfst::HfstTransducer *""'"); - } - arg1 = reinterpret_cast< hfst::HfstTransducer * >(argp1); - ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HfstTransducer_repeat_n" "', argument " "2"" of type '" "unsigned int""'"); - } - arg2 = static_cast< unsigned int >(val2); - hfst_HfstTransducer_repeat_n(arg1,arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducer_repeat_n_to_k(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::HfstTransducer *arg1 = (hfst::HfstTransducer *) 0 ; - unsigned int arg2 ; - unsigned int arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - unsigned int val2 ; - int ecode2 = 0 ; - unsigned int val3 ; - int ecode3 = 0 ; - PyObject *swig_obj[3] ; - - if (!SWIG_Python_UnpackTuple(args, "HfstTransducer_repeat_n_to_k", 3, 3, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__HfstTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducer_repeat_n_to_k" "', argument " "1"" of type '" "hfst::HfstTransducer *""'"); - } - arg1 = reinterpret_cast< hfst::HfstTransducer * >(argp1); - ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HfstTransducer_repeat_n_to_k" "', argument " "2"" of type '" "unsigned int""'"); - } - arg2 = static_cast< unsigned int >(val2); - ecode3 = SWIG_AsVal_unsigned_SS_int(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "HfstTransducer_repeat_n_to_k" "', argument " "3"" of type '" "unsigned int""'"); - } - arg3 = static_cast< unsigned int >(val3); - hfst_HfstTransducer_repeat_n_to_k(arg1,arg2,arg3); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducer_repeat_n_minus(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::HfstTransducer *arg1 = (hfst::HfstTransducer *) 0 ; - unsigned int arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - unsigned int val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args, "HfstTransducer_repeat_n_minus", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__HfstTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducer_repeat_n_minus" "', argument " "1"" of type '" "hfst::HfstTransducer *""'"); - } - arg1 = reinterpret_cast< hfst::HfstTransducer * >(argp1); - ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HfstTransducer_repeat_n_minus" "', argument " "2"" of type '" "unsigned int""'"); - } - arg2 = static_cast< unsigned int >(val2); - hfst_HfstTransducer_repeat_n_minus(arg1,arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducer_repeat_n_plus(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::HfstTransducer *arg1 = (hfst::HfstTransducer *) 0 ; - unsigned int arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - unsigned int val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args, "HfstTransducer_repeat_n_plus", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__HfstTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducer_repeat_n_plus" "', argument " "1"" of type '" "hfst::HfstTransducer *""'"); - } - arg1 = reinterpret_cast< hfst::HfstTransducer * >(argp1); - ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HfstTransducer_repeat_n_plus" "', argument " "2"" of type '" "unsigned int""'"); - } - arg2 = static_cast< unsigned int >(val2); - hfst_HfstTransducer_repeat_n_plus(arg1,arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducer_invert(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::HfstTransducer *arg1 = (hfst::HfstTransducer *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__HfstTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducer_invert" "', argument " "1"" of type '" "hfst::HfstTransducer *""'"); - } - arg1 = reinterpret_cast< hfst::HfstTransducer * >(argp1); - hfst_HfstTransducer_invert(arg1); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducer_reverse(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::HfstTransducer *arg1 = (hfst::HfstTransducer *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__HfstTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducer_reverse" "', argument " "1"" of type '" "hfst::HfstTransducer *""'"); - } - arg1 = reinterpret_cast< hfst::HfstTransducer * >(argp1); - hfst_HfstTransducer_reverse(arg1); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducer_input_project(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::HfstTransducer *arg1 = (hfst::HfstTransducer *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__HfstTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducer_input_project" "', argument " "1"" of type '" "hfst::HfstTransducer *""'"); - } - arg1 = reinterpret_cast< hfst::HfstTransducer * >(argp1); - hfst_HfstTransducer_input_project(arg1); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducer_output_project(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::HfstTransducer *arg1 = (hfst::HfstTransducer *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__HfstTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducer_output_project" "', argument " "1"" of type '" "hfst::HfstTransducer *""'"); - } - arg1 = reinterpret_cast< hfst::HfstTransducer * >(argp1); - hfst_HfstTransducer_output_project(arg1); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducer_optionalize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::HfstTransducer *arg1 = (hfst::HfstTransducer *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__HfstTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducer_optionalize" "', argument " "1"" of type '" "hfst::HfstTransducer *""'"); - } - arg1 = reinterpret_cast< hfst::HfstTransducer * >(argp1); - hfst_HfstTransducer_optionalize(arg1); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducer_insert_freely__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - hfst::HfstTransducer *arg1 = (hfst::HfstTransducer *) 0 ; - hfst::StringPair *arg2 = 0 ; - bool arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 = SWIG_OLDOBJ ; - bool val3 ; - int ecode3 = 0 ; - - if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__HfstTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducer_insert_freely" "', argument " "1"" of type '" "hfst::HfstTransducer *""'"); - } - arg1 = reinterpret_cast< hfst::HfstTransducer * >(argp1); - { - std::pair< std::string,std::string > *ptr = (std::pair< std::string,std::string > *)0; - res2 = swig::asptr(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HfstTransducer_insert_freely" "', argument " "2"" of type '" "hfst::StringPair const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstTransducer_insert_freely" "', argument " "2"" of type '" "hfst::StringPair const &""'"); - } - arg2 = ptr; - } - ecode3 = SWIG_AsVal_bool(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "HfstTransducer_insert_freely" "', argument " "3"" of type '" "bool""'"); - } - arg3 = static_cast< bool >(val3); - hfst_HfstTransducer_insert_freely__SWIG_0(arg1,(std::pair< std::string,std::string > const &)*arg2,arg3); - resultobj = SWIG_Py_Void(); - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducer_insert_freely__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - hfst::HfstTransducer *arg1 = (hfst::HfstTransducer *) 0 ; - hfst::StringPair *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 = SWIG_OLDOBJ ; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__HfstTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducer_insert_freely" "', argument " "1"" of type '" "hfst::HfstTransducer *""'"); - } - arg1 = reinterpret_cast< hfst::HfstTransducer * >(argp1); - { - std::pair< std::string,std::string > *ptr = (std::pair< std::string,std::string > *)0; - res2 = swig::asptr(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HfstTransducer_insert_freely" "', argument " "2"" of type '" "hfst::StringPair const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstTransducer_insert_freely" "', argument " "2"" of type '" "hfst::StringPair const &""'"); - } - arg2 = ptr; - } - hfst_HfstTransducer_insert_freely__SWIG_0(arg1,(std::pair< std::string,std::string > const &)*arg2); - resultobj = SWIG_Py_Void(); - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducer_insert_freely__SWIG_2(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - hfst::HfstTransducer *arg1 = (hfst::HfstTransducer *) 0 ; - hfst::HfstTransducer *arg2 = 0 ; - bool arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - bool val3 ; - int ecode3 = 0 ; - - if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__HfstTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducer_insert_freely" "', argument " "1"" of type '" "hfst::HfstTransducer *""'"); - } - arg1 = reinterpret_cast< hfst::HfstTransducer * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_hfst__HfstTransducer, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HfstTransducer_insert_freely" "', argument " "2"" of type '" "hfst::HfstTransducer const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstTransducer_insert_freely" "', argument " "2"" of type '" "hfst::HfstTransducer const &""'"); - } - arg2 = reinterpret_cast< hfst::HfstTransducer * >(argp2); - ecode3 = SWIG_AsVal_bool(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "HfstTransducer_insert_freely" "', argument " "3"" of type '" "bool""'"); - } - arg3 = static_cast< bool >(val3); - hfst_HfstTransducer_insert_freely__SWIG_2(arg1,(hfst::HfstTransducer const &)*arg2,arg3); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducer_insert_freely__SWIG_3(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - hfst::HfstTransducer *arg1 = (hfst::HfstTransducer *) 0 ; - hfst::HfstTransducer *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__HfstTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducer_insert_freely" "', argument " "1"" of type '" "hfst::HfstTransducer *""'"); - } - arg1 = reinterpret_cast< hfst::HfstTransducer * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_hfst__HfstTransducer, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HfstTransducer_insert_freely" "', argument " "2"" of type '" "hfst::HfstTransducer const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstTransducer_insert_freely" "', argument " "2"" of type '" "hfst::HfstTransducer const &""'"); - } - arg2 = reinterpret_cast< hfst::HfstTransducer * >(argp2); - hfst_HfstTransducer_insert_freely__SWIG_2(arg1,(hfst::HfstTransducer const &)*arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducer_insert_freely(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[4] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "HfstTransducer_insert_freely", 0, 3, argv))) SWIG_fail; - --argc; - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_hfst__HfstTransducer, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_hfst__HfstTransducer, SWIG_POINTER_NO_NULL | 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_HfstTransducer_insert_freely__SWIG_3(self, argc, argv); - } - } - } - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_hfst__HfstTransducer, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = swig::asptr(argv[1], (std::pair< std::string,std::string >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_HfstTransducer_insert_freely__SWIG_1(self, argc, argv); - } - } - } - if (argc == 3) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_hfst__HfstTransducer, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_hfst__HfstTransducer, SWIG_POINTER_NO_NULL | 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_bool(argv[2], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_HfstTransducer_insert_freely__SWIG_2(self, argc, argv); - } - } - } - } - if (argc == 3) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_hfst__HfstTransducer, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = swig::asptr(argv[1], (std::pair< std::string,std::string >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_bool(argv[2], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_HfstTransducer_insert_freely__SWIG_0(self, argc, argv); - } - } - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'HfstTransducer_insert_freely'.\n" - " Possible C/C++ prototypes are:\n" - " hfst::HfstTransducer::insert_freely(hfst::StringPair const &,bool)\n" - " hfst::HfstTransducer::insert_freely(hfst::StringPair const &)\n" - " hfst::HfstTransducer::insert_freely(hfst::HfstTransducer const &,bool)\n" - " hfst::HfstTransducer::insert_freely(hfst::HfstTransducer const &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducer__substitute_symbol__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - hfst::HfstTransducer *arg1 = (hfst::HfstTransducer *) 0 ; - std::string *arg2 = 0 ; - std::string *arg3 = 0 ; - bool arg4 ; - bool arg5 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 = SWIG_OLDOBJ ; - int res3 = SWIG_OLDOBJ ; - bool val4 ; - int ecode4 = 0 ; - bool val5 ; - int ecode5 = 0 ; - - if ((nobjs < 5) || (nobjs > 5)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__HfstTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducer__substitute_symbol" "', argument " "1"" of type '" "hfst::HfstTransducer *""'"); - } - arg1 = reinterpret_cast< hfst::HfstTransducer * >(argp1); - { - std::string *ptr = (std::string *)0; - res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HfstTransducer__substitute_symbol" "', argument " "2"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstTransducer__substitute_symbol" "', argument " "2"" of type '" "std::string const &""'"); - } - arg2 = ptr; - } - { - std::string *ptr = (std::string *)0; - res3 = SWIG_AsPtr_std_string(swig_obj[2], &ptr); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "HfstTransducer__substitute_symbol" "', argument " "3"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstTransducer__substitute_symbol" "', argument " "3"" of type '" "std::string const &""'"); - } - arg3 = ptr; - } - ecode4 = SWIG_AsVal_bool(swig_obj[3], &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "HfstTransducer__substitute_symbol" "', argument " "4"" of type '" "bool""'"); - } - arg4 = static_cast< bool >(val4); - ecode5 = SWIG_AsVal_bool(swig_obj[4], &val5); - if (!SWIG_IsOK(ecode5)) { - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "HfstTransducer__substitute_symbol" "', argument " "5"" of type '" "bool""'"); - } - arg5 = static_cast< bool >(val5); - hfst_HfstTransducer__substitute_symbol__SWIG_0(arg1,(std::string const &)*arg2,(std::string const &)*arg3,arg4,arg5); - resultobj = SWIG_Py_Void(); - if (SWIG_IsNewObj(res2)) delete arg2; - if (SWIG_IsNewObj(res3)) delete arg3; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - if (SWIG_IsNewObj(res3)) delete arg3; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducer__substitute_symbol__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - hfst::HfstTransducer *arg1 = (hfst::HfstTransducer *) 0 ; - std::string *arg2 = 0 ; - std::string *arg3 = 0 ; - bool arg4 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 = SWIG_OLDOBJ ; - int res3 = SWIG_OLDOBJ ; - bool val4 ; - int ecode4 = 0 ; - - if ((nobjs < 4) || (nobjs > 4)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__HfstTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducer__substitute_symbol" "', argument " "1"" of type '" "hfst::HfstTransducer *""'"); - } - arg1 = reinterpret_cast< hfst::HfstTransducer * >(argp1); - { - std::string *ptr = (std::string *)0; - res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HfstTransducer__substitute_symbol" "', argument " "2"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstTransducer__substitute_symbol" "', argument " "2"" of type '" "std::string const &""'"); - } - arg2 = ptr; - } - { - std::string *ptr = (std::string *)0; - res3 = SWIG_AsPtr_std_string(swig_obj[2], &ptr); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "HfstTransducer__substitute_symbol" "', argument " "3"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstTransducer__substitute_symbol" "', argument " "3"" of type '" "std::string const &""'"); - } - arg3 = ptr; - } - ecode4 = SWIG_AsVal_bool(swig_obj[3], &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "HfstTransducer__substitute_symbol" "', argument " "4"" of type '" "bool""'"); - } - arg4 = static_cast< bool >(val4); - hfst_HfstTransducer__substitute_symbol__SWIG_0(arg1,(std::string const &)*arg2,(std::string const &)*arg3,arg4); - resultobj = SWIG_Py_Void(); - if (SWIG_IsNewObj(res2)) delete arg2; - if (SWIG_IsNewObj(res3)) delete arg3; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - if (SWIG_IsNewObj(res3)) delete arg3; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducer__substitute_symbol__SWIG_2(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - hfst::HfstTransducer *arg1 = (hfst::HfstTransducer *) 0 ; - std::string *arg2 = 0 ; - std::string *arg3 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 = SWIG_OLDOBJ ; - int res3 = SWIG_OLDOBJ ; - - if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__HfstTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducer__substitute_symbol" "', argument " "1"" of type '" "hfst::HfstTransducer *""'"); - } - arg1 = reinterpret_cast< hfst::HfstTransducer * >(argp1); - { - std::string *ptr = (std::string *)0; - res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HfstTransducer__substitute_symbol" "', argument " "2"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstTransducer__substitute_symbol" "', argument " "2"" of type '" "std::string const &""'"); - } - arg2 = ptr; - } - { - std::string *ptr = (std::string *)0; - res3 = SWIG_AsPtr_std_string(swig_obj[2], &ptr); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "HfstTransducer__substitute_symbol" "', argument " "3"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstTransducer__substitute_symbol" "', argument " "3"" of type '" "std::string const &""'"); - } - arg3 = ptr; - } - hfst_HfstTransducer__substitute_symbol__SWIG_0(arg1,(std::string const &)*arg2,(std::string const &)*arg3); - resultobj = SWIG_Py_Void(); - if (SWIG_IsNewObj(res2)) delete arg2; - if (SWIG_IsNewObj(res3)) delete arg3; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - if (SWIG_IsNewObj(res3)) delete arg3; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducer__substitute_symbol(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[6] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "HfstTransducer__substitute_symbol", 0, 5, argv))) SWIG_fail; - --argc; - if (argc == 3) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_hfst__HfstTransducer, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_AsPtr_std_string(argv[1], (std::string**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_AsPtr_std_string(argv[2], (std::string**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_HfstTransducer__substitute_symbol__SWIG_2(self, argc, argv); - } - } - } - } - if (argc == 4) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_hfst__HfstTransducer, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_AsPtr_std_string(argv[1], (std::string**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_AsPtr_std_string(argv[2], (std::string**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_bool(argv[3], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_HfstTransducer__substitute_symbol__SWIG_1(self, argc, argv); - } - } - } - } - } - if (argc == 5) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_hfst__HfstTransducer, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_AsPtr_std_string(argv[1], (std::string**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_AsPtr_std_string(argv[2], (std::string**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_bool(argv[3], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - { - int res = SWIG_AsVal_bool(argv[4], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_HfstTransducer__substitute_symbol__SWIG_0(self, argc, argv); - } - } - } - } - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'HfstTransducer__substitute_symbol'.\n" - " Possible C/C++ prototypes are:\n" - " hfst::HfstTransducer::_substitute_symbol(std::string const &,std::string const &,bool,bool)\n" - " hfst::HfstTransducer::_substitute_symbol(std::string const &,std::string const &,bool)\n" - " hfst::HfstTransducer::_substitute_symbol(std::string const &,std::string const &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducer__substitute_symbol_pair(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::HfstTransducer *arg1 = (hfst::HfstTransducer *) 0 ; - hfst::StringPair *arg2 = 0 ; - hfst::StringPair *arg3 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 = SWIG_OLDOBJ ; - int res3 = SWIG_OLDOBJ ; - PyObject *swig_obj[3] ; - - if (!SWIG_Python_UnpackTuple(args, "HfstTransducer__substitute_symbol_pair", 3, 3, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__HfstTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducer__substitute_symbol_pair" "', argument " "1"" of type '" "hfst::HfstTransducer *""'"); - } - arg1 = reinterpret_cast< hfst::HfstTransducer * >(argp1); - { - std::pair< std::string,std::string > *ptr = (std::pair< std::string,std::string > *)0; - res2 = swig::asptr(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HfstTransducer__substitute_symbol_pair" "', argument " "2"" of type '" "hfst::StringPair const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstTransducer__substitute_symbol_pair" "', argument " "2"" of type '" "hfst::StringPair const &""'"); - } - arg2 = ptr; - } - { - std::pair< std::string,std::string > *ptr = (std::pair< std::string,std::string > *)0; - res3 = swig::asptr(swig_obj[2], &ptr); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "HfstTransducer__substitute_symbol_pair" "', argument " "3"" of type '" "hfst::StringPair const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstTransducer__substitute_symbol_pair" "', argument " "3"" of type '" "hfst::StringPair const &""'"); - } - arg3 = ptr; - } - hfst_HfstTransducer__substitute_symbol_pair(arg1,(std::pair< std::string,std::string > const &)*arg2,(std::pair< std::string,std::string > const &)*arg3); - resultobj = SWIG_Py_Void(); - if (SWIG_IsNewObj(res2)) delete arg2; - if (SWIG_IsNewObj(res3)) delete arg3; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - if (SWIG_IsNewObj(res3)) delete arg3; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducer__substitute_symbol_pair_with_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::HfstTransducer *arg1 = (hfst::HfstTransducer *) 0 ; - hfst::StringPair *arg2 = 0 ; - hfst::StringPairSet *arg3 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 = SWIG_OLDOBJ ; - int res3 = SWIG_OLDOBJ ; - PyObject *swig_obj[3] ; - - if (!SWIG_Python_UnpackTuple(args, "HfstTransducer__substitute_symbol_pair_with_set", 3, 3, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__HfstTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducer__substitute_symbol_pair_with_set" "', argument " "1"" of type '" "hfst::HfstTransducer *""'"); - } - arg1 = reinterpret_cast< hfst::HfstTransducer * >(argp1); - { - std::pair< std::string,std::string > *ptr = (std::pair< std::string,std::string > *)0; - res2 = swig::asptr(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HfstTransducer__substitute_symbol_pair_with_set" "', argument " "2"" of type '" "hfst::StringPair const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstTransducer__substitute_symbol_pair_with_set" "', argument " "2"" of type '" "hfst::StringPair const &""'"); - } - arg2 = ptr; - } - { - std::set< std::pair< std::string,std::string >,std::less< std::pair< std::string,std::string > >,std::allocator< std::pair< std::string,std::string > > > *ptr = (std::set< std::pair< std::string,std::string >,std::less< std::pair< std::string,std::string > >,std::allocator< std::pair< std::string,std::string > > > *)0; - res3 = swig::asptr(swig_obj[2], &ptr); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "HfstTransducer__substitute_symbol_pair_with_set" "', argument " "3"" of type '" "hfst::StringPairSet const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstTransducer__substitute_symbol_pair_with_set" "', argument " "3"" of type '" "hfst::StringPairSet const &""'"); - } - arg3 = ptr; - } - hfst_HfstTransducer__substitute_symbol_pair_with_set(arg1,(std::pair< std::string,std::string > const &)*arg2,(std::set< std::pair< std::string,std::string >,std::less< std::pair< std::string,std::string > >,std::allocator< std::pair< std::string,std::string > > > const &)*arg3); - resultobj = SWIG_Py_Void(); - if (SWIG_IsNewObj(res2)) delete arg2; - if (SWIG_IsNewObj(res3)) delete arg3; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - if (SWIG_IsNewObj(res3)) delete arg3; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducer__substitute_symbol_pair_with_transducer__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - hfst::HfstTransducer *arg1 = (hfst::HfstTransducer *) 0 ; - hfst::StringPair *arg2 = 0 ; - hfst::HfstTransducer *arg3 = 0 ; - bool arg4 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 = SWIG_OLDOBJ ; - void *argp3 = 0 ; - int res3 = 0 ; - bool val4 ; - int ecode4 = 0 ; - - if ((nobjs < 4) || (nobjs > 4)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__HfstTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducer__substitute_symbol_pair_with_transducer" "', argument " "1"" of type '" "hfst::HfstTransducer *""'"); - } - arg1 = reinterpret_cast< hfst::HfstTransducer * >(argp1); - { - std::pair< std::string,std::string > *ptr = (std::pair< std::string,std::string > *)0; - res2 = swig::asptr(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HfstTransducer__substitute_symbol_pair_with_transducer" "', argument " "2"" of type '" "hfst::StringPair const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstTransducer__substitute_symbol_pair_with_transducer" "', argument " "2"" of type '" "hfst::StringPair const &""'"); - } - arg2 = ptr; - } - res3 = SWIG_ConvertPtr(swig_obj[2], &argp3, SWIGTYPE_p_hfst__HfstTransducer, 0 ); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "HfstTransducer__substitute_symbol_pair_with_transducer" "', argument " "3"" of type '" "hfst::HfstTransducer &""'"); - } - if (!argp3) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstTransducer__substitute_symbol_pair_with_transducer" "', argument " "3"" of type '" "hfst::HfstTransducer &""'"); - } - arg3 = reinterpret_cast< hfst::HfstTransducer * >(argp3); - ecode4 = SWIG_AsVal_bool(swig_obj[3], &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "HfstTransducer__substitute_symbol_pair_with_transducer" "', argument " "4"" of type '" "bool""'"); - } - arg4 = static_cast< bool >(val4); - hfst_HfstTransducer__substitute_symbol_pair_with_transducer__SWIG_0(arg1,(std::pair< std::string,std::string > const &)*arg2,*arg3,arg4); - resultobj = SWIG_Py_Void(); - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducer__substitute_symbol_pair_with_transducer__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - hfst::HfstTransducer *arg1 = (hfst::HfstTransducer *) 0 ; - hfst::StringPair *arg2 = 0 ; - hfst::HfstTransducer *arg3 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 = SWIG_OLDOBJ ; - void *argp3 = 0 ; - int res3 = 0 ; - - if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__HfstTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducer__substitute_symbol_pair_with_transducer" "', argument " "1"" of type '" "hfst::HfstTransducer *""'"); - } - arg1 = reinterpret_cast< hfst::HfstTransducer * >(argp1); - { - std::pair< std::string,std::string > *ptr = (std::pair< std::string,std::string > *)0; - res2 = swig::asptr(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HfstTransducer__substitute_symbol_pair_with_transducer" "', argument " "2"" of type '" "hfst::StringPair const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstTransducer__substitute_symbol_pair_with_transducer" "', argument " "2"" of type '" "hfst::StringPair const &""'"); - } - arg2 = ptr; - } - res3 = SWIG_ConvertPtr(swig_obj[2], &argp3, SWIGTYPE_p_hfst__HfstTransducer, 0 ); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "HfstTransducer__substitute_symbol_pair_with_transducer" "', argument " "3"" of type '" "hfst::HfstTransducer &""'"); - } - if (!argp3) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstTransducer__substitute_symbol_pair_with_transducer" "', argument " "3"" of type '" "hfst::HfstTransducer &""'"); - } - arg3 = reinterpret_cast< hfst::HfstTransducer * >(argp3); - hfst_HfstTransducer__substitute_symbol_pair_with_transducer__SWIG_0(arg1,(std::pair< std::string,std::string > const &)*arg2,*arg3); - resultobj = SWIG_Py_Void(); - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducer__substitute_symbol_pair_with_transducer(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[5] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "HfstTransducer__substitute_symbol_pair_with_transducer", 0, 4, argv))) SWIG_fail; - --argc; - if (argc == 3) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_hfst__HfstTransducer, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = swig::asptr(argv[1], (std::pair< std::string,std::string >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_hfst__HfstTransducer, SWIG_POINTER_NO_NULL); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_HfstTransducer__substitute_symbol_pair_with_transducer__SWIG_1(self, argc, argv); - } - } - } - } - if (argc == 4) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_hfst__HfstTransducer, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = swig::asptr(argv[1], (std::pair< std::string,std::string >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_hfst__HfstTransducer, SWIG_POINTER_NO_NULL); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_bool(argv[3], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_HfstTransducer__substitute_symbol_pair_with_transducer__SWIG_0(self, argc, argv); - } - } - } - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'HfstTransducer__substitute_symbol_pair_with_transducer'.\n" - " Possible C/C++ prototypes are:\n" - " hfst::HfstTransducer::_substitute_symbol_pair_with_transducer(hfst::StringPair const &,hfst::HfstTransducer &,bool)\n" - " hfst::HfstTransducer::_substitute_symbol_pair_with_transducer(hfst::StringPair const &,hfst::HfstTransducer &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducer__substitute_symbols(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::HfstTransducer *arg1 = (hfst::HfstTransducer *) 0 ; - hfst::HfstSymbolSubstitutions *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 = SWIG_OLDOBJ ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args, "HfstTransducer__substitute_symbols", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__HfstTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducer__substitute_symbols" "', argument " "1"" of type '" "hfst::HfstTransducer *""'"); - } - arg1 = reinterpret_cast< hfst::HfstTransducer * >(argp1); - { - std::map< std::string,std::string,std::less< std::string >,std::allocator< std::pair< std::string const,std::string > > > *ptr = (std::map< std::string,std::string,std::less< std::string >,std::allocator< std::pair< std::string const,std::string > > > *)0; - res2 = swig::asptr(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HfstTransducer__substitute_symbols" "', argument " "2"" of type '" "hfst::HfstSymbolSubstitutions const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstTransducer__substitute_symbols" "', argument " "2"" of type '" "hfst::HfstSymbolSubstitutions const &""'"); - } - arg2 = ptr; - } - hfst_HfstTransducer__substitute_symbols(arg1,(std::map< std::string,std::string,std::less< std::string >,std::allocator< std::pair< std::string const,std::string > > > const &)*arg2); - resultobj = SWIG_Py_Void(); - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducer__substitute_symbol_pairs(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::HfstTransducer *arg1 = (hfst::HfstTransducer *) 0 ; - hfst::HfstSymbolPairSubstitutions *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 = SWIG_OLDOBJ ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args, "HfstTransducer__substitute_symbol_pairs", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__HfstTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducer__substitute_symbol_pairs" "', argument " "1"" of type '" "hfst::HfstTransducer *""'"); - } - arg1 = reinterpret_cast< hfst::HfstTransducer * >(argp1); - { - std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string >,std::less< std::pair< std::string,std::string > >,std::allocator< std::pair< std::pair< std::string,std::string > const,std::pair< std::string,std::string > > > > *ptr = (std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string >,std::less< std::pair< std::string,std::string > >,std::allocator< std::pair< std::pair< std::string,std::string > const,std::pair< std::string,std::string > > > > *)0; - res2 = swig::asptr(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HfstTransducer__substitute_symbol_pairs" "', argument " "2"" of type '" "hfst::HfstSymbolPairSubstitutions const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstTransducer__substitute_symbol_pairs" "', argument " "2"" of type '" "hfst::HfstSymbolPairSubstitutions const &""'"); - } - arg2 = ptr; - } - hfst_HfstTransducer__substitute_symbol_pairs(arg1,(std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string >,std::less< std::pair< std::string,std::string > >,std::allocator< std::pair< std::pair< std::string,std::string > const,std::pair< std::string,std::string > > > > const &)*arg2); - resultobj = SWIG_Py_Void(); - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducer_set_final_weights__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - hfst::HfstTransducer *arg1 = (hfst::HfstTransducer *) 0 ; - float arg2 ; - bool arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - float val2 ; - int ecode2 = 0 ; - bool val3 ; - int ecode3 = 0 ; - - if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__HfstTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducer_set_final_weights" "', argument " "1"" of type '" "hfst::HfstTransducer *""'"); - } - arg1 = reinterpret_cast< hfst::HfstTransducer * >(argp1); - ecode2 = SWIG_AsVal_float(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HfstTransducer_set_final_weights" "', argument " "2"" of type '" "float""'"); - } - arg2 = static_cast< float >(val2); - ecode3 = SWIG_AsVal_bool(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "HfstTransducer_set_final_weights" "', argument " "3"" of type '" "bool""'"); - } - arg3 = static_cast< bool >(val3); - hfst_HfstTransducer_set_final_weights__SWIG_0(arg1,arg2,arg3); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducer_set_final_weights__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - hfst::HfstTransducer *arg1 = (hfst::HfstTransducer *) 0 ; - float arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - float val2 ; - int ecode2 = 0 ; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__HfstTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducer_set_final_weights" "', argument " "1"" of type '" "hfst::HfstTransducer *""'"); - } - arg1 = reinterpret_cast< hfst::HfstTransducer * >(argp1); - ecode2 = SWIG_AsVal_float(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HfstTransducer_set_final_weights" "', argument " "2"" of type '" "float""'"); - } - arg2 = static_cast< float >(val2); - hfst_HfstTransducer_set_final_weights__SWIG_0(arg1,arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducer_set_final_weights(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[4] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "HfstTransducer_set_final_weights", 0, 3, argv))) SWIG_fail; - --argc; - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_hfst__HfstTransducer, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_float(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_HfstTransducer_set_final_weights__SWIG_1(self, argc, argv); - } - } - } - if (argc == 3) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_hfst__HfstTransducer, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_float(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - { - int res = SWIG_AsVal_bool(argv[2], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_HfstTransducer_set_final_weights__SWIG_0(self, argc, argv); - } - } - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'HfstTransducer_set_final_weights'.\n" - " Possible C/C++ prototypes are:\n" - " hfst::HfstTransducer::set_final_weights(float,bool)\n" - " hfst::HfstTransducer::set_final_weights(float)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducer_push_weights_to_start(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::HfstTransducer *arg1 = (hfst::HfstTransducer *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__HfstTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducer_push_weights_to_start" "', argument " "1"" of type '" "hfst::HfstTransducer *""'"); - } - arg1 = reinterpret_cast< hfst::HfstTransducer * >(argp1); - hfst_HfstTransducer_push_weights_to_start(arg1); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducer_push_weights_to_end(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::HfstTransducer *arg1 = (hfst::HfstTransducer *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__HfstTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducer_push_weights_to_end" "', argument " "1"" of type '" "hfst::HfstTransducer *""'"); - } - arg1 = reinterpret_cast< hfst::HfstTransducer * >(argp1); - hfst_HfstTransducer_push_weights_to_end(arg1); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducer_minus__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - hfst::HfstTransducer *arg1 = (hfst::HfstTransducer *) 0 ; - hfst::HfstTransducer *arg2 = 0 ; - bool arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - bool val3 ; - int ecode3 = 0 ; - - if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__HfstTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducer_minus" "', argument " "1"" of type '" "hfst::HfstTransducer *""'"); - } - arg1 = reinterpret_cast< hfst::HfstTransducer * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_hfst__HfstTransducer, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HfstTransducer_minus" "', argument " "2"" of type '" "hfst::HfstTransducer const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstTransducer_minus" "', argument " "2"" of type '" "hfst::HfstTransducer const &""'"); - } - arg2 = reinterpret_cast< hfst::HfstTransducer * >(argp2); - ecode3 = SWIG_AsVal_bool(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "HfstTransducer_minus" "', argument " "3"" of type '" "bool""'"); - } - arg3 = static_cast< bool >(val3); - hfst_HfstTransducer_minus__SWIG_0(arg1,(hfst::HfstTransducer const &)*arg2,arg3); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducer_minus__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - hfst::HfstTransducer *arg1 = (hfst::HfstTransducer *) 0 ; - hfst::HfstTransducer *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__HfstTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducer_minus" "', argument " "1"" of type '" "hfst::HfstTransducer *""'"); - } - arg1 = reinterpret_cast< hfst::HfstTransducer * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_hfst__HfstTransducer, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HfstTransducer_minus" "', argument " "2"" of type '" "hfst::HfstTransducer const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstTransducer_minus" "', argument " "2"" of type '" "hfst::HfstTransducer const &""'"); - } - arg2 = reinterpret_cast< hfst::HfstTransducer * >(argp2); - hfst_HfstTransducer_minus__SWIG_0(arg1,(hfst::HfstTransducer const &)*arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducer_minus(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[4] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "HfstTransducer_minus", 0, 3, argv))) SWIG_fail; - --argc; - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_hfst__HfstTransducer, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_hfst__HfstTransducer, SWIG_POINTER_NO_NULL | 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_HfstTransducer_minus__SWIG_1(self, argc, argv); - } - } - } - if (argc == 3) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_hfst__HfstTransducer, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_hfst__HfstTransducer, SWIG_POINTER_NO_NULL | 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_bool(argv[2], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_HfstTransducer_minus__SWIG_0(self, argc, argv); - } - } - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'HfstTransducer_minus'.\n" - " Possible C/C++ prototypes are:\n" - " hfst::HfstTransducer::minus(hfst::HfstTransducer const &,bool)\n" - " hfst::HfstTransducer::minus(hfst::HfstTransducer const &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducer_conjunct__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - hfst::HfstTransducer *arg1 = (hfst::HfstTransducer *) 0 ; - hfst::HfstTransducer *arg2 = 0 ; - bool arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - bool val3 ; - int ecode3 = 0 ; - - if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__HfstTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducer_conjunct" "', argument " "1"" of type '" "hfst::HfstTransducer *""'"); - } - arg1 = reinterpret_cast< hfst::HfstTransducer * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_hfst__HfstTransducer, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HfstTransducer_conjunct" "', argument " "2"" of type '" "hfst::HfstTransducer const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstTransducer_conjunct" "', argument " "2"" of type '" "hfst::HfstTransducer const &""'"); - } - arg2 = reinterpret_cast< hfst::HfstTransducer * >(argp2); - ecode3 = SWIG_AsVal_bool(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "HfstTransducer_conjunct" "', argument " "3"" of type '" "bool""'"); - } - arg3 = static_cast< bool >(val3); - hfst_HfstTransducer_conjunct__SWIG_0(arg1,(hfst::HfstTransducer const &)*arg2,arg3); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducer_conjunct__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - hfst::HfstTransducer *arg1 = (hfst::HfstTransducer *) 0 ; - hfst::HfstTransducer *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__HfstTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducer_conjunct" "', argument " "1"" of type '" "hfst::HfstTransducer *""'"); - } - arg1 = reinterpret_cast< hfst::HfstTransducer * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_hfst__HfstTransducer, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HfstTransducer_conjunct" "', argument " "2"" of type '" "hfst::HfstTransducer const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstTransducer_conjunct" "', argument " "2"" of type '" "hfst::HfstTransducer const &""'"); - } - arg2 = reinterpret_cast< hfst::HfstTransducer * >(argp2); - hfst_HfstTransducer_conjunct__SWIG_0(arg1,(hfst::HfstTransducer const &)*arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducer_conjunct(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[4] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "HfstTransducer_conjunct", 0, 3, argv))) SWIG_fail; - --argc; - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_hfst__HfstTransducer, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_hfst__HfstTransducer, SWIG_POINTER_NO_NULL | 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_HfstTransducer_conjunct__SWIG_1(self, argc, argv); - } - } - } - if (argc == 3) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_hfst__HfstTransducer, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_hfst__HfstTransducer, SWIG_POINTER_NO_NULL | 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_bool(argv[2], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_HfstTransducer_conjunct__SWIG_0(self, argc, argv); - } - } - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'HfstTransducer_conjunct'.\n" - " Possible C/C++ prototypes are:\n" - " hfst::HfstTransducer::conjunct(hfst::HfstTransducer const &,bool)\n" - " hfst::HfstTransducer::conjunct(hfst::HfstTransducer const &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducer_lookup_optimize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::HfstTransducer *arg1 = (hfst::HfstTransducer *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__HfstTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducer_lookup_optimize" "', argument " "1"" of type '" "hfst::HfstTransducer *""'"); - } - arg1 = reinterpret_cast< hfst::HfstTransducer * >(argp1); - hfst_HfstTransducer_lookup_optimize(arg1); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducer_remove_optimization(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::HfstTransducer *arg1 = (hfst::HfstTransducer *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__HfstTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducer_remove_optimization" "', argument " "1"" of type '" "hfst::HfstTransducer *""'"); - } - arg1 = reinterpret_cast< hfst::HfstTransducer * >(argp1); - hfst_HfstTransducer_remove_optimization(arg1); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_HfstTransducer__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **SWIGUNUSEDPARM(swig_obj)) { - PyObject *resultobj = 0; - hfst::HfstTransducer *result = 0 ; - - if ((nobjs < 0) || (nobjs > 0)) SWIG_fail; - result = (hfst::HfstTransducer *)new_hfst_HfstTransducer__SWIG_0(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_hfst__HfstTransducer, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_HfstTransducer__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - hfst::HfstTransducer *arg1 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - hfst::HfstTransducer *result = 0 ; - - if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_hfst__HfstTransducer, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_HfstTransducer" "', argument " "1"" of type '" "hfst::HfstTransducer const &""'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_HfstTransducer" "', argument " "1"" of type '" "hfst::HfstTransducer const &""'"); - } - arg1 = reinterpret_cast< hfst::HfstTransducer * >(argp1); - result = (hfst::HfstTransducer *)new_hfst_HfstTransducer__SWIG_1((hfst::HfstTransducer const &)*arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_hfst__HfstTransducer, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_HfstTransducer__SWIG_2(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - hfst::implementations::HfstBasicTransducer *arg1 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - hfst::HfstTransducer *result = 0 ; - - if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_hfst__implementations__HfstBasicTransducer, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_HfstTransducer" "', argument " "1"" of type '" "hfst::implementations::HfstBasicTransducer const &""'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_HfstTransducer" "', argument " "1"" of type '" "hfst::implementations::HfstBasicTransducer const &""'"); - } - arg1 = reinterpret_cast< hfst::implementations::HfstBasicTransducer * >(argp1); - result = (hfst::HfstTransducer *)new_hfst_HfstTransducer__SWIG_2((hfst::implementations::HfstBasicTransducer const &)*arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_hfst__HfstTransducer, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_HfstTransducer__SWIG_3(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - hfst::implementations::HfstBasicTransducer *arg1 = 0 ; - hfst::ImplementationType arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - hfst::HfstTransducer *result = 0 ; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_hfst__implementations__HfstBasicTransducer, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_HfstTransducer" "', argument " "1"" of type '" "hfst::implementations::HfstBasicTransducer const &""'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_HfstTransducer" "', argument " "1"" of type '" "hfst::implementations::HfstBasicTransducer const &""'"); - } - arg1 = reinterpret_cast< hfst::implementations::HfstBasicTransducer * >(argp1); - ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_HfstTransducer" "', argument " "2"" of type '" "hfst::ImplementationType""'"); - } - arg2 = static_cast< hfst::ImplementationType >(val2); - result = (hfst::HfstTransducer *)new_hfst_HfstTransducer__SWIG_3((hfst::implementations::HfstBasicTransducer const &)*arg1,arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_hfst__HfstTransducer, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_HfstTransducer(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[3] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "new_HfstTransducer", 0, 2, argv))) SWIG_fail; - --argc; - if (argc == 0) { - return _wrap_new_HfstTransducer__SWIG_0(self, argc, argv); - } - if (argc == 1) { - int _v; - int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_hfst__HfstTransducer, SWIG_POINTER_NO_NULL | 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_new_HfstTransducer__SWIG_1(self, argc, argv); - } - } - if (argc == 1) { - int _v; - int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_hfst__implementations__HfstBasicTransducer, SWIG_POINTER_NO_NULL | 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_new_HfstTransducer__SWIG_2(self, argc, argv); - } - } - if (argc == 2) { - int _v; - int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_hfst__implementations__HfstBasicTransducer, SWIG_POINTER_NO_NULL | 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_int(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_new_HfstTransducer__SWIG_3(self, argc, argv); - } - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'new_HfstTransducer'.\n" - " Possible C/C++ prototypes are:\n" - " hfst::HfstTransducer::HfstTransducer()\n" - " hfst::HfstTransducer::HfstTransducer(hfst::HfstTransducer const &)\n" - " hfst::HfstTransducer::HfstTransducer(hfst::implementations::HfstBasicTransducer const &)\n" - " hfst::HfstTransducer::HfstTransducer(hfst::implementations::HfstBasicTransducer const &,hfst::ImplementationType)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_delete_HfstTransducer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::HfstTransducer *arg1 = (hfst::HfstTransducer *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__HfstTransducer, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_HfstTransducer" "', argument " "1"" of type '" "hfst::HfstTransducer *""'"); - } - arg1 = reinterpret_cast< hfst::HfstTransducer * >(argp1); - delete_hfst_HfstTransducer(arg1); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducer___str__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::HfstTransducer *arg1 = (hfst::HfstTransducer *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - char *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__HfstTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducer___str__" "', argument " "1"" of type '" "hfst::HfstTransducer *""'"); - } - arg1 = reinterpret_cast< hfst::HfstTransducer * >(argp1); - result = (char *)hfst_HfstTransducer___str__(arg1); - resultobj = SWIG_FromCharPtr((const char *)result); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducer_write(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::HfstTransducer *arg1 = (hfst::HfstTransducer *) 0 ; - hfst::HfstOutputStream *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args, "HfstTransducer_write", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__HfstTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducer_write" "', argument " "1"" of type '" "hfst::HfstTransducer *""'"); - } - arg1 = reinterpret_cast< hfst::HfstTransducer * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_hfst__HfstOutputStream, 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HfstTransducer_write" "', argument " "2"" of type '" "hfst::HfstOutputStream &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstTransducer_write" "', argument " "2"" of type '" "hfst::HfstOutputStream &""'"); - } - arg2 = reinterpret_cast< hfst::HfstOutputStream * >(argp2); - hfst_HfstTransducer_write(arg1,*arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducer__extract_shortest_paths(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::HfstTransducer *arg1 = (hfst::HfstTransducer *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - hfst::HfstTwoLevelPaths result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__HfstTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducer__extract_shortest_paths" "', argument " "1"" of type '" "hfst::HfstTransducer *""'"); - } - arg1 = reinterpret_cast< hfst::HfstTransducer * >(argp1); - result = hfst_HfstTransducer__extract_shortest_paths(arg1); - resultobj = swig::from(static_cast< std::set< std::pair< float,std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > > >,std::less< std::pair< float,std::vector< std::pair< std::string,std::string > > > >,std::allocator< std::pair< float,std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > > > > > >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducer__extract_longest_paths(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::HfstTransducer *arg1 = (hfst::HfstTransducer *) 0 ; - bool arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - bool val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - hfst::HfstTwoLevelPaths result; - - if (!SWIG_Python_UnpackTuple(args, "HfstTransducer__extract_longest_paths", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__HfstTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducer__extract_longest_paths" "', argument " "1"" of type '" "hfst::HfstTransducer *""'"); - } - arg1 = reinterpret_cast< hfst::HfstTransducer * >(argp1); - ecode2 = SWIG_AsVal_bool(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HfstTransducer__extract_longest_paths" "', argument " "2"" of type '" "bool""'"); - } - arg2 = static_cast< bool >(val2); - result = hfst_HfstTransducer__extract_longest_paths(arg1,arg2); - resultobj = swig::from(static_cast< std::set< std::pair< float,std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > > >,std::less< std::pair< float,std::vector< std::pair< std::string,std::string > > > >,std::allocator< std::pair< float,std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > > > > > >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducer__extract_paths__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - hfst::HfstTransducer *arg1 = (hfst::HfstTransducer *) 0 ; - int arg2 ; - int arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - int val3 ; - int ecode3 = 0 ; - hfst::HfstTwoLevelPaths result; - - if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__HfstTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducer__extract_paths" "', argument " "1"" of type '" "hfst::HfstTransducer const *""'"); - } - arg1 = reinterpret_cast< hfst::HfstTransducer * >(argp1); - ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HfstTransducer__extract_paths" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - ecode3 = SWIG_AsVal_int(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "HfstTransducer__extract_paths" "', argument " "3"" of type '" "int""'"); - } - arg3 = static_cast< int >(val3); - try { - result = hfst_HfstTransducer__extract_paths__SWIG_0((hfst::HfstTransducer const *)arg1,arg2,arg3); - } catch(TransducerIsCyclicException &_e) { - SWIG_Python_Raise(SWIG_NewPointerObj((new TransducerIsCyclicException(static_cast< const TransducerIsCyclicException& >(_e))),SWIGTYPE_p_TransducerIsCyclicException,SWIG_POINTER_OWN), "TransducerIsCyclicException", SWIGTYPE_p_TransducerIsCyclicException); SWIG_fail; - } - resultobj = swig::from(static_cast< std::set< std::pair< float,std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > > >,std::less< std::pair< float,std::vector< std::pair< std::string,std::string > > > >,std::allocator< std::pair< float,std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > > > > > >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducer__extract_paths__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - hfst::HfstTransducer *arg1 = (hfst::HfstTransducer *) 0 ; - int arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - hfst::HfstTwoLevelPaths result; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__HfstTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducer__extract_paths" "', argument " "1"" of type '" "hfst::HfstTransducer const *""'"); - } - arg1 = reinterpret_cast< hfst::HfstTransducer * >(argp1); - ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HfstTransducer__extract_paths" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - try { - result = hfst_HfstTransducer__extract_paths__SWIG_0((hfst::HfstTransducer const *)arg1,arg2); - } catch(TransducerIsCyclicException &_e) { - SWIG_Python_Raise(SWIG_NewPointerObj((new TransducerIsCyclicException(static_cast< const TransducerIsCyclicException& >(_e))),SWIGTYPE_p_TransducerIsCyclicException,SWIG_POINTER_OWN), "TransducerIsCyclicException", SWIGTYPE_p_TransducerIsCyclicException); SWIG_fail; - } - resultobj = swig::from(static_cast< std::set< std::pair< float,std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > > >,std::less< std::pair< float,std::vector< std::pair< std::string,std::string > > > >,std::allocator< std::pair< float,std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > > > > > >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducer__extract_paths__SWIG_2(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - hfst::HfstTransducer *arg1 = (hfst::HfstTransducer *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - hfst::HfstTwoLevelPaths result; - - if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__HfstTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducer__extract_paths" "', argument " "1"" of type '" "hfst::HfstTransducer const *""'"); - } - arg1 = reinterpret_cast< hfst::HfstTransducer * >(argp1); - try { - result = hfst_HfstTransducer__extract_paths__SWIG_0((hfst::HfstTransducer const *)arg1); - } catch(TransducerIsCyclicException &_e) { - SWIG_Python_Raise(SWIG_NewPointerObj((new TransducerIsCyclicException(static_cast< const TransducerIsCyclicException& >(_e))),SWIGTYPE_p_TransducerIsCyclicException,SWIG_POINTER_OWN), "TransducerIsCyclicException", SWIGTYPE_p_TransducerIsCyclicException); SWIG_fail; - } - resultobj = swig::from(static_cast< std::set< std::pair< float,std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > > >,std::less< std::pair< float,std::vector< std::pair< std::string,std::string > > > >,std::allocator< std::pair< float,std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > > > > > >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducer__extract_paths(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[4] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "HfstTransducer__extract_paths", 0, 3, argv))) SWIG_fail; - --argc; - if (argc == 1) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_hfst__HfstTransducer, 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_HfstTransducer__extract_paths__SWIG_2(self, argc, argv); - } - } - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_hfst__HfstTransducer, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_int(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_HfstTransducer__extract_paths__SWIG_1(self, argc, argv); - } - } - } - if (argc == 3) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_hfst__HfstTransducer, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_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_HfstTransducer__extract_paths__SWIG_0(self, argc, argv); - } - } - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'HfstTransducer__extract_paths'.\n" - " Possible C/C++ prototypes are:\n" - " hfst::HfstTransducer::_extract_paths(int,int) const\n" - " hfst::HfstTransducer::_extract_paths(int) const\n" - " hfst::HfstTransducer::_extract_paths() const\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducer__extract_paths_fd__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - hfst::HfstTransducer *arg1 = (hfst::HfstTransducer *) 0 ; - int arg2 ; - int arg3 ; - bool arg4 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - int val3 ; - int ecode3 = 0 ; - bool val4 ; - int ecode4 = 0 ; - hfst::HfstTwoLevelPaths result; - - if ((nobjs < 4) || (nobjs > 4)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__HfstTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducer__extract_paths_fd" "', argument " "1"" of type '" "hfst::HfstTransducer const *""'"); - } - arg1 = reinterpret_cast< hfst::HfstTransducer * >(argp1); - ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HfstTransducer__extract_paths_fd" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - ecode3 = SWIG_AsVal_int(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "HfstTransducer__extract_paths_fd" "', argument " "3"" of type '" "int""'"); - } - arg3 = static_cast< int >(val3); - ecode4 = SWIG_AsVal_bool(swig_obj[3], &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "HfstTransducer__extract_paths_fd" "', argument " "4"" of type '" "bool""'"); - } - arg4 = static_cast< bool >(val4); - try { - result = hfst_HfstTransducer__extract_paths_fd__SWIG_0((hfst::HfstTransducer const *)arg1,arg2,arg3,arg4); - } catch(TransducerIsCyclicException &_e) { - SWIG_Python_Raise(SWIG_NewPointerObj((new TransducerIsCyclicException(static_cast< const TransducerIsCyclicException& >(_e))),SWIGTYPE_p_TransducerIsCyclicException,SWIG_POINTER_OWN), "TransducerIsCyclicException", SWIGTYPE_p_TransducerIsCyclicException); SWIG_fail; - } - resultobj = swig::from(static_cast< std::set< std::pair< float,std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > > >,std::less< std::pair< float,std::vector< std::pair< std::string,std::string > > > >,std::allocator< std::pair< float,std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > > > > > >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducer__extract_paths_fd__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - hfst::HfstTransducer *arg1 = (hfst::HfstTransducer *) 0 ; - int arg2 ; - int arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - int val3 ; - int ecode3 = 0 ; - hfst::HfstTwoLevelPaths result; - - if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__HfstTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducer__extract_paths_fd" "', argument " "1"" of type '" "hfst::HfstTransducer const *""'"); - } - arg1 = reinterpret_cast< hfst::HfstTransducer * >(argp1); - ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HfstTransducer__extract_paths_fd" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - ecode3 = SWIG_AsVal_int(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "HfstTransducer__extract_paths_fd" "', argument " "3"" of type '" "int""'"); - } - arg3 = static_cast< int >(val3); - try { - result = hfst_HfstTransducer__extract_paths_fd__SWIG_0((hfst::HfstTransducer const *)arg1,arg2,arg3); - } catch(TransducerIsCyclicException &_e) { - SWIG_Python_Raise(SWIG_NewPointerObj((new TransducerIsCyclicException(static_cast< const TransducerIsCyclicException& >(_e))),SWIGTYPE_p_TransducerIsCyclicException,SWIG_POINTER_OWN), "TransducerIsCyclicException", SWIGTYPE_p_TransducerIsCyclicException); SWIG_fail; - } - resultobj = swig::from(static_cast< std::set< std::pair< float,std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > > >,std::less< std::pair< float,std::vector< std::pair< std::string,std::string > > > >,std::allocator< std::pair< float,std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > > > > > >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducer__extract_paths_fd__SWIG_2(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - hfst::HfstTransducer *arg1 = (hfst::HfstTransducer *) 0 ; - int arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - hfst::HfstTwoLevelPaths result; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__HfstTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducer__extract_paths_fd" "', argument " "1"" of type '" "hfst::HfstTransducer const *""'"); - } - arg1 = reinterpret_cast< hfst::HfstTransducer * >(argp1); - ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HfstTransducer__extract_paths_fd" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - try { - result = hfst_HfstTransducer__extract_paths_fd__SWIG_0((hfst::HfstTransducer const *)arg1,arg2); - } catch(TransducerIsCyclicException &_e) { - SWIG_Python_Raise(SWIG_NewPointerObj((new TransducerIsCyclicException(static_cast< const TransducerIsCyclicException& >(_e))),SWIGTYPE_p_TransducerIsCyclicException,SWIG_POINTER_OWN), "TransducerIsCyclicException", SWIGTYPE_p_TransducerIsCyclicException); SWIG_fail; - } - resultobj = swig::from(static_cast< std::set< std::pair< float,std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > > >,std::less< std::pair< float,std::vector< std::pair< std::string,std::string > > > >,std::allocator< std::pair< float,std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > > > > > >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducer__extract_paths_fd__SWIG_3(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - hfst::HfstTransducer *arg1 = (hfst::HfstTransducer *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - hfst::HfstTwoLevelPaths result; - - if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__HfstTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducer__extract_paths_fd" "', argument " "1"" of type '" "hfst::HfstTransducer const *""'"); - } - arg1 = reinterpret_cast< hfst::HfstTransducer * >(argp1); - try { - result = hfst_HfstTransducer__extract_paths_fd__SWIG_0((hfst::HfstTransducer const *)arg1); - } catch(TransducerIsCyclicException &_e) { - SWIG_Python_Raise(SWIG_NewPointerObj((new TransducerIsCyclicException(static_cast< const TransducerIsCyclicException& >(_e))),SWIGTYPE_p_TransducerIsCyclicException,SWIG_POINTER_OWN), "TransducerIsCyclicException", SWIGTYPE_p_TransducerIsCyclicException); SWIG_fail; - } - resultobj = swig::from(static_cast< std::set< std::pair< float,std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > > >,std::less< std::pair< float,std::vector< std::pair< std::string,std::string > > > >,std::allocator< std::pair< float,std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > > > > > >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducer__extract_paths_fd(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[5] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "HfstTransducer__extract_paths_fd", 0, 4, argv))) SWIG_fail; - --argc; - if (argc == 1) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_hfst__HfstTransducer, 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_HfstTransducer__extract_paths_fd__SWIG_3(self, argc, argv); - } - } - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_hfst__HfstTransducer, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_int(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_HfstTransducer__extract_paths_fd__SWIG_2(self, argc, argv); - } - } - } - if (argc == 3) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_hfst__HfstTransducer, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_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_HfstTransducer__extract_paths_fd__SWIG_1(self, argc, argv); - } - } - } - } - if (argc == 4) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_hfst__HfstTransducer, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_int(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - { - int res = SWIG_AsVal_int(argv[2], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - { - int res = SWIG_AsVal_bool(argv[3], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_HfstTransducer__extract_paths_fd__SWIG_0(self, argc, argv); - } - } - } - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'HfstTransducer__extract_paths_fd'.\n" - " Possible C/C++ prototypes are:\n" - " hfst::HfstTransducer::_extract_paths_fd(int,int,bool) const\n" - " hfst::HfstTransducer::_extract_paths_fd(int,int) const\n" - " hfst::HfstTransducer::_extract_paths_fd(int) const\n" - " hfst::HfstTransducer::_extract_paths_fd() const\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducer__extract_random_paths(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::HfstTransducer *arg1 = (hfst::HfstTransducer *) 0 ; - int arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - hfst::HfstTwoLevelPaths result; - - if (!SWIG_Python_UnpackTuple(args, "HfstTransducer__extract_random_paths", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__HfstTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducer__extract_random_paths" "', argument " "1"" of type '" "hfst::HfstTransducer const *""'"); - } - arg1 = reinterpret_cast< hfst::HfstTransducer * >(argp1); - ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HfstTransducer__extract_random_paths" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - result = hfst_HfstTransducer__extract_random_paths((hfst::HfstTransducer const *)arg1,arg2); - resultobj = swig::from(static_cast< std::set< std::pair< float,std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > > >,std::less< std::pair< float,std::vector< std::pair< std::string,std::string > > > >,std::allocator< std::pair< float,std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > > > > > >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducer__extract_random_paths_fd(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::HfstTransducer *arg1 = (hfst::HfstTransducer *) 0 ; - int arg2 ; - bool arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - bool val3 ; - int ecode3 = 0 ; - PyObject *swig_obj[3] ; - hfst::HfstTwoLevelPaths result; - - if (!SWIG_Python_UnpackTuple(args, "HfstTransducer__extract_random_paths_fd", 3, 3, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__HfstTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducer__extract_random_paths_fd" "', argument " "1"" of type '" "hfst::HfstTransducer const *""'"); - } - arg1 = reinterpret_cast< hfst::HfstTransducer * >(argp1); - ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HfstTransducer__extract_random_paths_fd" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - ecode3 = SWIG_AsVal_bool(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "HfstTransducer__extract_random_paths_fd" "', argument " "3"" of type '" "bool""'"); - } - arg3 = static_cast< bool >(val3); - result = hfst_HfstTransducer__extract_random_paths_fd((hfst::HfstTransducer const *)arg1,arg2,arg3); - resultobj = swig::from(static_cast< std::set< std::pair< float,std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > > >,std::less< std::pair< float,std::vector< std::pair< std::string,std::string > > > >,std::allocator< std::pair< float,std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > > > > > >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducer__lookup_vector__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - hfst::HfstTransducer *arg1 = (hfst::HfstTransducer *) 0 ; - hfst::StringVector *arg2 = 0 ; - int arg3 ; - double arg4 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 = SWIG_OLDOBJ ; - int val3 ; - int ecode3 = 0 ; - double val4 ; - int ecode4 = 0 ; - hfst::HfstOneLevelPaths result; - - if ((nobjs < 4) || (nobjs > 4)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__HfstTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducer__lookup_vector" "', argument " "1"" of type '" "hfst::HfstTransducer const *""'"); - } - arg1 = reinterpret_cast< hfst::HfstTransducer * >(argp1); - { - std::vector< std::string,std::allocator< std::string > > *ptr = (std::vector< std::string,std::allocator< std::string > > *)0; - res2 = swig::asptr(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HfstTransducer__lookup_vector" "', argument " "2"" of type '" "hfst::StringVector const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstTransducer__lookup_vector" "', argument " "2"" of type '" "hfst::StringVector const &""'"); - } - arg2 = ptr; - } - ecode3 = SWIG_AsVal_int(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "HfstTransducer__lookup_vector" "', argument " "3"" of type '" "int""'"); - } - arg3 = static_cast< int >(val3); - ecode4 = SWIG_AsVal_double(swig_obj[3], &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "HfstTransducer__lookup_vector" "', argument " "4"" of type '" "double""'"); - } - arg4 = static_cast< double >(val4); - try { - result = hfst_HfstTransducer__lookup_vector__SWIG_0((hfst::HfstTransducer const *)arg1,(std::vector< std::string,std::allocator< std::string > > const &)*arg2,arg3,arg4); - } catch(TransducerIsCyclicException &_e) { - SWIG_Python_Raise(SWIG_NewPointerObj((new TransducerIsCyclicException(static_cast< const TransducerIsCyclicException& >(_e))),SWIGTYPE_p_TransducerIsCyclicException,SWIG_POINTER_OWN), "TransducerIsCyclicException", SWIGTYPE_p_TransducerIsCyclicException); SWIG_fail; - } catch(FunctionNotImplementedException &_e) { - SWIG_Python_Raise(SWIG_NewPointerObj((new FunctionNotImplementedException(static_cast< const FunctionNotImplementedException& >(_e))),SWIGTYPE_p_FunctionNotImplementedException,SWIG_POINTER_OWN), "FunctionNotImplementedException", SWIGTYPE_p_FunctionNotImplementedException); SWIG_fail; - } - resultobj = swig::from(static_cast< std::set< std::pair< float,std::vector< std::string,std::allocator< std::string > > >,std::less< std::pair< float,std::vector< std::string > > >,std::allocator< std::pair< float,std::vector< std::string,std::allocator< std::string > > > > > >(result)); - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducer__lookup_vector__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - hfst::HfstTransducer *arg1 = (hfst::HfstTransducer *) 0 ; - hfst::StringVector *arg2 = 0 ; - int arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 = SWIG_OLDOBJ ; - int val3 ; - int ecode3 = 0 ; - hfst::HfstOneLevelPaths result; - - if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__HfstTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducer__lookup_vector" "', argument " "1"" of type '" "hfst::HfstTransducer const *""'"); - } - arg1 = reinterpret_cast< hfst::HfstTransducer * >(argp1); - { - std::vector< std::string,std::allocator< std::string > > *ptr = (std::vector< std::string,std::allocator< std::string > > *)0; - res2 = swig::asptr(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HfstTransducer__lookup_vector" "', argument " "2"" of type '" "hfst::StringVector const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstTransducer__lookup_vector" "', argument " "2"" of type '" "hfst::StringVector const &""'"); - } - arg2 = ptr; - } - ecode3 = SWIG_AsVal_int(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "HfstTransducer__lookup_vector" "', argument " "3"" of type '" "int""'"); - } - arg3 = static_cast< int >(val3); - try { - result = hfst_HfstTransducer__lookup_vector__SWIG_0((hfst::HfstTransducer const *)arg1,(std::vector< std::string,std::allocator< std::string > > const &)*arg2,arg3); - } catch(TransducerIsCyclicException &_e) { - SWIG_Python_Raise(SWIG_NewPointerObj((new TransducerIsCyclicException(static_cast< const TransducerIsCyclicException& >(_e))),SWIGTYPE_p_TransducerIsCyclicException,SWIG_POINTER_OWN), "TransducerIsCyclicException", SWIGTYPE_p_TransducerIsCyclicException); SWIG_fail; - } catch(FunctionNotImplementedException &_e) { - SWIG_Python_Raise(SWIG_NewPointerObj((new FunctionNotImplementedException(static_cast< const FunctionNotImplementedException& >(_e))),SWIGTYPE_p_FunctionNotImplementedException,SWIG_POINTER_OWN), "FunctionNotImplementedException", SWIGTYPE_p_FunctionNotImplementedException); SWIG_fail; - } - resultobj = swig::from(static_cast< std::set< std::pair< float,std::vector< std::string,std::allocator< std::string > > >,std::less< std::pair< float,std::vector< std::string > > >,std::allocator< std::pair< float,std::vector< std::string,std::allocator< std::string > > > > > >(result)); - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducer__lookup_vector__SWIG_2(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - hfst::HfstTransducer *arg1 = (hfst::HfstTransducer *) 0 ; - hfst::StringVector *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 = SWIG_OLDOBJ ; - hfst::HfstOneLevelPaths result; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__HfstTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducer__lookup_vector" "', argument " "1"" of type '" "hfst::HfstTransducer const *""'"); - } - arg1 = reinterpret_cast< hfst::HfstTransducer * >(argp1); - { - std::vector< std::string,std::allocator< std::string > > *ptr = (std::vector< std::string,std::allocator< std::string > > *)0; - res2 = swig::asptr(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HfstTransducer__lookup_vector" "', argument " "2"" of type '" "hfst::StringVector const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstTransducer__lookup_vector" "', argument " "2"" of type '" "hfst::StringVector const &""'"); - } - arg2 = ptr; - } - try { - result = hfst_HfstTransducer__lookup_vector__SWIG_0((hfst::HfstTransducer const *)arg1,(std::vector< std::string,std::allocator< std::string > > const &)*arg2); - } catch(TransducerIsCyclicException &_e) { - SWIG_Python_Raise(SWIG_NewPointerObj((new TransducerIsCyclicException(static_cast< const TransducerIsCyclicException& >(_e))),SWIGTYPE_p_TransducerIsCyclicException,SWIG_POINTER_OWN), "TransducerIsCyclicException", SWIGTYPE_p_TransducerIsCyclicException); SWIG_fail; - } catch(FunctionNotImplementedException &_e) { - SWIG_Python_Raise(SWIG_NewPointerObj((new FunctionNotImplementedException(static_cast< const FunctionNotImplementedException& >(_e))),SWIGTYPE_p_FunctionNotImplementedException,SWIG_POINTER_OWN), "FunctionNotImplementedException", SWIGTYPE_p_FunctionNotImplementedException); SWIG_fail; - } - resultobj = swig::from(static_cast< std::set< std::pair< float,std::vector< std::string,std::allocator< std::string > > >,std::less< std::pair< float,std::vector< std::string > > >,std::allocator< std::pair< float,std::vector< std::string,std::allocator< std::string > > > > > >(result)); - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducer__lookup_vector(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[5] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "HfstTransducer__lookup_vector", 0, 4, argv))) SWIG_fail; - --argc; - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_hfst__HfstTransducer, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = swig::asptr(argv[1], (std::vector< std::string,std::allocator< std::string > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_HfstTransducer__lookup_vector__SWIG_2(self, argc, argv); - } - } - } - if (argc == 3) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_hfst__HfstTransducer, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = swig::asptr(argv[1], (std::vector< std::string,std::allocator< std::string > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_int(argv[2], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_HfstTransducer__lookup_vector__SWIG_1(self, argc, argv); - } - } - } - } - if (argc == 4) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_hfst__HfstTransducer, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = swig::asptr(argv[1], (std::vector< std::string,std::allocator< std::string > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_int(argv[2], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - { - int res = SWIG_AsVal_double(argv[3], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_HfstTransducer__lookup_vector__SWIG_0(self, argc, argv); - } - } - } - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'HfstTransducer__lookup_vector'.\n" - " Possible C/C++ prototypes are:\n" - " hfst::HfstTransducer::_lookup_vector(hfst::StringVector const &,int,double) const\n" - " hfst::HfstTransducer::_lookup_vector(hfst::StringVector const &,int) const\n" - " hfst::HfstTransducer::_lookup_vector(hfst::StringVector const &) const\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducer__lookup_fd_vector__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - hfst::HfstTransducer *arg1 = (hfst::HfstTransducer *) 0 ; - hfst::StringVector *arg2 = 0 ; - int arg3 ; - double arg4 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 = SWIG_OLDOBJ ; - int val3 ; - int ecode3 = 0 ; - double val4 ; - int ecode4 = 0 ; - hfst::HfstOneLevelPaths result; - - if ((nobjs < 4) || (nobjs > 4)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__HfstTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducer__lookup_fd_vector" "', argument " "1"" of type '" "hfst::HfstTransducer const *""'"); - } - arg1 = reinterpret_cast< hfst::HfstTransducer * >(argp1); - { - std::vector< std::string,std::allocator< std::string > > *ptr = (std::vector< std::string,std::allocator< std::string > > *)0; - res2 = swig::asptr(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HfstTransducer__lookup_fd_vector" "', argument " "2"" of type '" "hfst::StringVector const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstTransducer__lookup_fd_vector" "', argument " "2"" of type '" "hfst::StringVector const &""'"); - } - arg2 = ptr; - } - ecode3 = SWIG_AsVal_int(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "HfstTransducer__lookup_fd_vector" "', argument " "3"" of type '" "int""'"); - } - arg3 = static_cast< int >(val3); - ecode4 = SWIG_AsVal_double(swig_obj[3], &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "HfstTransducer__lookup_fd_vector" "', argument " "4"" of type '" "double""'"); - } - arg4 = static_cast< double >(val4); - try { - result = hfst_HfstTransducer__lookup_fd_vector__SWIG_0((hfst::HfstTransducer const *)arg1,(std::vector< std::string,std::allocator< std::string > > const &)*arg2,arg3,arg4); - } catch(TransducerIsCyclicException &_e) { - SWIG_Python_Raise(SWIG_NewPointerObj((new TransducerIsCyclicException(static_cast< const TransducerIsCyclicException& >(_e))),SWIGTYPE_p_TransducerIsCyclicException,SWIG_POINTER_OWN), "TransducerIsCyclicException", SWIGTYPE_p_TransducerIsCyclicException); SWIG_fail; - } catch(FunctionNotImplementedException &_e) { - SWIG_Python_Raise(SWIG_NewPointerObj((new FunctionNotImplementedException(static_cast< const FunctionNotImplementedException& >(_e))),SWIGTYPE_p_FunctionNotImplementedException,SWIG_POINTER_OWN), "FunctionNotImplementedException", SWIGTYPE_p_FunctionNotImplementedException); SWIG_fail; - } - resultobj = swig::from(static_cast< std::set< std::pair< float,std::vector< std::string,std::allocator< std::string > > >,std::less< std::pair< float,std::vector< std::string > > >,std::allocator< std::pair< float,std::vector< std::string,std::allocator< std::string > > > > > >(result)); - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducer__lookup_fd_vector__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - hfst::HfstTransducer *arg1 = (hfst::HfstTransducer *) 0 ; - hfst::StringVector *arg2 = 0 ; - int arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 = SWIG_OLDOBJ ; - int val3 ; - int ecode3 = 0 ; - hfst::HfstOneLevelPaths result; - - if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__HfstTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducer__lookup_fd_vector" "', argument " "1"" of type '" "hfst::HfstTransducer const *""'"); - } - arg1 = reinterpret_cast< hfst::HfstTransducer * >(argp1); - { - std::vector< std::string,std::allocator< std::string > > *ptr = (std::vector< std::string,std::allocator< std::string > > *)0; - res2 = swig::asptr(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HfstTransducer__lookup_fd_vector" "', argument " "2"" of type '" "hfst::StringVector const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstTransducer__lookup_fd_vector" "', argument " "2"" of type '" "hfst::StringVector const &""'"); - } - arg2 = ptr; - } - ecode3 = SWIG_AsVal_int(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "HfstTransducer__lookup_fd_vector" "', argument " "3"" of type '" "int""'"); - } - arg3 = static_cast< int >(val3); - try { - result = hfst_HfstTransducer__lookup_fd_vector__SWIG_0((hfst::HfstTransducer const *)arg1,(std::vector< std::string,std::allocator< std::string > > const &)*arg2,arg3); - } catch(TransducerIsCyclicException &_e) { - SWIG_Python_Raise(SWIG_NewPointerObj((new TransducerIsCyclicException(static_cast< const TransducerIsCyclicException& >(_e))),SWIGTYPE_p_TransducerIsCyclicException,SWIG_POINTER_OWN), "TransducerIsCyclicException", SWIGTYPE_p_TransducerIsCyclicException); SWIG_fail; - } catch(FunctionNotImplementedException &_e) { - SWIG_Python_Raise(SWIG_NewPointerObj((new FunctionNotImplementedException(static_cast< const FunctionNotImplementedException& >(_e))),SWIGTYPE_p_FunctionNotImplementedException,SWIG_POINTER_OWN), "FunctionNotImplementedException", SWIGTYPE_p_FunctionNotImplementedException); SWIG_fail; - } - resultobj = swig::from(static_cast< std::set< std::pair< float,std::vector< std::string,std::allocator< std::string > > >,std::less< std::pair< float,std::vector< std::string > > >,std::allocator< std::pair< float,std::vector< std::string,std::allocator< std::string > > > > > >(result)); - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducer__lookup_fd_vector__SWIG_2(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - hfst::HfstTransducer *arg1 = (hfst::HfstTransducer *) 0 ; - hfst::StringVector *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 = SWIG_OLDOBJ ; - hfst::HfstOneLevelPaths result; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__HfstTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducer__lookup_fd_vector" "', argument " "1"" of type '" "hfst::HfstTransducer const *""'"); - } - arg1 = reinterpret_cast< hfst::HfstTransducer * >(argp1); - { - std::vector< std::string,std::allocator< std::string > > *ptr = (std::vector< std::string,std::allocator< std::string > > *)0; - res2 = swig::asptr(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HfstTransducer__lookup_fd_vector" "', argument " "2"" of type '" "hfst::StringVector const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstTransducer__lookup_fd_vector" "', argument " "2"" of type '" "hfst::StringVector const &""'"); - } - arg2 = ptr; - } - try { - result = hfst_HfstTransducer__lookup_fd_vector__SWIG_0((hfst::HfstTransducer const *)arg1,(std::vector< std::string,std::allocator< std::string > > const &)*arg2); - } catch(TransducerIsCyclicException &_e) { - SWIG_Python_Raise(SWIG_NewPointerObj((new TransducerIsCyclicException(static_cast< const TransducerIsCyclicException& >(_e))),SWIGTYPE_p_TransducerIsCyclicException,SWIG_POINTER_OWN), "TransducerIsCyclicException", SWIGTYPE_p_TransducerIsCyclicException); SWIG_fail; - } catch(FunctionNotImplementedException &_e) { - SWIG_Python_Raise(SWIG_NewPointerObj((new FunctionNotImplementedException(static_cast< const FunctionNotImplementedException& >(_e))),SWIGTYPE_p_FunctionNotImplementedException,SWIG_POINTER_OWN), "FunctionNotImplementedException", SWIGTYPE_p_FunctionNotImplementedException); SWIG_fail; - } - resultobj = swig::from(static_cast< std::set< std::pair< float,std::vector< std::string,std::allocator< std::string > > >,std::less< std::pair< float,std::vector< std::string > > >,std::allocator< std::pair< float,std::vector< std::string,std::allocator< std::string > > > > > >(result)); - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducer__lookup_fd_vector(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[5] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "HfstTransducer__lookup_fd_vector", 0, 4, argv))) SWIG_fail; - --argc; - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_hfst__HfstTransducer, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = swig::asptr(argv[1], (std::vector< std::string,std::allocator< std::string > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_HfstTransducer__lookup_fd_vector__SWIG_2(self, argc, argv); - } - } - } - if (argc == 3) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_hfst__HfstTransducer, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = swig::asptr(argv[1], (std::vector< std::string,std::allocator< std::string > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_int(argv[2], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_HfstTransducer__lookup_fd_vector__SWIG_1(self, argc, argv); - } - } - } - } - if (argc == 4) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_hfst__HfstTransducer, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = swig::asptr(argv[1], (std::vector< std::string,std::allocator< std::string > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_int(argv[2], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - { - int res = SWIG_AsVal_double(argv[3], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_HfstTransducer__lookup_fd_vector__SWIG_0(self, argc, argv); - } - } - } - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'HfstTransducer__lookup_fd_vector'.\n" - " Possible C/C++ prototypes are:\n" - " hfst::HfstTransducer::_lookup_fd_vector(hfst::StringVector const &,int,double) const\n" - " hfst::HfstTransducer::_lookup_fd_vector(hfst::StringVector const &,int) const\n" - " hfst::HfstTransducer::_lookup_fd_vector(hfst::StringVector const &) const\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducer__lookup_fd_string__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - hfst::HfstTransducer *arg1 = (hfst::HfstTransducer *) 0 ; - std::string *arg2 = 0 ; - int arg3 ; - double arg4 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 = SWIG_OLDOBJ ; - int val3 ; - int ecode3 = 0 ; - double val4 ; - int ecode4 = 0 ; - hfst::HfstOneLevelPaths result; - - if ((nobjs < 4) || (nobjs > 4)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__HfstTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducer__lookup_fd_string" "', argument " "1"" of type '" "hfst::HfstTransducer const *""'"); - } - arg1 = reinterpret_cast< hfst::HfstTransducer * >(argp1); - { - std::string *ptr = (std::string *)0; - res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HfstTransducer__lookup_fd_string" "', argument " "2"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstTransducer__lookup_fd_string" "', argument " "2"" of type '" "std::string const &""'"); - } - arg2 = ptr; - } - ecode3 = SWIG_AsVal_int(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "HfstTransducer__lookup_fd_string" "', argument " "3"" of type '" "int""'"); - } - arg3 = static_cast< int >(val3); - ecode4 = SWIG_AsVal_double(swig_obj[3], &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "HfstTransducer__lookup_fd_string" "', argument " "4"" of type '" "double""'"); - } - arg4 = static_cast< double >(val4); - try { - result = hfst_HfstTransducer__lookup_fd_string__SWIG_0((hfst::HfstTransducer const *)arg1,(std::string const &)*arg2,arg3,arg4); - } catch(TransducerIsCyclicException &_e) { - SWIG_Python_Raise(SWIG_NewPointerObj((new TransducerIsCyclicException(static_cast< const TransducerIsCyclicException& >(_e))),SWIGTYPE_p_TransducerIsCyclicException,SWIG_POINTER_OWN), "TransducerIsCyclicException", SWIGTYPE_p_TransducerIsCyclicException); SWIG_fail; - } catch(FunctionNotImplementedException &_e) { - SWIG_Python_Raise(SWIG_NewPointerObj((new FunctionNotImplementedException(static_cast< const FunctionNotImplementedException& >(_e))),SWIGTYPE_p_FunctionNotImplementedException,SWIG_POINTER_OWN), "FunctionNotImplementedException", SWIGTYPE_p_FunctionNotImplementedException); SWIG_fail; - } - resultobj = swig::from(static_cast< std::set< std::pair< float,std::vector< std::string,std::allocator< std::string > > >,std::less< std::pair< float,std::vector< std::string > > >,std::allocator< std::pair< float,std::vector< std::string,std::allocator< std::string > > > > > >(result)); - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducer__lookup_fd_string__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - hfst::HfstTransducer *arg1 = (hfst::HfstTransducer *) 0 ; - std::string *arg2 = 0 ; - int arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 = SWIG_OLDOBJ ; - int val3 ; - int ecode3 = 0 ; - hfst::HfstOneLevelPaths result; - - if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__HfstTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducer__lookup_fd_string" "', argument " "1"" of type '" "hfst::HfstTransducer const *""'"); - } - arg1 = reinterpret_cast< hfst::HfstTransducer * >(argp1); - { - std::string *ptr = (std::string *)0; - res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HfstTransducer__lookup_fd_string" "', argument " "2"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstTransducer__lookup_fd_string" "', argument " "2"" of type '" "std::string const &""'"); - } - arg2 = ptr; - } - ecode3 = SWIG_AsVal_int(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "HfstTransducer__lookup_fd_string" "', argument " "3"" of type '" "int""'"); - } - arg3 = static_cast< int >(val3); - try { - result = hfst_HfstTransducer__lookup_fd_string__SWIG_0((hfst::HfstTransducer const *)arg1,(std::string const &)*arg2,arg3); - } catch(TransducerIsCyclicException &_e) { - SWIG_Python_Raise(SWIG_NewPointerObj((new TransducerIsCyclicException(static_cast< const TransducerIsCyclicException& >(_e))),SWIGTYPE_p_TransducerIsCyclicException,SWIG_POINTER_OWN), "TransducerIsCyclicException", SWIGTYPE_p_TransducerIsCyclicException); SWIG_fail; - } catch(FunctionNotImplementedException &_e) { - SWIG_Python_Raise(SWIG_NewPointerObj((new FunctionNotImplementedException(static_cast< const FunctionNotImplementedException& >(_e))),SWIGTYPE_p_FunctionNotImplementedException,SWIG_POINTER_OWN), "FunctionNotImplementedException", SWIGTYPE_p_FunctionNotImplementedException); SWIG_fail; - } - resultobj = swig::from(static_cast< std::set< std::pair< float,std::vector< std::string,std::allocator< std::string > > >,std::less< std::pair< float,std::vector< std::string > > >,std::allocator< std::pair< float,std::vector< std::string,std::allocator< std::string > > > > > >(result)); - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducer__lookup_fd_string__SWIG_2(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - hfst::HfstTransducer *arg1 = (hfst::HfstTransducer *) 0 ; - std::string *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 = SWIG_OLDOBJ ; - hfst::HfstOneLevelPaths result; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__HfstTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducer__lookup_fd_string" "', argument " "1"" of type '" "hfst::HfstTransducer const *""'"); - } - arg1 = reinterpret_cast< hfst::HfstTransducer * >(argp1); - { - std::string *ptr = (std::string *)0; - res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HfstTransducer__lookup_fd_string" "', argument " "2"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstTransducer__lookup_fd_string" "', argument " "2"" of type '" "std::string const &""'"); - } - arg2 = ptr; - } - try { - result = hfst_HfstTransducer__lookup_fd_string__SWIG_0((hfst::HfstTransducer const *)arg1,(std::string const &)*arg2); - } catch(TransducerIsCyclicException &_e) { - SWIG_Python_Raise(SWIG_NewPointerObj((new TransducerIsCyclicException(static_cast< const TransducerIsCyclicException& >(_e))),SWIGTYPE_p_TransducerIsCyclicException,SWIG_POINTER_OWN), "TransducerIsCyclicException", SWIGTYPE_p_TransducerIsCyclicException); SWIG_fail; - } catch(FunctionNotImplementedException &_e) { - SWIG_Python_Raise(SWIG_NewPointerObj((new FunctionNotImplementedException(static_cast< const FunctionNotImplementedException& >(_e))),SWIGTYPE_p_FunctionNotImplementedException,SWIG_POINTER_OWN), "FunctionNotImplementedException", SWIGTYPE_p_FunctionNotImplementedException); SWIG_fail; - } - resultobj = swig::from(static_cast< std::set< std::pair< float,std::vector< std::string,std::allocator< std::string > > >,std::less< std::pair< float,std::vector< std::string > > >,std::allocator< std::pair< float,std::vector< std::string,std::allocator< std::string > > > > > >(result)); - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducer__lookup_fd_string(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[5] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "HfstTransducer__lookup_fd_string", 0, 4, argv))) SWIG_fail; - --argc; - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_hfst__HfstTransducer, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_AsPtr_std_string(argv[1], (std::string**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_HfstTransducer__lookup_fd_string__SWIG_2(self, argc, argv); - } - } - } - if (argc == 3) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_hfst__HfstTransducer, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_AsPtr_std_string(argv[1], (std::string**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_int(argv[2], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_HfstTransducer__lookup_fd_string__SWIG_1(self, argc, argv); - } - } - } - } - if (argc == 4) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_hfst__HfstTransducer, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_AsPtr_std_string(argv[1], (std::string**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_int(argv[2], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - { - int res = SWIG_AsVal_double(argv[3], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_HfstTransducer__lookup_fd_string__SWIG_0(self, argc, argv); - } - } - } - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'HfstTransducer__lookup_fd_string'.\n" - " Possible C/C++ prototypes are:\n" - " hfst::HfstTransducer::_lookup_fd_string(std::string const &,int,double) const\n" - " hfst::HfstTransducer::_lookup_fd_string(std::string const &,int) const\n" - " hfst::HfstTransducer::_lookup_fd_string(std::string const &) const\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducer__lookup_string__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - hfst::HfstTransducer *arg1 = (hfst::HfstTransducer *) 0 ; - std::string *arg2 = 0 ; - int arg3 ; - double arg4 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 = SWIG_OLDOBJ ; - int val3 ; - int ecode3 = 0 ; - double val4 ; - int ecode4 = 0 ; - hfst::HfstOneLevelPaths result; - - if ((nobjs < 4) || (nobjs > 4)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__HfstTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducer__lookup_string" "', argument " "1"" of type '" "hfst::HfstTransducer const *""'"); - } - arg1 = reinterpret_cast< hfst::HfstTransducer * >(argp1); - { - std::string *ptr = (std::string *)0; - res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HfstTransducer__lookup_string" "', argument " "2"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstTransducer__lookup_string" "', argument " "2"" of type '" "std::string const &""'"); - } - arg2 = ptr; - } - ecode3 = SWIG_AsVal_int(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "HfstTransducer__lookup_string" "', argument " "3"" of type '" "int""'"); - } - arg3 = static_cast< int >(val3); - ecode4 = SWIG_AsVal_double(swig_obj[3], &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "HfstTransducer__lookup_string" "', argument " "4"" of type '" "double""'"); - } - arg4 = static_cast< double >(val4); - try { - result = hfst_HfstTransducer__lookup_string__SWIG_0((hfst::HfstTransducer const *)arg1,(std::string const &)*arg2,arg3,arg4); - } catch(TransducerIsCyclicException &_e) { - SWIG_Python_Raise(SWIG_NewPointerObj((new TransducerIsCyclicException(static_cast< const TransducerIsCyclicException& >(_e))),SWIGTYPE_p_TransducerIsCyclicException,SWIG_POINTER_OWN), "TransducerIsCyclicException", SWIGTYPE_p_TransducerIsCyclicException); SWIG_fail; - } catch(FunctionNotImplementedException &_e) { - SWIG_Python_Raise(SWIG_NewPointerObj((new FunctionNotImplementedException(static_cast< const FunctionNotImplementedException& >(_e))),SWIGTYPE_p_FunctionNotImplementedException,SWIG_POINTER_OWN), "FunctionNotImplementedException", SWIGTYPE_p_FunctionNotImplementedException); SWIG_fail; - } - resultobj = swig::from(static_cast< std::set< std::pair< float,std::vector< std::string,std::allocator< std::string > > >,std::less< std::pair< float,std::vector< std::string > > >,std::allocator< std::pair< float,std::vector< std::string,std::allocator< std::string > > > > > >(result)); - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducer__lookup_string__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - hfst::HfstTransducer *arg1 = (hfst::HfstTransducer *) 0 ; - std::string *arg2 = 0 ; - int arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 = SWIG_OLDOBJ ; - int val3 ; - int ecode3 = 0 ; - hfst::HfstOneLevelPaths result; - - if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__HfstTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducer__lookup_string" "', argument " "1"" of type '" "hfst::HfstTransducer const *""'"); - } - arg1 = reinterpret_cast< hfst::HfstTransducer * >(argp1); - { - std::string *ptr = (std::string *)0; - res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HfstTransducer__lookup_string" "', argument " "2"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstTransducer__lookup_string" "', argument " "2"" of type '" "std::string const &""'"); - } - arg2 = ptr; - } - ecode3 = SWIG_AsVal_int(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "HfstTransducer__lookup_string" "', argument " "3"" of type '" "int""'"); - } - arg3 = static_cast< int >(val3); - try { - result = hfst_HfstTransducer__lookup_string__SWIG_0((hfst::HfstTransducer const *)arg1,(std::string const &)*arg2,arg3); - } catch(TransducerIsCyclicException &_e) { - SWIG_Python_Raise(SWIG_NewPointerObj((new TransducerIsCyclicException(static_cast< const TransducerIsCyclicException& >(_e))),SWIGTYPE_p_TransducerIsCyclicException,SWIG_POINTER_OWN), "TransducerIsCyclicException", SWIGTYPE_p_TransducerIsCyclicException); SWIG_fail; - } catch(FunctionNotImplementedException &_e) { - SWIG_Python_Raise(SWIG_NewPointerObj((new FunctionNotImplementedException(static_cast< const FunctionNotImplementedException& >(_e))),SWIGTYPE_p_FunctionNotImplementedException,SWIG_POINTER_OWN), "FunctionNotImplementedException", SWIGTYPE_p_FunctionNotImplementedException); SWIG_fail; - } - resultobj = swig::from(static_cast< std::set< std::pair< float,std::vector< std::string,std::allocator< std::string > > >,std::less< std::pair< float,std::vector< std::string > > >,std::allocator< std::pair< float,std::vector< std::string,std::allocator< std::string > > > > > >(result)); - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducer__lookup_string__SWIG_2(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - hfst::HfstTransducer *arg1 = (hfst::HfstTransducer *) 0 ; - std::string *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 = SWIG_OLDOBJ ; - hfst::HfstOneLevelPaths result; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__HfstTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTransducer__lookup_string" "', argument " "1"" of type '" "hfst::HfstTransducer const *""'"); - } - arg1 = reinterpret_cast< hfst::HfstTransducer * >(argp1); - { - std::string *ptr = (std::string *)0; - res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HfstTransducer__lookup_string" "', argument " "2"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstTransducer__lookup_string" "', argument " "2"" of type '" "std::string const &""'"); - } - arg2 = ptr; - } - try { - result = hfst_HfstTransducer__lookup_string__SWIG_0((hfst::HfstTransducer const *)arg1,(std::string const &)*arg2); - } catch(TransducerIsCyclicException &_e) { - SWIG_Python_Raise(SWIG_NewPointerObj((new TransducerIsCyclicException(static_cast< const TransducerIsCyclicException& >(_e))),SWIGTYPE_p_TransducerIsCyclicException,SWIG_POINTER_OWN), "TransducerIsCyclicException", SWIGTYPE_p_TransducerIsCyclicException); SWIG_fail; - } catch(FunctionNotImplementedException &_e) { - SWIG_Python_Raise(SWIG_NewPointerObj((new FunctionNotImplementedException(static_cast< const FunctionNotImplementedException& >(_e))),SWIGTYPE_p_FunctionNotImplementedException,SWIG_POINTER_OWN), "FunctionNotImplementedException", SWIGTYPE_p_FunctionNotImplementedException); SWIG_fail; - } - resultobj = swig::from(static_cast< std::set< std::pair< float,std::vector< std::string,std::allocator< std::string > > >,std::less< std::pair< float,std::vector< std::string > > >,std::allocator< std::pair< float,std::vector< std::string,std::allocator< std::string > > > > > >(result)); - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTransducer__lookup_string(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[5] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "HfstTransducer__lookup_string", 0, 4, argv))) SWIG_fail; - --argc; - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_hfst__HfstTransducer, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_AsPtr_std_string(argv[1], (std::string**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_HfstTransducer__lookup_string__SWIG_2(self, argc, argv); - } - } - } - if (argc == 3) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_hfst__HfstTransducer, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_AsPtr_std_string(argv[1], (std::string**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_int(argv[2], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_HfstTransducer__lookup_string__SWIG_1(self, argc, argv); - } - } - } - } - if (argc == 4) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_hfst__HfstTransducer, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_AsPtr_std_string(argv[1], (std::string**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_int(argv[2], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - { - int res = SWIG_AsVal_double(argv[3], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_HfstTransducer__lookup_string__SWIG_0(self, argc, argv); - } - } - } - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'HfstTransducer__lookup_string'.\n" - " Possible C/C++ prototypes are:\n" - " hfst::HfstTransducer::_lookup_string(std::string const &,int,double) const\n" - " hfst::HfstTransducer::_lookup_string(std::string const &,int) const\n" - " hfst::HfstTransducer::_lookup_string(std::string const &) const\n"); - return 0; -} - - -SWIGINTERN PyObject *HfstTransducer_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_hfst__HfstTransducer, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *HfstTransducer_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_create_hfst_output_stream(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::string *arg1 = 0 ; - hfst::ImplementationType arg2 ; - bool arg3 ; - int res1 = SWIG_OLDOBJ ; - int val2 ; - int ecode2 = 0 ; - bool val3 ; - int ecode3 = 0 ; - PyObject *swig_obj[3] ; - hfst::HfstOutputStream *result = 0 ; - - if (!SWIG_Python_UnpackTuple(args, "create_hfst_output_stream", 3, 3, swig_obj)) SWIG_fail; - { - std::string *ptr = (std::string *)0; - res1 = SWIG_AsPtr_std_string(swig_obj[0], &ptr); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "create_hfst_output_stream" "', argument " "1"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "create_hfst_output_stream" "', argument " "1"" of type '" "std::string const &""'"); - } - arg1 = ptr; - } - ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "create_hfst_output_stream" "', argument " "2"" of type '" "hfst::ImplementationType""'"); - } - arg2 = static_cast< hfst::ImplementationType >(val2); - ecode3 = SWIG_AsVal_bool(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "create_hfst_output_stream" "', argument " "3"" of type '" "bool""'"); - } - arg3 = static_cast< bool >(val3); - result = (hfst::HfstOutputStream *)hfst::create_hfst_output_stream((std::string const &)*arg1,arg2,arg3); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_hfst__HfstOutputStream, 0 | 0 ); - if (SWIG_IsNewObj(res1)) delete arg1; - return resultobj; -fail: - if (SWIG_IsNewObj(res1)) delete arg1; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_HfstOutputStream(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::HfstOutputStream *arg1 = (hfst::HfstOutputStream *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__HfstOutputStream, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_HfstOutputStream" "', argument " "1"" of type '" "hfst::HfstOutputStream *""'"); - } - arg1 = reinterpret_cast< hfst::HfstOutputStream * >(argp1); - delete arg1; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstOutputStream_flush(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::HfstOutputStream *arg1 = (hfst::HfstOutputStream *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - hfst::HfstOutputStream *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__HfstOutputStream, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstOutputStream_flush" "', argument " "1"" of type '" "hfst::HfstOutputStream *""'"); - } - arg1 = reinterpret_cast< hfst::HfstOutputStream * >(argp1); - result = (hfst::HfstOutputStream *) &(arg1)->flush(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_hfst__HfstOutputStream, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstOutputStream_close(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::HfstOutputStream *arg1 = (hfst::HfstOutputStream *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__HfstOutputStream, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstOutputStream_close" "', argument " "1"" of type '" "hfst::HfstOutputStream *""'"); - } - arg1 = reinterpret_cast< hfst::HfstOutputStream * >(argp1); - (arg1)->close(); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstOutputStream_redirect(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::HfstOutputStream *arg1 = (hfst::HfstOutputStream *) 0 ; - hfst::HfstTransducer *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject *swig_obj[2] ; - hfst::HfstOutputStream *result = 0 ; - - if (!SWIG_Python_UnpackTuple(args, "HfstOutputStream_redirect", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__HfstOutputStream, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstOutputStream_redirect" "', argument " "1"" of type '" "hfst::HfstOutputStream *""'"); - } - arg1 = reinterpret_cast< hfst::HfstOutputStream * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_hfst__HfstTransducer, 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HfstOutputStream_redirect" "', argument " "2"" of type '" "hfst::HfstTransducer &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstOutputStream_redirect" "', argument " "2"" of type '" "hfst::HfstTransducer &""'"); - } - arg2 = reinterpret_cast< hfst::HfstTransducer * >(argp2); - try { - result = (hfst::HfstOutputStream *) &(arg1)->redirect(*arg2); - } catch(StreamIsClosedException &_e) { - SWIG_Python_Raise(SWIG_NewPointerObj((new StreamIsClosedException(static_cast< const StreamIsClosedException& >(_e))),SWIGTYPE_p_StreamIsClosedException,SWIG_POINTER_OWN), "StreamIsClosedException", SWIGTYPE_p_StreamIsClosedException); SWIG_fail; - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_hfst__HfstOutputStream, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_HfstOutputStream(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::HfstOutputStream *result = 0 ; - - if (!SWIG_Python_UnpackTuple(args, "new_HfstOutputStream", 0, 0, 0)) SWIG_fail; - result = (hfst::HfstOutputStream *)new_hfst_HfstOutputStream(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_hfst__HfstOutputStream, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *HfstOutputStream_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_hfst__HfstOutputStream, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *HfstOutputStream_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_new_HfstInputStream__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **SWIGUNUSEDPARM(swig_obj)) { - PyObject *resultobj = 0; - hfst::HfstInputStream *result = 0 ; - - if ((nobjs < 0) || (nobjs > 0)) SWIG_fail; - try { - result = (hfst::HfstInputStream *)new hfst::HfstInputStream(); - } catch(StreamNotReadableException &_e) { - SWIG_Python_Raise(SWIG_NewPointerObj((new StreamNotReadableException(static_cast< const StreamNotReadableException& >(_e))),SWIGTYPE_p_StreamNotReadableException,SWIG_POINTER_OWN), "StreamNotReadableException", SWIGTYPE_p_StreamNotReadableException); SWIG_fail; - } catch(NotTransducerStreamException &_e) { - SWIG_Python_Raise(SWIG_NewPointerObj((new NotTransducerStreamException(static_cast< const NotTransducerStreamException& >(_e))),SWIGTYPE_p_NotTransducerStreamException,SWIG_POINTER_OWN), "NotTransducerStreamException", SWIGTYPE_p_NotTransducerStreamException); SWIG_fail; - } catch(EndOfStreamException &_e) { - SWIG_Python_Raise(SWIG_NewPointerObj((new EndOfStreamException(static_cast< const EndOfStreamException& >(_e))),SWIGTYPE_p_EndOfStreamException,SWIG_POINTER_OWN), "EndOfStreamException", SWIGTYPE_p_EndOfStreamException); SWIG_fail; - } catch(TransducerHeaderException &_e) { - SWIG_Python_Raise(SWIG_NewPointerObj((new TransducerHeaderException(static_cast< const TransducerHeaderException& >(_e))),SWIGTYPE_p_TransducerHeaderException,SWIG_POINTER_OWN), "TransducerHeaderException", SWIGTYPE_p_TransducerHeaderException); SWIG_fail; - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_hfst__HfstInputStream, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_HfstInputStream__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::string *arg1 = 0 ; - int res1 = SWIG_OLDOBJ ; - hfst::HfstInputStream *result = 0 ; - - if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; - { - std::string *ptr = (std::string *)0; - res1 = SWIG_AsPtr_std_string(swig_obj[0], &ptr); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_HfstInputStream" "', argument " "1"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_HfstInputStream" "', argument " "1"" of type '" "std::string const &""'"); - } - arg1 = ptr; - } - try { - result = (hfst::HfstInputStream *)new hfst::HfstInputStream((std::string const &)*arg1); - } catch(StreamNotReadableException &_e) { - SWIG_Python_Raise(SWIG_NewPointerObj((new StreamNotReadableException(static_cast< const StreamNotReadableException& >(_e))),SWIGTYPE_p_StreamNotReadableException,SWIG_POINTER_OWN), "StreamNotReadableException", SWIGTYPE_p_StreamNotReadableException); SWIG_fail; - } catch(NotTransducerStreamException &_e) { - SWIG_Python_Raise(SWIG_NewPointerObj((new NotTransducerStreamException(static_cast< const NotTransducerStreamException& >(_e))),SWIGTYPE_p_NotTransducerStreamException,SWIG_POINTER_OWN), "NotTransducerStreamException", SWIGTYPE_p_NotTransducerStreamException); SWIG_fail; - } catch(EndOfStreamException &_e) { - SWIG_Python_Raise(SWIG_NewPointerObj((new EndOfStreamException(static_cast< const EndOfStreamException& >(_e))),SWIGTYPE_p_EndOfStreamException,SWIG_POINTER_OWN), "EndOfStreamException", SWIGTYPE_p_EndOfStreamException); SWIG_fail; - } catch(TransducerHeaderException &_e) { - SWIG_Python_Raise(SWIG_NewPointerObj((new TransducerHeaderException(static_cast< const TransducerHeaderException& >(_e))),SWIGTYPE_p_TransducerHeaderException,SWIG_POINTER_OWN), "TransducerHeaderException", SWIGTYPE_p_TransducerHeaderException); SWIG_fail; - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_hfst__HfstInputStream, SWIG_POINTER_NEW | 0 ); - if (SWIG_IsNewObj(res1)) delete arg1; - return resultobj; -fail: - if (SWIG_IsNewObj(res1)) delete arg1; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_HfstInputStream(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[2] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "new_HfstInputStream", 0, 1, argv))) SWIG_fail; - --argc; - if (argc == 0) { - return _wrap_new_HfstInputStream__SWIG_0(self, argc, argv); - } - if (argc == 1) { - int _v; - int res = SWIG_AsPtr_std_string(argv[0], (std::string**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_new_HfstInputStream__SWIG_1(self, argc, argv); - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'new_HfstInputStream'.\n" - " Possible C/C++ prototypes are:\n" - " hfst::HfstInputStream::HfstInputStream()\n" - " hfst::HfstInputStream::HfstInputStream(std::string const &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_delete_HfstInputStream(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::HfstInputStream *arg1 = (hfst::HfstInputStream *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__HfstInputStream, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_HfstInputStream" "', argument " "1"" of type '" "hfst::HfstInputStream *""'"); - } - arg1 = reinterpret_cast< hfst::HfstInputStream * >(argp1); - delete arg1; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstInputStream_close(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::HfstInputStream *arg1 = (hfst::HfstInputStream *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__HfstInputStream, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstInputStream_close" "', argument " "1"" of type '" "hfst::HfstInputStream *""'"); - } - arg1 = reinterpret_cast< hfst::HfstInputStream * >(argp1); - (arg1)->close(); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstInputStream_is_eof(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::HfstInputStream *arg1 = (hfst::HfstInputStream *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - bool result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__HfstInputStream, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstInputStream_is_eof" "', argument " "1"" of type '" "hfst::HfstInputStream *""'"); - } - arg1 = reinterpret_cast< hfst::HfstInputStream * >(argp1); - result = (bool)(arg1)->is_eof(); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstInputStream_is_bad(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::HfstInputStream *arg1 = (hfst::HfstInputStream *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - bool result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__HfstInputStream, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstInputStream_is_bad" "', argument " "1"" of type '" "hfst::HfstInputStream *""'"); - } - arg1 = reinterpret_cast< hfst::HfstInputStream * >(argp1); - result = (bool)(arg1)->is_bad(); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstInputStream_is_good(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::HfstInputStream *arg1 = (hfst::HfstInputStream *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - bool result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__HfstInputStream, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstInputStream_is_good" "', argument " "1"" of type '" "hfst::HfstInputStream *""'"); - } - arg1 = reinterpret_cast< hfst::HfstInputStream * >(argp1); - result = (bool)(arg1)->is_good(); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstInputStream_get_type(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::HfstInputStream *arg1 = (hfst::HfstInputStream *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - hfst::ImplementationType result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__HfstInputStream, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstInputStream_get_type" "', argument " "1"" of type '" "hfst::HfstInputStream const *""'"); - } - arg1 = reinterpret_cast< hfst::HfstInputStream * >(argp1); - try { - result = (hfst::ImplementationType)((hfst::HfstInputStream const *)arg1)->get_type(); - } catch(TransducerTypeMismatchException &_e) { - SWIG_Python_Raise(SWIG_NewPointerObj((new TransducerTypeMismatchException(static_cast< const TransducerTypeMismatchException& >(_e))),SWIGTYPE_p_TransducerTypeMismatchException,SWIG_POINTER_OWN), "TransducerTypeMismatchException", SWIGTYPE_p_TransducerTypeMismatchException); SWIG_fail; - } - resultobj = SWIG_From_int(static_cast< int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstInputStream_read(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::HfstInputStream *arg1 = (hfst::HfstInputStream *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - hfst::HfstTransducer *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__HfstInputStream, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstInputStream_read" "', argument " "1"" of type '" "hfst::HfstInputStream *""'"); - } - arg1 = reinterpret_cast< hfst::HfstInputStream * >(argp1); - try { - result = (hfst::HfstTransducer *)hfst_HfstInputStream_read(arg1); - } catch(EndOfStreamException &_e) { - SWIG_Python_Raise(SWIG_NewPointerObj((new EndOfStreamException(static_cast< const EndOfStreamException& >(_e))),SWIGTYPE_p_EndOfStreamException,SWIG_POINTER_OWN), "EndOfStreamException", SWIGTYPE_p_EndOfStreamException); SWIG_fail; - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_hfst__HfstTransducer, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *HfstInputStream_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_hfst__HfstInputStream, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *HfstInputStream_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_new_HfstTokenizer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::HfstTokenizer *result = 0 ; - - if (!SWIG_Python_UnpackTuple(args, "new_HfstTokenizer", 0, 0, 0)) SWIG_fail; - result = (hfst::HfstTokenizer *)new hfst::HfstTokenizer(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_hfst__HfstTokenizer, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTokenizer_add_skip_symbol(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::HfstTokenizer *arg1 = (hfst::HfstTokenizer *) 0 ; - std::string *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 = SWIG_OLDOBJ ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args, "HfstTokenizer_add_skip_symbol", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__HfstTokenizer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTokenizer_add_skip_symbol" "', argument " "1"" of type '" "hfst::HfstTokenizer *""'"); - } - arg1 = reinterpret_cast< hfst::HfstTokenizer * >(argp1); - { - std::string *ptr = (std::string *)0; - res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HfstTokenizer_add_skip_symbol" "', argument " "2"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstTokenizer_add_skip_symbol" "', argument " "2"" of type '" "std::string const &""'"); - } - arg2 = ptr; - } - (arg1)->add_skip_symbol((std::string const &)*arg2); - resultobj = SWIG_Py_Void(); - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTokenizer_add_multichar_symbol(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::HfstTokenizer *arg1 = (hfst::HfstTokenizer *) 0 ; - std::string *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 = SWIG_OLDOBJ ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args, "HfstTokenizer_add_multichar_symbol", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__HfstTokenizer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTokenizer_add_multichar_symbol" "', argument " "1"" of type '" "hfst::HfstTokenizer *""'"); - } - arg1 = reinterpret_cast< hfst::HfstTokenizer * >(argp1); - { - std::string *ptr = (std::string *)0; - res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HfstTokenizer_add_multichar_symbol" "', argument " "2"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstTokenizer_add_multichar_symbol" "', argument " "2"" of type '" "std::string const &""'"); - } - arg2 = ptr; - } - (arg1)->add_multichar_symbol((std::string const &)*arg2); - resultobj = SWIG_Py_Void(); - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTokenizer_tokenize__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - hfst::HfstTokenizer *arg1 = (hfst::HfstTokenizer *) 0 ; - std::string *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 = SWIG_OLDOBJ ; - hfst::StringPairVector result; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__HfstTokenizer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTokenizer_tokenize" "', argument " "1"" of type '" "hfst::HfstTokenizer const *""'"); - } - arg1 = reinterpret_cast< hfst::HfstTokenizer * >(argp1); - { - std::string *ptr = (std::string *)0; - res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HfstTokenizer_tokenize" "', argument " "2"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstTokenizer_tokenize" "', argument " "2"" of type '" "std::string const &""'"); - } - arg2 = ptr; - } - result = ((hfst::HfstTokenizer const *)arg1)->tokenize((std::string const &)*arg2); - resultobj = swig::from(static_cast< std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > > >(result)); - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTokenizer_tokenize_one_level(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::HfstTokenizer *arg1 = (hfst::HfstTokenizer *) 0 ; - std::string *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 = SWIG_OLDOBJ ; - PyObject *swig_obj[2] ; - hfst::StringVector result; - - if (!SWIG_Python_UnpackTuple(args, "HfstTokenizer_tokenize_one_level", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__HfstTokenizer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTokenizer_tokenize_one_level" "', argument " "1"" of type '" "hfst::HfstTokenizer const *""'"); - } - arg1 = reinterpret_cast< hfst::HfstTokenizer * >(argp1); - { - std::string *ptr = (std::string *)0; - res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HfstTokenizer_tokenize_one_level" "', argument " "2"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstTokenizer_tokenize_one_level" "', argument " "2"" of type '" "std::string const &""'"); - } - arg2 = ptr; - } - result = ((hfst::HfstTokenizer const *)arg1)->tokenize_one_level((std::string const &)*arg2); - resultobj = swig::from(static_cast< std::vector< std::string,std::allocator< std::string > > >(result)); - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTokenizer_tokenize_space_separated(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::string *arg1 = 0 ; - int res1 = SWIG_OLDOBJ ; - PyObject *swig_obj[1] ; - hfst::StringPairVector result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - std::string *ptr = (std::string *)0; - res1 = SWIG_AsPtr_std_string(swig_obj[0], &ptr); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTokenizer_tokenize_space_separated" "', argument " "1"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstTokenizer_tokenize_space_separated" "', argument " "1"" of type '" "std::string const &""'"); - } - arg1 = ptr; - } - result = hfst::HfstTokenizer::tokenize_space_separated((std::string const &)*arg1); - resultobj = swig::from(static_cast< std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > > >(result)); - if (SWIG_IsNewObj(res1)) delete arg1; - return resultobj; -fail: - if (SWIG_IsNewObj(res1)) delete arg1; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTokenizer_tokenize__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - hfst::HfstTokenizer *arg1 = (hfst::HfstTokenizer *) 0 ; - std::string *arg2 = 0 ; - std::string *arg3 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 = SWIG_OLDOBJ ; - int res3 = SWIG_OLDOBJ ; - hfst::StringPairVector result; - - if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__HfstTokenizer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTokenizer_tokenize" "', argument " "1"" of type '" "hfst::HfstTokenizer const *""'"); - } - arg1 = reinterpret_cast< hfst::HfstTokenizer * >(argp1); - { - std::string *ptr = (std::string *)0; - res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HfstTokenizer_tokenize" "', argument " "2"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstTokenizer_tokenize" "', argument " "2"" of type '" "std::string const &""'"); - } - arg2 = ptr; - } - { - std::string *ptr = (std::string *)0; - res3 = SWIG_AsPtr_std_string(swig_obj[2], &ptr); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "HfstTokenizer_tokenize" "', argument " "3"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstTokenizer_tokenize" "', argument " "3"" of type '" "std::string const &""'"); - } - arg3 = ptr; - } - result = ((hfst::HfstTokenizer const *)arg1)->tokenize((std::string const &)*arg2,(std::string const &)*arg3); - resultobj = swig::from(static_cast< std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > > >(result)); - if (SWIG_IsNewObj(res2)) delete arg2; - if (SWIG_IsNewObj(res3)) delete arg3; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - if (SWIG_IsNewObj(res3)) delete arg3; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstTokenizer_tokenize(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[4] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "HfstTokenizer_tokenize", 0, 3, argv))) SWIG_fail; - --argc; - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_hfst__HfstTokenizer, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_AsPtr_std_string(argv[1], (std::string**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_HfstTokenizer_tokenize__SWIG_0(self, argc, argv); - } - } - } - if (argc == 3) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_hfst__HfstTokenizer, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_AsPtr_std_string(argv[1], (std::string**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_AsPtr_std_string(argv[2], (std::string**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_HfstTokenizer_tokenize__SWIG_1(self, argc, argv); - } - } - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'HfstTokenizer_tokenize'.\n" - " Possible C/C++ prototypes are:\n" - " hfst::HfstTokenizer::tokenize(std::string const &) const\n" - " hfst::HfstTokenizer::tokenize(std::string const &,std::string const &) const\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_HfstTokenizer_check_utf8_correctness(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::string *arg1 = 0 ; - int res1 = SWIG_OLDOBJ ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - std::string *ptr = (std::string *)0; - res1 = SWIG_AsPtr_std_string(swig_obj[0], &ptr); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstTokenizer_check_utf8_correctness" "', argument " "1"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstTokenizer_check_utf8_correctness" "', argument " "1"" of type '" "std::string const &""'"); - } - arg1 = ptr; - } - hfst::HfstTokenizer::check_utf8_correctness((std::string const &)*arg1); - resultobj = SWIG_Py_Void(); - if (SWIG_IsNewObj(res1)) delete arg1; - return resultobj; -fail: - if (SWIG_IsNewObj(res1)) delete arg1; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_HfstTokenizer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::HfstTokenizer *arg1 = (hfst::HfstTokenizer *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__HfstTokenizer, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_HfstTokenizer" "', argument " "1"" of type '" "hfst::HfstTokenizer *""'"); - } - arg1 = reinterpret_cast< hfst::HfstTokenizer * >(argp1); - delete arg1; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *HfstTokenizer_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_hfst__HfstTokenizer, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *HfstTokenizer_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_new_HfstBasicTransducer__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **SWIGUNUSEDPARM(swig_obj)) { - PyObject *resultobj = 0; - hfst::implementations::HfstBasicTransducer *result = 0 ; - - if ((nobjs < 0) || (nobjs > 0)) SWIG_fail; - result = (hfst::implementations::HfstBasicTransducer *)new hfst::implementations::HfstBasicTransducer(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_hfst__implementations__HfstBasicTransducer, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_HfstBasicTransducer__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - hfst::implementations::HfstBasicTransducer *arg1 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - hfst::implementations::HfstBasicTransducer *result = 0 ; - - if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_hfst__implementations__HfstBasicTransducer, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_HfstBasicTransducer" "', argument " "1"" of type '" "hfst::implementations::HfstBasicTransducer const &""'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_HfstBasicTransducer" "', argument " "1"" of type '" "hfst::implementations::HfstBasicTransducer const &""'"); - } - arg1 = reinterpret_cast< hfst::implementations::HfstBasicTransducer * >(argp1); - result = (hfst::implementations::HfstBasicTransducer *)new hfst::implementations::HfstBasicTransducer((hfst::implementations::HfstBasicTransducer const &)*arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_hfst__implementations__HfstBasicTransducer, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_HfstBasicTransducer__SWIG_2(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - hfst::HfstTransducer *arg1 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - hfst::implementations::HfstBasicTransducer *result = 0 ; - - if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_hfst__HfstTransducer, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_HfstBasicTransducer" "', argument " "1"" of type '" "hfst::HfstTransducer const &""'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_HfstBasicTransducer" "', argument " "1"" of type '" "hfst::HfstTransducer const &""'"); - } - arg1 = reinterpret_cast< hfst::HfstTransducer * >(argp1); - result = (hfst::implementations::HfstBasicTransducer *)new hfst::implementations::HfstBasicTransducer((hfst::HfstTransducer const &)*arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_hfst__implementations__HfstBasicTransducer, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_HfstBasicTransducer(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[2] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "new_HfstBasicTransducer", 0, 1, argv))) SWIG_fail; - --argc; - if (argc == 0) { - return _wrap_new_HfstBasicTransducer__SWIG_0(self, argc, argv); - } - if (argc == 1) { - int _v; - int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_hfst__implementations__HfstBasicTransducer, SWIG_POINTER_NO_NULL | 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_new_HfstBasicTransducer__SWIG_1(self, argc, argv); - } - } - if (argc == 1) { - int _v; - int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_hfst__HfstTransducer, SWIG_POINTER_NO_NULL | 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_new_HfstBasicTransducer__SWIG_2(self, argc, argv); - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'new_HfstBasicTransducer'.\n" - " Possible C/C++ prototypes are:\n" - " hfst::implementations::HfstBasicTransducer::HfstBasicTransducer()\n" - " hfst::implementations::HfstBasicTransducer::HfstBasicTransducer(hfst::implementations::HfstBasicTransducer const &)\n" - " hfst::implementations::HfstBasicTransducer::HfstBasicTransducer(hfst::HfstTransducer const &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_HfstBasicTransducer_name_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::implementations::HfstBasicTransducer *arg1 = (hfst::implementations::HfstBasicTransducer *) 0 ; - std::string *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 = SWIG_OLDOBJ ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args, "HfstBasicTransducer_name_set", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__implementations__HfstBasicTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstBasicTransducer_name_set" "', argument " "1"" of type '" "hfst::implementations::HfstBasicTransducer *""'"); - } - arg1 = reinterpret_cast< hfst::implementations::HfstBasicTransducer * >(argp1); - { - std::string *ptr = (std::string *)0; - res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HfstBasicTransducer_name_set" "', argument " "2"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstBasicTransducer_name_set" "', argument " "2"" of type '" "std::string const &""'"); - } - arg2 = ptr; - } - if (arg1) (arg1)->name = *arg2; - resultobj = SWIG_Py_Void(); - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstBasicTransducer_name_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::implementations::HfstBasicTransducer *arg1 = (hfst::implementations::HfstBasicTransducer *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::string *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__implementations__HfstBasicTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstBasicTransducer_name_get" "', argument " "1"" of type '" "hfst::implementations::HfstBasicTransducer *""'"); - } - arg1 = reinterpret_cast< hfst::implementations::HfstBasicTransducer * >(argp1); - result = (std::string *) & ((arg1)->name); - resultobj = SWIG_From_std_string(static_cast< std::string >(*result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstBasicTransducer_add_symbol_to_alphabet(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::implementations::HfstBasicTransducer *arg1 = (hfst::implementations::HfstBasicTransducer *) 0 ; - std::string *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 = SWIG_OLDOBJ ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args, "HfstBasicTransducer_add_symbol_to_alphabet", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__implementations__HfstBasicTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstBasicTransducer_add_symbol_to_alphabet" "', argument " "1"" of type '" "hfst::implementations::HfstBasicTransducer *""'"); - } - arg1 = reinterpret_cast< hfst::implementations::HfstBasicTransducer * >(argp1); - { - std::string *ptr = (std::string *)0; - res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HfstBasicTransducer_add_symbol_to_alphabet" "', argument " "2"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstBasicTransducer_add_symbol_to_alphabet" "', argument " "2"" of type '" "std::string const &""'"); - } - arg2 = ptr; - } - (arg1)->add_symbol_to_alphabet((std::string const &)*arg2); - resultobj = SWIG_Py_Void(); - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstBasicTransducer_remove_symbol_from_alphabet(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::implementations::HfstBasicTransducer *arg1 = (hfst::implementations::HfstBasicTransducer *) 0 ; - std::string *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 = SWIG_OLDOBJ ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args, "HfstBasicTransducer_remove_symbol_from_alphabet", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__implementations__HfstBasicTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstBasicTransducer_remove_symbol_from_alphabet" "', argument " "1"" of type '" "hfst::implementations::HfstBasicTransducer *""'"); - } - arg1 = reinterpret_cast< hfst::implementations::HfstBasicTransducer * >(argp1); - { - std::string *ptr = (std::string *)0; - res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HfstBasicTransducer_remove_symbol_from_alphabet" "', argument " "2"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstBasicTransducer_remove_symbol_from_alphabet" "', argument " "2"" of type '" "std::string const &""'"); - } - arg2 = ptr; - } - (arg1)->remove_symbol_from_alphabet((std::string const &)*arg2); - resultobj = SWIG_Py_Void(); - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstBasicTransducer_remove_symbols_from_alphabet(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::implementations::HfstBasicTransducer *arg1 = (hfst::implementations::HfstBasicTransducer *) 0 ; - hfst::StringSet *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 = SWIG_OLDOBJ ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args, "HfstBasicTransducer_remove_symbols_from_alphabet", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__implementations__HfstBasicTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstBasicTransducer_remove_symbols_from_alphabet" "', argument " "1"" of type '" "hfst::implementations::HfstBasicTransducer *""'"); - } - arg1 = reinterpret_cast< hfst::implementations::HfstBasicTransducer * >(argp1); - { - std::set< std::string,std::less< std::string >,std::allocator< std::string > > *ptr = (std::set< std::string,std::less< std::string >,std::allocator< std::string > > *)0; - res2 = swig::asptr(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HfstBasicTransducer_remove_symbols_from_alphabet" "', argument " "2"" of type '" "hfst::StringSet const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstBasicTransducer_remove_symbols_from_alphabet" "', argument " "2"" of type '" "hfst::StringSet const &""'"); - } - arg2 = ptr; - } - (arg1)->remove_symbols_from_alphabet((hfst::StringSet const &)*arg2); - resultobj = SWIG_Py_Void(); - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstBasicTransducer_add_symbols_to_alphabet(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::implementations::HfstBasicTransducer *arg1 = (hfst::implementations::HfstBasicTransducer *) 0 ; - hfst::StringSet *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 = SWIG_OLDOBJ ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args, "HfstBasicTransducer_add_symbols_to_alphabet", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__implementations__HfstBasicTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstBasicTransducer_add_symbols_to_alphabet" "', argument " "1"" of type '" "hfst::implementations::HfstBasicTransducer *""'"); - } - arg1 = reinterpret_cast< hfst::implementations::HfstBasicTransducer * >(argp1); - { - std::set< std::string,std::less< std::string >,std::allocator< std::string > > *ptr = (std::set< std::string,std::less< std::string >,std::allocator< std::string > > *)0; - res2 = swig::asptr(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HfstBasicTransducer_add_symbols_to_alphabet" "', argument " "2"" of type '" "hfst::StringSet const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstBasicTransducer_add_symbols_to_alphabet" "', argument " "2"" of type '" "hfst::StringSet const &""'"); - } - arg2 = ptr; - } - (arg1)->add_symbols_to_alphabet((hfst::StringSet const &)*arg2); - resultobj = SWIG_Py_Void(); - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstBasicTransducer_symbols_used(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::implementations::HfstBasicTransducer *arg1 = (hfst::implementations::HfstBasicTransducer *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::set< std::string,std::less< std::string >,std::allocator< std::string > > result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__implementations__HfstBasicTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstBasicTransducer_symbols_used" "', argument " "1"" of type '" "hfst::implementations::HfstBasicTransducer *""'"); - } - arg1 = reinterpret_cast< hfst::implementations::HfstBasicTransducer * >(argp1); - result = (arg1)->symbols_used(); - resultobj = swig::from(static_cast< std::set< std::string,std::less< std::string >,std::allocator< std::string > > >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstBasicTransducer_prune_alphabet__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - hfst::implementations::HfstBasicTransducer *arg1 = (hfst::implementations::HfstBasicTransducer *) 0 ; - bool arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - bool val2 ; - int ecode2 = 0 ; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__implementations__HfstBasicTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstBasicTransducer_prune_alphabet" "', argument " "1"" of type '" "hfst::implementations::HfstBasicTransducer *""'"); - } - arg1 = reinterpret_cast< hfst::implementations::HfstBasicTransducer * >(argp1); - ecode2 = SWIG_AsVal_bool(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HfstBasicTransducer_prune_alphabet" "', argument " "2"" of type '" "bool""'"); - } - arg2 = static_cast< bool >(val2); - (arg1)->prune_alphabet(arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstBasicTransducer_prune_alphabet__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - hfst::implementations::HfstBasicTransducer *arg1 = (hfst::implementations::HfstBasicTransducer *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - - if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__implementations__HfstBasicTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstBasicTransducer_prune_alphabet" "', argument " "1"" of type '" "hfst::implementations::HfstBasicTransducer *""'"); - } - arg1 = reinterpret_cast< hfst::implementations::HfstBasicTransducer * >(argp1); - (arg1)->prune_alphabet(); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstBasicTransducer_prune_alphabet(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[3] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "HfstBasicTransducer_prune_alphabet", 0, 2, argv))) SWIG_fail; - --argc; - if (argc == 1) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_hfst__implementations__HfstBasicTransducer, 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_HfstBasicTransducer_prune_alphabet__SWIG_1(self, argc, argv); - } - } - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_hfst__implementations__HfstBasicTransducer, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_bool(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_HfstBasicTransducer_prune_alphabet__SWIG_0(self, argc, argv); - } - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'HfstBasicTransducer_prune_alphabet'.\n" - " Possible C/C++ prototypes are:\n" - " hfst::implementations::HfstBasicTransducer::prune_alphabet(bool)\n" - " hfst::implementations::HfstBasicTransducer::prune_alphabet()\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_HfstBasicTransducer_get_alphabet(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::implementations::HfstBasicTransducer *arg1 = (hfst::implementations::HfstBasicTransducer *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::set< std::string,std::less< std::string >,std::allocator< std::string > > *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__implementations__HfstBasicTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstBasicTransducer_get_alphabet" "', argument " "1"" of type '" "hfst::implementations::HfstBasicTransducer const *""'"); - } - arg1 = reinterpret_cast< hfst::implementations::HfstBasicTransducer * >(argp1); - result = (std::set< std::string,std::less< std::string >,std::allocator< std::string > > *) &((hfst::implementations::HfstBasicTransducer const *)arg1)->get_alphabet(); - resultobj = swig::from(static_cast< std::set< std::string,std::less< std::string >,std::allocator< std::string > > >(*result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstBasicTransducer_get_input_symbols(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::implementations::HfstBasicTransducer *arg1 = (hfst::implementations::HfstBasicTransducer *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - hfst::StringSet result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__implementations__HfstBasicTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstBasicTransducer_get_input_symbols" "', argument " "1"" of type '" "hfst::implementations::HfstBasicTransducer const *""'"); - } - arg1 = reinterpret_cast< hfst::implementations::HfstBasicTransducer * >(argp1); - result = ((hfst::implementations::HfstBasicTransducer const *)arg1)->get_input_symbols(); - resultobj = swig::from(static_cast< std::set< std::string,std::less< std::string >,std::allocator< std::string > > >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstBasicTransducer_get_output_symbols(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::implementations::HfstBasicTransducer *arg1 = (hfst::implementations::HfstBasicTransducer *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - hfst::StringSet result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__implementations__HfstBasicTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstBasicTransducer_get_output_symbols" "', argument " "1"" of type '" "hfst::implementations::HfstBasicTransducer const *""'"); - } - arg1 = reinterpret_cast< hfst::implementations::HfstBasicTransducer * >(argp1); - result = ((hfst::implementations::HfstBasicTransducer const *)arg1)->get_output_symbols(); - resultobj = swig::from(static_cast< std::set< std::string,std::less< std::string >,std::allocator< std::string > > >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstBasicTransducer_get_transition_pairs(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::implementations::HfstBasicTransducer *arg1 = (hfst::implementations::HfstBasicTransducer *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - hfst::StringPairSet result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__implementations__HfstBasicTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstBasicTransducer_get_transition_pairs" "', argument " "1"" of type '" "hfst::implementations::HfstBasicTransducer const *""'"); - } - arg1 = reinterpret_cast< hfst::implementations::HfstBasicTransducer * >(argp1); - result = ((hfst::implementations::HfstBasicTransducer const *)arg1)->get_transition_pairs(); - resultobj = swig::from(static_cast< std::set< std::pair< std::string,std::string >,std::less< std::pair< std::string,std::string > >,std::allocator< std::pair< std::string,std::string > > > >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstBasicTransducer_add_state__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - hfst::implementations::HfstBasicTransducer *arg1 = (hfst::implementations::HfstBasicTransducer *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - hfst::implementations::HfstState result; - - if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__implementations__HfstBasicTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstBasicTransducer_add_state" "', argument " "1"" of type '" "hfst::implementations::HfstBasicTransducer *""'"); - } - arg1 = reinterpret_cast< hfst::implementations::HfstBasicTransducer * >(argp1); - result = (hfst::implementations::HfstState)(arg1)->add_state(); - resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstBasicTransducer_add_state__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - hfst::implementations::HfstBasicTransducer *arg1 = (hfst::implementations::HfstBasicTransducer *) 0 ; - hfst::implementations::HfstState arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - unsigned int val2 ; - int ecode2 = 0 ; - hfst::implementations::HfstState result; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__implementations__HfstBasicTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstBasicTransducer_add_state" "', argument " "1"" of type '" "hfst::implementations::HfstBasicTransducer *""'"); - } - arg1 = reinterpret_cast< hfst::implementations::HfstBasicTransducer * >(argp1); - ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HfstBasicTransducer_add_state" "', argument " "2"" of type '" "hfst::implementations::HfstState""'"); - } - arg2 = static_cast< hfst::implementations::HfstState >(val2); - result = (hfst::implementations::HfstState)(arg1)->add_state(arg2); - resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstBasicTransducer_add_state(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[3] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "HfstBasicTransducer_add_state", 0, 2, argv))) SWIG_fail; - --argc; - if (argc == 1) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_hfst__implementations__HfstBasicTransducer, 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_HfstBasicTransducer_add_state__SWIG_0(self, argc, argv); - } - } - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_hfst__implementations__HfstBasicTransducer, 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_HfstBasicTransducer_add_state__SWIG_1(self, argc, argv); - } - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'HfstBasicTransducer_add_state'.\n" - " Possible C/C++ prototypes are:\n" - " hfst::implementations::HfstBasicTransducer::add_state()\n" - " hfst::implementations::HfstBasicTransducer::add_state(hfst::implementations::HfstState)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_HfstBasicTransducer_get_max_state(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::implementations::HfstBasicTransducer *arg1 = (hfst::implementations::HfstBasicTransducer *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - hfst::implementations::HfstState result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__implementations__HfstBasicTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstBasicTransducer_get_max_state" "', argument " "1"" of type '" "hfst::implementations::HfstBasicTransducer const *""'"); - } - arg1 = reinterpret_cast< hfst::implementations::HfstBasicTransducer * >(argp1); - result = (hfst::implementations::HfstState)((hfst::implementations::HfstBasicTransducer const *)arg1)->get_max_state(); - resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstBasicTransducer_states(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::implementations::HfstBasicTransducer *arg1 = (hfst::implementations::HfstBasicTransducer *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::vector< hfst::implementations::HfstState,std::allocator< hfst::implementations::HfstState > > result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__implementations__HfstBasicTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstBasicTransducer_states" "', argument " "1"" of type '" "hfst::implementations::HfstBasicTransducer const *""'"); - } - arg1 = reinterpret_cast< hfst::implementations::HfstBasicTransducer * >(argp1); - result = ((hfst::implementations::HfstBasicTransducer const *)arg1)->states(); - resultobj = swig::from(static_cast< std::vector< unsigned int,std::allocator< unsigned int > > >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstBasicTransducer_add_transition__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - hfst::implementations::HfstBasicTransducer *arg1 = (hfst::implementations::HfstBasicTransducer *) 0 ; - hfst::implementations::HfstState arg2 ; - hfst::implementations::HfstBasicTransition *arg3 = 0 ; - bool arg4 ; - void *argp1 = 0 ; - int res1 = 0 ; - unsigned int val2 ; - int ecode2 = 0 ; - void *argp3 = 0 ; - int res3 = 0 ; - bool val4 ; - int ecode4 = 0 ; - - if ((nobjs < 4) || (nobjs > 4)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__implementations__HfstBasicTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstBasicTransducer_add_transition" "', argument " "1"" of type '" "hfst::implementations::HfstBasicTransducer *""'"); - } - arg1 = reinterpret_cast< hfst::implementations::HfstBasicTransducer * >(argp1); - ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HfstBasicTransducer_add_transition" "', argument " "2"" of type '" "hfst::implementations::HfstState""'"); - } - arg2 = static_cast< hfst::implementations::HfstState >(val2); - res3 = SWIG_ConvertPtr(swig_obj[2], &argp3, SWIGTYPE_p_hfst__implementations__HfstBasicTransition, 0 | 0); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "HfstBasicTransducer_add_transition" "', argument " "3"" of type '" "hfst::implementations::HfstBasicTransition const &""'"); - } - if (!argp3) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstBasicTransducer_add_transition" "', argument " "3"" of type '" "hfst::implementations::HfstBasicTransition const &""'"); - } - arg3 = reinterpret_cast< hfst::implementations::HfstBasicTransition * >(argp3); - ecode4 = SWIG_AsVal_bool(swig_obj[3], &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "HfstBasicTransducer_add_transition" "', argument " "4"" of type '" "bool""'"); - } - arg4 = static_cast< bool >(val4); - (arg1)->add_transition(arg2,(hfst::implementations::HfstBasicTransition const &)*arg3,arg4); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstBasicTransducer_add_transition__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - hfst::implementations::HfstBasicTransducer *arg1 = (hfst::implementations::HfstBasicTransducer *) 0 ; - hfst::implementations::HfstState arg2 ; - hfst::implementations::HfstBasicTransition *arg3 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - unsigned int val2 ; - int ecode2 = 0 ; - void *argp3 = 0 ; - int res3 = 0 ; - - if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__implementations__HfstBasicTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstBasicTransducer_add_transition" "', argument " "1"" of type '" "hfst::implementations::HfstBasicTransducer *""'"); - } - arg1 = reinterpret_cast< hfst::implementations::HfstBasicTransducer * >(argp1); - ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HfstBasicTransducer_add_transition" "', argument " "2"" of type '" "hfst::implementations::HfstState""'"); - } - arg2 = static_cast< hfst::implementations::HfstState >(val2); - res3 = SWIG_ConvertPtr(swig_obj[2], &argp3, SWIGTYPE_p_hfst__implementations__HfstBasicTransition, 0 | 0); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "HfstBasicTransducer_add_transition" "', argument " "3"" of type '" "hfst::implementations::HfstBasicTransition const &""'"); - } - if (!argp3) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstBasicTransducer_add_transition" "', argument " "3"" of type '" "hfst::implementations::HfstBasicTransition const &""'"); - } - arg3 = reinterpret_cast< hfst::implementations::HfstBasicTransition * >(argp3); - (arg1)->add_transition(arg2,(hfst::implementations::HfstBasicTransition const &)*arg3); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstBasicTransducer_remove_transition__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - hfst::implementations::HfstBasicTransducer *arg1 = (hfst::implementations::HfstBasicTransducer *) 0 ; - hfst::implementations::HfstState arg2 ; - hfst::implementations::HfstBasicTransition *arg3 = 0 ; - bool arg4 ; - void *argp1 = 0 ; - int res1 = 0 ; - unsigned int val2 ; - int ecode2 = 0 ; - void *argp3 = 0 ; - int res3 = 0 ; - bool val4 ; - int ecode4 = 0 ; - - if ((nobjs < 4) || (nobjs > 4)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__implementations__HfstBasicTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstBasicTransducer_remove_transition" "', argument " "1"" of type '" "hfst::implementations::HfstBasicTransducer *""'"); - } - arg1 = reinterpret_cast< hfst::implementations::HfstBasicTransducer * >(argp1); - ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HfstBasicTransducer_remove_transition" "', argument " "2"" of type '" "hfst::implementations::HfstState""'"); - } - arg2 = static_cast< hfst::implementations::HfstState >(val2); - res3 = SWIG_ConvertPtr(swig_obj[2], &argp3, SWIGTYPE_p_hfst__implementations__HfstBasicTransition, 0 | 0); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "HfstBasicTransducer_remove_transition" "', argument " "3"" of type '" "hfst::implementations::HfstBasicTransition const &""'"); - } - if (!argp3) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstBasicTransducer_remove_transition" "', argument " "3"" of type '" "hfst::implementations::HfstBasicTransition const &""'"); - } - arg3 = reinterpret_cast< hfst::implementations::HfstBasicTransition * >(argp3); - ecode4 = SWIG_AsVal_bool(swig_obj[3], &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "HfstBasicTransducer_remove_transition" "', argument " "4"" of type '" "bool""'"); - } - arg4 = static_cast< bool >(val4); - (arg1)->remove_transition(arg2,(hfst::implementations::HfstBasicTransition const &)*arg3,arg4); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstBasicTransducer_remove_transition__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - hfst::implementations::HfstBasicTransducer *arg1 = (hfst::implementations::HfstBasicTransducer *) 0 ; - hfst::implementations::HfstState arg2 ; - hfst::implementations::HfstBasicTransition *arg3 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - unsigned int val2 ; - int ecode2 = 0 ; - void *argp3 = 0 ; - int res3 = 0 ; - - if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__implementations__HfstBasicTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstBasicTransducer_remove_transition" "', argument " "1"" of type '" "hfst::implementations::HfstBasicTransducer *""'"); - } - arg1 = reinterpret_cast< hfst::implementations::HfstBasicTransducer * >(argp1); - ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HfstBasicTransducer_remove_transition" "', argument " "2"" of type '" "hfst::implementations::HfstState""'"); - } - arg2 = static_cast< hfst::implementations::HfstState >(val2); - res3 = SWIG_ConvertPtr(swig_obj[2], &argp3, SWIGTYPE_p_hfst__implementations__HfstBasicTransition, 0 | 0); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "HfstBasicTransducer_remove_transition" "', argument " "3"" of type '" "hfst::implementations::HfstBasicTransition const &""'"); - } - if (!argp3) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstBasicTransducer_remove_transition" "', argument " "3"" of type '" "hfst::implementations::HfstBasicTransition const &""'"); - } - arg3 = reinterpret_cast< hfst::implementations::HfstBasicTransition * >(argp3); - (arg1)->remove_transition(arg2,(hfst::implementations::HfstBasicTransition const &)*arg3); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstBasicTransducer_remove_transition(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[5] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "HfstBasicTransducer_remove_transition", 0, 4, argv))) SWIG_fail; - --argc; - if (argc == 3) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_hfst__implementations__HfstBasicTransducer, 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_ConvertPtr(argv[2], 0, SWIGTYPE_p_hfst__implementations__HfstBasicTransition, SWIG_POINTER_NO_NULL | 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_HfstBasicTransducer_remove_transition__SWIG_1(self, argc, argv); - } - } - } - } - if (argc == 4) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_hfst__implementations__HfstBasicTransducer, 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_ConvertPtr(argv[2], 0, SWIGTYPE_p_hfst__implementations__HfstBasicTransition, SWIG_POINTER_NO_NULL | 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_bool(argv[3], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_HfstBasicTransducer_remove_transition__SWIG_0(self, argc, argv); - } - } - } - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'HfstBasicTransducer_remove_transition'.\n" - " Possible C/C++ prototypes are:\n" - " hfst::implementations::HfstBasicTransducer::remove_transition(hfst::implementations::HfstState,hfst::implementations::HfstBasicTransition const &,bool)\n" - " hfst::implementations::HfstBasicTransducer::remove_transition(hfst::implementations::HfstState,hfst::implementations::HfstBasicTransition const &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_HfstBasicTransducer_is_final_state(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::implementations::HfstBasicTransducer *arg1 = (hfst::implementations::HfstBasicTransducer *) 0 ; - hfst::implementations::HfstState arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - unsigned int val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - bool result; - - if (!SWIG_Python_UnpackTuple(args, "HfstBasicTransducer_is_final_state", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__implementations__HfstBasicTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstBasicTransducer_is_final_state" "', argument " "1"" of type '" "hfst::implementations::HfstBasicTransducer const *""'"); - } - arg1 = reinterpret_cast< hfst::implementations::HfstBasicTransducer * >(argp1); - ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HfstBasicTransducer_is_final_state" "', argument " "2"" of type '" "hfst::implementations::HfstState""'"); - } - arg2 = static_cast< hfst::implementations::HfstState >(val2); - result = (bool)((hfst::implementations::HfstBasicTransducer const *)arg1)->is_final_state(arg2); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstBasicTransducer_get_final_weight(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::implementations::HfstBasicTransducer *arg1 = (hfst::implementations::HfstBasicTransducer *) 0 ; - hfst::implementations::HfstState arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - unsigned int val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - float result; - - if (!SWIG_Python_UnpackTuple(args, "HfstBasicTransducer_get_final_weight", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__implementations__HfstBasicTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstBasicTransducer_get_final_weight" "', argument " "1"" of type '" "hfst::implementations::HfstBasicTransducer const *""'"); - } - arg1 = reinterpret_cast< hfst::implementations::HfstBasicTransducer * >(argp1); - ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HfstBasicTransducer_get_final_weight" "', argument " "2"" of type '" "hfst::implementations::HfstState""'"); - } - arg2 = static_cast< hfst::implementations::HfstState >(val2); - try { - result = (float)((hfst::implementations::HfstBasicTransducer const *)arg1)->get_final_weight(arg2); - } catch(StateIsNotFinalException &_e) { - SWIG_Python_Raise(SWIG_NewPointerObj((new StateIsNotFinalException(static_cast< const StateIsNotFinalException& >(_e))),SWIGTYPE_p_StateIsNotFinalException,SWIG_POINTER_OWN), "StateIsNotFinalException", SWIGTYPE_p_StateIsNotFinalException); SWIG_fail; - } catch(StateIndexOutOfBoundsException &_e) { - SWIG_Python_Raise(SWIG_NewPointerObj((new StateIndexOutOfBoundsException(static_cast< const StateIndexOutOfBoundsException& >(_e))),SWIGTYPE_p_StateIndexOutOfBoundsException,SWIG_POINTER_OWN), "StateIndexOutOfBoundsException", SWIGTYPE_p_StateIndexOutOfBoundsException); SWIG_fail; - } - resultobj = SWIG_From_float(static_cast< float >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstBasicTransducer_set_final_weight(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::implementations::HfstBasicTransducer *arg1 = (hfst::implementations::HfstBasicTransducer *) 0 ; - hfst::implementations::HfstState arg2 ; - float *arg3 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - unsigned int val2 ; - int ecode2 = 0 ; - float temp3 ; - float val3 ; - int ecode3 = 0 ; - PyObject *swig_obj[3] ; - - if (!SWIG_Python_UnpackTuple(args, "HfstBasicTransducer_set_final_weight", 3, 3, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__implementations__HfstBasicTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstBasicTransducer_set_final_weight" "', argument " "1"" of type '" "hfst::implementations::HfstBasicTransducer *""'"); - } - arg1 = reinterpret_cast< hfst::implementations::HfstBasicTransducer * >(argp1); - ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HfstBasicTransducer_set_final_weight" "', argument " "2"" of type '" "hfst::implementations::HfstState""'"); - } - arg2 = static_cast< hfst::implementations::HfstState >(val2); - ecode3 = SWIG_AsVal_float(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "HfstBasicTransducer_set_final_weight" "', argument " "3"" of type '" "float""'"); - } - temp3 = static_cast< float >(val3); - arg3 = &temp3; - (arg1)->set_final_weight(arg2,(float const &)*arg3); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstBasicTransducer_remove_final_weight(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::implementations::HfstBasicTransducer *arg1 = (hfst::implementations::HfstBasicTransducer *) 0 ; - hfst::implementations::HfstState arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - unsigned int val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args, "HfstBasicTransducer_remove_final_weight", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__implementations__HfstBasicTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstBasicTransducer_remove_final_weight" "', argument " "1"" of type '" "hfst::implementations::HfstBasicTransducer *""'"); - } - arg1 = reinterpret_cast< hfst::implementations::HfstBasicTransducer * >(argp1); - ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HfstBasicTransducer_remove_final_weight" "', argument " "2"" of type '" "hfst::implementations::HfstState""'"); - } - arg2 = static_cast< hfst::implementations::HfstState >(val2); - (arg1)->remove_final_weight(arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstBasicTransducer__transitions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::implementations::HfstBasicTransducer *arg1 = (hfst::implementations::HfstBasicTransducer *) 0 ; - hfst::implementations::HfstState arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - unsigned int val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - hfst::implementations::HfstBasicTransitions *result = 0 ; - - if (!SWIG_Python_UnpackTuple(args, "HfstBasicTransducer__transitions", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__implementations__HfstBasicTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstBasicTransducer__transitions" "', argument " "1"" of type '" "hfst::implementations::HfstBasicTransducer *""'"); - } - arg1 = reinterpret_cast< hfst::implementations::HfstBasicTransducer * >(argp1); - ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HfstBasicTransducer__transitions" "', argument " "2"" of type '" "hfst::implementations::HfstState""'"); - } - arg2 = static_cast< hfst::implementations::HfstState >(val2); - result = (hfst::implementations::HfstBasicTransitions *) &(arg1)->transitions(arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_hfst__implementations__HfstBasicTransition_std__allocatorT_hfst__implementations__HfstBasicTransition_t_t, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstBasicTransducer_is_infinitely_ambiguous(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::implementations::HfstBasicTransducer *arg1 = (hfst::implementations::HfstBasicTransducer *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - bool result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__implementations__HfstBasicTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstBasicTransducer_is_infinitely_ambiguous" "', argument " "1"" of type '" "hfst::implementations::HfstBasicTransducer *""'"); - } - arg1 = reinterpret_cast< hfst::implementations::HfstBasicTransducer * >(argp1); - result = (bool)(arg1)->is_infinitely_ambiguous(); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstBasicTransducer_is_lookup_infinitely_ambiguous(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::implementations::HfstBasicTransducer *arg1 = (hfst::implementations::HfstBasicTransducer *) 0 ; - hfst::StringVector *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 = SWIG_OLDOBJ ; - PyObject *swig_obj[2] ; - bool result; - - if (!SWIG_Python_UnpackTuple(args, "HfstBasicTransducer_is_lookup_infinitely_ambiguous", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__implementations__HfstBasicTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstBasicTransducer_is_lookup_infinitely_ambiguous" "', argument " "1"" of type '" "hfst::implementations::HfstBasicTransducer *""'"); - } - arg1 = reinterpret_cast< hfst::implementations::HfstBasicTransducer * >(argp1); - { - std::vector< std::string,std::allocator< std::string > > *ptr = (std::vector< std::string,std::allocator< std::string > > *)0; - res2 = swig::asptr(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HfstBasicTransducer_is_lookup_infinitely_ambiguous" "', argument " "2"" of type '" "hfst::StringVector const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstBasicTransducer_is_lookup_infinitely_ambiguous" "', argument " "2"" of type '" "hfst::StringVector const &""'"); - } - arg2 = ptr; - } - result = (bool)(arg1)->is_lookup_infinitely_ambiguous((hfst::StringVector const &)*arg2); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstBasicTransducer_longest_path_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::implementations::HfstBasicTransducer *arg1 = (hfst::implementations::HfstBasicTransducer *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - int result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__implementations__HfstBasicTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstBasicTransducer_longest_path_size" "', argument " "1"" of type '" "hfst::implementations::HfstBasicTransducer *""'"); - } - arg1 = reinterpret_cast< hfst::implementations::HfstBasicTransducer * >(argp1); - result = (int)(arg1)->longest_path_size(); - resultobj = SWIG_From_int(static_cast< int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstBasicTransducer__substitute_symbol__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - hfst::implementations::HfstBasicTransducer *arg1 = (hfst::implementations::HfstBasicTransducer *) 0 ; - std::string *arg2 = 0 ; - std::string *arg3 = 0 ; - bool arg4 ; - bool arg5 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 = SWIG_OLDOBJ ; - int res3 = SWIG_OLDOBJ ; - bool val4 ; - int ecode4 = 0 ; - bool val5 ; - int ecode5 = 0 ; - - if ((nobjs < 5) || (nobjs > 5)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__implementations__HfstBasicTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstBasicTransducer__substitute_symbol" "', argument " "1"" of type '" "hfst::implementations::HfstBasicTransducer *""'"); - } - arg1 = reinterpret_cast< hfst::implementations::HfstBasicTransducer * >(argp1); - { - std::string *ptr = (std::string *)0; - res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HfstBasicTransducer__substitute_symbol" "', argument " "2"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstBasicTransducer__substitute_symbol" "', argument " "2"" of type '" "std::string const &""'"); - } - arg2 = ptr; - } - { - std::string *ptr = (std::string *)0; - res3 = SWIG_AsPtr_std_string(swig_obj[2], &ptr); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "HfstBasicTransducer__substitute_symbol" "', argument " "3"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstBasicTransducer__substitute_symbol" "', argument " "3"" of type '" "std::string const &""'"); - } - arg3 = ptr; - } - ecode4 = SWIG_AsVal_bool(swig_obj[3], &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "HfstBasicTransducer__substitute_symbol" "', argument " "4"" of type '" "bool""'"); - } - arg4 = static_cast< bool >(val4); - ecode5 = SWIG_AsVal_bool(swig_obj[4], &val5); - if (!SWIG_IsOK(ecode5)) { - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "HfstBasicTransducer__substitute_symbol" "', argument " "5"" of type '" "bool""'"); - } - arg5 = static_cast< bool >(val5); - hfst_implementations_HfstBasicTransducer__substitute_symbol__SWIG_0(arg1,(std::string const &)*arg2,(std::string const &)*arg3,arg4,arg5); - resultobj = SWIG_Py_Void(); - if (SWIG_IsNewObj(res2)) delete arg2; - if (SWIG_IsNewObj(res3)) delete arg3; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - if (SWIG_IsNewObj(res3)) delete arg3; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstBasicTransducer__substitute_symbol__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - hfst::implementations::HfstBasicTransducer *arg1 = (hfst::implementations::HfstBasicTransducer *) 0 ; - std::string *arg2 = 0 ; - std::string *arg3 = 0 ; - bool arg4 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 = SWIG_OLDOBJ ; - int res3 = SWIG_OLDOBJ ; - bool val4 ; - int ecode4 = 0 ; - - if ((nobjs < 4) || (nobjs > 4)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__implementations__HfstBasicTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstBasicTransducer__substitute_symbol" "', argument " "1"" of type '" "hfst::implementations::HfstBasicTransducer *""'"); - } - arg1 = reinterpret_cast< hfst::implementations::HfstBasicTransducer * >(argp1); - { - std::string *ptr = (std::string *)0; - res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HfstBasicTransducer__substitute_symbol" "', argument " "2"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstBasicTransducer__substitute_symbol" "', argument " "2"" of type '" "std::string const &""'"); - } - arg2 = ptr; - } - { - std::string *ptr = (std::string *)0; - res3 = SWIG_AsPtr_std_string(swig_obj[2], &ptr); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "HfstBasicTransducer__substitute_symbol" "', argument " "3"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstBasicTransducer__substitute_symbol" "', argument " "3"" of type '" "std::string const &""'"); - } - arg3 = ptr; - } - ecode4 = SWIG_AsVal_bool(swig_obj[3], &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "HfstBasicTransducer__substitute_symbol" "', argument " "4"" of type '" "bool""'"); - } - arg4 = static_cast< bool >(val4); - hfst_implementations_HfstBasicTransducer__substitute_symbol__SWIG_0(arg1,(std::string const &)*arg2,(std::string const &)*arg3,arg4); - resultobj = SWIG_Py_Void(); - if (SWIG_IsNewObj(res2)) delete arg2; - if (SWIG_IsNewObj(res3)) delete arg3; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - if (SWIG_IsNewObj(res3)) delete arg3; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstBasicTransducer__substitute_symbol__SWIG_2(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - hfst::implementations::HfstBasicTransducer *arg1 = (hfst::implementations::HfstBasicTransducer *) 0 ; - std::string *arg2 = 0 ; - std::string *arg3 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 = SWIG_OLDOBJ ; - int res3 = SWIG_OLDOBJ ; - - if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__implementations__HfstBasicTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstBasicTransducer__substitute_symbol" "', argument " "1"" of type '" "hfst::implementations::HfstBasicTransducer *""'"); - } - arg1 = reinterpret_cast< hfst::implementations::HfstBasicTransducer * >(argp1); - { - std::string *ptr = (std::string *)0; - res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HfstBasicTransducer__substitute_symbol" "', argument " "2"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstBasicTransducer__substitute_symbol" "', argument " "2"" of type '" "std::string const &""'"); - } - arg2 = ptr; - } - { - std::string *ptr = (std::string *)0; - res3 = SWIG_AsPtr_std_string(swig_obj[2], &ptr); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "HfstBasicTransducer__substitute_symbol" "', argument " "3"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstBasicTransducer__substitute_symbol" "', argument " "3"" of type '" "std::string const &""'"); - } - arg3 = ptr; - } - hfst_implementations_HfstBasicTransducer__substitute_symbol__SWIG_0(arg1,(std::string const &)*arg2,(std::string const &)*arg3); - resultobj = SWIG_Py_Void(); - if (SWIG_IsNewObj(res2)) delete arg2; - if (SWIG_IsNewObj(res3)) delete arg3; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - if (SWIG_IsNewObj(res3)) delete arg3; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstBasicTransducer__substitute_symbol(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[6] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "HfstBasicTransducer__substitute_symbol", 0, 5, argv))) SWIG_fail; - --argc; - if (argc == 3) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_hfst__implementations__HfstBasicTransducer, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_AsPtr_std_string(argv[1], (std::string**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_AsPtr_std_string(argv[2], (std::string**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_HfstBasicTransducer__substitute_symbol__SWIG_2(self, argc, argv); - } - } - } - } - if (argc == 4) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_hfst__implementations__HfstBasicTransducer, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_AsPtr_std_string(argv[1], (std::string**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_AsPtr_std_string(argv[2], (std::string**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_bool(argv[3], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_HfstBasicTransducer__substitute_symbol__SWIG_1(self, argc, argv); - } - } - } - } - } - if (argc == 5) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_hfst__implementations__HfstBasicTransducer, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_AsPtr_std_string(argv[1], (std::string**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_AsPtr_std_string(argv[2], (std::string**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_bool(argv[3], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - { - int res = SWIG_AsVal_bool(argv[4], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_HfstBasicTransducer__substitute_symbol__SWIG_0(self, argc, argv); - } - } - } - } - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'HfstBasicTransducer__substitute_symbol'.\n" - " Possible C/C++ prototypes are:\n" - " hfst::implementations::HfstBasicTransducer::_substitute_symbol(std::string const &,std::string const &,bool,bool)\n" - " hfst::implementations::HfstBasicTransducer::_substitute_symbol(std::string const &,std::string const &,bool)\n" - " hfst::implementations::HfstBasicTransducer::_substitute_symbol(std::string const &,std::string const &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_HfstBasicTransducer__substitute_symbol_pair(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::implementations::HfstBasicTransducer *arg1 = (hfst::implementations::HfstBasicTransducer *) 0 ; - hfst::StringPair *arg2 = 0 ; - hfst::StringPair *arg3 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 = SWIG_OLDOBJ ; - int res3 = SWIG_OLDOBJ ; - PyObject *swig_obj[3] ; - - if (!SWIG_Python_UnpackTuple(args, "HfstBasicTransducer__substitute_symbol_pair", 3, 3, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__implementations__HfstBasicTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstBasicTransducer__substitute_symbol_pair" "', argument " "1"" of type '" "hfst::implementations::HfstBasicTransducer *""'"); - } - arg1 = reinterpret_cast< hfst::implementations::HfstBasicTransducer * >(argp1); - { - std::pair< std::string,std::string > *ptr = (std::pair< std::string,std::string > *)0; - res2 = swig::asptr(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HfstBasicTransducer__substitute_symbol_pair" "', argument " "2"" of type '" "hfst::StringPair const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstBasicTransducer__substitute_symbol_pair" "', argument " "2"" of type '" "hfst::StringPair const &""'"); - } - arg2 = ptr; - } - { - std::pair< std::string,std::string > *ptr = (std::pair< std::string,std::string > *)0; - res3 = swig::asptr(swig_obj[2], &ptr); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "HfstBasicTransducer__substitute_symbol_pair" "', argument " "3"" of type '" "hfst::StringPair const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstBasicTransducer__substitute_symbol_pair" "', argument " "3"" of type '" "hfst::StringPair const &""'"); - } - arg3 = ptr; - } - hfst_implementations_HfstBasicTransducer__substitute_symbol_pair(arg1,(std::pair< std::string,std::string > const &)*arg2,(std::pair< std::string,std::string > const &)*arg3); - resultobj = SWIG_Py_Void(); - if (SWIG_IsNewObj(res2)) delete arg2; - if (SWIG_IsNewObj(res3)) delete arg3; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - if (SWIG_IsNewObj(res3)) delete arg3; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstBasicTransducer__substitute_symbol_pair_with_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::implementations::HfstBasicTransducer *arg1 = (hfst::implementations::HfstBasicTransducer *) 0 ; - hfst::StringPair *arg2 = 0 ; - hfst::StringPairSet *arg3 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 = SWIG_OLDOBJ ; - int res3 = SWIG_OLDOBJ ; - PyObject *swig_obj[3] ; - - if (!SWIG_Python_UnpackTuple(args, "HfstBasicTransducer__substitute_symbol_pair_with_set", 3, 3, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__implementations__HfstBasicTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstBasicTransducer__substitute_symbol_pair_with_set" "', argument " "1"" of type '" "hfst::implementations::HfstBasicTransducer *""'"); - } - arg1 = reinterpret_cast< hfst::implementations::HfstBasicTransducer * >(argp1); - { - std::pair< std::string,std::string > *ptr = (std::pair< std::string,std::string > *)0; - res2 = swig::asptr(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HfstBasicTransducer__substitute_symbol_pair_with_set" "', argument " "2"" of type '" "hfst::StringPair const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstBasicTransducer__substitute_symbol_pair_with_set" "', argument " "2"" of type '" "hfst::StringPair const &""'"); - } - arg2 = ptr; - } - { - std::set< std::pair< std::string,std::string >,std::less< std::pair< std::string,std::string > >,std::allocator< std::pair< std::string,std::string > > > *ptr = (std::set< std::pair< std::string,std::string >,std::less< std::pair< std::string,std::string > >,std::allocator< std::pair< std::string,std::string > > > *)0; - res3 = swig::asptr(swig_obj[2], &ptr); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "HfstBasicTransducer__substitute_symbol_pair_with_set" "', argument " "3"" of type '" "hfst::StringPairSet const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstBasicTransducer__substitute_symbol_pair_with_set" "', argument " "3"" of type '" "hfst::StringPairSet const &""'"); - } - arg3 = ptr; - } - hfst_implementations_HfstBasicTransducer__substitute_symbol_pair_with_set(arg1,(std::pair< std::string,std::string > const &)*arg2,(std::set< std::pair< std::string,std::string >,std::less< std::pair< std::string,std::string > >,std::allocator< std::pair< std::string,std::string > > > const &)*arg3); - resultobj = SWIG_Py_Void(); - if (SWIG_IsNewObj(res2)) delete arg2; - if (SWIG_IsNewObj(res3)) delete arg3; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - if (SWIG_IsNewObj(res3)) delete arg3; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstBasicTransducer__substitute_symbol_pair_with_transducer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::implementations::HfstBasicTransducer *arg1 = (hfst::implementations::HfstBasicTransducer *) 0 ; - hfst::StringPair *arg2 = 0 ; - hfst::implementations::HfstBasicTransducer *arg3 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 = SWIG_OLDOBJ ; - void *argp3 = 0 ; - int res3 = 0 ; - PyObject *swig_obj[3] ; - - if (!SWIG_Python_UnpackTuple(args, "HfstBasicTransducer__substitute_symbol_pair_with_transducer", 3, 3, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__implementations__HfstBasicTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstBasicTransducer__substitute_symbol_pair_with_transducer" "', argument " "1"" of type '" "hfst::implementations::HfstBasicTransducer *""'"); - } - arg1 = reinterpret_cast< hfst::implementations::HfstBasicTransducer * >(argp1); - { - std::pair< std::string,std::string > *ptr = (std::pair< std::string,std::string > *)0; - res2 = swig::asptr(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HfstBasicTransducer__substitute_symbol_pair_with_transducer" "', argument " "2"" of type '" "hfst::StringPair const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstBasicTransducer__substitute_symbol_pair_with_transducer" "', argument " "2"" of type '" "hfst::StringPair const &""'"); - } - arg2 = ptr; - } - res3 = SWIG_ConvertPtr(swig_obj[2], &argp3, SWIGTYPE_p_hfst__implementations__HfstBasicTransducer, 0 ); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "HfstBasicTransducer__substitute_symbol_pair_with_transducer" "', argument " "3"" of type '" "hfst::implementations::HfstBasicTransducer &""'"); - } - if (!argp3) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstBasicTransducer__substitute_symbol_pair_with_transducer" "', argument " "3"" of type '" "hfst::implementations::HfstBasicTransducer &""'"); - } - arg3 = reinterpret_cast< hfst::implementations::HfstBasicTransducer * >(argp3); - hfst_implementations_HfstBasicTransducer__substitute_symbol_pair_with_transducer(arg1,(std::pair< std::string,std::string > const &)*arg2,*arg3); - resultobj = SWIG_Py_Void(); - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstBasicTransducer__substitute_symbols(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::implementations::HfstBasicTransducer *arg1 = (hfst::implementations::HfstBasicTransducer *) 0 ; - hfst::HfstSymbolSubstitutions *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 = SWIG_OLDOBJ ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args, "HfstBasicTransducer__substitute_symbols", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__implementations__HfstBasicTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstBasicTransducer__substitute_symbols" "', argument " "1"" of type '" "hfst::implementations::HfstBasicTransducer *""'"); - } - arg1 = reinterpret_cast< hfst::implementations::HfstBasicTransducer * >(argp1); - { - std::map< std::string,std::string,std::less< std::string >,std::allocator< std::pair< std::string const,std::string > > > *ptr = (std::map< std::string,std::string,std::less< std::string >,std::allocator< std::pair< std::string const,std::string > > > *)0; - res2 = swig::asptr(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HfstBasicTransducer__substitute_symbols" "', argument " "2"" of type '" "hfst::HfstSymbolSubstitutions const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstBasicTransducer__substitute_symbols" "', argument " "2"" of type '" "hfst::HfstSymbolSubstitutions const &""'"); - } - arg2 = ptr; - } - hfst_implementations_HfstBasicTransducer__substitute_symbols(arg1,(std::map< std::string,std::string,std::less< std::string >,std::allocator< std::pair< std::string const,std::string > > > const &)*arg2); - resultobj = SWIG_Py_Void(); - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstBasicTransducer__substitute_symbol_pairs(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::implementations::HfstBasicTransducer *arg1 = (hfst::implementations::HfstBasicTransducer *) 0 ; - hfst::HfstSymbolPairSubstitutions *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 = SWIG_OLDOBJ ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args, "HfstBasicTransducer__substitute_symbol_pairs", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__implementations__HfstBasicTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstBasicTransducer__substitute_symbol_pairs" "', argument " "1"" of type '" "hfst::implementations::HfstBasicTransducer *""'"); - } - arg1 = reinterpret_cast< hfst::implementations::HfstBasicTransducer * >(argp1); - { - std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string >,std::less< std::pair< std::string,std::string > >,std::allocator< std::pair< std::pair< std::string,std::string > const,std::pair< std::string,std::string > > > > *ptr = (std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string >,std::less< std::pair< std::string,std::string > >,std::allocator< std::pair< std::pair< std::string,std::string > const,std::pair< std::string,std::string > > > > *)0; - res2 = swig::asptr(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HfstBasicTransducer__substitute_symbol_pairs" "', argument " "2"" of type '" "hfst::HfstSymbolPairSubstitutions const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstBasicTransducer__substitute_symbol_pairs" "', argument " "2"" of type '" "hfst::HfstSymbolPairSubstitutions const &""'"); - } - arg2 = ptr; - } - hfst_implementations_HfstBasicTransducer__substitute_symbol_pairs(arg1,(std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string >,std::less< std::pair< std::string,std::string > >,std::allocator< std::pair< std::pair< std::string,std::string > const,std::pair< std::string,std::string > > > > const &)*arg2); - resultobj = SWIG_Py_Void(); - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstBasicTransducer_insert_freely__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - hfst::implementations::HfstBasicTransducer *arg1 = (hfst::implementations::HfstBasicTransducer *) 0 ; - hfst::StringPair *arg2 = 0 ; - float arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 = SWIG_OLDOBJ ; - float val3 ; - int ecode3 = 0 ; - - if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__implementations__HfstBasicTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstBasicTransducer_insert_freely" "', argument " "1"" of type '" "hfst::implementations::HfstBasicTransducer *""'"); - } - arg1 = reinterpret_cast< hfst::implementations::HfstBasicTransducer * >(argp1); - { - std::pair< std::string,std::string > *ptr = (std::pair< std::string,std::string > *)0; - res2 = swig::asptr(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HfstBasicTransducer_insert_freely" "', argument " "2"" of type '" "hfst::StringPair const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstBasicTransducer_insert_freely" "', argument " "2"" of type '" "hfst::StringPair const &""'"); - } - arg2 = ptr; - } - ecode3 = SWIG_AsVal_float(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "HfstBasicTransducer_insert_freely" "', argument " "3"" of type '" "float""'"); - } - arg3 = static_cast< float >(val3); - hfst_implementations_HfstBasicTransducer_insert_freely__SWIG_0(arg1,(std::pair< std::string,std::string > const &)*arg2,arg3); - resultobj = SWIG_Py_Void(); - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstBasicTransducer_insert_freely__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - hfst::implementations::HfstBasicTransducer *arg1 = (hfst::implementations::HfstBasicTransducer *) 0 ; - hfst::implementations::HfstBasicTransducer *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__implementations__HfstBasicTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstBasicTransducer_insert_freely" "', argument " "1"" of type '" "hfst::implementations::HfstBasicTransducer *""'"); - } - arg1 = reinterpret_cast< hfst::implementations::HfstBasicTransducer * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_hfst__implementations__HfstBasicTransducer, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HfstBasicTransducer_insert_freely" "', argument " "2"" of type '" "hfst::implementations::HfstBasicTransducer const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstBasicTransducer_insert_freely" "', argument " "2"" of type '" "hfst::implementations::HfstBasicTransducer const &""'"); - } - arg2 = reinterpret_cast< hfst::implementations::HfstBasicTransducer * >(argp2); - hfst_implementations_HfstBasicTransducer_insert_freely__SWIG_1(arg1,(hfst::implementations::HfstBasicTransducer const &)*arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstBasicTransducer_insert_freely(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[4] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "HfstBasicTransducer_insert_freely", 0, 3, argv))) SWIG_fail; - --argc; - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_hfst__implementations__HfstBasicTransducer, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_hfst__implementations__HfstBasicTransducer, SWIG_POINTER_NO_NULL | 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_HfstBasicTransducer_insert_freely__SWIG_1(self, argc, argv); - } - } - } - if (argc == 3) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_hfst__implementations__HfstBasicTransducer, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = swig::asptr(argv[1], (std::pair< std::string,std::string >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_float(argv[2], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_HfstBasicTransducer_insert_freely__SWIG_0(self, argc, argv); - } - } - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'HfstBasicTransducer_insert_freely'.\n" - " Possible C/C++ prototypes are:\n" - " hfst::implementations::HfstBasicTransducer::insert_freely(hfst::StringPair const &,float)\n" - " hfst::implementations::HfstBasicTransducer::insert_freely(hfst::implementations::HfstBasicTransducer const &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_HfstBasicTransducer_sort_arcs(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::implementations::HfstBasicTransducer *arg1 = (hfst::implementations::HfstBasicTransducer *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__implementations__HfstBasicTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstBasicTransducer_sort_arcs" "', argument " "1"" of type '" "hfst::implementations::HfstBasicTransducer *""'"); - } - arg1 = reinterpret_cast< hfst::implementations::HfstBasicTransducer * >(argp1); - hfst_implementations_HfstBasicTransducer_sort_arcs(arg1); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstBasicTransducer_disjunct(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::implementations::HfstBasicTransducer *arg1 = (hfst::implementations::HfstBasicTransducer *) 0 ; - hfst::StringPairVector *arg2 = 0 ; - float arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 = SWIG_OLDOBJ ; - float val3 ; - int ecode3 = 0 ; - PyObject *swig_obj[3] ; - - if (!SWIG_Python_UnpackTuple(args, "HfstBasicTransducer_disjunct", 3, 3, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__implementations__HfstBasicTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstBasicTransducer_disjunct" "', argument " "1"" of type '" "hfst::implementations::HfstBasicTransducer *""'"); - } - arg1 = reinterpret_cast< hfst::implementations::HfstBasicTransducer * >(argp1); - { - std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > > *ptr = (std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > > *)0; - res2 = swig::asptr(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HfstBasicTransducer_disjunct" "', argument " "2"" of type '" "hfst::StringPairVector const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstBasicTransducer_disjunct" "', argument " "2"" of type '" "hfst::StringPairVector const &""'"); - } - arg2 = ptr; - } - ecode3 = SWIG_AsVal_float(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "HfstBasicTransducer_disjunct" "', argument " "3"" of type '" "float""'"); - } - arg3 = static_cast< float >(val3); - hfst_implementations_HfstBasicTransducer_disjunct(arg1,(std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > > const &)*arg2,arg3); - resultobj = SWIG_Py_Void(); - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstBasicTransducer_harmonize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::implementations::HfstBasicTransducer *arg1 = (hfst::implementations::HfstBasicTransducer *) 0 ; - hfst::implementations::HfstBasicTransducer *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args, "HfstBasicTransducer_harmonize", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__implementations__HfstBasicTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstBasicTransducer_harmonize" "', argument " "1"" of type '" "hfst::implementations::HfstBasicTransducer *""'"); - } - arg1 = reinterpret_cast< hfst::implementations::HfstBasicTransducer * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_hfst__implementations__HfstBasicTransducer, 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HfstBasicTransducer_harmonize" "', argument " "2"" of type '" "hfst::implementations::HfstBasicTransducer &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstBasicTransducer_harmonize" "', argument " "2"" of type '" "hfst::implementations::HfstBasicTransducer &""'"); - } - arg2 = reinterpret_cast< hfst::implementations::HfstBasicTransducer * >(argp2); - hfst_implementations_HfstBasicTransducer_harmonize(arg1,*arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstBasicTransducer__lookup(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::implementations::HfstBasicTransducer *arg1 = (hfst::implementations::HfstBasicTransducer *) 0 ; - hfst::StringVector *arg2 = 0 ; - size_t *arg3 = (size_t *) 0 ; - float *arg4 = (float *) 0 ; - bool arg5 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 = SWIG_OLDOBJ ; - void *argp3 = 0 ; - int res3 = 0 ; - void *argp4 = 0 ; - int res4 = 0 ; - bool val5 ; - int ecode5 = 0 ; - PyObject *swig_obj[5] ; - hfst::HfstTwoLevelPaths result; - - if (!SWIG_Python_UnpackTuple(args, "HfstBasicTransducer__lookup", 5, 5, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__implementations__HfstBasicTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstBasicTransducer__lookup" "', argument " "1"" of type '" "hfst::implementations::HfstBasicTransducer *""'"); - } - arg1 = reinterpret_cast< hfst::implementations::HfstBasicTransducer * >(argp1); - { - std::vector< std::string,std::allocator< std::string > > *ptr = (std::vector< std::string,std::allocator< std::string > > *)0; - res2 = swig::asptr(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HfstBasicTransducer__lookup" "', argument " "2"" of type '" "hfst::StringVector const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstBasicTransducer__lookup" "', argument " "2"" of type '" "hfst::StringVector const &""'"); - } - arg2 = ptr; - } - res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_size_t, 0 | 0 ); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "HfstBasicTransducer__lookup" "', argument " "3"" of type '" "size_t *""'"); - } - arg3 = reinterpret_cast< size_t * >(argp3); - res4 = SWIG_ConvertPtr(swig_obj[3], &argp4,SWIGTYPE_p_float, 0 | 0 ); - if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "HfstBasicTransducer__lookup" "', argument " "4"" of type '" "float *""'"); - } - arg4 = reinterpret_cast< float * >(argp4); - ecode5 = SWIG_AsVal_bool(swig_obj[4], &val5); - if (!SWIG_IsOK(ecode5)) { - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "HfstBasicTransducer__lookup" "', argument " "5"" of type '" "bool""'"); - } - arg5 = static_cast< bool >(val5); - try { - result = hfst_implementations_HfstBasicTransducer__lookup(arg1,(std::vector< std::string,std::allocator< std::string > > const &)*arg2,arg3,arg4,arg5); - } catch(TransducerIsCyclicException &_e) { - SWIG_Python_Raise(SWIG_NewPointerObj((new TransducerIsCyclicException(static_cast< const TransducerIsCyclicException& >(_e))),SWIGTYPE_p_TransducerIsCyclicException,SWIG_POINTER_OWN), "TransducerIsCyclicException", SWIGTYPE_p_TransducerIsCyclicException); SWIG_fail; - } - resultobj = swig::from(static_cast< std::set< std::pair< float,std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > > >,std::less< std::pair< float,std::vector< std::pair< std::string,std::string > > > >,std::allocator< std::pair< float,std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > > > > > >(result)); - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstBasicTransducer_get_prolog_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::implementations::HfstBasicTransducer *arg1 = (hfst::implementations::HfstBasicTransducer *) 0 ; - bool arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - bool val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - std::string result; - - if (!SWIG_Python_UnpackTuple(args, "HfstBasicTransducer_get_prolog_string", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__implementations__HfstBasicTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstBasicTransducer_get_prolog_string" "', argument " "1"" of type '" "hfst::implementations::HfstBasicTransducer *""'"); - } - arg1 = reinterpret_cast< hfst::implementations::HfstBasicTransducer * >(argp1); - ecode2 = SWIG_AsVal_bool(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HfstBasicTransducer_get_prolog_string" "', argument " "2"" of type '" "bool""'"); - } - arg2 = static_cast< bool >(val2); - result = hfst_implementations_HfstBasicTransducer_get_prolog_string(arg1,arg2); - resultobj = SWIG_From_std_string(static_cast< std::string >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstBasicTransducer_get_xfst_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::implementations::HfstBasicTransducer *arg1 = (hfst::implementations::HfstBasicTransducer *) 0 ; - bool arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - bool val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - std::string result; - - if (!SWIG_Python_UnpackTuple(args, "HfstBasicTransducer_get_xfst_string", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__implementations__HfstBasicTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstBasicTransducer_get_xfst_string" "', argument " "1"" of type '" "hfst::implementations::HfstBasicTransducer *""'"); - } - arg1 = reinterpret_cast< hfst::implementations::HfstBasicTransducer * >(argp1); - ecode2 = SWIG_AsVal_bool(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HfstBasicTransducer_get_xfst_string" "', argument " "2"" of type '" "bool""'"); - } - arg2 = static_cast< bool >(val2); - result = hfst_implementations_HfstBasicTransducer_get_xfst_string(arg1,arg2); - resultobj = SWIG_From_std_string(static_cast< std::string >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstBasicTransducer_get_att_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::implementations::HfstBasicTransducer *arg1 = (hfst::implementations::HfstBasicTransducer *) 0 ; - bool arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - bool val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - std::string result; - - if (!SWIG_Python_UnpackTuple(args, "HfstBasicTransducer_get_att_string", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__implementations__HfstBasicTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstBasicTransducer_get_att_string" "', argument " "1"" of type '" "hfst::implementations::HfstBasicTransducer *""'"); - } - arg1 = reinterpret_cast< hfst::implementations::HfstBasicTransducer * >(argp1); - ecode2 = SWIG_AsVal_bool(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HfstBasicTransducer_get_att_string" "', argument " "2"" of type '" "bool""'"); - } - arg2 = static_cast< bool >(val2); - result = hfst_implementations_HfstBasicTransducer_get_att_string(arg1,arg2); - resultobj = SWIG_From_std_string(static_cast< std::string >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstBasicTransducer___str__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::implementations::HfstBasicTransducer *arg1 = (hfst::implementations::HfstBasicTransducer *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - char *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__implementations__HfstBasicTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstBasicTransducer___str__" "', argument " "1"" of type '" "hfst::implementations::HfstBasicTransducer *""'"); - } - arg1 = reinterpret_cast< hfst::implementations::HfstBasicTransducer * >(argp1); - result = (char *)hfst_implementations_HfstBasicTransducer___str__(arg1); - resultobj = SWIG_FromCharPtr((const char *)result); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstBasicTransducer_add_transition__SWIG_2(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - hfst::implementations::HfstBasicTransducer *arg1 = (hfst::implementations::HfstBasicTransducer *) 0 ; - hfst::implementations::HfstState arg2 ; - hfst::implementations::HfstState arg3 ; - std::string arg4 ; - std::string arg5 ; - float arg6 ; - void *argp1 = 0 ; - int res1 = 0 ; - unsigned int val2 ; - int ecode2 = 0 ; - unsigned int val3 ; - int ecode3 = 0 ; - float val6 ; - int ecode6 = 0 ; - - if ((nobjs < 6) || (nobjs > 6)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__implementations__HfstBasicTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstBasicTransducer_add_transition" "', argument " "1"" of type '" "hfst::implementations::HfstBasicTransducer *""'"); - } - arg1 = reinterpret_cast< hfst::implementations::HfstBasicTransducer * >(argp1); - ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HfstBasicTransducer_add_transition" "', argument " "2"" of type '" "hfst::implementations::HfstState""'"); - } - arg2 = static_cast< hfst::implementations::HfstState >(val2); - ecode3 = SWIG_AsVal_unsigned_SS_int(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "HfstBasicTransducer_add_transition" "', argument " "3"" of type '" "hfst::implementations::HfstState""'"); - } - arg3 = static_cast< hfst::implementations::HfstState >(val3); - { - std::string *ptr = (std::string *)0; - int res = SWIG_AsPtr_std_string(swig_obj[3], &ptr); - if (!SWIG_IsOK(res) || !ptr) { - SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "HfstBasicTransducer_add_transition" "', argument " "4"" of type '" "std::string""'"); - } - arg4 = *ptr; - if (SWIG_IsNewObj(res)) delete ptr; - } - { - std::string *ptr = (std::string *)0; - int res = SWIG_AsPtr_std_string(swig_obj[4], &ptr); - if (!SWIG_IsOK(res) || !ptr) { - SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "HfstBasicTransducer_add_transition" "', argument " "5"" of type '" "std::string""'"); - } - arg5 = *ptr; - if (SWIG_IsNewObj(res)) delete ptr; - } - ecode6 = SWIG_AsVal_float(swig_obj[5], &val6); - if (!SWIG_IsOK(ecode6)) { - SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "HfstBasicTransducer_add_transition" "', argument " "6"" of type '" "float""'"); - } - arg6 = static_cast< float >(val6); - hfst_implementations_HfstBasicTransducer_add_transition__SWIG_2(arg1,arg2,arg3,arg4,arg5,arg6); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstBasicTransducer_add_transition__SWIG_3(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - hfst::implementations::HfstBasicTransducer *arg1 = (hfst::implementations::HfstBasicTransducer *) 0 ; - hfst::implementations::HfstState arg2 ; - hfst::implementations::HfstState arg3 ; - std::string arg4 ; - std::string arg5 ; - void *argp1 = 0 ; - int res1 = 0 ; - unsigned int val2 ; - int ecode2 = 0 ; - unsigned int val3 ; - int ecode3 = 0 ; - - if ((nobjs < 5) || (nobjs > 5)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__implementations__HfstBasicTransducer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstBasicTransducer_add_transition" "', argument " "1"" of type '" "hfst::implementations::HfstBasicTransducer *""'"); - } - arg1 = reinterpret_cast< hfst::implementations::HfstBasicTransducer * >(argp1); - ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HfstBasicTransducer_add_transition" "', argument " "2"" of type '" "hfst::implementations::HfstState""'"); - } - arg2 = static_cast< hfst::implementations::HfstState >(val2); - ecode3 = SWIG_AsVal_unsigned_SS_int(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "HfstBasicTransducer_add_transition" "', argument " "3"" of type '" "hfst::implementations::HfstState""'"); - } - arg3 = static_cast< hfst::implementations::HfstState >(val3); - { - std::string *ptr = (std::string *)0; - int res = SWIG_AsPtr_std_string(swig_obj[3], &ptr); - if (!SWIG_IsOK(res) || !ptr) { - SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "HfstBasicTransducer_add_transition" "', argument " "4"" of type '" "std::string""'"); - } - arg4 = *ptr; - if (SWIG_IsNewObj(res)) delete ptr; - } - { - std::string *ptr = (std::string *)0; - int res = SWIG_AsPtr_std_string(swig_obj[4], &ptr); - if (!SWIG_IsOK(res) || !ptr) { - SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "HfstBasicTransducer_add_transition" "', argument " "5"" of type '" "std::string""'"); - } - arg5 = *ptr; - if (SWIG_IsNewObj(res)) delete ptr; - } - hfst_implementations_HfstBasicTransducer_add_transition__SWIG_2(arg1,arg2,arg3,arg4,arg5); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstBasicTransducer_add_transition(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[7] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "HfstBasicTransducer_add_transition", 0, 6, argv))) SWIG_fail; - --argc; - if (argc == 3) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_hfst__implementations__HfstBasicTransducer, 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_ConvertPtr(argv[2], 0, SWIGTYPE_p_hfst__implementations__HfstBasicTransition, SWIG_POINTER_NO_NULL | 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_HfstBasicTransducer_add_transition__SWIG_1(self, argc, argv); - } - } - } - } - if (argc == 4) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_hfst__implementations__HfstBasicTransducer, 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_ConvertPtr(argv[2], 0, SWIGTYPE_p_hfst__implementations__HfstBasicTransition, SWIG_POINTER_NO_NULL | 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_bool(argv[3], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_HfstBasicTransducer_add_transition__SWIG_0(self, argc, argv); - } - } - } - } - } - if (argc == 5) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_hfst__implementations__HfstBasicTransducer, 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_unsigned_SS_int(argv[2], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - int res = SWIG_AsPtr_std_string(argv[3], (std::string**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_AsPtr_std_string(argv[4], (std::string**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_HfstBasicTransducer_add_transition__SWIG_3(self, argc, argv); - } - } - } - } - } - } - if (argc == 6) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_hfst__implementations__HfstBasicTransducer, 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_unsigned_SS_int(argv[2], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - int res = SWIG_AsPtr_std_string(argv[3], (std::string**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_AsPtr_std_string(argv[4], (std::string**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_float(argv[5], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_HfstBasicTransducer_add_transition__SWIG_2(self, argc, argv); - } - } - } - } - } - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'HfstBasicTransducer_add_transition'.\n" - " Possible C/C++ prototypes are:\n" - " hfst::implementations::HfstBasicTransducer::add_transition(hfst::implementations::HfstState,hfst::implementations::HfstBasicTransition const &,bool)\n" - " hfst::implementations::HfstBasicTransducer::add_transition(hfst::implementations::HfstState,hfst::implementations::HfstBasicTransition const &)\n" - " hfst::implementations::HfstBasicTransducer::add_transition(hfst::implementations::HfstState,hfst::implementations::HfstState,std::string,std::string,float)\n" - " hfst::implementations::HfstBasicTransducer::add_transition(hfst::implementations::HfstState,hfst::implementations::HfstState,std::string,std::string)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_delete_HfstBasicTransducer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::implementations::HfstBasicTransducer *arg1 = (hfst::implementations::HfstBasicTransducer *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__implementations__HfstBasicTransducer, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_HfstBasicTransducer" "', argument " "1"" of type '" "hfst::implementations::HfstBasicTransducer *""'"); - } - arg1 = reinterpret_cast< hfst::implementations::HfstBasicTransducer * >(argp1); - delete arg1; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *HfstBasicTransducer_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_hfst__implementations__HfstBasicTransducer, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *HfstBasicTransducer_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_new_HfstBasicTransition__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **SWIGUNUSEDPARM(swig_obj)) { - PyObject *resultobj = 0; - hfst::implementations::HfstBasicTransition *result = 0 ; - - if ((nobjs < 0) || (nobjs > 0)) SWIG_fail; - result = (hfst::implementations::HfstBasicTransition *)new hfst::implementations::HfstBasicTransition(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_hfst__implementations__HfstBasicTransition, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_HfstBasicTransition__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - hfst::implementations::HfstState arg1 ; - std::string arg2 ; - std::string arg3 ; - float arg4 ; - unsigned int val1 ; - int ecode1 = 0 ; - float val4 ; - int ecode4 = 0 ; - hfst::implementations::HfstBasicTransition *result = 0 ; - - if ((nobjs < 4) || (nobjs > 4)) SWIG_fail; - ecode1 = SWIG_AsVal_unsigned_SS_int(swig_obj[0], &val1); - if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_HfstBasicTransition" "', argument " "1"" of type '" "hfst::implementations::HfstState""'"); - } - arg1 = static_cast< hfst::implementations::HfstState >(val1); - { - std::string *ptr = (std::string *)0; - int res = SWIG_AsPtr_std_string(swig_obj[1], &ptr); - if (!SWIG_IsOK(res) || !ptr) { - SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "new_HfstBasicTransition" "', argument " "2"" of type '" "std::string""'"); - } - arg2 = *ptr; - if (SWIG_IsNewObj(res)) delete ptr; - } - { - std::string *ptr = (std::string *)0; - int res = SWIG_AsPtr_std_string(swig_obj[2], &ptr); - if (!SWIG_IsOK(res) || !ptr) { - SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "new_HfstBasicTransition" "', argument " "3"" of type '" "std::string""'"); - } - arg3 = *ptr; - if (SWIG_IsNewObj(res)) delete ptr; - } - ecode4 = SWIG_AsVal_float(swig_obj[3], &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_HfstBasicTransition" "', argument " "4"" of type '" "float""'"); - } - arg4 = static_cast< float >(val4); - result = (hfst::implementations::HfstBasicTransition *)new hfst::implementations::HfstBasicTransition(arg1,arg2,arg3,arg4); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_hfst__implementations__HfstBasicTransition, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_HfstBasicTransition(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[5] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "new_HfstBasicTransition", 0, 4, argv))) SWIG_fail; - --argc; - if (argc == 0) { - return _wrap_new_HfstBasicTransition__SWIG_0(self, argc, argv); - } - if (argc == 4) { - int _v; - { - int res = SWIG_AsVal_unsigned_SS_int(argv[0], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - int res = SWIG_AsPtr_std_string(argv[1], (std::string**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_AsPtr_std_string(argv[2], (std::string**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_float(argv[3], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_new_HfstBasicTransition__SWIG_1(self, argc, argv); - } - } - } - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'new_HfstBasicTransition'.\n" - " Possible C/C++ prototypes are:\n" - " hfst::implementations::HfstBasicTransition::HfstBasicTransition()\n" - " hfst::implementations::HfstBasicTransition::HfstBasicTransition(hfst::implementations::HfstState,std::string,std::string,float)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_delete_HfstBasicTransition(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::implementations::HfstBasicTransition *arg1 = (hfst::implementations::HfstBasicTransition *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__implementations__HfstBasicTransition, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_HfstBasicTransition" "', argument " "1"" of type '" "hfst::implementations::HfstBasicTransition *""'"); - } - arg1 = reinterpret_cast< hfst::implementations::HfstBasicTransition * >(argp1); - delete arg1; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstBasicTransition_get_target_state(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::implementations::HfstBasicTransition *arg1 = (hfst::implementations::HfstBasicTransition *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - hfst::implementations::HfstState result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__implementations__HfstBasicTransition, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstBasicTransition_get_target_state" "', argument " "1"" of type '" "hfst::implementations::HfstBasicTransition const *""'"); - } - arg1 = reinterpret_cast< hfst::implementations::HfstBasicTransition * >(argp1); - result = (hfst::implementations::HfstState)((hfst::implementations::HfstBasicTransition const *)arg1)->get_target_state(); - resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstBasicTransition_get_input_symbol(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::implementations::HfstBasicTransition *arg1 = (hfst::implementations::HfstBasicTransition *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::string result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__implementations__HfstBasicTransition, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstBasicTransition_get_input_symbol" "', argument " "1"" of type '" "hfst::implementations::HfstBasicTransition const *""'"); - } - arg1 = reinterpret_cast< hfst::implementations::HfstBasicTransition * >(argp1); - result = ((hfst::implementations::HfstBasicTransition const *)arg1)->get_input_symbol(); - resultobj = SWIG_From_std_string(static_cast< std::string >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstBasicTransition_set_input_symbol(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::implementations::HfstBasicTransition *arg1 = (hfst::implementations::HfstBasicTransition *) 0 ; - std::string *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 = SWIG_OLDOBJ ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args, "HfstBasicTransition_set_input_symbol", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__implementations__HfstBasicTransition, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstBasicTransition_set_input_symbol" "', argument " "1"" of type '" "hfst::implementations::HfstBasicTransition *""'"); - } - arg1 = reinterpret_cast< hfst::implementations::HfstBasicTransition * >(argp1); - { - std::string *ptr = (std::string *)0; - res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HfstBasicTransition_set_input_symbol" "', argument " "2"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstBasicTransition_set_input_symbol" "', argument " "2"" of type '" "std::string const &""'"); - } - arg2 = ptr; - } - (arg1)->set_input_symbol((std::string const &)*arg2); - resultobj = SWIG_Py_Void(); - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstBasicTransition_get_output_symbol(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::implementations::HfstBasicTransition *arg1 = (hfst::implementations::HfstBasicTransition *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::string result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__implementations__HfstBasicTransition, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstBasicTransition_get_output_symbol" "', argument " "1"" of type '" "hfst::implementations::HfstBasicTransition const *""'"); - } - arg1 = reinterpret_cast< hfst::implementations::HfstBasicTransition * >(argp1); - result = ((hfst::implementations::HfstBasicTransition const *)arg1)->get_output_symbol(); - resultobj = SWIG_From_std_string(static_cast< std::string >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstBasicTransition_set_output_symbol(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::implementations::HfstBasicTransition *arg1 = (hfst::implementations::HfstBasicTransition *) 0 ; - std::string *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 = SWIG_OLDOBJ ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args, "HfstBasicTransition_set_output_symbol", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__implementations__HfstBasicTransition, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstBasicTransition_set_output_symbol" "', argument " "1"" of type '" "hfst::implementations::HfstBasicTransition *""'"); - } - arg1 = reinterpret_cast< hfst::implementations::HfstBasicTransition * >(argp1); - { - std::string *ptr = (std::string *)0; - res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HfstBasicTransition_set_output_symbol" "', argument " "2"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HfstBasicTransition_set_output_symbol" "', argument " "2"" of type '" "std::string const &""'"); - } - arg2 = ptr; - } - (arg1)->set_output_symbol((std::string const &)*arg2); - resultobj = SWIG_Py_Void(); - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstBasicTransition_get_weight(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::implementations::HfstBasicTransition *arg1 = (hfst::implementations::HfstBasicTransition *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - float result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__implementations__HfstBasicTransition, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstBasicTransition_get_weight" "', argument " "1"" of type '" "hfst::implementations::HfstBasicTransition const *""'"); - } - arg1 = reinterpret_cast< hfst::implementations::HfstBasicTransition * >(argp1); - result = (float)((hfst::implementations::HfstBasicTransition const *)arg1)->get_weight(); - resultobj = SWIG_From_float(static_cast< float >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstBasicTransition_set_weight(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::implementations::HfstBasicTransition *arg1 = (hfst::implementations::HfstBasicTransition *) 0 ; - float arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - float val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args, "HfstBasicTransition_set_weight", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__implementations__HfstBasicTransition, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstBasicTransition_set_weight" "', argument " "1"" of type '" "hfst::implementations::HfstBasicTransition *""'"); - } - arg1 = reinterpret_cast< hfst::implementations::HfstBasicTransition * >(argp1); - ecode2 = SWIG_AsVal_float(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HfstBasicTransition_set_weight" "', argument " "2"" of type '" "float""'"); - } - arg2 = static_cast< float >(val2); - (arg1)->set_weight(arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HfstBasicTransition___str__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::implementations::HfstBasicTransition *arg1 = (hfst::implementations::HfstBasicTransition *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - char *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__implementations__HfstBasicTransition, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HfstBasicTransition___str__" "', argument " "1"" of type '" "hfst::implementations::HfstBasicTransition *""'"); - } - arg1 = reinterpret_cast< hfst::implementations::HfstBasicTransition * >(argp1); - result = (char *)hfst_implementations_HfstBasicTransition___str__(arg1); - resultobj = SWIG_FromCharPtr((const char *)result); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *HfstBasicTransition_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_hfst__implementations__HfstBasicTransition, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *HfstBasicTransition_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_new_XreCompiler__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **SWIGUNUSEDPARM(swig_obj)) { - PyObject *resultobj = 0; - hfst::xre::XreCompiler *result = 0 ; - - if ((nobjs < 0) || (nobjs > 0)) SWIG_fail; - result = (hfst::xre::XreCompiler *)new hfst::xre::XreCompiler(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_hfst__xre__XreCompiler, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_XreCompiler__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - hfst::ImplementationType arg1 ; - int val1 ; - int ecode1 = 0 ; - hfst::xre::XreCompiler *result = 0 ; - - if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; - ecode1 = SWIG_AsVal_int(swig_obj[0], &val1); - if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_XreCompiler" "', argument " "1"" of type '" "hfst::ImplementationType""'"); - } - arg1 = static_cast< hfst::ImplementationType >(val1); - result = (hfst::xre::XreCompiler *)new hfst::xre::XreCompiler(arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_hfst__xre__XreCompiler, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_XreCompiler(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[2] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "new_XreCompiler", 0, 1, argv))) SWIG_fail; - --argc; - if (argc == 0) { - return _wrap_new_XreCompiler__SWIG_0(self, argc, argv); - } - if (argc == 1) { - int _v; - { - int res = SWIG_AsVal_int(argv[0], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_new_XreCompiler__SWIG_1(self, argc, argv); - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'new_XreCompiler'.\n" - " Possible C/C++ prototypes are:\n" - " hfst::xre::XreCompiler::XreCompiler()\n" - " hfst::xre::XreCompiler::XreCompiler(hfst::ImplementationType)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_XreCompiler_define_list(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::xre::XreCompiler *arg1 = (hfst::xre::XreCompiler *) 0 ; - std::string *arg2 = 0 ; - std::set< std::string,std::less< std::string >,std::allocator< std::string > > *arg3 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 = SWIG_OLDOBJ ; - int res3 = SWIG_OLDOBJ ; - PyObject *swig_obj[3] ; - - if (!SWIG_Python_UnpackTuple(args, "XreCompiler_define_list", 3, 3, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__xre__XreCompiler, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "XreCompiler_define_list" "', argument " "1"" of type '" "hfst::xre::XreCompiler *""'"); - } - arg1 = reinterpret_cast< hfst::xre::XreCompiler * >(argp1); - { - std::string *ptr = (std::string *)0; - res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "XreCompiler_define_list" "', argument " "2"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "XreCompiler_define_list" "', argument " "2"" of type '" "std::string const &""'"); - } - arg2 = ptr; - } - { - std::set< std::string,std::less< std::string >,std::allocator< std::string > > *ptr = (std::set< std::string,std::less< std::string >,std::allocator< std::string > > *)0; - res3 = swig::asptr(swig_obj[2], &ptr); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "XreCompiler_define_list" "', argument " "3"" of type '" "std::set< std::string,std::less< std::string >,std::allocator< std::string > > const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "XreCompiler_define_list" "', argument " "3"" of type '" "std::set< std::string,std::less< std::string >,std::allocator< std::string > > const &""'"); - } - arg3 = ptr; - } - (arg1)->define_list((std::string const &)*arg2,(std::set< std::string,std::less< std::string >,std::allocator< std::string > > const &)*arg3); - resultobj = SWIG_Py_Void(); - if (SWIG_IsNewObj(res2)) delete arg2; - if (SWIG_IsNewObj(res3)) delete arg3; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - if (SWIG_IsNewObj(res3)) delete arg3; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_XreCompiler_define_function(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::xre::XreCompiler *arg1 = (hfst::xre::XreCompiler *) 0 ; - std::string *arg2 = 0 ; - unsigned int arg3 ; - std::string *arg4 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 = SWIG_OLDOBJ ; - unsigned int val3 ; - int ecode3 = 0 ; - int res4 = SWIG_OLDOBJ ; - PyObject *swig_obj[4] ; - bool result; - - if (!SWIG_Python_UnpackTuple(args, "XreCompiler_define_function", 4, 4, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__xre__XreCompiler, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "XreCompiler_define_function" "', argument " "1"" of type '" "hfst::xre::XreCompiler *""'"); - } - arg1 = reinterpret_cast< hfst::xre::XreCompiler * >(argp1); - { - std::string *ptr = (std::string *)0; - res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "XreCompiler_define_function" "', argument " "2"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "XreCompiler_define_function" "', argument " "2"" of type '" "std::string const &""'"); - } - arg2 = ptr; - } - ecode3 = SWIG_AsVal_unsigned_SS_int(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "XreCompiler_define_function" "', argument " "3"" of type '" "unsigned int""'"); - } - arg3 = static_cast< unsigned int >(val3); - { - std::string *ptr = (std::string *)0; - res4 = SWIG_AsPtr_std_string(swig_obj[3], &ptr); - if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "XreCompiler_define_function" "', argument " "4"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "XreCompiler_define_function" "', argument " "4"" of type '" "std::string const &""'"); - } - arg4 = ptr; - } - result = (bool)(arg1)->define_function((std::string const &)*arg2,arg3,(std::string const &)*arg4); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - if (SWIG_IsNewObj(res2)) delete arg2; - if (SWIG_IsNewObj(res4)) delete arg4; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - if (SWIG_IsNewObj(res4)) delete arg4; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_XreCompiler_is_definition(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::xre::XreCompiler *arg1 = (hfst::xre::XreCompiler *) 0 ; - std::string *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 = SWIG_OLDOBJ ; - PyObject *swig_obj[2] ; - bool result; - - if (!SWIG_Python_UnpackTuple(args, "XreCompiler_is_definition", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__xre__XreCompiler, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "XreCompiler_is_definition" "', argument " "1"" of type '" "hfst::xre::XreCompiler *""'"); - } - arg1 = reinterpret_cast< hfst::xre::XreCompiler * >(argp1); - { - std::string *ptr = (std::string *)0; - res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "XreCompiler_is_definition" "', argument " "2"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "XreCompiler_is_definition" "', argument " "2"" of type '" "std::string const &""'"); - } - arg2 = ptr; - } - result = (bool)(arg1)->is_definition((std::string const &)*arg2); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_XreCompiler_is_function_definition(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::xre::XreCompiler *arg1 = (hfst::xre::XreCompiler *) 0 ; - std::string *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 = SWIG_OLDOBJ ; - PyObject *swig_obj[2] ; - bool result; - - if (!SWIG_Python_UnpackTuple(args, "XreCompiler_is_function_definition", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__xre__XreCompiler, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "XreCompiler_is_function_definition" "', argument " "1"" of type '" "hfst::xre::XreCompiler *""'"); - } - arg1 = reinterpret_cast< hfst::xre::XreCompiler * >(argp1); - { - std::string *ptr = (std::string *)0; - res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "XreCompiler_is_function_definition" "', argument " "2"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "XreCompiler_is_function_definition" "', argument " "2"" of type '" "std::string const &""'"); - } - arg2 = ptr; - } - result = (bool)(arg1)->is_function_definition((std::string const &)*arg2); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_XreCompiler_undefine(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::xre::XreCompiler *arg1 = (hfst::xre::XreCompiler *) 0 ; - std::string *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 = SWIG_OLDOBJ ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args, "XreCompiler_undefine", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__xre__XreCompiler, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "XreCompiler_undefine" "', argument " "1"" of type '" "hfst::xre::XreCompiler *""'"); - } - arg1 = reinterpret_cast< hfst::xre::XreCompiler * >(argp1); - { - std::string *ptr = (std::string *)0; - res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "XreCompiler_undefine" "', argument " "2"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "XreCompiler_undefine" "', argument " "2"" of type '" "std::string const &""'"); - } - arg2 = ptr; - } - (arg1)->undefine((std::string const &)*arg2); - resultobj = SWIG_Py_Void(); - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_XreCompiler_compile(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::xre::XreCompiler *arg1 = (hfst::xre::XreCompiler *) 0 ; - std::string *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 = SWIG_OLDOBJ ; - PyObject *swig_obj[2] ; - hfst::HfstTransducer *result = 0 ; - - if (!SWIG_Python_UnpackTuple(args, "XreCompiler_compile", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__xre__XreCompiler, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "XreCompiler_compile" "', argument " "1"" of type '" "hfst::xre::XreCompiler *""'"); - } - arg1 = reinterpret_cast< hfst::xre::XreCompiler * >(argp1); - { - std::string *ptr = (std::string *)0; - res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "XreCompiler_compile" "', argument " "2"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "XreCompiler_compile" "', argument " "2"" of type '" "std::string const &""'"); - } - arg2 = ptr; - } - result = (hfst::HfstTransducer *)(arg1)->compile((std::string const &)*arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_hfst__HfstTransducer, 0 | 0 ); - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_XreCompiler_set_verbosity(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::xre::XreCompiler *arg1 = (hfst::xre::XreCompiler *) 0 ; - bool arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - bool val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args, "XreCompiler_set_verbosity", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__xre__XreCompiler, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "XreCompiler_set_verbosity" "', argument " "1"" of type '" "hfst::xre::XreCompiler *""'"); - } - arg1 = reinterpret_cast< hfst::xre::XreCompiler * >(argp1); - ecode2 = SWIG_AsVal_bool(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "XreCompiler_set_verbosity" "', argument " "2"" of type '" "bool""'"); - } - arg2 = static_cast< bool >(val2); - (arg1)->set_verbosity(arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_XreCompiler_getOutputToConsole(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::xre::XreCompiler *arg1 = (hfst::xre::XreCompiler *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - bool result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__xre__XreCompiler, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "XreCompiler_getOutputToConsole" "', argument " "1"" of type '" "hfst::xre::XreCompiler *""'"); - } - arg1 = reinterpret_cast< hfst::xre::XreCompiler * >(argp1); - result = (bool)(arg1)->getOutputToConsole(); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_XreCompiler_set_expand_definitions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::xre::XreCompiler *arg1 = (hfst::xre::XreCompiler *) 0 ; - bool arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - bool val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args, "XreCompiler_set_expand_definitions", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__xre__XreCompiler, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "XreCompiler_set_expand_definitions" "', argument " "1"" of type '" "hfst::xre::XreCompiler *""'"); - } - arg1 = reinterpret_cast< hfst::xre::XreCompiler * >(argp1); - ecode2 = SWIG_AsVal_bool(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "XreCompiler_set_expand_definitions" "', argument " "2"" of type '" "bool""'"); - } - arg2 = static_cast< bool >(val2); - (arg1)->set_expand_definitions(arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_XreCompiler_set_harmonization(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::xre::XreCompiler *arg1 = (hfst::xre::XreCompiler *) 0 ; - bool arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - bool val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args, "XreCompiler_set_harmonization", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__xre__XreCompiler, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "XreCompiler_set_harmonization" "', argument " "1"" of type '" "hfst::xre::XreCompiler *""'"); - } - arg1 = reinterpret_cast< hfst::xre::XreCompiler * >(argp1); - ecode2 = SWIG_AsVal_bool(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "XreCompiler_set_harmonization" "', argument " "2"" of type '" "bool""'"); - } - arg2 = static_cast< bool >(val2); - (arg1)->set_harmonization(arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_XreCompiler_contained_only_comments(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::xre::XreCompiler *arg1 = (hfst::xre::XreCompiler *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - bool result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__xre__XreCompiler, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "XreCompiler_contained_only_comments" "', argument " "1"" of type '" "hfst::xre::XreCompiler *""'"); - } - arg1 = reinterpret_cast< hfst::xre::XreCompiler * >(argp1); - result = (bool)(arg1)->contained_only_comments(); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_XreCompiler_define_xre(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::xre::XreCompiler *arg1 = (hfst::xre::XreCompiler *) 0 ; - std::string *arg2 = 0 ; - std::string *arg3 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 = SWIG_OLDOBJ ; - int res3 = SWIG_OLDOBJ ; - PyObject *swig_obj[3] ; - - if (!SWIG_Python_UnpackTuple(args, "XreCompiler_define_xre", 3, 3, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__xre__XreCompiler, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "XreCompiler_define_xre" "', argument " "1"" of type '" "hfst::xre::XreCompiler *""'"); - } - arg1 = reinterpret_cast< hfst::xre::XreCompiler * >(argp1); - { - std::string *ptr = (std::string *)0; - res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "XreCompiler_define_xre" "', argument " "2"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "XreCompiler_define_xre" "', argument " "2"" of type '" "std::string const &""'"); - } - arg2 = ptr; - } - { - std::string *ptr = (std::string *)0; - res3 = SWIG_AsPtr_std_string(swig_obj[2], &ptr); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "XreCompiler_define_xre" "', argument " "3"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "XreCompiler_define_xre" "', argument " "3"" of type '" "std::string const &""'"); - } - arg3 = ptr; - } - hfst_xre_XreCompiler_define_xre(arg1,(std::string const &)*arg2,(std::string const &)*arg3); - resultobj = SWIG_Py_Void(); - if (SWIG_IsNewObj(res2)) delete arg2; - if (SWIG_IsNewObj(res3)) delete arg3; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - if (SWIG_IsNewObj(res3)) delete arg3; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_XreCompiler_define_transducer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::xre::XreCompiler *arg1 = (hfst::xre::XreCompiler *) 0 ; - std::string *arg2 = 0 ; - hfst::HfstTransducer *arg3 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 = SWIG_OLDOBJ ; - void *argp3 = 0 ; - int res3 = 0 ; - PyObject *swig_obj[3] ; - - if (!SWIG_Python_UnpackTuple(args, "XreCompiler_define_transducer", 3, 3, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__xre__XreCompiler, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "XreCompiler_define_transducer" "', argument " "1"" of type '" "hfst::xre::XreCompiler *""'"); - } - arg1 = reinterpret_cast< hfst::xre::XreCompiler * >(argp1); - { - std::string *ptr = (std::string *)0; - res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "XreCompiler_define_transducer" "', argument " "2"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "XreCompiler_define_transducer" "', argument " "2"" of type '" "std::string const &""'"); - } - arg2 = ptr; - } - res3 = SWIG_ConvertPtr(swig_obj[2], &argp3, SWIGTYPE_p_hfst__HfstTransducer, 0 | 0); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "XreCompiler_define_transducer" "', argument " "3"" of type '" "hfst::HfstTransducer const &""'"); - } - if (!argp3) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "XreCompiler_define_transducer" "', argument " "3"" of type '" "hfst::HfstTransducer const &""'"); - } - arg3 = reinterpret_cast< hfst::HfstTransducer * >(argp3); - hfst_xre_XreCompiler_define_transducer(arg1,(std::string const &)*arg2,(hfst::HfstTransducer const &)*arg3); - resultobj = SWIG_Py_Void(); - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_XreCompiler_setOutputToConsole(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::xre::XreCompiler *arg1 = (hfst::xre::XreCompiler *) 0 ; - bool arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - bool val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args, "XreCompiler_setOutputToConsole", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__xre__XreCompiler, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "XreCompiler_setOutputToConsole" "', argument " "1"" of type '" "hfst::xre::XreCompiler *""'"); - } - arg1 = reinterpret_cast< hfst::xre::XreCompiler * >(argp1); - ecode2 = SWIG_AsVal_bool(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "XreCompiler_setOutputToConsole" "', argument " "2"" of type '" "bool""'"); - } - arg2 = static_cast< bool >(val2); - hfst_xre_XreCompiler_setOutputToConsole(arg1,arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_XreCompiler_compile_first(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::xre::XreCompiler *arg1 = (hfst::xre::XreCompiler *) 0 ; - std::string *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 = SWIG_OLDOBJ ; - PyObject *swig_obj[2] ; - hfst::HfstTransducerUIntPair result; - - if (!SWIG_Python_UnpackTuple(args, "XreCompiler_compile_first", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__xre__XreCompiler, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "XreCompiler_compile_first" "', argument " "1"" of type '" "hfst::xre::XreCompiler *""'"); - } - arg1 = reinterpret_cast< hfst::xre::XreCompiler * >(argp1); - { - std::string *ptr = (std::string *)0; - res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "XreCompiler_compile_first" "', argument " "2"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "XreCompiler_compile_first" "', argument " "2"" of type '" "std::string const &""'"); - } - arg2 = ptr; - } - result = hfst_xre_XreCompiler_compile_first(arg1,(std::string const &)*arg2); - resultobj = swig::from(static_cast< std::pair< hfst::HfstTransducer*,unsigned int > >(result)); - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_XreCompiler(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::xre::XreCompiler *arg1 = (hfst::xre::XreCompiler *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__xre__XreCompiler, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_XreCompiler" "', argument " "1"" of type '" "hfst::xre::XreCompiler *""'"); - } - arg1 = reinterpret_cast< hfst::xre::XreCompiler * >(argp1); - delete arg1; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *XreCompiler_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_hfst__xre__XreCompiler, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *XreCompiler_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_new_LexcCompiler__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **SWIGUNUSEDPARM(swig_obj)) { - PyObject *resultobj = 0; - hfst::lexc::LexcCompiler *result = 0 ; - - if ((nobjs < 0) || (nobjs > 0)) SWIG_fail; - result = (hfst::lexc::LexcCompiler *)new hfst::lexc::LexcCompiler(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_hfst__lexc__LexcCompiler, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_LexcCompiler__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - hfst::ImplementationType arg1 ; - int val1 ; - int ecode1 = 0 ; - hfst::lexc::LexcCompiler *result = 0 ; - - if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; - ecode1 = SWIG_AsVal_int(swig_obj[0], &val1); - if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_LexcCompiler" "', argument " "1"" of type '" "hfst::ImplementationType""'"); - } - arg1 = static_cast< hfst::ImplementationType >(val1); - result = (hfst::lexc::LexcCompiler *)new hfst::lexc::LexcCompiler(arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_hfst__lexc__LexcCompiler, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_LexcCompiler__SWIG_2(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - hfst::ImplementationType arg1 ; - bool arg2 ; - bool arg3 ; - int val1 ; - int ecode1 = 0 ; - bool val2 ; - int ecode2 = 0 ; - bool val3 ; - int ecode3 = 0 ; - hfst::lexc::LexcCompiler *result = 0 ; - - if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; - ecode1 = SWIG_AsVal_int(swig_obj[0], &val1); - if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_LexcCompiler" "', argument " "1"" of type '" "hfst::ImplementationType""'"); - } - arg1 = static_cast< hfst::ImplementationType >(val1); - ecode2 = SWIG_AsVal_bool(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_LexcCompiler" "', argument " "2"" of type '" "bool""'"); - } - arg2 = static_cast< bool >(val2); - ecode3 = SWIG_AsVal_bool(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_LexcCompiler" "', argument " "3"" of type '" "bool""'"); - } - arg3 = static_cast< bool >(val3); - result = (hfst::lexc::LexcCompiler *)new hfst::lexc::LexcCompiler(arg1,arg2,arg3); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_hfst__lexc__LexcCompiler, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_LexcCompiler(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[4] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "new_LexcCompiler", 0, 3, argv))) SWIG_fail; - --argc; - if (argc == 0) { - return _wrap_new_LexcCompiler__SWIG_0(self, argc, argv); - } - if (argc == 1) { - int _v; - { - int res = SWIG_AsVal_int(argv[0], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_new_LexcCompiler__SWIG_1(self, argc, argv); - } - } - if (argc == 3) { - int _v; - { - int res = SWIG_AsVal_int(argv[0], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - { - int res = SWIG_AsVal_bool(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - { - int res = SWIG_AsVal_bool(argv[2], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_new_LexcCompiler__SWIG_2(self, argc, argv); - } - } - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'new_LexcCompiler'.\n" - " Possible C/C++ prototypes are:\n" - " hfst::lexc::LexcCompiler::LexcCompiler()\n" - " hfst::lexc::LexcCompiler::LexcCompiler(hfst::ImplementationType)\n" - " hfst::lexc::LexcCompiler::LexcCompiler(hfst::ImplementationType,bool,bool)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_LexcCompiler_setVerbosity(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::lexc::LexcCompiler *arg1 = (hfst::lexc::LexcCompiler *) 0 ; - unsigned int arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - unsigned int val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - hfst::lexc::LexcCompiler *result = 0 ; - - if (!SWIG_Python_UnpackTuple(args, "LexcCompiler_setVerbosity", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__lexc__LexcCompiler, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LexcCompiler_setVerbosity" "', argument " "1"" of type '" "hfst::lexc::LexcCompiler *""'"); - } - arg1 = reinterpret_cast< hfst::lexc::LexcCompiler * >(argp1); - ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "LexcCompiler_setVerbosity" "', argument " "2"" of type '" "unsigned int""'"); - } - arg2 = static_cast< unsigned int >(val2); - result = (hfst::lexc::LexcCompiler *) &(arg1)->setVerbosity(arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_hfst__lexc__LexcCompiler, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_LexcCompiler_setOutputToConsole(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::lexc::LexcCompiler *arg1 = (hfst::lexc::LexcCompiler *) 0 ; - bool arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - bool val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args, "LexcCompiler_setOutputToConsole", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__lexc__LexcCompiler, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LexcCompiler_setOutputToConsole" "', argument " "1"" of type '" "hfst::lexc::LexcCompiler *""'"); - } - arg1 = reinterpret_cast< hfst::lexc::LexcCompiler * >(argp1); - ecode2 = SWIG_AsVal_bool(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "LexcCompiler_setOutputToConsole" "', argument " "2"" of type '" "bool""'"); - } - arg2 = static_cast< bool >(val2); - (arg1)->setOutputToConsole(arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_LexcCompiler(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::lexc::LexcCompiler *arg1 = (hfst::lexc::LexcCompiler *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__lexc__LexcCompiler, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_LexcCompiler" "', argument " "1"" of type '" "hfst::lexc::LexcCompiler *""'"); - } - arg1 = reinterpret_cast< hfst::lexc::LexcCompiler * >(argp1); - delete arg1; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *LexcCompiler_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_hfst__lexc__LexcCompiler, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *LexcCompiler_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_new_XfstCompiler__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **SWIGUNUSEDPARM(swig_obj)) { - PyObject *resultobj = 0; - hfst::xfst::XfstCompiler *result = 0 ; - - if ((nobjs < 0) || (nobjs > 0)) SWIG_fail; - result = (hfst::xfst::XfstCompiler *)new hfst::xfst::XfstCompiler(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_hfst__xfst__XfstCompiler, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_XfstCompiler__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - hfst::ImplementationType arg1 ; - int val1 ; - int ecode1 = 0 ; - hfst::xfst::XfstCompiler *result = 0 ; - - if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; - ecode1 = SWIG_AsVal_int(swig_obj[0], &val1); - if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_XfstCompiler" "', argument " "1"" of type '" "hfst::ImplementationType""'"); - } - arg1 = static_cast< hfst::ImplementationType >(val1); - result = (hfst::xfst::XfstCompiler *)new hfst::xfst::XfstCompiler(arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_hfst__xfst__XfstCompiler, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_XfstCompiler(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[2] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "new_XfstCompiler", 0, 1, argv))) SWIG_fail; - --argc; - if (argc == 0) { - return _wrap_new_XfstCompiler__SWIG_0(self, argc, argv); - } - if (argc == 1) { - int _v; - { - int res = SWIG_AsVal_int(argv[0], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_new_XfstCompiler__SWIG_1(self, argc, argv); - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'new_XfstCompiler'.\n" - " Possible C/C++ prototypes are:\n" - " hfst::xfst::XfstCompiler::XfstCompiler()\n" - " hfst::xfst::XfstCompiler::XfstCompiler(hfst::ImplementationType)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_XfstCompiler_setOutputToConsole(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::xfst::XfstCompiler *arg1 = (hfst::xfst::XfstCompiler *) 0 ; - bool arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - bool val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - hfst::xfst::XfstCompiler *result = 0 ; - - if (!SWIG_Python_UnpackTuple(args, "XfstCompiler_setOutputToConsole", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__xfst__XfstCompiler, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "XfstCompiler_setOutputToConsole" "', argument " "1"" of type '" "hfst::xfst::XfstCompiler *""'"); - } - arg1 = reinterpret_cast< hfst::xfst::XfstCompiler * >(argp1); - ecode2 = SWIG_AsVal_bool(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "XfstCompiler_setOutputToConsole" "', argument " "2"" of type '" "bool""'"); - } - arg2 = static_cast< bool >(val2); - result = (hfst::xfst::XfstCompiler *) &(arg1)->setOutputToConsole(arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_hfst__xfst__XfstCompiler, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_XfstCompiler_setReadInteractiveTextFromStdin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::xfst::XfstCompiler *arg1 = (hfst::xfst::XfstCompiler *) 0 ; - bool arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - bool val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - hfst::xfst::XfstCompiler *result = 0 ; - - if (!SWIG_Python_UnpackTuple(args, "XfstCompiler_setReadInteractiveTextFromStdin", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__xfst__XfstCompiler, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "XfstCompiler_setReadInteractiveTextFromStdin" "', argument " "1"" of type '" "hfst::xfst::XfstCompiler *""'"); - } - arg1 = reinterpret_cast< hfst::xfst::XfstCompiler * >(argp1); - ecode2 = SWIG_AsVal_bool(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "XfstCompiler_setReadInteractiveTextFromStdin" "', argument " "2"" of type '" "bool""'"); - } - arg2 = static_cast< bool >(val2); - result = (hfst::xfst::XfstCompiler *) &(arg1)->setReadInteractiveTextFromStdin(arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_hfst__xfst__XfstCompiler, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_XfstCompiler_setReadline(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::xfst::XfstCompiler *arg1 = (hfst::xfst::XfstCompiler *) 0 ; - bool arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - bool val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - hfst::xfst::XfstCompiler *result = 0 ; - - if (!SWIG_Python_UnpackTuple(args, "XfstCompiler_setReadline", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__xfst__XfstCompiler, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "XfstCompiler_setReadline" "', argument " "1"" of type '" "hfst::xfst::XfstCompiler *""'"); - } - arg1 = reinterpret_cast< hfst::xfst::XfstCompiler * >(argp1); - ecode2 = SWIG_AsVal_bool(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "XfstCompiler_setReadline" "', argument " "2"" of type '" "bool""'"); - } - arg2 = static_cast< bool >(val2); - result = (hfst::xfst::XfstCompiler *) &(arg1)->setReadline(arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_hfst__xfst__XfstCompiler, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_XfstCompiler_setVerbosity(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::xfst::XfstCompiler *arg1 = (hfst::xfst::XfstCompiler *) 0 ; - bool arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - bool val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - hfst::xfst::XfstCompiler *result = 0 ; - - if (!SWIG_Python_UnpackTuple(args, "XfstCompiler_setVerbosity", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__xfst__XfstCompiler, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "XfstCompiler_setVerbosity" "', argument " "1"" of type '" "hfst::xfst::XfstCompiler *""'"); - } - arg1 = reinterpret_cast< hfst::xfst::XfstCompiler * >(argp1); - ecode2 = SWIG_AsVal_bool(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "XfstCompiler_setVerbosity" "', argument " "2"" of type '" "bool""'"); - } - arg2 = static_cast< bool >(val2); - result = (hfst::xfst::XfstCompiler *) &(arg1)->setVerbosity(arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_hfst__xfst__XfstCompiler, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_XfstCompiler_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::xfst::XfstCompiler *arg1 = (hfst::xfst::XfstCompiler *) 0 ; - char *arg2 = (char *) 0 ; - char *arg3 = (char *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 ; - char *buf2 = 0 ; - int alloc2 = 0 ; - int res3 ; - char *buf3 = 0 ; - int alloc3 = 0 ; - PyObject *swig_obj[3] ; - hfst::xfst::XfstCompiler *result = 0 ; - - if (!SWIG_Python_UnpackTuple(args, "XfstCompiler_set", 3, 3, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__xfst__XfstCompiler, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "XfstCompiler_set" "', argument " "1"" of type '" "hfst::xfst::XfstCompiler *""'"); - } - arg1 = reinterpret_cast< hfst::xfst::XfstCompiler * >(argp1); - res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "XfstCompiler_set" "', argument " "2"" of type '" "char const *""'"); - } - arg2 = reinterpret_cast< char * >(buf2); - res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "XfstCompiler_set" "', argument " "3"" of type '" "char const *""'"); - } - arg3 = reinterpret_cast< char * >(buf3); - result = (hfst::xfst::XfstCompiler *) &(arg1)->set((char const *)arg2,(char const *)arg3); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_hfst__xfst__XfstCompiler, 0 | 0 ); - if (alloc2 == SWIG_NEWOBJ) delete[] buf2; - if (alloc3 == SWIG_NEWOBJ) delete[] buf3; - return resultobj; -fail: - if (alloc2 == SWIG_NEWOBJ) delete[] buf2; - if (alloc3 == SWIG_NEWOBJ) delete[] buf3; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_XfstCompiler_get_prompt(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::xfst::XfstCompiler *arg1 = (hfst::xfst::XfstCompiler *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - char *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__xfst__XfstCompiler, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "XfstCompiler_get_prompt" "', argument " "1"" of type '" "hfst::xfst::XfstCompiler const *""'"); - } - arg1 = reinterpret_cast< hfst::xfst::XfstCompiler * >(argp1); - result = (char *)((hfst::xfst::XfstCompiler const *)arg1)->get_prompt(); - resultobj = SWIG_FromCharPtr((const char *)result); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_XfstCompiler_apply_up(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::xfst::XfstCompiler *arg1 = (hfst::xfst::XfstCompiler *) 0 ; - char *arg2 = (char *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 ; - char *buf2 = 0 ; - int alloc2 = 0 ; - PyObject *swig_obj[2] ; - hfst::xfst::XfstCompiler *result = 0 ; - - if (!SWIG_Python_UnpackTuple(args, "XfstCompiler_apply_up", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__xfst__XfstCompiler, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "XfstCompiler_apply_up" "', argument " "1"" of type '" "hfst::xfst::XfstCompiler *""'"); - } - arg1 = reinterpret_cast< hfst::xfst::XfstCompiler * >(argp1); - res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "XfstCompiler_apply_up" "', argument " "2"" of type '" "char const *""'"); - } - arg2 = reinterpret_cast< char * >(buf2); - result = (hfst::xfst::XfstCompiler *) &(arg1)->apply_up((char const *)arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_hfst__xfst__XfstCompiler, 0 | 0 ); - if (alloc2 == SWIG_NEWOBJ) delete[] buf2; - return resultobj; -fail: - if (alloc2 == SWIG_NEWOBJ) delete[] buf2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_XfstCompiler_apply_down(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::xfst::XfstCompiler *arg1 = (hfst::xfst::XfstCompiler *) 0 ; - char *arg2 = (char *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 ; - char *buf2 = 0 ; - int alloc2 = 0 ; - PyObject *swig_obj[2] ; - hfst::xfst::XfstCompiler *result = 0 ; - - if (!SWIG_Python_UnpackTuple(args, "XfstCompiler_apply_down", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__xfst__XfstCompiler, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "XfstCompiler_apply_down" "', argument " "1"" of type '" "hfst::xfst::XfstCompiler *""'"); - } - arg1 = reinterpret_cast< hfst::xfst::XfstCompiler * >(argp1); - res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "XfstCompiler_apply_down" "', argument " "2"" of type '" "char const *""'"); - } - arg2 = reinterpret_cast< char * >(buf2); - result = (hfst::xfst::XfstCompiler *) &(arg1)->apply_down((char const *)arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_hfst__xfst__XfstCompiler, 0 | 0 ); - if (alloc2 == SWIG_NEWOBJ) delete[] buf2; - return resultobj; -fail: - if (alloc2 == SWIG_NEWOBJ) delete[] buf2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_XfstCompiler_parse_line(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::xfst::XfstCompiler *arg1 = (hfst::xfst::XfstCompiler *) 0 ; - std::string arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[2] ; - int result; - - if (!SWIG_Python_UnpackTuple(args, "XfstCompiler_parse_line", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__xfst__XfstCompiler, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "XfstCompiler_parse_line" "', argument " "1"" of type '" "hfst::xfst::XfstCompiler *""'"); - } - arg1 = reinterpret_cast< hfst::xfst::XfstCompiler * >(argp1); - { - std::string *ptr = (std::string *)0; - int res = SWIG_AsPtr_std_string(swig_obj[1], &ptr); - if (!SWIG_IsOK(res) || !ptr) { - SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "XfstCompiler_parse_line" "', argument " "2"" of type '" "std::string""'"); - } - arg2 = *ptr; - if (SWIG_IsNewObj(res)) delete ptr; - } - result = (int)(arg1)->parse_line(arg2); - resultobj = SWIG_From_int(static_cast< int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_XfstCompiler_quit_requested(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::xfst::XfstCompiler *arg1 = (hfst::xfst::XfstCompiler *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - bool result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__xfst__XfstCompiler, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "XfstCompiler_quit_requested" "', argument " "1"" of type '" "hfst::xfst::XfstCompiler const *""'"); - } - arg1 = reinterpret_cast< hfst::xfst::XfstCompiler * >(argp1); - result = (bool)((hfst::xfst::XfstCompiler const *)arg1)->quit_requested(); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_XfstCompiler(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::xfst::XfstCompiler *arg1 = (hfst::xfst::XfstCompiler *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__xfst__XfstCompiler, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_XfstCompiler" "', argument " "1"" of type '" "hfst::xfst::XfstCompiler *""'"); - } - arg1 = reinterpret_cast< hfst::xfst::XfstCompiler * >(argp1); - delete arg1; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *XfstCompiler_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_hfst__xfst__XfstCompiler, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *XfstCompiler_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_get_hfst_regex_error_message(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::string result; - - if (!SWIG_Python_UnpackTuple(args, "get_hfst_regex_error_message", 0, 0, 0)) SWIG_fail; - result = hfst::get_hfst_regex_error_message(); - resultobj = SWIG_From_std_string(static_cast< std::string >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_hfst_regex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::xre::XreCompiler *arg1 = 0 ; - std::string *arg2 = 0 ; - std::string *arg3 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 = SWIG_OLDOBJ ; - int res3 = SWIG_OLDOBJ ; - PyObject *swig_obj[3] ; - hfst::HfstTransducer *result = 0 ; - - if (!SWIG_Python_UnpackTuple(args, "hfst_regex", 3, 3, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_hfst__xre__XreCompiler, 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "hfst_regex" "', argument " "1"" of type '" "hfst::xre::XreCompiler &""'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "hfst_regex" "', argument " "1"" of type '" "hfst::xre::XreCompiler &""'"); - } - arg1 = reinterpret_cast< hfst::xre::XreCompiler * >(argp1); - { - std::string *ptr = (std::string *)0; - res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "hfst_regex" "', argument " "2"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "hfst_regex" "', argument " "2"" of type '" "std::string const &""'"); - } - arg2 = ptr; - } - { - std::string *ptr = (std::string *)0; - res3 = SWIG_AsPtr_std_string(swig_obj[2], &ptr); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "hfst_regex" "', argument " "3"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "hfst_regex" "', argument " "3"" of type '" "std::string const &""'"); - } - arg3 = ptr; - } - result = (hfst::HfstTransducer *)hfst::hfst_regex(*arg1,(std::string const &)*arg2,(std::string const &)*arg3); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_hfst__HfstTransducer, 0 | 0 ); - if (SWIG_IsNewObj(res2)) delete arg2; - if (SWIG_IsNewObj(res3)) delete arg3; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - if (SWIG_IsNewObj(res3)) delete arg3; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_get_hfst_xfst_string_one(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - char *result = 0 ; - - if (!SWIG_Python_UnpackTuple(args, "get_hfst_xfst_string_one", 0, 0, 0)) SWIG_fail; - result = (char *)hfst::get_hfst_xfst_string_one(); - resultobj = SWIG_FromCharPtr((const char *)result); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_get_hfst_xfst_string_two(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - char *result = 0 ; - - if (!SWIG_Python_UnpackTuple(args, "get_hfst_xfst_string_two", 0, 0, 0)) SWIG_fail; - result = (char *)hfst::get_hfst_xfst_string_two(); - resultobj = SWIG_FromCharPtr((const char *)result); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_hfst_compile_xfst_to_string_one(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::xfst::XfstCompiler *arg1 = 0 ; - std::string arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[2] ; - int result; - - if (!SWIG_Python_UnpackTuple(args, "hfst_compile_xfst_to_string_one", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_hfst__xfst__XfstCompiler, 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "hfst_compile_xfst_to_string_one" "', argument " "1"" of type '" "hfst::xfst::XfstCompiler &""'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "hfst_compile_xfst_to_string_one" "', argument " "1"" of type '" "hfst::xfst::XfstCompiler &""'"); - } - arg1 = reinterpret_cast< hfst::xfst::XfstCompiler * >(argp1); - { - std::string *ptr = (std::string *)0; - int res = SWIG_AsPtr_std_string(swig_obj[1], &ptr); - if (!SWIG_IsOK(res) || !ptr) { - SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "hfst_compile_xfst_to_string_one" "', argument " "2"" of type '" "std::string""'"); - } - arg2 = *ptr; - if (SWIG_IsNewObj(res)) delete ptr; - } - result = (int)hfst::hfst_compile_xfst_to_string_one(*arg1,arg2); - resultobj = SWIG_From_int(static_cast< int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_hfst_compile_xfst(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::xfst::XfstCompiler *arg1 = 0 ; - std::string arg2 ; - std::string *arg3 = 0 ; - std::string *arg4 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res3 = SWIG_OLDOBJ ; - int res4 = SWIG_OLDOBJ ; - PyObject *swig_obj[4] ; - int result; - - if (!SWIG_Python_UnpackTuple(args, "hfst_compile_xfst", 4, 4, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_hfst__xfst__XfstCompiler, 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "hfst_compile_xfst" "', argument " "1"" of type '" "hfst::xfst::XfstCompiler &""'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "hfst_compile_xfst" "', argument " "1"" of type '" "hfst::xfst::XfstCompiler &""'"); - } - arg1 = reinterpret_cast< hfst::xfst::XfstCompiler * >(argp1); - { - std::string *ptr = (std::string *)0; - int res = SWIG_AsPtr_std_string(swig_obj[1], &ptr); - if (!SWIG_IsOK(res) || !ptr) { - SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "hfst_compile_xfst" "', argument " "2"" of type '" "std::string""'"); - } - arg2 = *ptr; - if (SWIG_IsNewObj(res)) delete ptr; - } - { - std::string *ptr = (std::string *)0; - res3 = SWIG_AsPtr_std_string(swig_obj[2], &ptr); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "hfst_compile_xfst" "', argument " "3"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "hfst_compile_xfst" "', argument " "3"" of type '" "std::string const &""'"); - } - arg3 = ptr; - } - { - std::string *ptr = (std::string *)0; - res4 = SWIG_AsPtr_std_string(swig_obj[3], &ptr); - if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "hfst_compile_xfst" "', argument " "4"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "hfst_compile_xfst" "', argument " "4"" of type '" "std::string const &""'"); - } - arg4 = ptr; - } - result = (int)hfst::hfst_compile_xfst(*arg1,arg2,(std::string const &)*arg3,(std::string const &)*arg4); - resultobj = SWIG_From_int(static_cast< int >(result)); - if (SWIG_IsNewObj(res3)) delete arg3; - if (SWIG_IsNewObj(res4)) delete arg4; - return resultobj; -fail: - if (SWIG_IsNewObj(res3)) delete arg3; - if (SWIG_IsNewObj(res4)) delete arg4; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_get_hfst_lexc_output(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::string result; - - if (!SWIG_Python_UnpackTuple(args, "get_hfst_lexc_output", 0, 0, 0)) SWIG_fail; - result = hfst::get_hfst_lexc_output(); - resultobj = SWIG_From_std_string(static_cast< std::string >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_hfst_compile_lexc(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::lexc::LexcCompiler *arg1 = 0 ; - std::string *arg2 = 0 ; - std::string *arg3 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 = SWIG_OLDOBJ ; - int res3 = SWIG_OLDOBJ ; - PyObject *swig_obj[3] ; - hfst::HfstTransducer *result = 0 ; - - if (!SWIG_Python_UnpackTuple(args, "hfst_compile_lexc", 3, 3, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_hfst__lexc__LexcCompiler, 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "hfst_compile_lexc" "', argument " "1"" of type '" "hfst::lexc::LexcCompiler &""'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "hfst_compile_lexc" "', argument " "1"" of type '" "hfst::lexc::LexcCompiler &""'"); - } - arg1 = reinterpret_cast< hfst::lexc::LexcCompiler * >(argp1); - { - std::string *ptr = (std::string *)0; - res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "hfst_compile_lexc" "', argument " "2"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "hfst_compile_lexc" "', argument " "2"" of type '" "std::string const &""'"); - } - arg2 = ptr; - } - { - std::string *ptr = (std::string *)0; - res3 = SWIG_AsPtr_std_string(swig_obj[2], &ptr); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "hfst_compile_lexc" "', argument " "3"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "hfst_compile_lexc" "', argument " "3"" of type '" "std::string const &""'"); - } - arg3 = ptr; - } - result = (hfst::HfstTransducer *)hfst::hfst_compile_lexc(*arg1,(std::string const &)*arg2,(std::string const &)*arg3); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_hfst__HfstTransducer, 0 | 0 ); - if (SWIG_IsNewObj(res2)) delete arg2; - if (SWIG_IsNewObj(res3)) delete arg3; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - if (SWIG_IsNewObj(res3)) delete arg3; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_get_hfst_sfst_output(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::string result; - - if (!SWIG_Python_UnpackTuple(args, "get_hfst_sfst_output", 0, 0, 0)) SWIG_fail; - result = hfst::get_hfst_sfst_output(); - resultobj = SWIG_From_std_string(static_cast< std::string >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_hfst_compile_sfst(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::string *arg1 = 0 ; - std::string *arg2 = 0 ; - bool arg3 ; - bool arg4 ; - int res1 = SWIG_OLDOBJ ; - int res2 = SWIG_OLDOBJ ; - bool val3 ; - int ecode3 = 0 ; - bool val4 ; - int ecode4 = 0 ; - PyObject *swig_obj[4] ; - hfst::HfstTransducer *result = 0 ; - - if (!SWIG_Python_UnpackTuple(args, "hfst_compile_sfst", 4, 4, swig_obj)) SWIG_fail; - { - std::string *ptr = (std::string *)0; - res1 = SWIG_AsPtr_std_string(swig_obj[0], &ptr); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "hfst_compile_sfst" "', argument " "1"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "hfst_compile_sfst" "', argument " "1"" of type '" "std::string const &""'"); - } - arg1 = ptr; - } - { - std::string *ptr = (std::string *)0; - res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "hfst_compile_sfst" "', argument " "2"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "hfst_compile_sfst" "', argument " "2"" of type '" "std::string const &""'"); - } - arg2 = ptr; - } - ecode3 = SWIG_AsVal_bool(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "hfst_compile_sfst" "', argument " "3"" of type '" "bool""'"); - } - arg3 = static_cast< bool >(val3); - ecode4 = SWIG_AsVal_bool(swig_obj[3], &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "hfst_compile_sfst" "', argument " "4"" of type '" "bool""'"); - } - arg4 = static_cast< bool >(val4); - result = (hfst::HfstTransducer *)hfst::hfst_compile_sfst((std::string const &)*arg1,(std::string const &)*arg2,arg3,arg4); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_hfst__HfstTransducer, 0 | 0 ); - if (SWIG_IsNewObj(res1)) delete arg1; - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res1)) delete arg1; - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_one_level_paths_to_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::HfstOneLevelPaths *arg1 = 0 ; - int res1 = SWIG_OLDOBJ ; - PyObject *swig_obj[1] ; - std::string result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - std::set< std::pair< float,std::vector< std::string,std::allocator< std::string > > >,std::less< std::pair< float,std::vector< std::string > > >,std::allocator< std::pair< float,std::vector< std::string,std::allocator< std::string > > > > > *ptr = (std::set< std::pair< float,std::vector< std::string,std::allocator< std::string > > >,std::less< std::pair< float,std::vector< std::string > > >,std::allocator< std::pair< float,std::vector< std::string,std::allocator< std::string > > > > > *)0; - res1 = swig::asptr(swig_obj[0], &ptr); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "one_level_paths_to_string" "', argument " "1"" of type '" "hfst::HfstOneLevelPaths const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "one_level_paths_to_string" "', argument " "1"" of type '" "hfst::HfstOneLevelPaths const &""'"); - } - arg1 = ptr; - } - result = hfst::one_level_paths_to_string((std::set< std::pair< float,std::vector< std::string,std::allocator< std::string > > >,std::less< std::pair< float,std::vector< std::string,std::allocator< std::string > > > >,std::allocator< std::pair< float,std::vector< std::string,std::allocator< std::string > > > > > const &)*arg1); - resultobj = SWIG_From_std_string(static_cast< std::string >(result)); - if (SWIG_IsNewObj(res1)) delete arg1; - return resultobj; -fail: - if (SWIG_IsNewObj(res1)) delete arg1; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_two_level_paths_to_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::HfstTwoLevelPaths *arg1 = 0 ; - int res1 = SWIG_OLDOBJ ; - PyObject *swig_obj[1] ; - std::string result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - std::set< std::pair< float,std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > > >,std::less< std::pair< float,std::vector< std::pair< std::string,std::string > > > >,std::allocator< std::pair< float,std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > > > > > *ptr = (std::set< std::pair< float,std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > > >,std::less< std::pair< float,std::vector< std::pair< std::string,std::string > > > >,std::allocator< std::pair< float,std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > > > > > *)0; - res1 = swig::asptr(swig_obj[0], &ptr); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "two_level_paths_to_string" "', argument " "1"" of type '" "hfst::HfstTwoLevelPaths const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "two_level_paths_to_string" "', argument " "1"" of type '" "hfst::HfstTwoLevelPaths const &""'"); - } - arg1 = ptr; - } - result = hfst::two_level_paths_to_string((std::set< std::pair< float,std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > > >,std::less< std::pair< float,std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > > > >,std::allocator< std::pair< float,std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > > > > > const &)*arg1); - resultobj = SWIG_From_std_string(static_cast< std::string >(result)); - if (SWIG_IsNewObj(res1)) delete arg1; - return resultobj; -fail: - if (SWIG_IsNewObj(res1)) delete arg1; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_parse_prolog_network_line(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::string *arg1 = 0 ; - hfst::implementations::HfstBasicTransducer *arg2 = (hfst::implementations::HfstBasicTransducer *) 0 ; - int res1 = SWIG_OLDOBJ ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject *swig_obj[2] ; - bool result; - - if (!SWIG_Python_UnpackTuple(args, "parse_prolog_network_line", 2, 2, swig_obj)) SWIG_fail; - { - std::string *ptr = (std::string *)0; - res1 = SWIG_AsPtr_std_string(swig_obj[0], &ptr); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "parse_prolog_network_line" "', argument " "1"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "parse_prolog_network_line" "', argument " "1"" of type '" "std::string const &""'"); - } - arg1 = ptr; - } - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_hfst__implementations__HfstBasicTransducer, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "parse_prolog_network_line" "', argument " "2"" of type '" "hfst::implementations::HfstBasicTransducer *""'"); - } - arg2 = reinterpret_cast< hfst::implementations::HfstBasicTransducer * >(argp2); - result = (bool)hfst::parse_prolog_network_line((std::string const &)*arg1,arg2); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - if (SWIG_IsNewObj(res1)) delete arg1; - return resultobj; -fail: - if (SWIG_IsNewObj(res1)) delete arg1; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_parse_prolog_arc_line(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::string *arg1 = 0 ; - hfst::implementations::HfstBasicTransducer *arg2 = (hfst::implementations::HfstBasicTransducer *) 0 ; - int res1 = SWIG_OLDOBJ ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject *swig_obj[2] ; - bool result; - - if (!SWIG_Python_UnpackTuple(args, "parse_prolog_arc_line", 2, 2, swig_obj)) SWIG_fail; - { - std::string *ptr = (std::string *)0; - res1 = SWIG_AsPtr_std_string(swig_obj[0], &ptr); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "parse_prolog_arc_line" "', argument " "1"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "parse_prolog_arc_line" "', argument " "1"" of type '" "std::string const &""'"); - } - arg1 = ptr; - } - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_hfst__implementations__HfstBasicTransducer, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "parse_prolog_arc_line" "', argument " "2"" of type '" "hfst::implementations::HfstBasicTransducer *""'"); - } - arg2 = reinterpret_cast< hfst::implementations::HfstBasicTransducer * >(argp2); - result = (bool)hfst::parse_prolog_arc_line((std::string const &)*arg1,arg2); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - if (SWIG_IsNewObj(res1)) delete arg1; - return resultobj; -fail: - if (SWIG_IsNewObj(res1)) delete arg1; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_parse_prolog_symbol_line(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::string *arg1 = 0 ; - hfst::implementations::HfstBasicTransducer *arg2 = (hfst::implementations::HfstBasicTransducer *) 0 ; - int res1 = SWIG_OLDOBJ ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject *swig_obj[2] ; - bool result; - - if (!SWIG_Python_UnpackTuple(args, "parse_prolog_symbol_line", 2, 2, swig_obj)) SWIG_fail; - { - std::string *ptr = (std::string *)0; - res1 = SWIG_AsPtr_std_string(swig_obj[0], &ptr); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "parse_prolog_symbol_line" "', argument " "1"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "parse_prolog_symbol_line" "', argument " "1"" of type '" "std::string const &""'"); - } - arg1 = ptr; - } - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_hfst__implementations__HfstBasicTransducer, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "parse_prolog_symbol_line" "', argument " "2"" of type '" "hfst::implementations::HfstBasicTransducer *""'"); - } - arg2 = reinterpret_cast< hfst::implementations::HfstBasicTransducer * >(argp2); - result = (bool)hfst::parse_prolog_symbol_line((std::string const &)*arg1,arg2); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - if (SWIG_IsNewObj(res1)) delete arg1; - return resultobj; -fail: - if (SWIG_IsNewObj(res1)) delete arg1; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_parse_prolog_final_line(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::string *arg1 = 0 ; - hfst::implementations::HfstBasicTransducer *arg2 = (hfst::implementations::HfstBasicTransducer *) 0 ; - int res1 = SWIG_OLDOBJ ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject *swig_obj[2] ; - bool result; - - if (!SWIG_Python_UnpackTuple(args, "parse_prolog_final_line", 2, 2, swig_obj)) SWIG_fail; - { - std::string *ptr = (std::string *)0; - res1 = SWIG_AsPtr_std_string(swig_obj[0], &ptr); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "parse_prolog_final_line" "', argument " "1"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "parse_prolog_final_line" "', argument " "1"" of type '" "std::string const &""'"); - } - arg1 = ptr; - } - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_hfst__implementations__HfstBasicTransducer, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "parse_prolog_final_line" "', argument " "2"" of type '" "hfst::implementations::HfstBasicTransducer *""'"); - } - arg2 = reinterpret_cast< hfst::implementations::HfstBasicTransducer * >(argp2); - result = (bool)hfst::parse_prolog_final_line((std::string const &)*arg1,arg2); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - if (SWIG_IsNewObj(res1)) delete arg1; - return resultobj; -fail: - if (SWIG_IsNewObj(res1)) delete arg1; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_set_default_fst_type(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::ImplementationType arg1 ; - int val1 ; - int ecode1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - ecode1 = SWIG_AsVal_int(swig_obj[0], &val1); - if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "set_default_fst_type" "', argument " "1"" of type '" "hfst::ImplementationType""'"); - } - arg1 = static_cast< hfst::ImplementationType >(val1); - hfst::set_default_fst_type(arg1); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_get_default_fst_type(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::ImplementationType result; - - if (!SWIG_Python_UnpackTuple(args, "get_default_fst_type", 0, 0, 0)) SWIG_fail; - result = (hfst::ImplementationType)hfst::get_default_fst_type(); - resultobj = SWIG_From_int(static_cast< int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_fst_type_to_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::ImplementationType arg1 ; - int val1 ; - int ecode1 = 0 ; - PyObject *swig_obj[1] ; - std::string result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - ecode1 = SWIG_AsVal_int(swig_obj[0], &val1); - if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "fst_type_to_string" "', argument " "1"" of type '" "hfst::ImplementationType""'"); - } - arg1 = static_cast< hfst::ImplementationType >(val1); - result = hfst::fst_type_to_string(arg1); - resultobj = SWIG_From_std_string(static_cast< std::string >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_two_level_if(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::HfstTransducerPair *arg1 = 0 ; - hfst::StringPairSet *arg2 = 0 ; - hfst::StringPairSet *arg3 = 0 ; - int res1 = SWIG_OLDOBJ ; - int res2 = SWIG_OLDOBJ ; - int res3 = SWIG_OLDOBJ ; - PyObject *swig_obj[3] ; - SwigValueWrapper< hfst::HfstTransducer > result; - - if (!SWIG_Python_UnpackTuple(args, "two_level_if", 3, 3, swig_obj)) SWIG_fail; - { - std::pair< hfst::HfstTransducer,hfst::HfstTransducer > *ptr = (std::pair< hfst::HfstTransducer,hfst::HfstTransducer > *)0; - res1 = swig::asptr(swig_obj[0], &ptr); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "two_level_if" "', argument " "1"" of type '" "hfst::HfstTransducerPair const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "two_level_if" "', argument " "1"" of type '" "hfst::HfstTransducerPair const &""'"); - } - arg1 = ptr; - } - { - std::set< std::pair< std::string,std::string >,std::less< std::pair< std::string,std::string > >,std::allocator< std::pair< std::string,std::string > > > *ptr = (std::set< std::pair< std::string,std::string >,std::less< std::pair< std::string,std::string > >,std::allocator< std::pair< std::string,std::string > > > *)0; - res2 = swig::asptr(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "two_level_if" "', argument " "2"" of type '" "hfst::StringPairSet const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "two_level_if" "', argument " "2"" of type '" "hfst::StringPairSet const &""'"); - } - arg2 = ptr; - } - { - std::set< std::pair< std::string,std::string >,std::less< std::pair< std::string,std::string > >,std::allocator< std::pair< std::string,std::string > > > *ptr = (std::set< std::pair< std::string,std::string >,std::less< std::pair< std::string,std::string > >,std::allocator< std::pair< std::string,std::string > > > *)0; - res3 = swig::asptr(swig_obj[2], &ptr); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "two_level_if" "', argument " "3"" of type '" "hfst::StringPairSet const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "two_level_if" "', argument " "3"" of type '" "hfst::StringPairSet const &""'"); - } - arg3 = ptr; - } - result = hfst::hfst_rules::two_level_if((std::pair< hfst::HfstTransducer,hfst::HfstTransducer > const &)*arg1,(std::set< std::pair< std::string,std::string >,std::less< std::pair< std::string,std::string > >,std::allocator< std::pair< std::string,std::string > > > const &)*arg2,(std::set< std::pair< std::string,std::string >,std::less< std::pair< std::string,std::string > >,std::allocator< std::pair< std::string,std::string > > > const &)*arg3); - resultobj = SWIG_NewPointerObj((new hfst::HfstTransducer(static_cast< const hfst::HfstTransducer& >(result))), SWIGTYPE_p_hfst__HfstTransducer, SWIG_POINTER_OWN | 0 ); - if (SWIG_IsNewObj(res1)) delete arg1; - if (SWIG_IsNewObj(res2)) delete arg2; - if (SWIG_IsNewObj(res3)) delete arg3; - return resultobj; -fail: - if (SWIG_IsNewObj(res1)) delete arg1; - if (SWIG_IsNewObj(res2)) delete arg2; - if (SWIG_IsNewObj(res3)) delete arg3; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_two_level_only_if(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::HfstTransducerPair *arg1 = 0 ; - hfst::StringPairSet *arg2 = 0 ; - hfst::StringPairSet *arg3 = 0 ; - int res1 = SWIG_OLDOBJ ; - int res2 = SWIG_OLDOBJ ; - int res3 = SWIG_OLDOBJ ; - PyObject *swig_obj[3] ; - SwigValueWrapper< hfst::HfstTransducer > result; - - if (!SWIG_Python_UnpackTuple(args, "two_level_only_if", 3, 3, swig_obj)) SWIG_fail; - { - std::pair< hfst::HfstTransducer,hfst::HfstTransducer > *ptr = (std::pair< hfst::HfstTransducer,hfst::HfstTransducer > *)0; - res1 = swig::asptr(swig_obj[0], &ptr); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "two_level_only_if" "', argument " "1"" of type '" "hfst::HfstTransducerPair const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "two_level_only_if" "', argument " "1"" of type '" "hfst::HfstTransducerPair const &""'"); - } - arg1 = ptr; - } - { - std::set< std::pair< std::string,std::string >,std::less< std::pair< std::string,std::string > >,std::allocator< std::pair< std::string,std::string > > > *ptr = (std::set< std::pair< std::string,std::string >,std::less< std::pair< std::string,std::string > >,std::allocator< std::pair< std::string,std::string > > > *)0; - res2 = swig::asptr(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "two_level_only_if" "', argument " "2"" of type '" "hfst::StringPairSet const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "two_level_only_if" "', argument " "2"" of type '" "hfst::StringPairSet const &""'"); - } - arg2 = ptr; - } - { - std::set< std::pair< std::string,std::string >,std::less< std::pair< std::string,std::string > >,std::allocator< std::pair< std::string,std::string > > > *ptr = (std::set< std::pair< std::string,std::string >,std::less< std::pair< std::string,std::string > >,std::allocator< std::pair< std::string,std::string > > > *)0; - res3 = swig::asptr(swig_obj[2], &ptr); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "two_level_only_if" "', argument " "3"" of type '" "hfst::StringPairSet const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "two_level_only_if" "', argument " "3"" of type '" "hfst::StringPairSet const &""'"); - } - arg3 = ptr; - } - result = hfst::hfst_rules::two_level_only_if((std::pair< hfst::HfstTransducer,hfst::HfstTransducer > const &)*arg1,(std::set< std::pair< std::string,std::string >,std::less< std::pair< std::string,std::string > >,std::allocator< std::pair< std::string,std::string > > > const &)*arg2,(std::set< std::pair< std::string,std::string >,std::less< std::pair< std::string,std::string > >,std::allocator< std::pair< std::string,std::string > > > const &)*arg3); - resultobj = SWIG_NewPointerObj((new hfst::HfstTransducer(static_cast< const hfst::HfstTransducer& >(result))), SWIGTYPE_p_hfst__HfstTransducer, SWIG_POINTER_OWN | 0 ); - if (SWIG_IsNewObj(res1)) delete arg1; - if (SWIG_IsNewObj(res2)) delete arg2; - if (SWIG_IsNewObj(res3)) delete arg3; - return resultobj; -fail: - if (SWIG_IsNewObj(res1)) delete arg1; - if (SWIG_IsNewObj(res2)) delete arg2; - if (SWIG_IsNewObj(res3)) delete arg3; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_two_level_if_and_only_if(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::HfstTransducerPair *arg1 = 0 ; - hfst::StringPairSet *arg2 = 0 ; - hfst::StringPairSet *arg3 = 0 ; - int res1 = SWIG_OLDOBJ ; - int res2 = SWIG_OLDOBJ ; - int res3 = SWIG_OLDOBJ ; - PyObject *swig_obj[3] ; - SwigValueWrapper< hfst::HfstTransducer > result; - - if (!SWIG_Python_UnpackTuple(args, "two_level_if_and_only_if", 3, 3, swig_obj)) SWIG_fail; - { - std::pair< hfst::HfstTransducer,hfst::HfstTransducer > *ptr = (std::pair< hfst::HfstTransducer,hfst::HfstTransducer > *)0; - res1 = swig::asptr(swig_obj[0], &ptr); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "two_level_if_and_only_if" "', argument " "1"" of type '" "hfst::HfstTransducerPair const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "two_level_if_and_only_if" "', argument " "1"" of type '" "hfst::HfstTransducerPair const &""'"); - } - arg1 = ptr; - } - { - std::set< std::pair< std::string,std::string >,std::less< std::pair< std::string,std::string > >,std::allocator< std::pair< std::string,std::string > > > *ptr = (std::set< std::pair< std::string,std::string >,std::less< std::pair< std::string,std::string > >,std::allocator< std::pair< std::string,std::string > > > *)0; - res2 = swig::asptr(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "two_level_if_and_only_if" "', argument " "2"" of type '" "hfst::StringPairSet const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "two_level_if_and_only_if" "', argument " "2"" of type '" "hfst::StringPairSet const &""'"); - } - arg2 = ptr; - } - { - std::set< std::pair< std::string,std::string >,std::less< std::pair< std::string,std::string > >,std::allocator< std::pair< std::string,std::string > > > *ptr = (std::set< std::pair< std::string,std::string >,std::less< std::pair< std::string,std::string > >,std::allocator< std::pair< std::string,std::string > > > *)0; - res3 = swig::asptr(swig_obj[2], &ptr); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "two_level_if_and_only_if" "', argument " "3"" of type '" "hfst::StringPairSet const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "two_level_if_and_only_if" "', argument " "3"" of type '" "hfst::StringPairSet const &""'"); - } - arg3 = ptr; - } - result = hfst::hfst_rules::two_level_if_and_only_if((std::pair< hfst::HfstTransducer,hfst::HfstTransducer > const &)*arg1,(std::set< std::pair< std::string,std::string >,std::less< std::pair< std::string,std::string > >,std::allocator< std::pair< std::string,std::string > > > const &)*arg2,(std::set< std::pair< std::string,std::string >,std::less< std::pair< std::string,std::string > >,std::allocator< std::pair< std::string,std::string > > > const &)*arg3); - resultobj = SWIG_NewPointerObj((new hfst::HfstTransducer(static_cast< const hfst::HfstTransducer& >(result))), SWIGTYPE_p_hfst__HfstTransducer, SWIG_POINTER_OWN | 0 ); - if (SWIG_IsNewObj(res1)) delete arg1; - if (SWIG_IsNewObj(res2)) delete arg2; - if (SWIG_IsNewObj(res3)) delete arg3; - return resultobj; -fail: - if (SWIG_IsNewObj(res1)) delete arg1; - if (SWIG_IsNewObj(res2)) delete arg2; - if (SWIG_IsNewObj(res3)) delete arg3; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_replace_down__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - hfst::HfstTransducerPair *arg1 = 0 ; - hfst::HfstTransducer *arg2 = 0 ; - bool arg3 ; - hfst::StringPairSet *arg4 = 0 ; - int res1 = SWIG_OLDOBJ ; - void *argp2 = 0 ; - int res2 = 0 ; - bool val3 ; - int ecode3 = 0 ; - int res4 = SWIG_OLDOBJ ; - SwigValueWrapper< hfst::HfstTransducer > result; - - if ((nobjs < 4) || (nobjs > 4)) SWIG_fail; - { - std::pair< hfst::HfstTransducer,hfst::HfstTransducer > *ptr = (std::pair< hfst::HfstTransducer,hfst::HfstTransducer > *)0; - res1 = swig::asptr(swig_obj[0], &ptr); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "replace_down" "', argument " "1"" of type '" "hfst::HfstTransducerPair const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "replace_down" "', argument " "1"" of type '" "hfst::HfstTransducerPair const &""'"); - } - arg1 = ptr; - } - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_hfst__HfstTransducer, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "replace_down" "', argument " "2"" of type '" "hfst::HfstTransducer const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "replace_down" "', argument " "2"" of type '" "hfst::HfstTransducer const &""'"); - } - arg2 = reinterpret_cast< hfst::HfstTransducer * >(argp2); - ecode3 = SWIG_AsVal_bool(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "replace_down" "', argument " "3"" of type '" "bool""'"); - } - arg3 = static_cast< bool >(val3); - { - std::set< std::pair< std::string,std::string >,std::less< std::pair< std::string,std::string > >,std::allocator< std::pair< std::string,std::string > > > *ptr = (std::set< std::pair< std::string,std::string >,std::less< std::pair< std::string,std::string > >,std::allocator< std::pair< std::string,std::string > > > *)0; - res4 = swig::asptr(swig_obj[3], &ptr); - if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "replace_down" "', argument " "4"" of type '" "hfst::StringPairSet const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "replace_down" "', argument " "4"" of type '" "hfst::StringPairSet const &""'"); - } - arg4 = ptr; - } - result = hfst::hfst_rules::replace_down((std::pair< hfst::HfstTransducer,hfst::HfstTransducer > const &)*arg1,(hfst::HfstTransducer const &)*arg2,arg3,(std::set< std::pair< std::string,std::string >,std::less< std::pair< std::string,std::string > >,std::allocator< std::pair< std::string,std::string > > > const &)*arg4); - resultobj = SWIG_NewPointerObj((new hfst::HfstTransducer(static_cast< const hfst::HfstTransducer& >(result))), SWIGTYPE_p_hfst__HfstTransducer, SWIG_POINTER_OWN | 0 ); - if (SWIG_IsNewObj(res1)) delete arg1; - if (SWIG_IsNewObj(res4)) delete arg4; - return resultobj; -fail: - if (SWIG_IsNewObj(res1)) delete arg1; - if (SWIG_IsNewObj(res4)) delete arg4; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_replace_down_karttunen(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::HfstTransducerPair *arg1 = 0 ; - hfst::HfstTransducer *arg2 = 0 ; - bool arg3 ; - hfst::StringPairSet *arg4 = 0 ; - int res1 = SWIG_OLDOBJ ; - void *argp2 = 0 ; - int res2 = 0 ; - bool val3 ; - int ecode3 = 0 ; - int res4 = SWIG_OLDOBJ ; - PyObject *swig_obj[4] ; - SwigValueWrapper< hfst::HfstTransducer > result; - - if (!SWIG_Python_UnpackTuple(args, "replace_down_karttunen", 4, 4, swig_obj)) SWIG_fail; - { - std::pair< hfst::HfstTransducer,hfst::HfstTransducer > *ptr = (std::pair< hfst::HfstTransducer,hfst::HfstTransducer > *)0; - res1 = swig::asptr(swig_obj[0], &ptr); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "replace_down_karttunen" "', argument " "1"" of type '" "hfst::HfstTransducerPair const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "replace_down_karttunen" "', argument " "1"" of type '" "hfst::HfstTransducerPair const &""'"); - } - arg1 = ptr; - } - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_hfst__HfstTransducer, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "replace_down_karttunen" "', argument " "2"" of type '" "hfst::HfstTransducer const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "replace_down_karttunen" "', argument " "2"" of type '" "hfst::HfstTransducer const &""'"); - } - arg2 = reinterpret_cast< hfst::HfstTransducer * >(argp2); - ecode3 = SWIG_AsVal_bool(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "replace_down_karttunen" "', argument " "3"" of type '" "bool""'"); - } - arg3 = static_cast< bool >(val3); - { - std::set< std::pair< std::string,std::string >,std::less< std::pair< std::string,std::string > >,std::allocator< std::pair< std::string,std::string > > > *ptr = (std::set< std::pair< std::string,std::string >,std::less< std::pair< std::string,std::string > >,std::allocator< std::pair< std::string,std::string > > > *)0; - res4 = swig::asptr(swig_obj[3], &ptr); - if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "replace_down_karttunen" "', argument " "4"" of type '" "hfst::StringPairSet const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "replace_down_karttunen" "', argument " "4"" of type '" "hfst::StringPairSet const &""'"); - } - arg4 = ptr; - } - result = hfst::hfst_rules::replace_down_karttunen((std::pair< hfst::HfstTransducer,hfst::HfstTransducer > const &)*arg1,(hfst::HfstTransducer const &)*arg2,arg3,(std::set< std::pair< std::string,std::string >,std::less< std::pair< std::string,std::string > >,std::allocator< std::pair< std::string,std::string > > > const &)*arg4); - resultobj = SWIG_NewPointerObj((new hfst::HfstTransducer(static_cast< const hfst::HfstTransducer& >(result))), SWIGTYPE_p_hfst__HfstTransducer, SWIG_POINTER_OWN | 0 ); - if (SWIG_IsNewObj(res1)) delete arg1; - if (SWIG_IsNewObj(res4)) delete arg4; - return resultobj; -fail: - if (SWIG_IsNewObj(res1)) delete arg1; - if (SWIG_IsNewObj(res4)) delete arg4; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_replace_right(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::HfstTransducerPair *arg1 = 0 ; - hfst::HfstTransducer *arg2 = 0 ; - bool arg3 ; - hfst::StringPairSet *arg4 = 0 ; - int res1 = SWIG_OLDOBJ ; - void *argp2 = 0 ; - int res2 = 0 ; - bool val3 ; - int ecode3 = 0 ; - int res4 = SWIG_OLDOBJ ; - PyObject *swig_obj[4] ; - SwigValueWrapper< hfst::HfstTransducer > result; - - if (!SWIG_Python_UnpackTuple(args, "replace_right", 4, 4, swig_obj)) SWIG_fail; - { - std::pair< hfst::HfstTransducer,hfst::HfstTransducer > *ptr = (std::pair< hfst::HfstTransducer,hfst::HfstTransducer > *)0; - res1 = swig::asptr(swig_obj[0], &ptr); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "replace_right" "', argument " "1"" of type '" "hfst::HfstTransducerPair const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "replace_right" "', argument " "1"" of type '" "hfst::HfstTransducerPair const &""'"); - } - arg1 = ptr; - } - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_hfst__HfstTransducer, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "replace_right" "', argument " "2"" of type '" "hfst::HfstTransducer const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "replace_right" "', argument " "2"" of type '" "hfst::HfstTransducer const &""'"); - } - arg2 = reinterpret_cast< hfst::HfstTransducer * >(argp2); - ecode3 = SWIG_AsVal_bool(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "replace_right" "', argument " "3"" of type '" "bool""'"); - } - arg3 = static_cast< bool >(val3); - { - std::set< std::pair< std::string,std::string >,std::less< std::pair< std::string,std::string > >,std::allocator< std::pair< std::string,std::string > > > *ptr = (std::set< std::pair< std::string,std::string >,std::less< std::pair< std::string,std::string > >,std::allocator< std::pair< std::string,std::string > > > *)0; - res4 = swig::asptr(swig_obj[3], &ptr); - if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "replace_right" "', argument " "4"" of type '" "hfst::StringPairSet const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "replace_right" "', argument " "4"" of type '" "hfst::StringPairSet const &""'"); - } - arg4 = ptr; - } - result = hfst::hfst_rules::replace_right((std::pair< hfst::HfstTransducer,hfst::HfstTransducer > const &)*arg1,(hfst::HfstTransducer const &)*arg2,arg3,(std::set< std::pair< std::string,std::string >,std::less< std::pair< std::string,std::string > >,std::allocator< std::pair< std::string,std::string > > > const &)*arg4); - resultobj = SWIG_NewPointerObj((new hfst::HfstTransducer(static_cast< const hfst::HfstTransducer& >(result))), SWIGTYPE_p_hfst__HfstTransducer, SWIG_POINTER_OWN | 0 ); - if (SWIG_IsNewObj(res1)) delete arg1; - if (SWIG_IsNewObj(res4)) delete arg4; - return resultobj; -fail: - if (SWIG_IsNewObj(res1)) delete arg1; - if (SWIG_IsNewObj(res4)) delete arg4; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_replace_left(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::HfstTransducerPair *arg1 = 0 ; - hfst::HfstTransducer *arg2 = 0 ; - bool arg3 ; - hfst::StringPairSet *arg4 = 0 ; - int res1 = SWIG_OLDOBJ ; - void *argp2 = 0 ; - int res2 = 0 ; - bool val3 ; - int ecode3 = 0 ; - int res4 = SWIG_OLDOBJ ; - PyObject *swig_obj[4] ; - SwigValueWrapper< hfst::HfstTransducer > result; - - if (!SWIG_Python_UnpackTuple(args, "replace_left", 4, 4, swig_obj)) SWIG_fail; - { - std::pair< hfst::HfstTransducer,hfst::HfstTransducer > *ptr = (std::pair< hfst::HfstTransducer,hfst::HfstTransducer > *)0; - res1 = swig::asptr(swig_obj[0], &ptr); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "replace_left" "', argument " "1"" of type '" "hfst::HfstTransducerPair const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "replace_left" "', argument " "1"" of type '" "hfst::HfstTransducerPair const &""'"); - } - arg1 = ptr; - } - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_hfst__HfstTransducer, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "replace_left" "', argument " "2"" of type '" "hfst::HfstTransducer const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "replace_left" "', argument " "2"" of type '" "hfst::HfstTransducer const &""'"); - } - arg2 = reinterpret_cast< hfst::HfstTransducer * >(argp2); - ecode3 = SWIG_AsVal_bool(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "replace_left" "', argument " "3"" of type '" "bool""'"); - } - arg3 = static_cast< bool >(val3); - { - std::set< std::pair< std::string,std::string >,std::less< std::pair< std::string,std::string > >,std::allocator< std::pair< std::string,std::string > > > *ptr = (std::set< std::pair< std::string,std::string >,std::less< std::pair< std::string,std::string > >,std::allocator< std::pair< std::string,std::string > > > *)0; - res4 = swig::asptr(swig_obj[3], &ptr); - if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "replace_left" "', argument " "4"" of type '" "hfst::StringPairSet const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "replace_left" "', argument " "4"" of type '" "hfst::StringPairSet const &""'"); - } - arg4 = ptr; - } - result = hfst::hfst_rules::replace_left((std::pair< hfst::HfstTransducer,hfst::HfstTransducer > const &)*arg1,(hfst::HfstTransducer const &)*arg2,arg3,(std::set< std::pair< std::string,std::string >,std::less< std::pair< std::string,std::string > >,std::allocator< std::pair< std::string,std::string > > > const &)*arg4); - resultobj = SWIG_NewPointerObj((new hfst::HfstTransducer(static_cast< const hfst::HfstTransducer& >(result))), SWIGTYPE_p_hfst__HfstTransducer, SWIG_POINTER_OWN | 0 ); - if (SWIG_IsNewObj(res1)) delete arg1; - if (SWIG_IsNewObj(res4)) delete arg4; - return resultobj; -fail: - if (SWIG_IsNewObj(res1)) delete arg1; - if (SWIG_IsNewObj(res4)) delete arg4; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_replace_up(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::HfstTransducer *arg1 = 0 ; - bool arg2 ; - hfst::StringPairSet *arg3 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - bool val2 ; - int ecode2 = 0 ; - int res3 = SWIG_OLDOBJ ; - PyObject *swig_obj[3] ; - SwigValueWrapper< hfst::HfstTransducer > result; - - if (!SWIG_Python_UnpackTuple(args, "replace_up", 3, 3, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_hfst__HfstTransducer, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "replace_up" "', argument " "1"" of type '" "hfst::HfstTransducer const &""'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "replace_up" "', argument " "1"" of type '" "hfst::HfstTransducer const &""'"); - } - arg1 = reinterpret_cast< hfst::HfstTransducer * >(argp1); - ecode2 = SWIG_AsVal_bool(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "replace_up" "', argument " "2"" of type '" "bool""'"); - } - arg2 = static_cast< bool >(val2); - { - std::set< std::pair< std::string,std::string >,std::less< std::pair< std::string,std::string > >,std::allocator< std::pair< std::string,std::string > > > *ptr = (std::set< std::pair< std::string,std::string >,std::less< std::pair< std::string,std::string > >,std::allocator< std::pair< std::string,std::string > > > *)0; - res3 = swig::asptr(swig_obj[2], &ptr); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "replace_up" "', argument " "3"" of type '" "hfst::StringPairSet const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "replace_up" "', argument " "3"" of type '" "hfst::StringPairSet const &""'"); - } - arg3 = ptr; - } - result = hfst::hfst_rules::replace_up((hfst::HfstTransducer const &)*arg1,arg2,(std::set< std::pair< std::string,std::string >,std::less< std::pair< std::string,std::string > >,std::allocator< std::pair< std::string,std::string > > > const &)*arg3); - resultobj = SWIG_NewPointerObj((new hfst::HfstTransducer(static_cast< const hfst::HfstTransducer& >(result))), SWIGTYPE_p_hfst__HfstTransducer, SWIG_POINTER_OWN | 0 ); - if (SWIG_IsNewObj(res3)) delete arg3; - return resultobj; -fail: - if (SWIG_IsNewObj(res3)) delete arg3; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_replace_down__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - hfst::HfstTransducer *arg1 = 0 ; - bool arg2 ; - hfst::StringPairSet *arg3 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - bool val2 ; - int ecode2 = 0 ; - int res3 = SWIG_OLDOBJ ; - SwigValueWrapper< hfst::HfstTransducer > result; - - if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_hfst__HfstTransducer, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "replace_down" "', argument " "1"" of type '" "hfst::HfstTransducer const &""'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "replace_down" "', argument " "1"" of type '" "hfst::HfstTransducer const &""'"); - } - arg1 = reinterpret_cast< hfst::HfstTransducer * >(argp1); - ecode2 = SWIG_AsVal_bool(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "replace_down" "', argument " "2"" of type '" "bool""'"); - } - arg2 = static_cast< bool >(val2); - { - std::set< std::pair< std::string,std::string >,std::less< std::pair< std::string,std::string > >,std::allocator< std::pair< std::string,std::string > > > *ptr = (std::set< std::pair< std::string,std::string >,std::less< std::pair< std::string,std::string > >,std::allocator< std::pair< std::string,std::string > > > *)0; - res3 = swig::asptr(swig_obj[2], &ptr); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "replace_down" "', argument " "3"" of type '" "hfst::StringPairSet const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "replace_down" "', argument " "3"" of type '" "hfst::StringPairSet const &""'"); - } - arg3 = ptr; - } - result = hfst::hfst_rules::replace_down((hfst::HfstTransducer const &)*arg1,arg2,(std::set< std::pair< std::string,std::string >,std::less< std::pair< std::string,std::string > >,std::allocator< std::pair< std::string,std::string > > > const &)*arg3); - resultobj = SWIG_NewPointerObj((new hfst::HfstTransducer(static_cast< const hfst::HfstTransducer& >(result))), SWIGTYPE_p_hfst__HfstTransducer, SWIG_POINTER_OWN | 0 ); - if (SWIG_IsNewObj(res3)) delete arg3; - return resultobj; -fail: - if (SWIG_IsNewObj(res3)) delete arg3; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_replace_down(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[5] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "replace_down", 0, 4, argv))) SWIG_fail; - --argc; - if (argc == 3) { - int _v; - int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_hfst__HfstTransducer, SWIG_POINTER_NO_NULL | 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_bool(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - int res = swig::asptr(argv[2], (std::set< std::pair< std::string,std::string >,std::less< std::pair< std::string,std::string > >,std::allocator< std::pair< std::string,std::string > > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_replace_down__SWIG_1(self, argc, argv); - } - } - } - } - if (argc == 4) { - int _v; - int res = swig::asptr(argv[0], (std::pair< hfst::HfstTransducer,hfst::HfstTransducer >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_hfst__HfstTransducer, SWIG_POINTER_NO_NULL | 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_bool(argv[2], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - int res = swig::asptr(argv[3], (std::set< std::pair< std::string,std::string >,std::less< std::pair< std::string,std::string > >,std::allocator< std::pair< std::string,std::string > > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_replace_down__SWIG_0(self, argc, argv); - } - } - } - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'replace_down'.\n" - " Possible C/C++ prototypes are:\n" - " hfst::hfst_rules::replace_down(hfst::HfstTransducerPair const &,hfst::HfstTransducer const &,bool,hfst::StringPairSet const &)\n" - " hfst::hfst_rules::replace_down(hfst::HfstTransducer const &,bool,hfst::StringPairSet const &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_left_replace_up__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - hfst::HfstTransducer *arg1 = 0 ; - bool arg2 ; - hfst::StringPairSet *arg3 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - bool val2 ; - int ecode2 = 0 ; - int res3 = SWIG_OLDOBJ ; - SwigValueWrapper< hfst::HfstTransducer > result; - - if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_hfst__HfstTransducer, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "left_replace_up" "', argument " "1"" of type '" "hfst::HfstTransducer const &""'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "left_replace_up" "', argument " "1"" of type '" "hfst::HfstTransducer const &""'"); - } - arg1 = reinterpret_cast< hfst::HfstTransducer * >(argp1); - ecode2 = SWIG_AsVal_bool(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "left_replace_up" "', argument " "2"" of type '" "bool""'"); - } - arg2 = static_cast< bool >(val2); - { - std::set< std::pair< std::string,std::string >,std::less< std::pair< std::string,std::string > >,std::allocator< std::pair< std::string,std::string > > > *ptr = (std::set< std::pair< std::string,std::string >,std::less< std::pair< std::string,std::string > >,std::allocator< std::pair< std::string,std::string > > > *)0; - res3 = swig::asptr(swig_obj[2], &ptr); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "left_replace_up" "', argument " "3"" of type '" "hfst::StringPairSet const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "left_replace_up" "', argument " "3"" of type '" "hfst::StringPairSet const &""'"); - } - arg3 = ptr; - } - result = hfst::hfst_rules::left_replace_up((hfst::HfstTransducer const &)*arg1,arg2,(std::set< std::pair< std::string,std::string >,std::less< std::pair< std::string,std::string > >,std::allocator< std::pair< std::string,std::string > > > const &)*arg3); - resultobj = SWIG_NewPointerObj((new hfst::HfstTransducer(static_cast< const hfst::HfstTransducer& >(result))), SWIGTYPE_p_hfst__HfstTransducer, SWIG_POINTER_OWN | 0 ); - if (SWIG_IsNewObj(res3)) delete arg3; - return resultobj; -fail: - if (SWIG_IsNewObj(res3)) delete arg3; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_left_replace_up__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - hfst::HfstTransducerPair *arg1 = 0 ; - hfst::HfstTransducer *arg2 = 0 ; - bool arg3 ; - hfst::StringPairSet *arg4 = 0 ; - int res1 = SWIG_OLDOBJ ; - void *argp2 = 0 ; - int res2 = 0 ; - bool val3 ; - int ecode3 = 0 ; - int res4 = SWIG_OLDOBJ ; - SwigValueWrapper< hfst::HfstTransducer > result; - - if ((nobjs < 4) || (nobjs > 4)) SWIG_fail; - { - std::pair< hfst::HfstTransducer,hfst::HfstTransducer > *ptr = (std::pair< hfst::HfstTransducer,hfst::HfstTransducer > *)0; - res1 = swig::asptr(swig_obj[0], &ptr); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "left_replace_up" "', argument " "1"" of type '" "hfst::HfstTransducerPair const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "left_replace_up" "', argument " "1"" of type '" "hfst::HfstTransducerPair const &""'"); - } - arg1 = ptr; - } - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_hfst__HfstTransducer, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "left_replace_up" "', argument " "2"" of type '" "hfst::HfstTransducer const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "left_replace_up" "', argument " "2"" of type '" "hfst::HfstTransducer const &""'"); - } - arg2 = reinterpret_cast< hfst::HfstTransducer * >(argp2); - ecode3 = SWIG_AsVal_bool(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "left_replace_up" "', argument " "3"" of type '" "bool""'"); - } - arg3 = static_cast< bool >(val3); - { - std::set< std::pair< std::string,std::string >,std::less< std::pair< std::string,std::string > >,std::allocator< std::pair< std::string,std::string > > > *ptr = (std::set< std::pair< std::string,std::string >,std::less< std::pair< std::string,std::string > >,std::allocator< std::pair< std::string,std::string > > > *)0; - res4 = swig::asptr(swig_obj[3], &ptr); - if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "left_replace_up" "', argument " "4"" of type '" "hfst::StringPairSet const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "left_replace_up" "', argument " "4"" of type '" "hfst::StringPairSet const &""'"); - } - arg4 = ptr; - } - result = hfst::hfst_rules::left_replace_up((std::pair< hfst::HfstTransducer,hfst::HfstTransducer > const &)*arg1,(hfst::HfstTransducer const &)*arg2,arg3,(std::set< std::pair< std::string,std::string >,std::less< std::pair< std::string,std::string > >,std::allocator< std::pair< std::string,std::string > > > const &)*arg4); - resultobj = SWIG_NewPointerObj((new hfst::HfstTransducer(static_cast< const hfst::HfstTransducer& >(result))), SWIGTYPE_p_hfst__HfstTransducer, SWIG_POINTER_OWN | 0 ); - if (SWIG_IsNewObj(res1)) delete arg1; - if (SWIG_IsNewObj(res4)) delete arg4; - return resultobj; -fail: - if (SWIG_IsNewObj(res1)) delete arg1; - if (SWIG_IsNewObj(res4)) delete arg4; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_left_replace_up(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[5] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "left_replace_up", 0, 4, argv))) SWIG_fail; - --argc; - if (argc == 3) { - int _v; - int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_hfst__HfstTransducer, SWIG_POINTER_NO_NULL | 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_bool(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - int res = swig::asptr(argv[2], (std::set< std::pair< std::string,std::string >,std::less< std::pair< std::string,std::string > >,std::allocator< std::pair< std::string,std::string > > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_left_replace_up__SWIG_0(self, argc, argv); - } - } - } - } - if (argc == 4) { - int _v; - int res = swig::asptr(argv[0], (std::pair< hfst::HfstTransducer,hfst::HfstTransducer >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_hfst__HfstTransducer, SWIG_POINTER_NO_NULL | 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_bool(argv[2], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - int res = swig::asptr(argv[3], (std::set< std::pair< std::string,std::string >,std::less< std::pair< std::string,std::string > >,std::allocator< std::pair< std::string,std::string > > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_left_replace_up__SWIG_1(self, argc, argv); - } - } - } - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'left_replace_up'.\n" - " Possible C/C++ prototypes are:\n" - " hfst::hfst_rules::left_replace_up(hfst::HfstTransducer const &,bool,hfst::StringPairSet const &)\n" - " hfst::hfst_rules::left_replace_up(hfst::HfstTransducerPair const &,hfst::HfstTransducer const &,bool,hfst::StringPairSet const &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_left_replace_down(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::HfstTransducerPair *arg1 = 0 ; - hfst::HfstTransducer *arg2 = 0 ; - bool arg3 ; - hfst::StringPairSet *arg4 = 0 ; - int res1 = SWIG_OLDOBJ ; - void *argp2 = 0 ; - int res2 = 0 ; - bool val3 ; - int ecode3 = 0 ; - int res4 = SWIG_OLDOBJ ; - PyObject *swig_obj[4] ; - SwigValueWrapper< hfst::HfstTransducer > result; - - if (!SWIG_Python_UnpackTuple(args, "left_replace_down", 4, 4, swig_obj)) SWIG_fail; - { - std::pair< hfst::HfstTransducer,hfst::HfstTransducer > *ptr = (std::pair< hfst::HfstTransducer,hfst::HfstTransducer > *)0; - res1 = swig::asptr(swig_obj[0], &ptr); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "left_replace_down" "', argument " "1"" of type '" "hfst::HfstTransducerPair const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "left_replace_down" "', argument " "1"" of type '" "hfst::HfstTransducerPair const &""'"); - } - arg1 = ptr; - } - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_hfst__HfstTransducer, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "left_replace_down" "', argument " "2"" of type '" "hfst::HfstTransducer const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "left_replace_down" "', argument " "2"" of type '" "hfst::HfstTransducer const &""'"); - } - arg2 = reinterpret_cast< hfst::HfstTransducer * >(argp2); - ecode3 = SWIG_AsVal_bool(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "left_replace_down" "', argument " "3"" of type '" "bool""'"); - } - arg3 = static_cast< bool >(val3); - { - std::set< std::pair< std::string,std::string >,std::less< std::pair< std::string,std::string > >,std::allocator< std::pair< std::string,std::string > > > *ptr = (std::set< std::pair< std::string,std::string >,std::less< std::pair< std::string,std::string > >,std::allocator< std::pair< std::string,std::string > > > *)0; - res4 = swig::asptr(swig_obj[3], &ptr); - if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "left_replace_down" "', argument " "4"" of type '" "hfst::StringPairSet const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "left_replace_down" "', argument " "4"" of type '" "hfst::StringPairSet const &""'"); - } - arg4 = ptr; - } - result = hfst::hfst_rules::left_replace_down((std::pair< hfst::HfstTransducer,hfst::HfstTransducer > const &)*arg1,(hfst::HfstTransducer const &)*arg2,arg3,(std::set< std::pair< std::string,std::string >,std::less< std::pair< std::string,std::string > >,std::allocator< std::pair< std::string,std::string > > > const &)*arg4); - resultobj = SWIG_NewPointerObj((new hfst::HfstTransducer(static_cast< const hfst::HfstTransducer& >(result))), SWIGTYPE_p_hfst__HfstTransducer, SWIG_POINTER_OWN | 0 ); - if (SWIG_IsNewObj(res1)) delete arg1; - if (SWIG_IsNewObj(res4)) delete arg4; - return resultobj; -fail: - if (SWIG_IsNewObj(res1)) delete arg1; - if (SWIG_IsNewObj(res4)) delete arg4; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_left_replace_down_karttunen(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::HfstTransducerPair *arg1 = 0 ; - hfst::HfstTransducer *arg2 = 0 ; - bool arg3 ; - hfst::StringPairSet *arg4 = 0 ; - int res1 = SWIG_OLDOBJ ; - void *argp2 = 0 ; - int res2 = 0 ; - bool val3 ; - int ecode3 = 0 ; - int res4 = SWIG_OLDOBJ ; - PyObject *swig_obj[4] ; - SwigValueWrapper< hfst::HfstTransducer > result; - - if (!SWIG_Python_UnpackTuple(args, "left_replace_down_karttunen", 4, 4, swig_obj)) SWIG_fail; - { - std::pair< hfst::HfstTransducer,hfst::HfstTransducer > *ptr = (std::pair< hfst::HfstTransducer,hfst::HfstTransducer > *)0; - res1 = swig::asptr(swig_obj[0], &ptr); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "left_replace_down_karttunen" "', argument " "1"" of type '" "hfst::HfstTransducerPair const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "left_replace_down_karttunen" "', argument " "1"" of type '" "hfst::HfstTransducerPair const &""'"); - } - arg1 = ptr; - } - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_hfst__HfstTransducer, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "left_replace_down_karttunen" "', argument " "2"" of type '" "hfst::HfstTransducer const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "left_replace_down_karttunen" "', argument " "2"" of type '" "hfst::HfstTransducer const &""'"); - } - arg2 = reinterpret_cast< hfst::HfstTransducer * >(argp2); - ecode3 = SWIG_AsVal_bool(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "left_replace_down_karttunen" "', argument " "3"" of type '" "bool""'"); - } - arg3 = static_cast< bool >(val3); - { - std::set< std::pair< std::string,std::string >,std::less< std::pair< std::string,std::string > >,std::allocator< std::pair< std::string,std::string > > > *ptr = (std::set< std::pair< std::string,std::string >,std::less< std::pair< std::string,std::string > >,std::allocator< std::pair< std::string,std::string > > > *)0; - res4 = swig::asptr(swig_obj[3], &ptr); - if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "left_replace_down_karttunen" "', argument " "4"" of type '" "hfst::StringPairSet const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "left_replace_down_karttunen" "', argument " "4"" of type '" "hfst::StringPairSet const &""'"); - } - arg4 = ptr; - } - result = hfst::hfst_rules::left_replace_down_karttunen((std::pair< hfst::HfstTransducer,hfst::HfstTransducer > const &)*arg1,(hfst::HfstTransducer const &)*arg2,arg3,(std::set< std::pair< std::string,std::string >,std::less< std::pair< std::string,std::string > >,std::allocator< std::pair< std::string,std::string > > > const &)*arg4); - resultobj = SWIG_NewPointerObj((new hfst::HfstTransducer(static_cast< const hfst::HfstTransducer& >(result))), SWIGTYPE_p_hfst__HfstTransducer, SWIG_POINTER_OWN | 0 ); - if (SWIG_IsNewObj(res1)) delete arg1; - if (SWIG_IsNewObj(res4)) delete arg4; - return resultobj; -fail: - if (SWIG_IsNewObj(res1)) delete arg1; - if (SWIG_IsNewObj(res4)) delete arg4; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_left_replace_left(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::HfstTransducerPair *arg1 = 0 ; - hfst::HfstTransducer *arg2 = 0 ; - bool arg3 ; - hfst::StringPairSet *arg4 = 0 ; - int res1 = SWIG_OLDOBJ ; - void *argp2 = 0 ; - int res2 = 0 ; - bool val3 ; - int ecode3 = 0 ; - int res4 = SWIG_OLDOBJ ; - PyObject *swig_obj[4] ; - SwigValueWrapper< hfst::HfstTransducer > result; - - if (!SWIG_Python_UnpackTuple(args, "left_replace_left", 4, 4, swig_obj)) SWIG_fail; - { - std::pair< hfst::HfstTransducer,hfst::HfstTransducer > *ptr = (std::pair< hfst::HfstTransducer,hfst::HfstTransducer > *)0; - res1 = swig::asptr(swig_obj[0], &ptr); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "left_replace_left" "', argument " "1"" of type '" "hfst::HfstTransducerPair const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "left_replace_left" "', argument " "1"" of type '" "hfst::HfstTransducerPair const &""'"); - } - arg1 = ptr; - } - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_hfst__HfstTransducer, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "left_replace_left" "', argument " "2"" of type '" "hfst::HfstTransducer const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "left_replace_left" "', argument " "2"" of type '" "hfst::HfstTransducer const &""'"); - } - arg2 = reinterpret_cast< hfst::HfstTransducer * >(argp2); - ecode3 = SWIG_AsVal_bool(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "left_replace_left" "', argument " "3"" of type '" "bool""'"); - } - arg3 = static_cast< bool >(val3); - { - std::set< std::pair< std::string,std::string >,std::less< std::pair< std::string,std::string > >,std::allocator< std::pair< std::string,std::string > > > *ptr = (std::set< std::pair< std::string,std::string >,std::less< std::pair< std::string,std::string > >,std::allocator< std::pair< std::string,std::string > > > *)0; - res4 = swig::asptr(swig_obj[3], &ptr); - if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "left_replace_left" "', argument " "4"" of type '" "hfst::StringPairSet const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "left_replace_left" "', argument " "4"" of type '" "hfst::StringPairSet const &""'"); - } - arg4 = ptr; - } - result = hfst::hfst_rules::left_replace_left((std::pair< hfst::HfstTransducer,hfst::HfstTransducer > const &)*arg1,(hfst::HfstTransducer const &)*arg2,arg3,(std::set< std::pair< std::string,std::string >,std::less< std::pair< std::string,std::string > >,std::allocator< std::pair< std::string,std::string > > > const &)*arg4); - resultobj = SWIG_NewPointerObj((new hfst::HfstTransducer(static_cast< const hfst::HfstTransducer& >(result))), SWIGTYPE_p_hfst__HfstTransducer, SWIG_POINTER_OWN | 0 ); - if (SWIG_IsNewObj(res1)) delete arg1; - if (SWIG_IsNewObj(res4)) delete arg4; - return resultobj; -fail: - if (SWIG_IsNewObj(res1)) delete arg1; - if (SWIG_IsNewObj(res4)) delete arg4; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_left_replace_right(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::HfstTransducerPair *arg1 = 0 ; - hfst::HfstTransducer *arg2 = 0 ; - bool arg3 ; - hfst::StringPairSet *arg4 = 0 ; - int res1 = SWIG_OLDOBJ ; - void *argp2 = 0 ; - int res2 = 0 ; - bool val3 ; - int ecode3 = 0 ; - int res4 = SWIG_OLDOBJ ; - PyObject *swig_obj[4] ; - SwigValueWrapper< hfst::HfstTransducer > result; - - if (!SWIG_Python_UnpackTuple(args, "left_replace_right", 4, 4, swig_obj)) SWIG_fail; - { - std::pair< hfst::HfstTransducer,hfst::HfstTransducer > *ptr = (std::pair< hfst::HfstTransducer,hfst::HfstTransducer > *)0; - res1 = swig::asptr(swig_obj[0], &ptr); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "left_replace_right" "', argument " "1"" of type '" "hfst::HfstTransducerPair const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "left_replace_right" "', argument " "1"" of type '" "hfst::HfstTransducerPair const &""'"); - } - arg1 = ptr; - } - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_hfst__HfstTransducer, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "left_replace_right" "', argument " "2"" of type '" "hfst::HfstTransducer const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "left_replace_right" "', argument " "2"" of type '" "hfst::HfstTransducer const &""'"); - } - arg2 = reinterpret_cast< hfst::HfstTransducer * >(argp2); - ecode3 = SWIG_AsVal_bool(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "left_replace_right" "', argument " "3"" of type '" "bool""'"); - } - arg3 = static_cast< bool >(val3); - { - std::set< std::pair< std::string,std::string >,std::less< std::pair< std::string,std::string > >,std::allocator< std::pair< std::string,std::string > > > *ptr = (std::set< std::pair< std::string,std::string >,std::less< std::pair< std::string,std::string > >,std::allocator< std::pair< std::string,std::string > > > *)0; - res4 = swig::asptr(swig_obj[3], &ptr); - if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "left_replace_right" "', argument " "4"" of type '" "hfst::StringPairSet const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "left_replace_right" "', argument " "4"" of type '" "hfst::StringPairSet const &""'"); - } - arg4 = ptr; - } - result = hfst::hfst_rules::left_replace_right((std::pair< hfst::HfstTransducer,hfst::HfstTransducer > const &)*arg1,(hfst::HfstTransducer const &)*arg2,arg3,(std::set< std::pair< std::string,std::string >,std::less< std::pair< std::string,std::string > >,std::allocator< std::pair< std::string,std::string > > > const &)*arg4); - resultobj = SWIG_NewPointerObj((new hfst::HfstTransducer(static_cast< const hfst::HfstTransducer& >(result))), SWIGTYPE_p_hfst__HfstTransducer, SWIG_POINTER_OWN | 0 ); - if (SWIG_IsNewObj(res1)) delete arg1; - if (SWIG_IsNewObj(res4)) delete arg4; - return resultobj; -fail: - if (SWIG_IsNewObj(res1)) delete arg1; - if (SWIG_IsNewObj(res4)) delete arg4; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_restriction(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::HfstTransducerPairVector *arg1 = 0 ; - hfst::HfstTransducer *arg2 = 0 ; - hfst::StringPairSet *arg3 = 0 ; - int res1 = SWIG_OLDOBJ ; - void *argp2 = 0 ; - int res2 = 0 ; - int res3 = SWIG_OLDOBJ ; - PyObject *swig_obj[3] ; - SwigValueWrapper< hfst::HfstTransducer > result; - - if (!SWIG_Python_UnpackTuple(args, "restriction", 3, 3, swig_obj)) SWIG_fail; - { - std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer >,std::allocator< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > > *ptr = (std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer >,std::allocator< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > > *)0; - res1 = swig::asptr(swig_obj[0], &ptr); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "restriction" "', argument " "1"" of type '" "hfst::HfstTransducerPairVector const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "restriction" "', argument " "1"" of type '" "hfst::HfstTransducerPairVector const &""'"); - } - arg1 = ptr; - } - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_hfst__HfstTransducer, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "restriction" "', argument " "2"" of type '" "hfst::HfstTransducer const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "restriction" "', argument " "2"" of type '" "hfst::HfstTransducer const &""'"); - } - arg2 = reinterpret_cast< hfst::HfstTransducer * >(argp2); - { - std::set< std::pair< std::string,std::string >,std::less< std::pair< std::string,std::string > >,std::allocator< std::pair< std::string,std::string > > > *ptr = (std::set< std::pair< std::string,std::string >,std::less< std::pair< std::string,std::string > >,std::allocator< std::pair< std::string,std::string > > > *)0; - res3 = swig::asptr(swig_obj[2], &ptr); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "restriction" "', argument " "3"" of type '" "hfst::StringPairSet const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "restriction" "', argument " "3"" of type '" "hfst::StringPairSet const &""'"); - } - arg3 = ptr; - } - result = hfst::hfst_rules::restriction((std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer >,std::allocator< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > > const &)*arg1,(hfst::HfstTransducer const &)*arg2,(std::set< std::pair< std::string,std::string >,std::less< std::pair< std::string,std::string > >,std::allocator< std::pair< std::string,std::string > > > const &)*arg3); - resultobj = SWIG_NewPointerObj((new hfst::HfstTransducer(static_cast< const hfst::HfstTransducer& >(result))), SWIGTYPE_p_hfst__HfstTransducer, SWIG_POINTER_OWN | 0 ); - if (SWIG_IsNewObj(res1)) delete arg1; - if (SWIG_IsNewObj(res3)) delete arg3; - return resultobj; -fail: - if (SWIG_IsNewObj(res1)) delete arg1; - if (SWIG_IsNewObj(res3)) delete arg3; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_coercion(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::HfstTransducerPairVector *arg1 = 0 ; - hfst::HfstTransducer *arg2 = 0 ; - hfst::StringPairSet *arg3 = 0 ; - int res1 = SWIG_OLDOBJ ; - void *argp2 = 0 ; - int res2 = 0 ; - int res3 = SWIG_OLDOBJ ; - PyObject *swig_obj[3] ; - SwigValueWrapper< hfst::HfstTransducer > result; - - if (!SWIG_Python_UnpackTuple(args, "coercion", 3, 3, swig_obj)) SWIG_fail; - { - std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer >,std::allocator< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > > *ptr = (std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer >,std::allocator< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > > *)0; - res1 = swig::asptr(swig_obj[0], &ptr); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "coercion" "', argument " "1"" of type '" "hfst::HfstTransducerPairVector const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "coercion" "', argument " "1"" of type '" "hfst::HfstTransducerPairVector const &""'"); - } - arg1 = ptr; - } - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_hfst__HfstTransducer, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "coercion" "', argument " "2"" of type '" "hfst::HfstTransducer const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "coercion" "', argument " "2"" of type '" "hfst::HfstTransducer const &""'"); - } - arg2 = reinterpret_cast< hfst::HfstTransducer * >(argp2); - { - std::set< std::pair< std::string,std::string >,std::less< std::pair< std::string,std::string > >,std::allocator< std::pair< std::string,std::string > > > *ptr = (std::set< std::pair< std::string,std::string >,std::less< std::pair< std::string,std::string > >,std::allocator< std::pair< std::string,std::string > > > *)0; - res3 = swig::asptr(swig_obj[2], &ptr); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "coercion" "', argument " "3"" of type '" "hfst::StringPairSet const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "coercion" "', argument " "3"" of type '" "hfst::StringPairSet const &""'"); - } - arg3 = ptr; - } - result = hfst::hfst_rules::coercion((std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer >,std::allocator< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > > const &)*arg1,(hfst::HfstTransducer const &)*arg2,(std::set< std::pair< std::string,std::string >,std::less< std::pair< std::string,std::string > >,std::allocator< std::pair< std::string,std::string > > > const &)*arg3); - resultobj = SWIG_NewPointerObj((new hfst::HfstTransducer(static_cast< const hfst::HfstTransducer& >(result))), SWIGTYPE_p_hfst__HfstTransducer, SWIG_POINTER_OWN | 0 ); - if (SWIG_IsNewObj(res1)) delete arg1; - if (SWIG_IsNewObj(res3)) delete arg3; - return resultobj; -fail: - if (SWIG_IsNewObj(res1)) delete arg1; - if (SWIG_IsNewObj(res3)) delete arg3; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_restriction_and_coercion(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::HfstTransducerPairVector *arg1 = 0 ; - hfst::HfstTransducer *arg2 = 0 ; - hfst::StringPairSet *arg3 = 0 ; - int res1 = SWIG_OLDOBJ ; - void *argp2 = 0 ; - int res2 = 0 ; - int res3 = SWIG_OLDOBJ ; - PyObject *swig_obj[3] ; - SwigValueWrapper< hfst::HfstTransducer > result; - - if (!SWIG_Python_UnpackTuple(args, "restriction_and_coercion", 3, 3, swig_obj)) SWIG_fail; - { - std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer >,std::allocator< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > > *ptr = (std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer >,std::allocator< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > > *)0; - res1 = swig::asptr(swig_obj[0], &ptr); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "restriction_and_coercion" "', argument " "1"" of type '" "hfst::HfstTransducerPairVector const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "restriction_and_coercion" "', argument " "1"" of type '" "hfst::HfstTransducerPairVector const &""'"); - } - arg1 = ptr; - } - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_hfst__HfstTransducer, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "restriction_and_coercion" "', argument " "2"" of type '" "hfst::HfstTransducer const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "restriction_and_coercion" "', argument " "2"" of type '" "hfst::HfstTransducer const &""'"); - } - arg2 = reinterpret_cast< hfst::HfstTransducer * >(argp2); - { - std::set< std::pair< std::string,std::string >,std::less< std::pair< std::string,std::string > >,std::allocator< std::pair< std::string,std::string > > > *ptr = (std::set< std::pair< std::string,std::string >,std::less< std::pair< std::string,std::string > >,std::allocator< std::pair< std::string,std::string > > > *)0; - res3 = swig::asptr(swig_obj[2], &ptr); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "restriction_and_coercion" "', argument " "3"" of type '" "hfst::StringPairSet const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "restriction_and_coercion" "', argument " "3"" of type '" "hfst::StringPairSet const &""'"); - } - arg3 = ptr; - } - result = hfst::hfst_rules::restriction_and_coercion((std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer >,std::allocator< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > > const &)*arg1,(hfst::HfstTransducer const &)*arg2,(std::set< std::pair< std::string,std::string >,std::less< std::pair< std::string,std::string > >,std::allocator< std::pair< std::string,std::string > > > const &)*arg3); - resultobj = SWIG_NewPointerObj((new hfst::HfstTransducer(static_cast< const hfst::HfstTransducer& >(result))), SWIGTYPE_p_hfst__HfstTransducer, SWIG_POINTER_OWN | 0 ); - if (SWIG_IsNewObj(res1)) delete arg1; - if (SWIG_IsNewObj(res3)) delete arg3; - return resultobj; -fail: - if (SWIG_IsNewObj(res1)) delete arg1; - if (SWIG_IsNewObj(res3)) delete arg3; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_surface_restriction(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::HfstTransducerPairVector *arg1 = 0 ; - hfst::HfstTransducer *arg2 = 0 ; - hfst::StringPairSet *arg3 = 0 ; - int res1 = SWIG_OLDOBJ ; - void *argp2 = 0 ; - int res2 = 0 ; - int res3 = SWIG_OLDOBJ ; - PyObject *swig_obj[3] ; - SwigValueWrapper< hfst::HfstTransducer > result; - - if (!SWIG_Python_UnpackTuple(args, "surface_restriction", 3, 3, swig_obj)) SWIG_fail; - { - std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer >,std::allocator< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > > *ptr = (std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer >,std::allocator< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > > *)0; - res1 = swig::asptr(swig_obj[0], &ptr); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "surface_restriction" "', argument " "1"" of type '" "hfst::HfstTransducerPairVector const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "surface_restriction" "', argument " "1"" of type '" "hfst::HfstTransducerPairVector const &""'"); - } - arg1 = ptr; - } - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_hfst__HfstTransducer, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "surface_restriction" "', argument " "2"" of type '" "hfst::HfstTransducer const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "surface_restriction" "', argument " "2"" of type '" "hfst::HfstTransducer const &""'"); - } - arg2 = reinterpret_cast< hfst::HfstTransducer * >(argp2); - { - std::set< std::pair< std::string,std::string >,std::less< std::pair< std::string,std::string > >,std::allocator< std::pair< std::string,std::string > > > *ptr = (std::set< std::pair< std::string,std::string >,std::less< std::pair< std::string,std::string > >,std::allocator< std::pair< std::string,std::string > > > *)0; - res3 = swig::asptr(swig_obj[2], &ptr); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "surface_restriction" "', argument " "3"" of type '" "hfst::StringPairSet const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "surface_restriction" "', argument " "3"" of type '" "hfst::StringPairSet const &""'"); - } - arg3 = ptr; - } - result = hfst::hfst_rules::surface_restriction((std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer >,std::allocator< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > > const &)*arg1,(hfst::HfstTransducer const &)*arg2,(std::set< std::pair< std::string,std::string >,std::less< std::pair< std::string,std::string > >,std::allocator< std::pair< std::string,std::string > > > const &)*arg3); - resultobj = SWIG_NewPointerObj((new hfst::HfstTransducer(static_cast< const hfst::HfstTransducer& >(result))), SWIGTYPE_p_hfst__HfstTransducer, SWIG_POINTER_OWN | 0 ); - if (SWIG_IsNewObj(res1)) delete arg1; - if (SWIG_IsNewObj(res3)) delete arg3; - return resultobj; -fail: - if (SWIG_IsNewObj(res1)) delete arg1; - if (SWIG_IsNewObj(res3)) delete arg3; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_surface_coercion(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::HfstTransducerPairVector *arg1 = 0 ; - hfst::HfstTransducer *arg2 = 0 ; - hfst::StringPairSet *arg3 = 0 ; - int res1 = SWIG_OLDOBJ ; - void *argp2 = 0 ; - int res2 = 0 ; - int res3 = SWIG_OLDOBJ ; - PyObject *swig_obj[3] ; - SwigValueWrapper< hfst::HfstTransducer > result; - - if (!SWIG_Python_UnpackTuple(args, "surface_coercion", 3, 3, swig_obj)) SWIG_fail; - { - std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer >,std::allocator< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > > *ptr = (std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer >,std::allocator< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > > *)0; - res1 = swig::asptr(swig_obj[0], &ptr); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "surface_coercion" "', argument " "1"" of type '" "hfst::HfstTransducerPairVector const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "surface_coercion" "', argument " "1"" of type '" "hfst::HfstTransducerPairVector const &""'"); - } - arg1 = ptr; - } - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_hfst__HfstTransducer, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "surface_coercion" "', argument " "2"" of type '" "hfst::HfstTransducer const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "surface_coercion" "', argument " "2"" of type '" "hfst::HfstTransducer const &""'"); - } - arg2 = reinterpret_cast< hfst::HfstTransducer * >(argp2); - { - std::set< std::pair< std::string,std::string >,std::less< std::pair< std::string,std::string > >,std::allocator< std::pair< std::string,std::string > > > *ptr = (std::set< std::pair< std::string,std::string >,std::less< std::pair< std::string,std::string > >,std::allocator< std::pair< std::string,std::string > > > *)0; - res3 = swig::asptr(swig_obj[2], &ptr); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "surface_coercion" "', argument " "3"" of type '" "hfst::StringPairSet const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "surface_coercion" "', argument " "3"" of type '" "hfst::StringPairSet const &""'"); - } - arg3 = ptr; - } - result = hfst::hfst_rules::surface_coercion((std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer >,std::allocator< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > > const &)*arg1,(hfst::HfstTransducer const &)*arg2,(std::set< std::pair< std::string,std::string >,std::less< std::pair< std::string,std::string > >,std::allocator< std::pair< std::string,std::string > > > const &)*arg3); - resultobj = SWIG_NewPointerObj((new hfst::HfstTransducer(static_cast< const hfst::HfstTransducer& >(result))), SWIGTYPE_p_hfst__HfstTransducer, SWIG_POINTER_OWN | 0 ); - if (SWIG_IsNewObj(res1)) delete arg1; - if (SWIG_IsNewObj(res3)) delete arg3; - return resultobj; -fail: - if (SWIG_IsNewObj(res1)) delete arg1; - if (SWIG_IsNewObj(res3)) delete arg3; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_surface_restriction_and_coercion(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::HfstTransducerPairVector *arg1 = 0 ; - hfst::HfstTransducer *arg2 = 0 ; - hfst::StringPairSet *arg3 = 0 ; - int res1 = SWIG_OLDOBJ ; - void *argp2 = 0 ; - int res2 = 0 ; - int res3 = SWIG_OLDOBJ ; - PyObject *swig_obj[3] ; - SwigValueWrapper< hfst::HfstTransducer > result; - - if (!SWIG_Python_UnpackTuple(args, "surface_restriction_and_coercion", 3, 3, swig_obj)) SWIG_fail; - { - std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer >,std::allocator< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > > *ptr = (std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer >,std::allocator< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > > *)0; - res1 = swig::asptr(swig_obj[0], &ptr); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "surface_restriction_and_coercion" "', argument " "1"" of type '" "hfst::HfstTransducerPairVector const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "surface_restriction_and_coercion" "', argument " "1"" of type '" "hfst::HfstTransducerPairVector const &""'"); - } - arg1 = ptr; - } - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_hfst__HfstTransducer, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "surface_restriction_and_coercion" "', argument " "2"" of type '" "hfst::HfstTransducer const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "surface_restriction_and_coercion" "', argument " "2"" of type '" "hfst::HfstTransducer const &""'"); - } - arg2 = reinterpret_cast< hfst::HfstTransducer * >(argp2); - { - std::set< std::pair< std::string,std::string >,std::less< std::pair< std::string,std::string > >,std::allocator< std::pair< std::string,std::string > > > *ptr = (std::set< std::pair< std::string,std::string >,std::less< std::pair< std::string,std::string > >,std::allocator< std::pair< std::string,std::string > > > *)0; - res3 = swig::asptr(swig_obj[2], &ptr); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "surface_restriction_and_coercion" "', argument " "3"" of type '" "hfst::StringPairSet const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "surface_restriction_and_coercion" "', argument " "3"" of type '" "hfst::StringPairSet const &""'"); - } - arg3 = ptr; - } - result = hfst::hfst_rules::surface_restriction_and_coercion((std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer >,std::allocator< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > > const &)*arg1,(hfst::HfstTransducer const &)*arg2,(std::set< std::pair< std::string,std::string >,std::less< std::pair< std::string,std::string > >,std::allocator< std::pair< std::string,std::string > > > const &)*arg3); - resultobj = SWIG_NewPointerObj((new hfst::HfstTransducer(static_cast< const hfst::HfstTransducer& >(result))), SWIGTYPE_p_hfst__HfstTransducer, SWIG_POINTER_OWN | 0 ); - if (SWIG_IsNewObj(res1)) delete arg1; - if (SWIG_IsNewObj(res3)) delete arg3; - return resultobj; -fail: - if (SWIG_IsNewObj(res1)) delete arg1; - if (SWIG_IsNewObj(res3)) delete arg3; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_deep_restriction(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::HfstTransducerPairVector *arg1 = 0 ; - hfst::HfstTransducer *arg2 = 0 ; - hfst::StringPairSet *arg3 = 0 ; - int res1 = SWIG_OLDOBJ ; - void *argp2 = 0 ; - int res2 = 0 ; - int res3 = SWIG_OLDOBJ ; - PyObject *swig_obj[3] ; - SwigValueWrapper< hfst::HfstTransducer > result; - - if (!SWIG_Python_UnpackTuple(args, "deep_restriction", 3, 3, swig_obj)) SWIG_fail; - { - std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer >,std::allocator< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > > *ptr = (std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer >,std::allocator< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > > *)0; - res1 = swig::asptr(swig_obj[0], &ptr); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "deep_restriction" "', argument " "1"" of type '" "hfst::HfstTransducerPairVector const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "deep_restriction" "', argument " "1"" of type '" "hfst::HfstTransducerPairVector const &""'"); - } - arg1 = ptr; - } - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_hfst__HfstTransducer, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "deep_restriction" "', argument " "2"" of type '" "hfst::HfstTransducer const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "deep_restriction" "', argument " "2"" of type '" "hfst::HfstTransducer const &""'"); - } - arg2 = reinterpret_cast< hfst::HfstTransducer * >(argp2); - { - std::set< std::pair< std::string,std::string >,std::less< std::pair< std::string,std::string > >,std::allocator< std::pair< std::string,std::string > > > *ptr = (std::set< std::pair< std::string,std::string >,std::less< std::pair< std::string,std::string > >,std::allocator< std::pair< std::string,std::string > > > *)0; - res3 = swig::asptr(swig_obj[2], &ptr); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "deep_restriction" "', argument " "3"" of type '" "hfst::StringPairSet const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "deep_restriction" "', argument " "3"" of type '" "hfst::StringPairSet const &""'"); - } - arg3 = ptr; - } - result = hfst::hfst_rules::deep_restriction((std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer >,std::allocator< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > > const &)*arg1,(hfst::HfstTransducer const &)*arg2,(std::set< std::pair< std::string,std::string >,std::less< std::pair< std::string,std::string > >,std::allocator< std::pair< std::string,std::string > > > const &)*arg3); - resultobj = SWIG_NewPointerObj((new hfst::HfstTransducer(static_cast< const hfst::HfstTransducer& >(result))), SWIGTYPE_p_hfst__HfstTransducer, SWIG_POINTER_OWN | 0 ); - if (SWIG_IsNewObj(res1)) delete arg1; - if (SWIG_IsNewObj(res3)) delete arg3; - return resultobj; -fail: - if (SWIG_IsNewObj(res1)) delete arg1; - if (SWIG_IsNewObj(res3)) delete arg3; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_deep_coercion(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::HfstTransducerPairVector *arg1 = 0 ; - hfst::HfstTransducer *arg2 = 0 ; - hfst::StringPairSet *arg3 = 0 ; - int res1 = SWIG_OLDOBJ ; - void *argp2 = 0 ; - int res2 = 0 ; - int res3 = SWIG_OLDOBJ ; - PyObject *swig_obj[3] ; - SwigValueWrapper< hfst::HfstTransducer > result; - - if (!SWIG_Python_UnpackTuple(args, "deep_coercion", 3, 3, swig_obj)) SWIG_fail; - { - std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer >,std::allocator< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > > *ptr = (std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer >,std::allocator< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > > *)0; - res1 = swig::asptr(swig_obj[0], &ptr); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "deep_coercion" "', argument " "1"" of type '" "hfst::HfstTransducerPairVector const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "deep_coercion" "', argument " "1"" of type '" "hfst::HfstTransducerPairVector const &""'"); - } - arg1 = ptr; - } - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_hfst__HfstTransducer, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "deep_coercion" "', argument " "2"" of type '" "hfst::HfstTransducer const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "deep_coercion" "', argument " "2"" of type '" "hfst::HfstTransducer const &""'"); - } - arg2 = reinterpret_cast< hfst::HfstTransducer * >(argp2); - { - std::set< std::pair< std::string,std::string >,std::less< std::pair< std::string,std::string > >,std::allocator< std::pair< std::string,std::string > > > *ptr = (std::set< std::pair< std::string,std::string >,std::less< std::pair< std::string,std::string > >,std::allocator< std::pair< std::string,std::string > > > *)0; - res3 = swig::asptr(swig_obj[2], &ptr); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "deep_coercion" "', argument " "3"" of type '" "hfst::StringPairSet const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "deep_coercion" "', argument " "3"" of type '" "hfst::StringPairSet const &""'"); - } - arg3 = ptr; - } - result = hfst::hfst_rules::deep_coercion((std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer >,std::allocator< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > > const &)*arg1,(hfst::HfstTransducer const &)*arg2,(std::set< std::pair< std::string,std::string >,std::less< std::pair< std::string,std::string > >,std::allocator< std::pair< std::string,std::string > > > const &)*arg3); - resultobj = SWIG_NewPointerObj((new hfst::HfstTransducer(static_cast< const hfst::HfstTransducer& >(result))), SWIGTYPE_p_hfst__HfstTransducer, SWIG_POINTER_OWN | 0 ); - if (SWIG_IsNewObj(res1)) delete arg1; - if (SWIG_IsNewObj(res3)) delete arg3; - return resultobj; -fail: - if (SWIG_IsNewObj(res1)) delete arg1; - if (SWIG_IsNewObj(res3)) delete arg3; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_deep_restriction_and_coercion(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::HfstTransducerPairVector *arg1 = 0 ; - hfst::HfstTransducer *arg2 = 0 ; - hfst::StringPairSet *arg3 = 0 ; - int res1 = SWIG_OLDOBJ ; - void *argp2 = 0 ; - int res2 = 0 ; - int res3 = SWIG_OLDOBJ ; - PyObject *swig_obj[3] ; - SwigValueWrapper< hfst::HfstTransducer > result; - - if (!SWIG_Python_UnpackTuple(args, "deep_restriction_and_coercion", 3, 3, swig_obj)) SWIG_fail; - { - std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer >,std::allocator< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > > *ptr = (std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer >,std::allocator< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > > *)0; - res1 = swig::asptr(swig_obj[0], &ptr); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "deep_restriction_and_coercion" "', argument " "1"" of type '" "hfst::HfstTransducerPairVector const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "deep_restriction_and_coercion" "', argument " "1"" of type '" "hfst::HfstTransducerPairVector const &""'"); - } - arg1 = ptr; - } - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_hfst__HfstTransducer, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "deep_restriction_and_coercion" "', argument " "2"" of type '" "hfst::HfstTransducer const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "deep_restriction_and_coercion" "', argument " "2"" of type '" "hfst::HfstTransducer const &""'"); - } - arg2 = reinterpret_cast< hfst::HfstTransducer * >(argp2); - { - std::set< std::pair< std::string,std::string >,std::less< std::pair< std::string,std::string > >,std::allocator< std::pair< std::string,std::string > > > *ptr = (std::set< std::pair< std::string,std::string >,std::less< std::pair< std::string,std::string > >,std::allocator< std::pair< std::string,std::string > > > *)0; - res3 = swig::asptr(swig_obj[2], &ptr); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "deep_restriction_and_coercion" "', argument " "3"" of type '" "hfst::StringPairSet const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "deep_restriction_and_coercion" "', argument " "3"" of type '" "hfst::StringPairSet const &""'"); - } - arg3 = ptr; - } - result = hfst::hfst_rules::deep_restriction_and_coercion((std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer >,std::allocator< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > > const &)*arg1,(hfst::HfstTransducer const &)*arg2,(std::set< std::pair< std::string,std::string >,std::less< std::pair< std::string,std::string > >,std::allocator< std::pair< std::string,std::string > > > const &)*arg3); - resultobj = SWIG_NewPointerObj((new hfst::HfstTransducer(static_cast< const hfst::HfstTransducer& >(result))), SWIGTYPE_p_hfst__HfstTransducer, SWIG_POINTER_OWN | 0 ); - if (SWIG_IsNewObj(res1)) delete arg1; - if (SWIG_IsNewObj(res3)) delete arg3; - return resultobj; -fail: - if (SWIG_IsNewObj(res1)) delete arg1; - if (SWIG_IsNewObj(res3)) delete arg3; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_TwolcCompiler_compile(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::string *arg1 = 0 ; - std::string *arg2 = 0 ; - bool arg3 ; - bool arg4 ; - bool arg5 ; - bool arg6 ; - hfst::ImplementationType arg7 ; - int res1 = SWIG_OLDOBJ ; - int res2 = SWIG_OLDOBJ ; - bool val3 ; - int ecode3 = 0 ; - bool val4 ; - int ecode4 = 0 ; - bool val5 ; - int ecode5 = 0 ; - bool val6 ; - int ecode6 = 0 ; - int val7 ; - int ecode7 = 0 ; - PyObject *swig_obj[7] ; - int result; - - if (!SWIG_Python_UnpackTuple(args, "TwolcCompiler_compile", 7, 7, swig_obj)) SWIG_fail; - { - std::string *ptr = (std::string *)0; - res1 = SWIG_AsPtr_std_string(swig_obj[0], &ptr); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TwolcCompiler_compile" "', argument " "1"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "TwolcCompiler_compile" "', argument " "1"" of type '" "std::string const &""'"); - } - arg1 = ptr; - } - { - std::string *ptr = (std::string *)0; - res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "TwolcCompiler_compile" "', argument " "2"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "TwolcCompiler_compile" "', argument " "2"" of type '" "std::string const &""'"); - } - arg2 = ptr; - } - ecode3 = SWIG_AsVal_bool(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "TwolcCompiler_compile" "', argument " "3"" of type '" "bool""'"); - } - arg3 = static_cast< bool >(val3); - ecode4 = SWIG_AsVal_bool(swig_obj[3], &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "TwolcCompiler_compile" "', argument " "4"" of type '" "bool""'"); - } - arg4 = static_cast< bool >(val4); - ecode5 = SWIG_AsVal_bool(swig_obj[4], &val5); - if (!SWIG_IsOK(ecode5)) { - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "TwolcCompiler_compile" "', argument " "5"" of type '" "bool""'"); - } - arg5 = static_cast< bool >(val5); - ecode6 = SWIG_AsVal_bool(swig_obj[5], &val6); - if (!SWIG_IsOK(ecode6)) { - SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "TwolcCompiler_compile" "', argument " "6"" of type '" "bool""'"); - } - arg6 = static_cast< bool >(val6); - ecode7 = SWIG_AsVal_int(swig_obj[6], &val7); - if (!SWIG_IsOK(ecode7)) { - SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "TwolcCompiler_compile" "', argument " "7"" of type '" "hfst::ImplementationType""'"); - } - arg7 = static_cast< hfst::ImplementationType >(val7); - result = (int)hfst::twolc::TwolcCompiler::compile((std::string const &)*arg1,(std::string const &)*arg2,arg3,arg4,arg5,arg6,arg7); - resultobj = SWIG_From_int(static_cast< int >(result)); - if (SWIG_IsNewObj(res1)) delete arg1; - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res1)) delete arg1; - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_TwolcCompiler(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::twolc::TwolcCompiler *result = 0 ; - - if (!SWIG_Python_UnpackTuple(args, "new_TwolcCompiler", 0, 0, 0)) SWIG_fail; - result = (hfst::twolc::TwolcCompiler *)new hfst::twolc::TwolcCompiler(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_hfst__twolc__TwolcCompiler, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_TwolcCompiler(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst::twolc::TwolcCompiler *arg1 = (hfst::twolc::TwolcCompiler *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst__twolc__TwolcCompiler, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_TwolcCompiler" "', argument " "1"" of type '" "hfst::twolc::TwolcCompiler *""'"); - } - arg1 = reinterpret_cast< hfst::twolc::TwolcCompiler * >(argp1); - delete arg1; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *TwolcCompiler_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_hfst__twolc__TwolcCompiler, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *TwolcCompiler_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_pmatch_get_tokenized_output(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst_ol::PmatchContainer *arg1 = (hfst_ol::PmatchContainer *) 0 ; - std::string *arg2 = 0 ; - std::string *arg3 = 0 ; - int *arg4 = (int *) 0 ; - bool arg5 ; - bool arg6 ; - bool arg7 ; - double arg8 ; - bool arg9 ; - float arg10 ; - bool arg11 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 = SWIG_OLDOBJ ; - int res3 = SWIG_OLDOBJ ; - void *argp4 = 0 ; - int res4 = 0 ; - bool val5 ; - int ecode5 = 0 ; - bool val6 ; - int ecode6 = 0 ; - bool val7 ; - int ecode7 = 0 ; - double val8 ; - int ecode8 = 0 ; - bool val9 ; - int ecode9 = 0 ; - float val10 ; - int ecode10 = 0 ; - bool val11 ; - int ecode11 = 0 ; - PyObject *swig_obj[11] ; - std::string result; - - if (!SWIG_Python_UnpackTuple(args, "pmatch_get_tokenized_output", 11, 11, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst_ol__PmatchContainer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pmatch_get_tokenized_output" "', argument " "1"" of type '" "hfst_ol::PmatchContainer *""'"); - } - arg1 = reinterpret_cast< hfst_ol::PmatchContainer * >(argp1); - { - std::string *ptr = (std::string *)0; - res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pmatch_get_tokenized_output" "', argument " "2"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "pmatch_get_tokenized_output" "', argument " "2"" of type '" "std::string const &""'"); - } - arg2 = ptr; - } - { - std::string *ptr = (std::string *)0; - res3 = SWIG_AsPtr_std_string(swig_obj[2], &ptr); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "pmatch_get_tokenized_output" "', argument " "3"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "pmatch_get_tokenized_output" "', argument " "3"" of type '" "std::string const &""'"); - } - arg3 = ptr; - } - res4 = SWIG_ConvertPtr(swig_obj[3], &argp4,SWIGTYPE_p_int, 0 | 0 ); - if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "pmatch_get_tokenized_output" "', argument " "4"" of type '" "int *""'"); - } - arg4 = reinterpret_cast< int * >(argp4); - ecode5 = SWIG_AsVal_bool(swig_obj[4], &val5); - if (!SWIG_IsOK(ecode5)) { - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "pmatch_get_tokenized_output" "', argument " "5"" of type '" "bool""'"); - } - arg5 = static_cast< bool >(val5); - ecode6 = SWIG_AsVal_bool(swig_obj[5], &val6); - if (!SWIG_IsOK(ecode6)) { - SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "pmatch_get_tokenized_output" "', argument " "6"" of type '" "bool""'"); - } - arg6 = static_cast< bool >(val6); - ecode7 = SWIG_AsVal_bool(swig_obj[6], &val7); - if (!SWIG_IsOK(ecode7)) { - SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "pmatch_get_tokenized_output" "', argument " "7"" of type '" "bool""'"); - } - arg7 = static_cast< bool >(val7); - ecode8 = SWIG_AsVal_double(swig_obj[7], &val8); - if (!SWIG_IsOK(ecode8)) { - SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "pmatch_get_tokenized_output" "', argument " "8"" of type '" "double""'"); - } - arg8 = static_cast< double >(val8); - ecode9 = SWIG_AsVal_bool(swig_obj[8], &val9); - if (!SWIG_IsOK(ecode9)) { - SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "pmatch_get_tokenized_output" "', argument " "9"" of type '" "bool""'"); - } - arg9 = static_cast< bool >(val9); - ecode10 = SWIG_AsVal_float(swig_obj[9], &val10); - if (!SWIG_IsOK(ecode10)) { - SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "pmatch_get_tokenized_output" "', argument " "10"" of type '" "float""'"); - } - arg10 = static_cast< float >(val10); - ecode11 = SWIG_AsVal_bool(swig_obj[10], &val11); - if (!SWIG_IsOK(ecode11)) { - SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "pmatch_get_tokenized_output" "', argument " "11"" of type '" "bool""'"); - } - arg11 = static_cast< bool >(val11); - result = hfst::pmatch_get_tokenized_output(arg1,(std::string const &)*arg2,(std::string const &)*arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11); - resultobj = SWIG_From_std_string(static_cast< std::string >(result)); - if (SWIG_IsNewObj(res2)) delete arg2; - if (SWIG_IsNewObj(res3)) delete arg3; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - if (SWIG_IsNewObj(res3)) delete arg3; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_pmatch_locate__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - hfst_ol::PmatchContainer *arg1 = (hfst_ol::PmatchContainer *) 0 ; - std::string *arg2 = 0 ; - double arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 = SWIG_OLDOBJ ; - double val3 ; - int ecode3 = 0 ; - hfst_ol::LocationVectorVector result; - - if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst_ol__PmatchContainer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pmatch_locate" "', argument " "1"" of type '" "hfst_ol::PmatchContainer *""'"); - } - arg1 = reinterpret_cast< hfst_ol::PmatchContainer * >(argp1); - { - std::string *ptr = (std::string *)0; - res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pmatch_locate" "', argument " "2"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "pmatch_locate" "', argument " "2"" of type '" "std::string const &""'"); - } - arg2 = ptr; - } - ecode3 = SWIG_AsVal_double(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "pmatch_locate" "', argument " "3"" of type '" "double""'"); - } - arg3 = static_cast< double >(val3); - result = hfst::pmatch_locate(arg1,(std::string const &)*arg2,arg3); - resultobj = swig::from(static_cast< std::vector< std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > >,std::allocator< std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > > > > >(result)); - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_pmatch_locate__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - hfst_ol::PmatchContainer *arg1 = (hfst_ol::PmatchContainer *) 0 ; - std::string *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 = SWIG_OLDOBJ ; - hfst_ol::LocationVectorVector result; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst_ol__PmatchContainer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pmatch_locate" "', argument " "1"" of type '" "hfst_ol::PmatchContainer *""'"); - } - arg1 = reinterpret_cast< hfst_ol::PmatchContainer * >(argp1); - { - std::string *ptr = (std::string *)0; - res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pmatch_locate" "', argument " "2"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "pmatch_locate" "', argument " "2"" of type '" "std::string const &""'"); - } - arg2 = ptr; - } - result = hfst::pmatch_locate(arg1,(std::string const &)*arg2); - resultobj = swig::from(static_cast< std::vector< std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > >,std::allocator< std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > > > > >(result)); - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_pmatch_locate__SWIG_2(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - hfst_ol::PmatchContainer *arg1 = (hfst_ol::PmatchContainer *) 0 ; - std::string *arg2 = 0 ; - double arg3 ; - float arg4 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 = SWIG_OLDOBJ ; - double val3 ; - int ecode3 = 0 ; - float val4 ; - int ecode4 = 0 ; - hfst_ol::LocationVectorVector result; - - if ((nobjs < 4) || (nobjs > 4)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst_ol__PmatchContainer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pmatch_locate" "', argument " "1"" of type '" "hfst_ol::PmatchContainer *""'"); - } - arg1 = reinterpret_cast< hfst_ol::PmatchContainer * >(argp1); - { - std::string *ptr = (std::string *)0; - res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pmatch_locate" "', argument " "2"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "pmatch_locate" "', argument " "2"" of type '" "std::string const &""'"); - } - arg2 = ptr; - } - ecode3 = SWIG_AsVal_double(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "pmatch_locate" "', argument " "3"" of type '" "double""'"); - } - arg3 = static_cast< double >(val3); - ecode4 = SWIG_AsVal_float(swig_obj[3], &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "pmatch_locate" "', argument " "4"" of type '" "float""'"); - } - arg4 = static_cast< float >(val4); - result = hfst::pmatch_locate(arg1,(std::string const &)*arg2,arg3,arg4); - resultobj = swig::from(static_cast< std::vector< std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > >,std::allocator< std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > > > > >(result)); - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_pmatch_locate(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[5] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "pmatch_locate", 0, 4, argv))) SWIG_fail; - --argc; - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_hfst_ol__PmatchContainer, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_AsPtr_std_string(argv[1], (std::string**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_pmatch_locate__SWIG_1(self, argc, argv); - } - } - } - if (argc == 3) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_hfst_ol__PmatchContainer, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_AsPtr_std_string(argv[1], (std::string**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_double(argv[2], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_pmatch_locate__SWIG_0(self, argc, argv); - } - } - } - } - if (argc == 4) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_hfst_ol__PmatchContainer, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_AsPtr_std_string(argv[1], (std::string**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_double(argv[2], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - { - int res = SWIG_AsVal_float(argv[3], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_pmatch_locate__SWIG_2(self, argc, argv); - } - } - } - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'pmatch_locate'.\n" - " Possible C/C++ prototypes are:\n" - " hfst::pmatch_locate(hfst_ol::PmatchContainer *,std::string const &,double)\n" - " hfst::pmatch_locate(hfst_ol::PmatchContainer *,std::string const &)\n" - " hfst::pmatch_locate(hfst_ol::PmatchContainer *,std::string const &,double,float)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_new_PmatchContainer__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **SWIGUNUSEDPARM(swig_obj)) { - PyObject *resultobj = 0; - hfst_ol::PmatchContainer *result = 0 ; - - if ((nobjs < 0) || (nobjs > 0)) SWIG_fail; - result = (hfst_ol::PmatchContainer *)new hfst_ol::PmatchContainer(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_hfst_ol__PmatchContainer, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_PmatchContainer__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - hfst::HfstTransducerVector arg1 ; - hfst_ol::PmatchContainer *result = 0 ; - - if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; - { - std::vector< hfst::HfstTransducer,std::allocator< hfst::HfstTransducer > > *ptr = (std::vector< hfst::HfstTransducer,std::allocator< hfst::HfstTransducer > > *)0; - int res = swig::asptr(swig_obj[0], &ptr); - if (!SWIG_IsOK(res) || !ptr) { - SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "new_PmatchContainer" "', argument " "1"" of type '" "hfst::HfstTransducerVector""'"); - } - arg1 = *ptr; - if (SWIG_IsNewObj(res)) delete ptr; - } - result = (hfst_ol::PmatchContainer *)new hfst_ol::PmatchContainer(arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_hfst_ol__PmatchContainer, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_PmatchContainer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst_ol::PmatchContainer *arg1 = (hfst_ol::PmatchContainer *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst_ol__PmatchContainer, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_PmatchContainer" "', argument " "1"" of type '" "hfst_ol::PmatchContainer *""'"); - } - arg1 = reinterpret_cast< hfst_ol::PmatchContainer * >(argp1); - delete arg1; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_PmatchContainer_match__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - hfst_ol::PmatchContainer *arg1 = (hfst_ol::PmatchContainer *) 0 ; - std::string *arg2 = 0 ; - double arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 = SWIG_OLDOBJ ; - double val3 ; - int ecode3 = 0 ; - std::string result; - - if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst_ol__PmatchContainer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PmatchContainer_match" "', argument " "1"" of type '" "hfst_ol::PmatchContainer *""'"); - } - arg1 = reinterpret_cast< hfst_ol::PmatchContainer * >(argp1); - { - std::string *ptr = (std::string *)0; - res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "PmatchContainer_match" "', argument " "2"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "PmatchContainer_match" "', argument " "2"" of type '" "std::string const &""'"); - } - arg2 = ptr; - } - ecode3 = SWIG_AsVal_double(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "PmatchContainer_match" "', argument " "3"" of type '" "double""'"); - } - arg3 = static_cast< double >(val3); - result = (arg1)->match((std::string const &)*arg2,arg3); - resultobj = SWIG_From_std_string(static_cast< std::string >(result)); - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_PmatchContainer_match__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - hfst_ol::PmatchContainer *arg1 = (hfst_ol::PmatchContainer *) 0 ; - std::string *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 = SWIG_OLDOBJ ; - std::string result; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst_ol__PmatchContainer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PmatchContainer_match" "', argument " "1"" of type '" "hfst_ol::PmatchContainer *""'"); - } - arg1 = reinterpret_cast< hfst_ol::PmatchContainer * >(argp1); - { - std::string *ptr = (std::string *)0; - res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "PmatchContainer_match" "', argument " "2"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "PmatchContainer_match" "', argument " "2"" of type '" "std::string const &""'"); - } - arg2 = ptr; - } - result = (arg1)->match((std::string const &)*arg2); - resultobj = SWIG_From_std_string(static_cast< std::string >(result)); - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_PmatchContainer_match(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[4] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "PmatchContainer_match", 0, 3, argv))) SWIG_fail; - --argc; - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_hfst_ol__PmatchContainer, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_AsPtr_std_string(argv[1], (std::string**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_PmatchContainer_match__SWIG_1(self, argc, argv); - } - } - } - if (argc == 3) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_hfst_ol__PmatchContainer, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_AsPtr_std_string(argv[1], (std::string**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_double(argv[2], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_PmatchContainer_match__SWIG_0(self, argc, argv); - } - } - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'PmatchContainer_match'.\n" - " Possible C/C++ prototypes are:\n" - " hfst_ol::PmatchContainer::match(std::string const &,double)\n" - " hfst_ol::PmatchContainer::match(std::string const &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_PmatchContainer_get_profiling_info(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst_ol::PmatchContainer *arg1 = (hfst_ol::PmatchContainer *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::string result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst_ol__PmatchContainer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PmatchContainer_get_profiling_info" "', argument " "1"" of type '" "hfst_ol::PmatchContainer *""'"); - } - arg1 = reinterpret_cast< hfst_ol::PmatchContainer * >(argp1); - result = (arg1)->get_profiling_info(); - resultobj = SWIG_From_std_string(static_cast< std::string >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_PmatchContainer_set_verbose(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst_ol::PmatchContainer *arg1 = (hfst_ol::PmatchContainer *) 0 ; - bool arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - bool val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args, "PmatchContainer_set_verbose", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst_ol__PmatchContainer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PmatchContainer_set_verbose" "', argument " "1"" of type '" "hfst_ol::PmatchContainer *""'"); - } - arg1 = reinterpret_cast< hfst_ol::PmatchContainer * >(argp1); - ecode2 = SWIG_AsVal_bool(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "PmatchContainer_set_verbose" "', argument " "2"" of type '" "bool""'"); - } - arg2 = static_cast< bool >(val2); - (arg1)->set_verbose(arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_PmatchContainer_set_profile(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - hfst_ol::PmatchContainer *arg1 = (hfst_ol::PmatchContainer *) 0 ; - bool arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - bool val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args, "PmatchContainer_set_profile", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst_ol__PmatchContainer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PmatchContainer_set_profile" "', argument " "1"" of type '" "hfst_ol::PmatchContainer *""'"); - } - arg1 = reinterpret_cast< hfst_ol::PmatchContainer * >(argp1); - ecode2 = SWIG_AsVal_bool(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "PmatchContainer_set_profile" "', argument " "2"" of type '" "bool""'"); - } - arg2 = static_cast< bool >(val2); - (arg1)->set_profile(arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_PmatchContainer__SWIG_2(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::string *arg1 = 0 ; - int res1 = SWIG_OLDOBJ ; - hfst_ol::PmatchContainer *result = 0 ; - - if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; - { - std::string *ptr = (std::string *)0; - res1 = SWIG_AsPtr_std_string(swig_obj[0], &ptr); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_PmatchContainer" "', argument " "1"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PmatchContainer" "', argument " "1"" of type '" "std::string const &""'"); - } - arg1 = ptr; - } - result = (hfst_ol::PmatchContainer *)new_hfst_ol_PmatchContainer__SWIG_2((std::string const &)*arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_hfst_ol__PmatchContainer, SWIG_POINTER_NEW | 0 ); - if (SWIG_IsNewObj(res1)) delete arg1; - return resultobj; -fail: - if (SWIG_IsNewObj(res1)) delete arg1; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_PmatchContainer(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[2] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "new_PmatchContainer", 0, 1, argv))) SWIG_fail; - --argc; - if (argc == 0) { - return _wrap_new_PmatchContainer__SWIG_0(self, argc, argv); - } - if (argc == 1) { - int _v; - int res = SWIG_AsPtr_std_string(argv[0], (std::string**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_new_PmatchContainer__SWIG_2(self, argc, argv); - } - } - if (argc == 1) { - int _v; - int res = swig::asptr(argv[0], (std::vector< hfst::HfstTransducer,std::allocator< hfst::HfstTransducer > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_new_PmatchContainer__SWIG_1(self, argc, argv); - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'new_PmatchContainer'.\n" - " Possible C/C++ prototypes are:\n" - " hfst_ol::PmatchContainer::PmatchContainer()\n" - " hfst_ol::PmatchContainer::PmatchContainer(hfst::HfstTransducerVector)\n" - " hfst_ol::PmatchContainer::PmatchContainer(std::string const &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_PmatchContainer_locate__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - hfst_ol::PmatchContainer *arg1 = (hfst_ol::PmatchContainer *) 0 ; - std::string *arg2 = 0 ; - double arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 = SWIG_OLDOBJ ; - double val3 ; - int ecode3 = 0 ; - hfst_ol::LocationVectorVector result; - - if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst_ol__PmatchContainer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PmatchContainer_locate" "', argument " "1"" of type '" "hfst_ol::PmatchContainer *""'"); - } - arg1 = reinterpret_cast< hfst_ol::PmatchContainer * >(argp1); - { - std::string *ptr = (std::string *)0; - res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "PmatchContainer_locate" "', argument " "2"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "PmatchContainer_locate" "', argument " "2"" of type '" "std::string const &""'"); - } - arg2 = ptr; - } - ecode3 = SWIG_AsVal_double(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "PmatchContainer_locate" "', argument " "3"" of type '" "double""'"); - } - arg3 = static_cast< double >(val3); - result = hfst_ol_PmatchContainer_locate__SWIG_0(arg1,(std::string const &)*arg2,arg3); - resultobj = swig::from(static_cast< std::vector< std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > >,std::allocator< std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > > > > >(result)); - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_PmatchContainer_locate__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - hfst_ol::PmatchContainer *arg1 = (hfst_ol::PmatchContainer *) 0 ; - std::string *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 = SWIG_OLDOBJ ; - hfst_ol::LocationVectorVector result; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst_ol__PmatchContainer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PmatchContainer_locate" "', argument " "1"" of type '" "hfst_ol::PmatchContainer *""'"); - } - arg1 = reinterpret_cast< hfst_ol::PmatchContainer * >(argp1); - { - std::string *ptr = (std::string *)0; - res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "PmatchContainer_locate" "', argument " "2"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "PmatchContainer_locate" "', argument " "2"" of type '" "std::string const &""'"); - } - arg2 = ptr; - } - result = hfst_ol_PmatchContainer_locate__SWIG_0(arg1,(std::string const &)*arg2); - resultobj = swig::from(static_cast< std::vector< std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > >,std::allocator< std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > > > > >(result)); - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_PmatchContainer_locate__SWIG_2(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - hfst_ol::PmatchContainer *arg1 = (hfst_ol::PmatchContainer *) 0 ; - std::string *arg2 = 0 ; - double arg3 ; - float arg4 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 = SWIG_OLDOBJ ; - double val3 ; - int ecode3 = 0 ; - float val4 ; - int ecode4 = 0 ; - hfst_ol::LocationVectorVector result; - - if ((nobjs < 4) || (nobjs > 4)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hfst_ol__PmatchContainer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PmatchContainer_locate" "', argument " "1"" of type '" "hfst_ol::PmatchContainer *""'"); - } - arg1 = reinterpret_cast< hfst_ol::PmatchContainer * >(argp1); - { - std::string *ptr = (std::string *)0; - res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "PmatchContainer_locate" "', argument " "2"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "PmatchContainer_locate" "', argument " "2"" of type '" "std::string const &""'"); - } - arg2 = ptr; - } - ecode3 = SWIG_AsVal_double(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "PmatchContainer_locate" "', argument " "3"" of type '" "double""'"); - } - arg3 = static_cast< double >(val3); - ecode4 = SWIG_AsVal_float(swig_obj[3], &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "PmatchContainer_locate" "', argument " "4"" of type '" "float""'"); - } - arg4 = static_cast< float >(val4); - result = hfst_ol_PmatchContainer_locate__SWIG_2(arg1,(std::string const &)*arg2,arg3,arg4); - resultobj = swig::from(static_cast< std::vector< std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > >,std::allocator< std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > > > > >(result)); - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_PmatchContainer_locate(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[5] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "PmatchContainer_locate", 0, 4, argv))) SWIG_fail; - --argc; - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_hfst_ol__PmatchContainer, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_AsPtr_std_string(argv[1], (std::string**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_PmatchContainer_locate__SWIG_1(self, argc, argv); - } - } - } - if (argc == 3) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_hfst_ol__PmatchContainer, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_AsPtr_std_string(argv[1], (std::string**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_double(argv[2], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_PmatchContainer_locate__SWIG_0(self, argc, argv); - } - } - } - } - if (argc == 4) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_hfst_ol__PmatchContainer, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_AsPtr_std_string(argv[1], (std::string**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_double(argv[2], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - { - int res = SWIG_AsVal_float(argv[3], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_PmatchContainer_locate__SWIG_2(self, argc, argv); - } - } - } - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'PmatchContainer_locate'.\n" - " Possible C/C++ prototypes are:\n" - " hfst_ol::PmatchContainer::locate(std::string const &,double)\n" - " hfst_ol::PmatchContainer::locate(std::string const &)\n" - " hfst_ol::PmatchContainer::locate(std::string const &,double,float)\n"); - return 0; -} - - -SWIGINTERN PyObject *PmatchContainer_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_hfst_ol__PmatchContainer, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *PmatchContainer_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -static PyMethodDef SwigMethods[] = { - { "SWIG_PyInstanceMethod_New", SWIG_PyInstanceMethod_New, METH_O, NULL}, - { "delete_SwigPyIterator", _wrap_delete_SwigPyIterator, METH_O, NULL}, - { "SwigPyIterator_value", _wrap_SwigPyIterator_value, METH_O, NULL}, - { "SwigPyIterator_incr", _wrap_SwigPyIterator_incr, METH_VARARGS, NULL}, - { "SwigPyIterator_decr", _wrap_SwigPyIterator_decr, METH_VARARGS, NULL}, - { "SwigPyIterator_distance", _wrap_SwigPyIterator_distance, METH_VARARGS, NULL}, - { "SwigPyIterator_equal", _wrap_SwigPyIterator_equal, METH_VARARGS, NULL}, - { "SwigPyIterator_copy", _wrap_SwigPyIterator_copy, METH_O, NULL}, - { "SwigPyIterator_next", _wrap_SwigPyIterator_next, METH_O, NULL}, - { "SwigPyIterator___next__", _wrap_SwigPyIterator___next__, METH_O, NULL}, - { "SwigPyIterator_previous", _wrap_SwigPyIterator_previous, METH_O, NULL}, - { "SwigPyIterator_advance", _wrap_SwigPyIterator_advance, METH_VARARGS, NULL}, - { "SwigPyIterator___eq__", _wrap_SwigPyIterator___eq__, METH_VARARGS, NULL}, - { "SwigPyIterator___ne__", _wrap_SwigPyIterator___ne__, METH_VARARGS, NULL}, - { "SwigPyIterator___iadd__", _wrap_SwigPyIterator___iadd__, METH_VARARGS, NULL}, - { "SwigPyIterator___isub__", _wrap_SwigPyIterator___isub__, METH_VARARGS, NULL}, - { "SwigPyIterator___add__", _wrap_SwigPyIterator___add__, METH_VARARGS, NULL}, - { "SwigPyIterator___sub__", _wrap_SwigPyIterator___sub__, METH_VARARGS, NULL}, - { "SwigPyIterator_swigregister", SwigPyIterator_swigregister, METH_O, NULL}, - { "StringVector_iterator", _wrap_StringVector_iterator, METH_O, NULL}, - { "StringVector___nonzero__", _wrap_StringVector___nonzero__, METH_O, NULL}, - { "StringVector___bool__", _wrap_StringVector___bool__, METH_O, NULL}, - { "StringVector___len__", _wrap_StringVector___len__, METH_O, NULL}, - { "StringVector___getslice__", _wrap_StringVector___getslice__, METH_VARARGS, NULL}, - { "StringVector___setslice__", _wrap_StringVector___setslice__, METH_VARARGS, NULL}, - { "StringVector___delslice__", _wrap_StringVector___delslice__, METH_VARARGS, NULL}, - { "StringVector___delitem__", _wrap_StringVector___delitem__, METH_VARARGS, NULL}, - { "StringVector___getitem__", _wrap_StringVector___getitem__, METH_VARARGS, NULL}, - { "StringVector___setitem__", _wrap_StringVector___setitem__, METH_VARARGS, NULL}, - { "StringVector_pop", _wrap_StringVector_pop, METH_O, NULL}, - { "StringVector_append", _wrap_StringVector_append, METH_VARARGS, NULL}, - { "StringVector_empty", _wrap_StringVector_empty, METH_O, NULL}, - { "StringVector_size", _wrap_StringVector_size, METH_O, NULL}, - { "StringVector_swap", _wrap_StringVector_swap, METH_VARARGS, NULL}, - { "StringVector_begin", _wrap_StringVector_begin, METH_O, NULL}, - { "StringVector_end", _wrap_StringVector_end, METH_O, NULL}, - { "StringVector_rbegin", _wrap_StringVector_rbegin, METH_O, NULL}, - { "StringVector_rend", _wrap_StringVector_rend, METH_O, NULL}, - { "StringVector_clear", _wrap_StringVector_clear, METH_O, NULL}, - { "StringVector_get_allocator", _wrap_StringVector_get_allocator, METH_O, NULL}, - { "StringVector_pop_back", _wrap_StringVector_pop_back, METH_O, NULL}, - { "StringVector_erase", _wrap_StringVector_erase, METH_VARARGS, NULL}, - { "new_StringVector", _wrap_new_StringVector, METH_VARARGS, NULL}, - { "StringVector_push_back", _wrap_StringVector_push_back, METH_VARARGS, NULL}, - { "StringVector_front", _wrap_StringVector_front, METH_O, NULL}, - { "StringVector_back", _wrap_StringVector_back, METH_O, NULL}, - { "StringVector_assign", _wrap_StringVector_assign, METH_VARARGS, NULL}, - { "StringVector_resize", _wrap_StringVector_resize, METH_VARARGS, NULL}, - { "StringVector_insert", _wrap_StringVector_insert, METH_VARARGS, NULL}, - { "StringVector_reserve", _wrap_StringVector_reserve, METH_VARARGS, NULL}, - { "StringVector_capacity", _wrap_StringVector_capacity, METH_O, NULL}, - { "delete_StringVector", _wrap_delete_StringVector, METH_O, NULL}, - { "StringVector_swigregister", StringVector_swigregister, METH_O, NULL}, - { "StringVector_swiginit", StringVector_swiginit, METH_VARARGS, NULL}, - { "new_StringPair", _wrap_new_StringPair, METH_VARARGS, NULL}, - { "StringPair_first_set", _wrap_StringPair_first_set, METH_VARARGS, NULL}, - { "StringPair_first_get", _wrap_StringPair_first_get, METH_O, NULL}, - { "StringPair_second_set", _wrap_StringPair_second_set, METH_VARARGS, NULL}, - { "StringPair_second_get", _wrap_StringPair_second_get, METH_O, NULL}, - { "delete_StringPair", _wrap_delete_StringPair, METH_O, NULL}, - { "StringPair_swigregister", StringPair_swigregister, METH_O, NULL}, - { "StringPair_swiginit", StringPair_swiginit, METH_VARARGS, NULL}, - { "StringPairVector_iterator", _wrap_StringPairVector_iterator, METH_O, NULL}, - { "StringPairVector___nonzero__", _wrap_StringPairVector___nonzero__, METH_O, NULL}, - { "StringPairVector___bool__", _wrap_StringPairVector___bool__, METH_O, NULL}, - { "StringPairVector___len__", _wrap_StringPairVector___len__, METH_O, NULL}, - { "StringPairVector___getslice__", _wrap_StringPairVector___getslice__, METH_VARARGS, NULL}, - { "StringPairVector___setslice__", _wrap_StringPairVector___setslice__, METH_VARARGS, NULL}, - { "StringPairVector___delslice__", _wrap_StringPairVector___delslice__, METH_VARARGS, NULL}, - { "StringPairVector___delitem__", _wrap_StringPairVector___delitem__, METH_VARARGS, NULL}, - { "StringPairVector___getitem__", _wrap_StringPairVector___getitem__, METH_VARARGS, NULL}, - { "StringPairVector___setitem__", _wrap_StringPairVector___setitem__, METH_VARARGS, NULL}, - { "StringPairVector_pop", _wrap_StringPairVector_pop, METH_O, NULL}, - { "StringPairVector_append", _wrap_StringPairVector_append, METH_VARARGS, NULL}, - { "StringPairVector_empty", _wrap_StringPairVector_empty, METH_O, NULL}, - { "StringPairVector_size", _wrap_StringPairVector_size, METH_O, NULL}, - { "StringPairVector_swap", _wrap_StringPairVector_swap, METH_VARARGS, NULL}, - { "StringPairVector_begin", _wrap_StringPairVector_begin, METH_O, NULL}, - { "StringPairVector_end", _wrap_StringPairVector_end, METH_O, NULL}, - { "StringPairVector_rbegin", _wrap_StringPairVector_rbegin, METH_O, NULL}, - { "StringPairVector_rend", _wrap_StringPairVector_rend, METH_O, NULL}, - { "StringPairVector_clear", _wrap_StringPairVector_clear, METH_O, NULL}, - { "StringPairVector_get_allocator", _wrap_StringPairVector_get_allocator, METH_O, NULL}, - { "StringPairVector_pop_back", _wrap_StringPairVector_pop_back, METH_O, NULL}, - { "StringPairVector_erase", _wrap_StringPairVector_erase, METH_VARARGS, NULL}, - { "new_StringPairVector", _wrap_new_StringPairVector, METH_VARARGS, NULL}, - { "StringPairVector_push_back", _wrap_StringPairVector_push_back, METH_VARARGS, NULL}, - { "StringPairVector_front", _wrap_StringPairVector_front, METH_O, NULL}, - { "StringPairVector_back", _wrap_StringPairVector_back, METH_O, NULL}, - { "StringPairVector_assign", _wrap_StringPairVector_assign, METH_VARARGS, NULL}, - { "StringPairVector_resize", _wrap_StringPairVector_resize, METH_VARARGS, NULL}, - { "StringPairVector_insert", _wrap_StringPairVector_insert, METH_VARARGS, NULL}, - { "StringPairVector_reserve", _wrap_StringPairVector_reserve, METH_VARARGS, NULL}, - { "StringPairVector_capacity", _wrap_StringPairVector_capacity, METH_O, NULL}, - { "delete_StringPairVector", _wrap_delete_StringPairVector, METH_O, NULL}, - { "StringPairVector_swigregister", StringPairVector_swigregister, METH_O, NULL}, - { "StringPairVector_swiginit", StringPairVector_swiginit, METH_VARARGS, NULL}, - { "FloatVector_iterator", _wrap_FloatVector_iterator, METH_O, NULL}, - { "FloatVector___nonzero__", _wrap_FloatVector___nonzero__, METH_O, NULL}, - { "FloatVector___bool__", _wrap_FloatVector___bool__, METH_O, NULL}, - { "FloatVector___len__", _wrap_FloatVector___len__, METH_O, NULL}, - { "FloatVector___getslice__", _wrap_FloatVector___getslice__, METH_VARARGS, NULL}, - { "FloatVector___setslice__", _wrap_FloatVector___setslice__, METH_VARARGS, NULL}, - { "FloatVector___delslice__", _wrap_FloatVector___delslice__, METH_VARARGS, NULL}, - { "FloatVector___delitem__", _wrap_FloatVector___delitem__, METH_VARARGS, NULL}, - { "FloatVector___getitem__", _wrap_FloatVector___getitem__, METH_VARARGS, NULL}, - { "FloatVector___setitem__", _wrap_FloatVector___setitem__, METH_VARARGS, NULL}, - { "FloatVector_pop", _wrap_FloatVector_pop, METH_O, NULL}, - { "FloatVector_append", _wrap_FloatVector_append, METH_VARARGS, NULL}, - { "FloatVector_empty", _wrap_FloatVector_empty, METH_O, NULL}, - { "FloatVector_size", _wrap_FloatVector_size, METH_O, NULL}, - { "FloatVector_swap", _wrap_FloatVector_swap, METH_VARARGS, NULL}, - { "FloatVector_begin", _wrap_FloatVector_begin, METH_O, NULL}, - { "FloatVector_end", _wrap_FloatVector_end, METH_O, NULL}, - { "FloatVector_rbegin", _wrap_FloatVector_rbegin, METH_O, NULL}, - { "FloatVector_rend", _wrap_FloatVector_rend, METH_O, NULL}, - { "FloatVector_clear", _wrap_FloatVector_clear, METH_O, NULL}, - { "FloatVector_get_allocator", _wrap_FloatVector_get_allocator, METH_O, NULL}, - { "FloatVector_pop_back", _wrap_FloatVector_pop_back, METH_O, NULL}, - { "FloatVector_erase", _wrap_FloatVector_erase, METH_VARARGS, NULL}, - { "new_FloatVector", _wrap_new_FloatVector, METH_VARARGS, NULL}, - { "FloatVector_push_back", _wrap_FloatVector_push_back, METH_VARARGS, NULL}, - { "FloatVector_front", _wrap_FloatVector_front, METH_O, NULL}, - { "FloatVector_back", _wrap_FloatVector_back, METH_O, NULL}, - { "FloatVector_assign", _wrap_FloatVector_assign, METH_VARARGS, NULL}, - { "FloatVector_resize", _wrap_FloatVector_resize, METH_VARARGS, NULL}, - { "FloatVector_insert", _wrap_FloatVector_insert, METH_VARARGS, NULL}, - { "FloatVector_reserve", _wrap_FloatVector_reserve, METH_VARARGS, NULL}, - { "FloatVector_capacity", _wrap_FloatVector_capacity, METH_O, NULL}, - { "delete_FloatVector", _wrap_delete_FloatVector, METH_O, NULL}, - { "FloatVector_swigregister", FloatVector_swigregister, METH_O, NULL}, - { "FloatVector_swiginit", FloatVector_swiginit, METH_VARARGS, NULL}, - { "StringSet_iterator", _wrap_StringSet_iterator, METH_O, NULL}, - { "StringSet___nonzero__", _wrap_StringSet___nonzero__, METH_O, NULL}, - { "StringSet___bool__", _wrap_StringSet___bool__, METH_O, NULL}, - { "StringSet___len__", _wrap_StringSet___len__, METH_O, NULL}, - { "StringSet_append", _wrap_StringSet_append, METH_VARARGS, NULL}, - { "StringSet___contains__", _wrap_StringSet___contains__, METH_VARARGS, NULL}, - { "StringSet___getitem__", _wrap_StringSet___getitem__, METH_VARARGS, NULL}, - { "StringSet_add", _wrap_StringSet_add, METH_VARARGS, NULL}, - { "StringSet_discard", _wrap_StringSet_discard, METH_VARARGS, NULL}, - { "new_StringSet", _wrap_new_StringSet, METH_VARARGS, NULL}, - { "StringSet_empty", _wrap_StringSet_empty, METH_O, NULL}, - { "StringSet_size", _wrap_StringSet_size, METH_O, NULL}, - { "StringSet_clear", _wrap_StringSet_clear, METH_O, NULL}, - { "StringSet_swap", _wrap_StringSet_swap, METH_VARARGS, NULL}, - { "StringSet_count", _wrap_StringSet_count, METH_VARARGS, NULL}, - { "StringSet_begin", _wrap_StringSet_begin, METH_O, NULL}, - { "StringSet_end", _wrap_StringSet_end, METH_O, NULL}, - { "StringSet_rbegin", _wrap_StringSet_rbegin, METH_O, NULL}, - { "StringSet_rend", _wrap_StringSet_rend, METH_O, NULL}, - { "StringSet_erase", _wrap_StringSet_erase, METH_VARARGS, NULL}, - { "StringSet_find", _wrap_StringSet_find, METH_VARARGS, NULL}, - { "StringSet_lower_bound", _wrap_StringSet_lower_bound, METH_VARARGS, NULL}, - { "StringSet_upper_bound", _wrap_StringSet_upper_bound, METH_VARARGS, NULL}, - { "StringSet_equal_range", _wrap_StringSet_equal_range, METH_VARARGS, NULL}, - { "StringSet_insert", _wrap_StringSet_insert, METH_VARARGS, NULL}, - { "delete_StringSet", _wrap_delete_StringSet, METH_O, NULL}, - { "StringSet_swigregister", StringSet_swigregister, METH_O, NULL}, - { "StringSet_swiginit", StringSet_swiginit, METH_VARARGS, NULL}, - { "StringPairSet_iterator", _wrap_StringPairSet_iterator, METH_O, NULL}, - { "StringPairSet___nonzero__", _wrap_StringPairSet___nonzero__, METH_O, NULL}, - { "StringPairSet___bool__", _wrap_StringPairSet___bool__, METH_O, NULL}, - { "StringPairSet___len__", _wrap_StringPairSet___len__, METH_O, NULL}, - { "StringPairSet_append", _wrap_StringPairSet_append, METH_VARARGS, NULL}, - { "StringPairSet___contains__", _wrap_StringPairSet___contains__, METH_VARARGS, NULL}, - { "StringPairSet___getitem__", _wrap_StringPairSet___getitem__, METH_VARARGS, NULL}, - { "StringPairSet_add", _wrap_StringPairSet_add, METH_VARARGS, NULL}, - { "StringPairSet_discard", _wrap_StringPairSet_discard, METH_VARARGS, NULL}, - { "new_StringPairSet", _wrap_new_StringPairSet, METH_VARARGS, NULL}, - { "StringPairSet_empty", _wrap_StringPairSet_empty, METH_O, NULL}, - { "StringPairSet_size", _wrap_StringPairSet_size, METH_O, NULL}, - { "StringPairSet_clear", _wrap_StringPairSet_clear, METH_O, NULL}, - { "StringPairSet_swap", _wrap_StringPairSet_swap, METH_VARARGS, NULL}, - { "StringPairSet_count", _wrap_StringPairSet_count, METH_VARARGS, NULL}, - { "StringPairSet_begin", _wrap_StringPairSet_begin, METH_O, NULL}, - { "StringPairSet_end", _wrap_StringPairSet_end, METH_O, NULL}, - { "StringPairSet_rbegin", _wrap_StringPairSet_rbegin, METH_O, NULL}, - { "StringPairSet_rend", _wrap_StringPairSet_rend, METH_O, NULL}, - { "StringPairSet_erase", _wrap_StringPairSet_erase, METH_VARARGS, NULL}, - { "StringPairSet_find", _wrap_StringPairSet_find, METH_VARARGS, NULL}, - { "StringPairSet_lower_bound", _wrap_StringPairSet_lower_bound, METH_VARARGS, NULL}, - { "StringPairSet_upper_bound", _wrap_StringPairSet_upper_bound, METH_VARARGS, NULL}, - { "StringPairSet_equal_range", _wrap_StringPairSet_equal_range, METH_VARARGS, NULL}, - { "StringPairSet_insert", _wrap_StringPairSet_insert, METH_VARARGS, NULL}, - { "delete_StringPairSet", _wrap_delete_StringPairSet, METH_O, NULL}, - { "StringPairSet_swigregister", StringPairSet_swigregister, METH_O, NULL}, - { "StringPairSet_swiginit", StringPairSet_swiginit, METH_VARARGS, NULL}, - { "HfstTransducerVector_iterator", _wrap_HfstTransducerVector_iterator, METH_O, NULL}, - { "HfstTransducerVector___nonzero__", _wrap_HfstTransducerVector___nonzero__, METH_O, NULL}, - { "HfstTransducerVector___bool__", _wrap_HfstTransducerVector___bool__, METH_O, NULL}, - { "HfstTransducerVector___len__", _wrap_HfstTransducerVector___len__, METH_O, NULL}, - { "HfstTransducerVector___getslice__", _wrap_HfstTransducerVector___getslice__, METH_VARARGS, NULL}, - { "HfstTransducerVector___setslice__", _wrap_HfstTransducerVector___setslice__, METH_VARARGS, NULL}, - { "HfstTransducerVector___delslice__", _wrap_HfstTransducerVector___delslice__, METH_VARARGS, NULL}, - { "HfstTransducerVector___delitem__", _wrap_HfstTransducerVector___delitem__, METH_VARARGS, NULL}, - { "HfstTransducerVector___getitem__", _wrap_HfstTransducerVector___getitem__, METH_VARARGS, NULL}, - { "HfstTransducerVector___setitem__", _wrap_HfstTransducerVector___setitem__, METH_VARARGS, NULL}, - { "HfstTransducerVector_pop", _wrap_HfstTransducerVector_pop, METH_O, NULL}, - { "HfstTransducerVector_append", _wrap_HfstTransducerVector_append, METH_VARARGS, NULL}, - { "HfstTransducerVector_empty", _wrap_HfstTransducerVector_empty, METH_O, NULL}, - { "HfstTransducerVector_size", _wrap_HfstTransducerVector_size, METH_O, NULL}, - { "HfstTransducerVector_swap", _wrap_HfstTransducerVector_swap, METH_VARARGS, NULL}, - { "HfstTransducerVector_begin", _wrap_HfstTransducerVector_begin, METH_O, NULL}, - { "HfstTransducerVector_end", _wrap_HfstTransducerVector_end, METH_O, NULL}, - { "HfstTransducerVector_rbegin", _wrap_HfstTransducerVector_rbegin, METH_O, NULL}, - { "HfstTransducerVector_rend", _wrap_HfstTransducerVector_rend, METH_O, NULL}, - { "HfstTransducerVector_clear", _wrap_HfstTransducerVector_clear, METH_O, NULL}, - { "HfstTransducerVector_get_allocator", _wrap_HfstTransducerVector_get_allocator, METH_O, NULL}, - { "HfstTransducerVector_pop_back", _wrap_HfstTransducerVector_pop_back, METH_O, NULL}, - { "HfstTransducerVector_erase", _wrap_HfstTransducerVector_erase, METH_VARARGS, NULL}, - { "new_HfstTransducerVector", _wrap_new_HfstTransducerVector, METH_VARARGS, NULL}, - { "HfstTransducerVector_push_back", _wrap_HfstTransducerVector_push_back, METH_VARARGS, NULL}, - { "HfstTransducerVector_front", _wrap_HfstTransducerVector_front, METH_O, NULL}, - { "HfstTransducerVector_back", _wrap_HfstTransducerVector_back, METH_O, NULL}, - { "HfstTransducerVector_assign", _wrap_HfstTransducerVector_assign, METH_VARARGS, NULL}, - { "HfstTransducerVector_resize", _wrap_HfstTransducerVector_resize, METH_VARARGS, NULL}, - { "HfstTransducerVector_insert", _wrap_HfstTransducerVector_insert, METH_VARARGS, NULL}, - { "HfstTransducerVector_reserve", _wrap_HfstTransducerVector_reserve, METH_VARARGS, NULL}, - { "HfstTransducerVector_capacity", _wrap_HfstTransducerVector_capacity, METH_O, NULL}, - { "delete_HfstTransducerVector", _wrap_delete_HfstTransducerVector, METH_O, NULL}, - { "HfstTransducerVector_swigregister", HfstTransducerVector_swigregister, METH_O, NULL}, - { "HfstTransducerVector_swiginit", HfstTransducerVector_swiginit, METH_VARARGS, NULL}, - { "HfstSymbolSubstitutions_iterator", _wrap_HfstSymbolSubstitutions_iterator, METH_O, NULL}, - { "HfstSymbolSubstitutions___nonzero__", _wrap_HfstSymbolSubstitutions___nonzero__, METH_O, NULL}, - { "HfstSymbolSubstitutions___bool__", _wrap_HfstSymbolSubstitutions___bool__, METH_O, NULL}, - { "HfstSymbolSubstitutions___len__", _wrap_HfstSymbolSubstitutions___len__, METH_O, NULL}, - { "HfstSymbolSubstitutions___getitem__", _wrap_HfstSymbolSubstitutions___getitem__, METH_VARARGS, NULL}, - { "HfstSymbolSubstitutions___delitem__", _wrap_HfstSymbolSubstitutions___delitem__, METH_VARARGS, NULL}, - { "HfstSymbolSubstitutions_has_key", _wrap_HfstSymbolSubstitutions_has_key, METH_VARARGS, NULL}, - { "HfstSymbolSubstitutions_keys", _wrap_HfstSymbolSubstitutions_keys, METH_O, NULL}, - { "HfstSymbolSubstitutions_values", _wrap_HfstSymbolSubstitutions_values, METH_O, NULL}, - { "HfstSymbolSubstitutions_items", _wrap_HfstSymbolSubstitutions_items, METH_O, NULL}, - { "HfstSymbolSubstitutions___contains__", _wrap_HfstSymbolSubstitutions___contains__, METH_VARARGS, NULL}, - { "HfstSymbolSubstitutions_key_iterator", _wrap_HfstSymbolSubstitutions_key_iterator, METH_O, NULL}, - { "HfstSymbolSubstitutions_value_iterator", _wrap_HfstSymbolSubstitutions_value_iterator, METH_O, NULL}, - { "HfstSymbolSubstitutions___setitem__", _wrap_HfstSymbolSubstitutions___setitem__, METH_VARARGS, NULL}, - { "HfstSymbolSubstitutions_asdict", _wrap_HfstSymbolSubstitutions_asdict, METH_O, NULL}, - { "new_HfstSymbolSubstitutions", _wrap_new_HfstSymbolSubstitutions, METH_VARARGS, NULL}, - { "HfstSymbolSubstitutions_empty", _wrap_HfstSymbolSubstitutions_empty, METH_O, NULL}, - { "HfstSymbolSubstitutions_size", _wrap_HfstSymbolSubstitutions_size, METH_O, NULL}, - { "HfstSymbolSubstitutions_swap", _wrap_HfstSymbolSubstitutions_swap, METH_VARARGS, NULL}, - { "HfstSymbolSubstitutions_begin", _wrap_HfstSymbolSubstitutions_begin, METH_O, NULL}, - { "HfstSymbolSubstitutions_end", _wrap_HfstSymbolSubstitutions_end, METH_O, NULL}, - { "HfstSymbolSubstitutions_rbegin", _wrap_HfstSymbolSubstitutions_rbegin, METH_O, NULL}, - { "HfstSymbolSubstitutions_rend", _wrap_HfstSymbolSubstitutions_rend, METH_O, NULL}, - { "HfstSymbolSubstitutions_clear", _wrap_HfstSymbolSubstitutions_clear, METH_O, NULL}, - { "HfstSymbolSubstitutions_get_allocator", _wrap_HfstSymbolSubstitutions_get_allocator, METH_O, NULL}, - { "HfstSymbolSubstitutions_count", _wrap_HfstSymbolSubstitutions_count, METH_VARARGS, NULL}, - { "HfstSymbolSubstitutions_erase", _wrap_HfstSymbolSubstitutions_erase, METH_VARARGS, NULL}, - { "HfstSymbolSubstitutions_find", _wrap_HfstSymbolSubstitutions_find, METH_VARARGS, NULL}, - { "HfstSymbolSubstitutions_lower_bound", _wrap_HfstSymbolSubstitutions_lower_bound, METH_VARARGS, NULL}, - { "HfstSymbolSubstitutions_upper_bound", _wrap_HfstSymbolSubstitutions_upper_bound, METH_VARARGS, NULL}, - { "delete_HfstSymbolSubstitutions", _wrap_delete_HfstSymbolSubstitutions, METH_O, NULL}, - { "HfstSymbolSubstitutions_swigregister", HfstSymbolSubstitutions_swigregister, METH_O, NULL}, - { "HfstSymbolSubstitutions_swiginit", HfstSymbolSubstitutions_swiginit, METH_VARARGS, NULL}, - { "HfstSymbolPairSubstitutions_iterator", _wrap_HfstSymbolPairSubstitutions_iterator, METH_O, NULL}, - { "HfstSymbolPairSubstitutions___nonzero__", _wrap_HfstSymbolPairSubstitutions___nonzero__, METH_O, NULL}, - { "HfstSymbolPairSubstitutions___bool__", _wrap_HfstSymbolPairSubstitutions___bool__, METH_O, NULL}, - { "HfstSymbolPairSubstitutions___len__", _wrap_HfstSymbolPairSubstitutions___len__, METH_O, NULL}, - { "HfstSymbolPairSubstitutions___getitem__", _wrap_HfstSymbolPairSubstitutions___getitem__, METH_VARARGS, NULL}, - { "HfstSymbolPairSubstitutions___delitem__", _wrap_HfstSymbolPairSubstitutions___delitem__, METH_VARARGS, NULL}, - { "HfstSymbolPairSubstitutions_has_key", _wrap_HfstSymbolPairSubstitutions_has_key, METH_VARARGS, NULL}, - { "HfstSymbolPairSubstitutions_keys", _wrap_HfstSymbolPairSubstitutions_keys, METH_O, NULL}, - { "HfstSymbolPairSubstitutions_values", _wrap_HfstSymbolPairSubstitutions_values, METH_O, NULL}, - { "HfstSymbolPairSubstitutions_items", _wrap_HfstSymbolPairSubstitutions_items, METH_O, NULL}, - { "HfstSymbolPairSubstitutions___contains__", _wrap_HfstSymbolPairSubstitutions___contains__, METH_VARARGS, NULL}, - { "HfstSymbolPairSubstitutions_key_iterator", _wrap_HfstSymbolPairSubstitutions_key_iterator, METH_O, NULL}, - { "HfstSymbolPairSubstitutions_value_iterator", _wrap_HfstSymbolPairSubstitutions_value_iterator, METH_O, NULL}, - { "HfstSymbolPairSubstitutions___setitem__", _wrap_HfstSymbolPairSubstitutions___setitem__, METH_VARARGS, NULL}, - { "HfstSymbolPairSubstitutions_asdict", _wrap_HfstSymbolPairSubstitutions_asdict, METH_O, NULL}, - { "new_HfstSymbolPairSubstitutions", _wrap_new_HfstSymbolPairSubstitutions, METH_VARARGS, NULL}, - { "HfstSymbolPairSubstitutions_empty", _wrap_HfstSymbolPairSubstitutions_empty, METH_O, NULL}, - { "HfstSymbolPairSubstitutions_size", _wrap_HfstSymbolPairSubstitutions_size, METH_O, NULL}, - { "HfstSymbolPairSubstitutions_swap", _wrap_HfstSymbolPairSubstitutions_swap, METH_VARARGS, NULL}, - { "HfstSymbolPairSubstitutions_begin", _wrap_HfstSymbolPairSubstitutions_begin, METH_O, NULL}, - { "HfstSymbolPairSubstitutions_end", _wrap_HfstSymbolPairSubstitutions_end, METH_O, NULL}, - { "HfstSymbolPairSubstitutions_rbegin", _wrap_HfstSymbolPairSubstitutions_rbegin, METH_O, NULL}, - { "HfstSymbolPairSubstitutions_rend", _wrap_HfstSymbolPairSubstitutions_rend, METH_O, NULL}, - { "HfstSymbolPairSubstitutions_clear", _wrap_HfstSymbolPairSubstitutions_clear, METH_O, NULL}, - { "HfstSymbolPairSubstitutions_get_allocator", _wrap_HfstSymbolPairSubstitutions_get_allocator, METH_O, NULL}, - { "HfstSymbolPairSubstitutions_count", _wrap_HfstSymbolPairSubstitutions_count, METH_VARARGS, NULL}, - { "HfstSymbolPairSubstitutions_erase", _wrap_HfstSymbolPairSubstitutions_erase, METH_VARARGS, NULL}, - { "HfstSymbolPairSubstitutions_find", _wrap_HfstSymbolPairSubstitutions_find, METH_VARARGS, NULL}, - { "HfstSymbolPairSubstitutions_lower_bound", _wrap_HfstSymbolPairSubstitutions_lower_bound, METH_VARARGS, NULL}, - { "HfstSymbolPairSubstitutions_upper_bound", _wrap_HfstSymbolPairSubstitutions_upper_bound, METH_VARARGS, NULL}, - { "delete_HfstSymbolPairSubstitutions", _wrap_delete_HfstSymbolPairSubstitutions, METH_O, NULL}, - { "HfstSymbolPairSubstitutions_swigregister", HfstSymbolPairSubstitutions_swigregister, METH_O, NULL}, - { "HfstSymbolPairSubstitutions_swiginit", HfstSymbolPairSubstitutions_swiginit, METH_VARARGS, NULL}, - { "BarBazFoo_iterator", _wrap_BarBazFoo_iterator, METH_O, NULL}, - { "BarBazFoo___nonzero__", _wrap_BarBazFoo___nonzero__, METH_O, NULL}, - { "BarBazFoo___bool__", _wrap_BarBazFoo___bool__, METH_O, NULL}, - { "BarBazFoo___len__", _wrap_BarBazFoo___len__, METH_O, NULL}, - { "BarBazFoo___getslice__", _wrap_BarBazFoo___getslice__, METH_VARARGS, NULL}, - { "BarBazFoo___setslice__", _wrap_BarBazFoo___setslice__, METH_VARARGS, NULL}, - { "BarBazFoo___delslice__", _wrap_BarBazFoo___delslice__, METH_VARARGS, NULL}, - { "BarBazFoo___delitem__", _wrap_BarBazFoo___delitem__, METH_VARARGS, NULL}, - { "BarBazFoo___getitem__", _wrap_BarBazFoo___getitem__, METH_VARARGS, NULL}, - { "BarBazFoo___setitem__", _wrap_BarBazFoo___setitem__, METH_VARARGS, NULL}, - { "BarBazFoo_pop", _wrap_BarBazFoo_pop, METH_O, NULL}, - { "BarBazFoo_append", _wrap_BarBazFoo_append, METH_VARARGS, NULL}, - { "BarBazFoo_empty", _wrap_BarBazFoo_empty, METH_O, NULL}, - { "BarBazFoo_size", _wrap_BarBazFoo_size, METH_O, NULL}, - { "BarBazFoo_swap", _wrap_BarBazFoo_swap, METH_VARARGS, NULL}, - { "BarBazFoo_begin", _wrap_BarBazFoo_begin, METH_O, NULL}, - { "BarBazFoo_end", _wrap_BarBazFoo_end, METH_O, NULL}, - { "BarBazFoo_rbegin", _wrap_BarBazFoo_rbegin, METH_O, NULL}, - { "BarBazFoo_rend", _wrap_BarBazFoo_rend, METH_O, NULL}, - { "BarBazFoo_clear", _wrap_BarBazFoo_clear, METH_O, NULL}, - { "BarBazFoo_get_allocator", _wrap_BarBazFoo_get_allocator, METH_O, NULL}, - { "BarBazFoo_pop_back", _wrap_BarBazFoo_pop_back, METH_O, NULL}, - { "BarBazFoo_erase", _wrap_BarBazFoo_erase, METH_VARARGS, NULL}, - { "new_BarBazFoo", _wrap_new_BarBazFoo, METH_VARARGS, NULL}, - { "BarBazFoo_push_back", _wrap_BarBazFoo_push_back, METH_VARARGS, NULL}, - { "BarBazFoo_front", _wrap_BarBazFoo_front, METH_O, NULL}, - { "BarBazFoo_back", _wrap_BarBazFoo_back, METH_O, NULL}, - { "BarBazFoo_assign", _wrap_BarBazFoo_assign, METH_VARARGS, NULL}, - { "BarBazFoo_resize", _wrap_BarBazFoo_resize, METH_VARARGS, NULL}, - { "BarBazFoo_insert", _wrap_BarBazFoo_insert, METH_VARARGS, NULL}, - { "BarBazFoo_reserve", _wrap_BarBazFoo_reserve, METH_VARARGS, NULL}, - { "BarBazFoo_capacity", _wrap_BarBazFoo_capacity, METH_O, NULL}, - { "delete_BarBazFoo", _wrap_delete_BarBazFoo, METH_O, NULL}, - { "BarBazFoo_swigregister", BarBazFoo_swigregister, METH_O, NULL}, - { "BarBazFoo_swiginit", BarBazFoo_swiginit, METH_VARARGS, NULL}, - { "HfstBasicTransitions_iterator", _wrap_HfstBasicTransitions_iterator, METH_O, NULL}, - { "HfstBasicTransitions___nonzero__", _wrap_HfstBasicTransitions___nonzero__, METH_O, NULL}, - { "HfstBasicTransitions___bool__", _wrap_HfstBasicTransitions___bool__, METH_O, NULL}, - { "HfstBasicTransitions___len__", _wrap_HfstBasicTransitions___len__, METH_O, NULL}, - { "HfstBasicTransitions___getslice__", _wrap_HfstBasicTransitions___getslice__, METH_VARARGS, NULL}, - { "HfstBasicTransitions___setslice__", _wrap_HfstBasicTransitions___setslice__, METH_VARARGS, NULL}, - { "HfstBasicTransitions___delslice__", _wrap_HfstBasicTransitions___delslice__, METH_VARARGS, NULL}, - { "HfstBasicTransitions___delitem__", _wrap_HfstBasicTransitions___delitem__, METH_VARARGS, NULL}, - { "HfstBasicTransitions___getitem__", _wrap_HfstBasicTransitions___getitem__, METH_VARARGS, NULL}, - { "HfstBasicTransitions___setitem__", _wrap_HfstBasicTransitions___setitem__, METH_VARARGS, NULL}, - { "HfstBasicTransitions_pop", _wrap_HfstBasicTransitions_pop, METH_O, NULL}, - { "HfstBasicTransitions_append", _wrap_HfstBasicTransitions_append, METH_VARARGS, NULL}, - { "HfstBasicTransitions_empty", _wrap_HfstBasicTransitions_empty, METH_O, NULL}, - { "HfstBasicTransitions_size", _wrap_HfstBasicTransitions_size, METH_O, NULL}, - { "HfstBasicTransitions_swap", _wrap_HfstBasicTransitions_swap, METH_VARARGS, NULL}, - { "HfstBasicTransitions_begin", _wrap_HfstBasicTransitions_begin, METH_O, NULL}, - { "HfstBasicTransitions_end", _wrap_HfstBasicTransitions_end, METH_O, NULL}, - { "HfstBasicTransitions_rbegin", _wrap_HfstBasicTransitions_rbegin, METH_O, NULL}, - { "HfstBasicTransitions_rend", _wrap_HfstBasicTransitions_rend, METH_O, NULL}, - { "HfstBasicTransitions_clear", _wrap_HfstBasicTransitions_clear, METH_O, NULL}, - { "HfstBasicTransitions_get_allocator", _wrap_HfstBasicTransitions_get_allocator, METH_O, NULL}, - { "HfstBasicTransitions_pop_back", _wrap_HfstBasicTransitions_pop_back, METH_O, NULL}, - { "HfstBasicTransitions_erase", _wrap_HfstBasicTransitions_erase, METH_VARARGS, NULL}, - { "new_HfstBasicTransitions", _wrap_new_HfstBasicTransitions, METH_VARARGS, NULL}, - { "HfstBasicTransitions_push_back", _wrap_HfstBasicTransitions_push_back, METH_VARARGS, NULL}, - { "HfstBasicTransitions_front", _wrap_HfstBasicTransitions_front, METH_O, NULL}, - { "HfstBasicTransitions_back", _wrap_HfstBasicTransitions_back, METH_O, NULL}, - { "HfstBasicTransitions_assign", _wrap_HfstBasicTransitions_assign, METH_VARARGS, NULL}, - { "HfstBasicTransitions_resize", _wrap_HfstBasicTransitions_resize, METH_VARARGS, NULL}, - { "HfstBasicTransitions_insert", _wrap_HfstBasicTransitions_insert, METH_VARARGS, NULL}, - { "HfstBasicTransitions_reserve", _wrap_HfstBasicTransitions_reserve, METH_VARARGS, NULL}, - { "HfstBasicTransitions_capacity", _wrap_HfstBasicTransitions_capacity, METH_O, NULL}, - { "delete_HfstBasicTransitions", _wrap_delete_HfstBasicTransitions, METH_O, NULL}, - { "HfstBasicTransitions_swigregister", HfstBasicTransitions_swigregister, METH_O, NULL}, - { "HfstBasicTransitions_swiginit", HfstBasicTransitions_swiginit, METH_VARARGS, NULL}, - { "new_HfstOneLevelPath", _wrap_new_HfstOneLevelPath, METH_VARARGS, NULL}, - { "HfstOneLevelPath_first_set", _wrap_HfstOneLevelPath_first_set, METH_VARARGS, NULL}, - { "HfstOneLevelPath_first_get", _wrap_HfstOneLevelPath_first_get, METH_O, NULL}, - { "HfstOneLevelPath_second_set", _wrap_HfstOneLevelPath_second_set, METH_VARARGS, NULL}, - { "HfstOneLevelPath_second_get", _wrap_HfstOneLevelPath_second_get, METH_O, NULL}, - { "delete_HfstOneLevelPath", _wrap_delete_HfstOneLevelPath, METH_O, NULL}, - { "HfstOneLevelPath_swigregister", HfstOneLevelPath_swigregister, METH_O, NULL}, - { "HfstOneLevelPath_swiginit", HfstOneLevelPath_swiginit, METH_VARARGS, NULL}, - { "HfstOneLevelPaths_iterator", _wrap_HfstOneLevelPaths_iterator, METH_O, NULL}, - { "HfstOneLevelPaths___nonzero__", _wrap_HfstOneLevelPaths___nonzero__, METH_O, NULL}, - { "HfstOneLevelPaths___bool__", _wrap_HfstOneLevelPaths___bool__, METH_O, NULL}, - { "HfstOneLevelPaths___len__", _wrap_HfstOneLevelPaths___len__, METH_O, NULL}, - { "HfstOneLevelPaths_append", _wrap_HfstOneLevelPaths_append, METH_VARARGS, NULL}, - { "HfstOneLevelPaths___contains__", _wrap_HfstOneLevelPaths___contains__, METH_VARARGS, NULL}, - { "HfstOneLevelPaths___getitem__", _wrap_HfstOneLevelPaths___getitem__, METH_VARARGS, NULL}, - { "HfstOneLevelPaths_add", _wrap_HfstOneLevelPaths_add, METH_VARARGS, NULL}, - { "HfstOneLevelPaths_discard", _wrap_HfstOneLevelPaths_discard, METH_VARARGS, NULL}, - { "new_HfstOneLevelPaths", _wrap_new_HfstOneLevelPaths, METH_VARARGS, NULL}, - { "HfstOneLevelPaths_empty", _wrap_HfstOneLevelPaths_empty, METH_O, NULL}, - { "HfstOneLevelPaths_size", _wrap_HfstOneLevelPaths_size, METH_O, NULL}, - { "HfstOneLevelPaths_clear", _wrap_HfstOneLevelPaths_clear, METH_O, NULL}, - { "HfstOneLevelPaths_swap", _wrap_HfstOneLevelPaths_swap, METH_VARARGS, NULL}, - { "HfstOneLevelPaths_count", _wrap_HfstOneLevelPaths_count, METH_VARARGS, NULL}, - { "HfstOneLevelPaths_begin", _wrap_HfstOneLevelPaths_begin, METH_O, NULL}, - { "HfstOneLevelPaths_end", _wrap_HfstOneLevelPaths_end, METH_O, NULL}, - { "HfstOneLevelPaths_rbegin", _wrap_HfstOneLevelPaths_rbegin, METH_O, NULL}, - { "HfstOneLevelPaths_rend", _wrap_HfstOneLevelPaths_rend, METH_O, NULL}, - { "HfstOneLevelPaths_erase", _wrap_HfstOneLevelPaths_erase, METH_VARARGS, NULL}, - { "HfstOneLevelPaths_find", _wrap_HfstOneLevelPaths_find, METH_VARARGS, NULL}, - { "HfstOneLevelPaths_lower_bound", _wrap_HfstOneLevelPaths_lower_bound, METH_VARARGS, NULL}, - { "HfstOneLevelPaths_upper_bound", _wrap_HfstOneLevelPaths_upper_bound, METH_VARARGS, NULL}, - { "HfstOneLevelPaths_equal_range", _wrap_HfstOneLevelPaths_equal_range, METH_VARARGS, NULL}, - { "HfstOneLevelPaths_insert", _wrap_HfstOneLevelPaths_insert, METH_VARARGS, NULL}, - { "delete_HfstOneLevelPaths", _wrap_delete_HfstOneLevelPaths, METH_O, NULL}, - { "HfstOneLevelPaths_swigregister", HfstOneLevelPaths_swigregister, METH_O, NULL}, - { "HfstOneLevelPaths_swiginit", HfstOneLevelPaths_swiginit, METH_VARARGS, NULL}, - { "new_HfstTwoLevelPath", _wrap_new_HfstTwoLevelPath, METH_VARARGS, NULL}, - { "HfstTwoLevelPath_first_set", _wrap_HfstTwoLevelPath_first_set, METH_VARARGS, NULL}, - { "HfstTwoLevelPath_first_get", _wrap_HfstTwoLevelPath_first_get, METH_O, NULL}, - { "HfstTwoLevelPath_second_set", _wrap_HfstTwoLevelPath_second_set, METH_VARARGS, NULL}, - { "HfstTwoLevelPath_second_get", _wrap_HfstTwoLevelPath_second_get, METH_O, NULL}, - { "delete_HfstTwoLevelPath", _wrap_delete_HfstTwoLevelPath, METH_O, NULL}, - { "HfstTwoLevelPath_swigregister", HfstTwoLevelPath_swigregister, METH_O, NULL}, - { "HfstTwoLevelPath_swiginit", HfstTwoLevelPath_swiginit, METH_VARARGS, NULL}, - { "HfstTwoLevelPaths_iterator", _wrap_HfstTwoLevelPaths_iterator, METH_O, NULL}, - { "HfstTwoLevelPaths___nonzero__", _wrap_HfstTwoLevelPaths___nonzero__, METH_O, NULL}, - { "HfstTwoLevelPaths___bool__", _wrap_HfstTwoLevelPaths___bool__, METH_O, NULL}, - { "HfstTwoLevelPaths___len__", _wrap_HfstTwoLevelPaths___len__, METH_O, NULL}, - { "HfstTwoLevelPaths_append", _wrap_HfstTwoLevelPaths_append, METH_VARARGS, NULL}, - { "HfstTwoLevelPaths___contains__", _wrap_HfstTwoLevelPaths___contains__, METH_VARARGS, NULL}, - { "HfstTwoLevelPaths___getitem__", _wrap_HfstTwoLevelPaths___getitem__, METH_VARARGS, NULL}, - { "HfstTwoLevelPaths_add", _wrap_HfstTwoLevelPaths_add, METH_VARARGS, NULL}, - { "HfstTwoLevelPaths_discard", _wrap_HfstTwoLevelPaths_discard, METH_VARARGS, NULL}, - { "new_HfstTwoLevelPaths", _wrap_new_HfstTwoLevelPaths, METH_VARARGS, NULL}, - { "HfstTwoLevelPaths_empty", _wrap_HfstTwoLevelPaths_empty, METH_O, NULL}, - { "HfstTwoLevelPaths_size", _wrap_HfstTwoLevelPaths_size, METH_O, NULL}, - { "HfstTwoLevelPaths_clear", _wrap_HfstTwoLevelPaths_clear, METH_O, NULL}, - { "HfstTwoLevelPaths_swap", _wrap_HfstTwoLevelPaths_swap, METH_VARARGS, NULL}, - { "HfstTwoLevelPaths_count", _wrap_HfstTwoLevelPaths_count, METH_VARARGS, NULL}, - { "HfstTwoLevelPaths_begin", _wrap_HfstTwoLevelPaths_begin, METH_O, NULL}, - { "HfstTwoLevelPaths_end", _wrap_HfstTwoLevelPaths_end, METH_O, NULL}, - { "HfstTwoLevelPaths_rbegin", _wrap_HfstTwoLevelPaths_rbegin, METH_O, NULL}, - { "HfstTwoLevelPaths_rend", _wrap_HfstTwoLevelPaths_rend, METH_O, NULL}, - { "HfstTwoLevelPaths_erase", _wrap_HfstTwoLevelPaths_erase, METH_VARARGS, NULL}, - { "HfstTwoLevelPaths_find", _wrap_HfstTwoLevelPaths_find, METH_VARARGS, NULL}, - { "HfstTwoLevelPaths_lower_bound", _wrap_HfstTwoLevelPaths_lower_bound, METH_VARARGS, NULL}, - { "HfstTwoLevelPaths_upper_bound", _wrap_HfstTwoLevelPaths_upper_bound, METH_VARARGS, NULL}, - { "HfstTwoLevelPaths_equal_range", _wrap_HfstTwoLevelPaths_equal_range, METH_VARARGS, NULL}, - { "HfstTwoLevelPaths_insert", _wrap_HfstTwoLevelPaths_insert, METH_VARARGS, NULL}, - { "delete_HfstTwoLevelPaths", _wrap_delete_HfstTwoLevelPaths, METH_O, NULL}, - { "HfstTwoLevelPaths_swigregister", HfstTwoLevelPaths_swigregister, METH_O, NULL}, - { "HfstTwoLevelPaths_swiginit", HfstTwoLevelPaths_swiginit, METH_VARARGS, NULL}, - { "new_HfstTransducerPair", _wrap_new_HfstTransducerPair, METH_VARARGS, NULL}, - { "HfstTransducerPair_first_set", _wrap_HfstTransducerPair_first_set, METH_VARARGS, NULL}, - { "HfstTransducerPair_first_get", _wrap_HfstTransducerPair_first_get, METH_O, NULL}, - { "HfstTransducerPair_second_set", _wrap_HfstTransducerPair_second_set, METH_VARARGS, NULL}, - { "HfstTransducerPair_second_get", _wrap_HfstTransducerPair_second_get, METH_O, NULL}, - { "delete_HfstTransducerPair", _wrap_delete_HfstTransducerPair, METH_O, NULL}, - { "HfstTransducerPair_swigregister", HfstTransducerPair_swigregister, METH_O, NULL}, - { "HfstTransducerPair_swiginit", HfstTransducerPair_swiginit, METH_VARARGS, NULL}, - { "HfstTransducerPairVector_iterator", _wrap_HfstTransducerPairVector_iterator, METH_O, NULL}, - { "HfstTransducerPairVector___nonzero__", _wrap_HfstTransducerPairVector___nonzero__, METH_O, NULL}, - { "HfstTransducerPairVector___bool__", _wrap_HfstTransducerPairVector___bool__, METH_O, NULL}, - { "HfstTransducerPairVector___len__", _wrap_HfstTransducerPairVector___len__, METH_O, NULL}, - { "HfstTransducerPairVector___getslice__", _wrap_HfstTransducerPairVector___getslice__, METH_VARARGS, NULL}, - { "HfstTransducerPairVector___setslice__", _wrap_HfstTransducerPairVector___setslice__, METH_VARARGS, NULL}, - { "HfstTransducerPairVector___delslice__", _wrap_HfstTransducerPairVector___delslice__, METH_VARARGS, NULL}, - { "HfstTransducerPairVector___delitem__", _wrap_HfstTransducerPairVector___delitem__, METH_VARARGS, NULL}, - { "HfstTransducerPairVector___getitem__", _wrap_HfstTransducerPairVector___getitem__, METH_VARARGS, NULL}, - { "HfstTransducerPairVector___setitem__", _wrap_HfstTransducerPairVector___setitem__, METH_VARARGS, NULL}, - { "HfstTransducerPairVector_pop", _wrap_HfstTransducerPairVector_pop, METH_O, NULL}, - { "HfstTransducerPairVector_append", _wrap_HfstTransducerPairVector_append, METH_VARARGS, NULL}, - { "HfstTransducerPairVector_empty", _wrap_HfstTransducerPairVector_empty, METH_O, NULL}, - { "HfstTransducerPairVector_size", _wrap_HfstTransducerPairVector_size, METH_O, NULL}, - { "HfstTransducerPairVector_swap", _wrap_HfstTransducerPairVector_swap, METH_VARARGS, NULL}, - { "HfstTransducerPairVector_begin", _wrap_HfstTransducerPairVector_begin, METH_O, NULL}, - { "HfstTransducerPairVector_end", _wrap_HfstTransducerPairVector_end, METH_O, NULL}, - { "HfstTransducerPairVector_rbegin", _wrap_HfstTransducerPairVector_rbegin, METH_O, NULL}, - { "HfstTransducerPairVector_rend", _wrap_HfstTransducerPairVector_rend, METH_O, NULL}, - { "HfstTransducerPairVector_clear", _wrap_HfstTransducerPairVector_clear, METH_O, NULL}, - { "HfstTransducerPairVector_get_allocator", _wrap_HfstTransducerPairVector_get_allocator, METH_O, NULL}, - { "HfstTransducerPairVector_pop_back", _wrap_HfstTransducerPairVector_pop_back, METH_O, NULL}, - { "HfstTransducerPairVector_erase", _wrap_HfstTransducerPairVector_erase, METH_VARARGS, NULL}, - { "new_HfstTransducerPairVector", _wrap_new_HfstTransducerPairVector, METH_VARARGS, NULL}, - { "HfstTransducerPairVector_push_back", _wrap_HfstTransducerPairVector_push_back, METH_VARARGS, NULL}, - { "HfstTransducerPairVector_front", _wrap_HfstTransducerPairVector_front, METH_O, NULL}, - { "HfstTransducerPairVector_back", _wrap_HfstTransducerPairVector_back, METH_O, NULL}, - { "HfstTransducerPairVector_assign", _wrap_HfstTransducerPairVector_assign, METH_VARARGS, NULL}, - { "HfstTransducerPairVector_resize", _wrap_HfstTransducerPairVector_resize, METH_VARARGS, NULL}, - { "HfstTransducerPairVector_insert", _wrap_HfstTransducerPairVector_insert, METH_VARARGS, NULL}, - { "HfstTransducerPairVector_reserve", _wrap_HfstTransducerPairVector_reserve, METH_VARARGS, NULL}, - { "HfstTransducerPairVector_capacity", _wrap_HfstTransducerPairVector_capacity, METH_O, NULL}, - { "delete_HfstTransducerPairVector", _wrap_delete_HfstTransducerPairVector, METH_O, NULL}, - { "HfstTransducerPairVector_swigregister", HfstTransducerPairVector_swigregister, METH_O, NULL}, - { "HfstTransducerPairVector_swiginit", HfstTransducerPairVector_swiginit, METH_VARARGS, NULL}, - { "HfstRuleVector_iterator", _wrap_HfstRuleVector_iterator, METH_O, NULL}, - { "HfstRuleVector___nonzero__", _wrap_HfstRuleVector___nonzero__, METH_O, NULL}, - { "HfstRuleVector___bool__", _wrap_HfstRuleVector___bool__, METH_O, NULL}, - { "HfstRuleVector___len__", _wrap_HfstRuleVector___len__, METH_O, NULL}, - { "HfstRuleVector___getslice__", _wrap_HfstRuleVector___getslice__, METH_VARARGS, NULL}, - { "HfstRuleVector___setslice__", _wrap_HfstRuleVector___setslice__, METH_VARARGS, NULL}, - { "HfstRuleVector___delslice__", _wrap_HfstRuleVector___delslice__, METH_VARARGS, NULL}, - { "HfstRuleVector___delitem__", _wrap_HfstRuleVector___delitem__, METH_VARARGS, NULL}, - { "HfstRuleVector___getitem__", _wrap_HfstRuleVector___getitem__, METH_VARARGS, NULL}, - { "HfstRuleVector___setitem__", _wrap_HfstRuleVector___setitem__, METH_VARARGS, NULL}, - { "HfstRuleVector_pop", _wrap_HfstRuleVector_pop, METH_O, NULL}, - { "HfstRuleVector_append", _wrap_HfstRuleVector_append, METH_VARARGS, NULL}, - { "HfstRuleVector_empty", _wrap_HfstRuleVector_empty, METH_O, NULL}, - { "HfstRuleVector_size", _wrap_HfstRuleVector_size, METH_O, NULL}, - { "HfstRuleVector_swap", _wrap_HfstRuleVector_swap, METH_VARARGS, NULL}, - { "HfstRuleVector_begin", _wrap_HfstRuleVector_begin, METH_O, NULL}, - { "HfstRuleVector_end", _wrap_HfstRuleVector_end, METH_O, NULL}, - { "HfstRuleVector_rbegin", _wrap_HfstRuleVector_rbegin, METH_O, NULL}, - { "HfstRuleVector_rend", _wrap_HfstRuleVector_rend, METH_O, NULL}, - { "HfstRuleVector_clear", _wrap_HfstRuleVector_clear, METH_O, NULL}, - { "HfstRuleVector_get_allocator", _wrap_HfstRuleVector_get_allocator, METH_O, NULL}, - { "HfstRuleVector_pop_back", _wrap_HfstRuleVector_pop_back, METH_O, NULL}, - { "HfstRuleVector_erase", _wrap_HfstRuleVector_erase, METH_VARARGS, NULL}, - { "new_HfstRuleVector", _wrap_new_HfstRuleVector, METH_VARARGS, NULL}, - { "HfstRuleVector_push_back", _wrap_HfstRuleVector_push_back, METH_VARARGS, NULL}, - { "HfstRuleVector_front", _wrap_HfstRuleVector_front, METH_O, NULL}, - { "HfstRuleVector_back", _wrap_HfstRuleVector_back, METH_O, NULL}, - { "HfstRuleVector_assign", _wrap_HfstRuleVector_assign, METH_VARARGS, NULL}, - { "HfstRuleVector_resize", _wrap_HfstRuleVector_resize, METH_VARARGS, NULL}, - { "HfstRuleVector_insert", _wrap_HfstRuleVector_insert, METH_VARARGS, NULL}, - { "HfstRuleVector_reserve", _wrap_HfstRuleVector_reserve, METH_VARARGS, NULL}, - { "HfstRuleVector_capacity", _wrap_HfstRuleVector_capacity, METH_O, NULL}, - { "delete_HfstRuleVector", _wrap_delete_HfstRuleVector, METH_O, NULL}, - { "HfstRuleVector_swigregister", HfstRuleVector_swigregister, METH_O, NULL}, - { "HfstRuleVector_swiginit", HfstRuleVector_swiginit, METH_VARARGS, NULL}, - { "new_HfstTransducerUIntPair", _wrap_new_HfstTransducerUIntPair, METH_VARARGS, NULL}, - { "HfstTransducerUIntPair_first_set", _wrap_HfstTransducerUIntPair_first_set, METH_VARARGS, NULL}, - { "HfstTransducerUIntPair_first_get", _wrap_HfstTransducerUIntPair_first_get, METH_O, NULL}, - { "HfstTransducerUIntPair_second_set", _wrap_HfstTransducerUIntPair_second_set, METH_VARARGS, NULL}, - { "HfstTransducerUIntPair_second_get", _wrap_HfstTransducerUIntPair_second_get, METH_O, NULL}, - { "delete_HfstTransducerUIntPair", _wrap_delete_HfstTransducerUIntPair, METH_O, NULL}, - { "HfstTransducerUIntPair_swigregister", HfstTransducerUIntPair_swigregister, METH_O, NULL}, - { "HfstTransducerUIntPair_swiginit", HfstTransducerUIntPair_swiginit, METH_VARARGS, NULL}, - { "LocationVector_iterator", _wrap_LocationVector_iterator, METH_O, NULL}, - { "LocationVector___nonzero__", _wrap_LocationVector___nonzero__, METH_O, NULL}, - { "LocationVector___bool__", _wrap_LocationVector___bool__, METH_O, NULL}, - { "LocationVector___len__", _wrap_LocationVector___len__, METH_O, NULL}, - { "LocationVector___getslice__", _wrap_LocationVector___getslice__, METH_VARARGS, NULL}, - { "LocationVector___setslice__", _wrap_LocationVector___setslice__, METH_VARARGS, NULL}, - { "LocationVector___delslice__", _wrap_LocationVector___delslice__, METH_VARARGS, NULL}, - { "LocationVector___delitem__", _wrap_LocationVector___delitem__, METH_VARARGS, NULL}, - { "LocationVector___getitem__", _wrap_LocationVector___getitem__, METH_VARARGS, NULL}, - { "LocationVector___setitem__", _wrap_LocationVector___setitem__, METH_VARARGS, NULL}, - { "LocationVector_pop", _wrap_LocationVector_pop, METH_O, NULL}, - { "LocationVector_append", _wrap_LocationVector_append, METH_VARARGS, NULL}, - { "LocationVector_empty", _wrap_LocationVector_empty, METH_O, NULL}, - { "LocationVector_size", _wrap_LocationVector_size, METH_O, NULL}, - { "LocationVector_swap", _wrap_LocationVector_swap, METH_VARARGS, NULL}, - { "LocationVector_begin", _wrap_LocationVector_begin, METH_O, NULL}, - { "LocationVector_end", _wrap_LocationVector_end, METH_O, NULL}, - { "LocationVector_rbegin", _wrap_LocationVector_rbegin, METH_O, NULL}, - { "LocationVector_rend", _wrap_LocationVector_rend, METH_O, NULL}, - { "LocationVector_clear", _wrap_LocationVector_clear, METH_O, NULL}, - { "LocationVector_get_allocator", _wrap_LocationVector_get_allocator, METH_O, NULL}, - { "LocationVector_pop_back", _wrap_LocationVector_pop_back, METH_O, NULL}, - { "LocationVector_erase", _wrap_LocationVector_erase, METH_VARARGS, NULL}, - { "new_LocationVector", _wrap_new_LocationVector, METH_VARARGS, NULL}, - { "LocationVector_push_back", _wrap_LocationVector_push_back, METH_VARARGS, NULL}, - { "LocationVector_front", _wrap_LocationVector_front, METH_O, NULL}, - { "LocationVector_back", _wrap_LocationVector_back, METH_O, NULL}, - { "LocationVector_assign", _wrap_LocationVector_assign, METH_VARARGS, NULL}, - { "LocationVector_resize", _wrap_LocationVector_resize, METH_VARARGS, NULL}, - { "LocationVector_insert", _wrap_LocationVector_insert, METH_VARARGS, NULL}, - { "LocationVector_reserve", _wrap_LocationVector_reserve, METH_VARARGS, NULL}, - { "LocationVector_capacity", _wrap_LocationVector_capacity, METH_O, NULL}, - { "delete_LocationVector", _wrap_delete_LocationVector, METH_O, NULL}, - { "LocationVector_swigregister", LocationVector_swigregister, METH_O, NULL}, - { "LocationVector_swiginit", LocationVector_swiginit, METH_VARARGS, NULL}, - { "LocationVectorVector_iterator", _wrap_LocationVectorVector_iterator, METH_O, NULL}, - { "LocationVectorVector___nonzero__", _wrap_LocationVectorVector___nonzero__, METH_O, NULL}, - { "LocationVectorVector___bool__", _wrap_LocationVectorVector___bool__, METH_O, NULL}, - { "LocationVectorVector___len__", _wrap_LocationVectorVector___len__, METH_O, NULL}, - { "LocationVectorVector___getslice__", _wrap_LocationVectorVector___getslice__, METH_VARARGS, NULL}, - { "LocationVectorVector___setslice__", _wrap_LocationVectorVector___setslice__, METH_VARARGS, NULL}, - { "LocationVectorVector___delslice__", _wrap_LocationVectorVector___delslice__, METH_VARARGS, NULL}, - { "LocationVectorVector___delitem__", _wrap_LocationVectorVector___delitem__, METH_VARARGS, NULL}, - { "LocationVectorVector___getitem__", _wrap_LocationVectorVector___getitem__, METH_VARARGS, NULL}, - { "LocationVectorVector___setitem__", _wrap_LocationVectorVector___setitem__, METH_VARARGS, NULL}, - { "LocationVectorVector_pop", _wrap_LocationVectorVector_pop, METH_O, NULL}, - { "LocationVectorVector_append", _wrap_LocationVectorVector_append, METH_VARARGS, NULL}, - { "LocationVectorVector_empty", _wrap_LocationVectorVector_empty, METH_O, NULL}, - { "LocationVectorVector_size", _wrap_LocationVectorVector_size, METH_O, NULL}, - { "LocationVectorVector_swap", _wrap_LocationVectorVector_swap, METH_VARARGS, NULL}, - { "LocationVectorVector_begin", _wrap_LocationVectorVector_begin, METH_O, NULL}, - { "LocationVectorVector_end", _wrap_LocationVectorVector_end, METH_O, NULL}, - { "LocationVectorVector_rbegin", _wrap_LocationVectorVector_rbegin, METH_O, NULL}, - { "LocationVectorVector_rend", _wrap_LocationVectorVector_rend, METH_O, NULL}, - { "LocationVectorVector_clear", _wrap_LocationVectorVector_clear, METH_O, NULL}, - { "LocationVectorVector_get_allocator", _wrap_LocationVectorVector_get_allocator, METH_O, NULL}, - { "LocationVectorVector_pop_back", _wrap_LocationVectorVector_pop_back, METH_O, NULL}, - { "LocationVectorVector_erase", _wrap_LocationVectorVector_erase, METH_VARARGS, NULL}, - { "new_LocationVectorVector", _wrap_new_LocationVectorVector, METH_VARARGS, NULL}, - { "LocationVectorVector_push_back", _wrap_LocationVectorVector_push_back, METH_VARARGS, NULL}, - { "LocationVectorVector_front", _wrap_LocationVectorVector_front, METH_O, NULL}, - { "LocationVectorVector_back", _wrap_LocationVectorVector_back, METH_O, NULL}, - { "LocationVectorVector_assign", _wrap_LocationVectorVector_assign, METH_VARARGS, NULL}, - { "LocationVectorVector_resize", _wrap_LocationVectorVector_resize, METH_VARARGS, NULL}, - { "LocationVectorVector_insert", _wrap_LocationVectorVector_insert, METH_VARARGS, NULL}, - { "LocationVectorVector_reserve", _wrap_LocationVectorVector_reserve, METH_VARARGS, NULL}, - { "LocationVectorVector_capacity", _wrap_LocationVectorVector_capacity, METH_O, NULL}, - { "delete_LocationVectorVector", _wrap_delete_LocationVectorVector, METH_O, NULL}, - { "LocationVectorVector_swigregister", LocationVectorVector_swigregister, METH_O, NULL}, - { "LocationVectorVector_swiginit", LocationVectorVector_swiginit, METH_VARARGS, NULL}, - { "new_HfstException", _wrap_new_HfstException, METH_VARARGS, NULL}, - { "delete_HfstException", _wrap_delete_HfstException, METH_O, NULL}, - { "HfstException_what", _wrap_HfstException_what, METH_O, NULL}, - { "HfstException_swigregister", HfstException_swigregister, METH_O, NULL}, - { "HfstException_swiginit", HfstException_swiginit, METH_VARARGS, NULL}, - { "new_HfstTransducerTypeMismatchException", _wrap_new_HfstTransducerTypeMismatchException, METH_VARARGS, NULL}, - { "delete_HfstTransducerTypeMismatchException", _wrap_delete_HfstTransducerTypeMismatchException, METH_O, NULL}, - { "HfstTransducerTypeMismatchException_what", _wrap_HfstTransducerTypeMismatchException_what, METH_O, NULL}, - { "HfstTransducerTypeMismatchException_swigregister", HfstTransducerTypeMismatchException_swigregister, METH_O, NULL}, - { "HfstTransducerTypeMismatchException_swiginit", HfstTransducerTypeMismatchException_swiginit, METH_VARARGS, NULL}, - { "new_ImplementationTypeNotAvailableException", _wrap_new_ImplementationTypeNotAvailableException, METH_VARARGS, NULL}, - { "delete_ImplementationTypeNotAvailableException", _wrap_delete_ImplementationTypeNotAvailableException, METH_O, NULL}, - { "ImplementationTypeNotAvailableException_what", _wrap_ImplementationTypeNotAvailableException_what, METH_O, NULL}, - { "ImplementationTypeNotAvailableException_get_type", _wrap_ImplementationTypeNotAvailableException_get_type, METH_O, NULL}, - { "ImplementationTypeNotAvailableException_swigregister", ImplementationTypeNotAvailableException_swigregister, METH_O, NULL}, - { "ImplementationTypeNotAvailableException_swiginit", ImplementationTypeNotAvailableException_swiginit, METH_VARARGS, NULL}, - { "new_FunctionNotImplementedException", _wrap_new_FunctionNotImplementedException, METH_VARARGS, NULL}, - { "delete_FunctionNotImplementedException", _wrap_delete_FunctionNotImplementedException, METH_O, NULL}, - { "FunctionNotImplementedException_what", _wrap_FunctionNotImplementedException_what, METH_O, NULL}, - { "FunctionNotImplementedException_swigregister", FunctionNotImplementedException_swigregister, METH_O, NULL}, - { "FunctionNotImplementedException_swiginit", FunctionNotImplementedException_swiginit, METH_VARARGS, NULL}, - { "new_StreamNotReadableException", _wrap_new_StreamNotReadableException, METH_VARARGS, NULL}, - { "delete_StreamNotReadableException", _wrap_delete_StreamNotReadableException, METH_O, NULL}, - { "StreamNotReadableException_what", _wrap_StreamNotReadableException_what, METH_O, NULL}, - { "StreamNotReadableException_swigregister", StreamNotReadableException_swigregister, METH_O, NULL}, - { "StreamNotReadableException_swiginit", StreamNotReadableException_swiginit, METH_VARARGS, NULL}, - { "new_StreamCannotBeWrittenException", _wrap_new_StreamCannotBeWrittenException, METH_VARARGS, NULL}, - { "delete_StreamCannotBeWrittenException", _wrap_delete_StreamCannotBeWrittenException, METH_O, NULL}, - { "StreamCannotBeWrittenException_what", _wrap_StreamCannotBeWrittenException_what, METH_O, NULL}, - { "StreamCannotBeWrittenException_swigregister", StreamCannotBeWrittenException_swigregister, METH_O, NULL}, - { "StreamCannotBeWrittenException_swiginit", StreamCannotBeWrittenException_swiginit, METH_VARARGS, NULL}, - { "new_StreamIsClosedException", _wrap_new_StreamIsClosedException, METH_VARARGS, NULL}, - { "delete_StreamIsClosedException", _wrap_delete_StreamIsClosedException, METH_O, NULL}, - { "StreamIsClosedException_what", _wrap_StreamIsClosedException_what, METH_O, NULL}, - { "StreamIsClosedException_swigregister", StreamIsClosedException_swigregister, METH_O, NULL}, - { "StreamIsClosedException_swiginit", StreamIsClosedException_swiginit, METH_VARARGS, NULL}, - { "new_EndOfStreamException", _wrap_new_EndOfStreamException, METH_VARARGS, NULL}, - { "delete_EndOfStreamException", _wrap_delete_EndOfStreamException, METH_O, NULL}, - { "EndOfStreamException_what", _wrap_EndOfStreamException_what, METH_O, NULL}, - { "EndOfStreamException_swigregister", EndOfStreamException_swigregister, METH_O, NULL}, - { "EndOfStreamException_swiginit", EndOfStreamException_swiginit, METH_VARARGS, NULL}, - { "new_TransducerIsCyclicException", _wrap_new_TransducerIsCyclicException, METH_VARARGS, NULL}, - { "delete_TransducerIsCyclicException", _wrap_delete_TransducerIsCyclicException, METH_O, NULL}, - { "TransducerIsCyclicException_what", _wrap_TransducerIsCyclicException_what, METH_O, NULL}, - { "TransducerIsCyclicException_swigregister", TransducerIsCyclicException_swigregister, METH_O, NULL}, - { "TransducerIsCyclicException_swiginit", TransducerIsCyclicException_swiginit, METH_VARARGS, NULL}, - { "new_NotTransducerStreamException", _wrap_new_NotTransducerStreamException, METH_VARARGS, NULL}, - { "delete_NotTransducerStreamException", _wrap_delete_NotTransducerStreamException, METH_O, NULL}, - { "NotTransducerStreamException_what", _wrap_NotTransducerStreamException_what, METH_O, NULL}, - { "NotTransducerStreamException_swigregister", NotTransducerStreamException_swigregister, METH_O, NULL}, - { "NotTransducerStreamException_swiginit", NotTransducerStreamException_swiginit, METH_VARARGS, NULL}, - { "new_NotValidAttFormatException", _wrap_new_NotValidAttFormatException, METH_VARARGS, NULL}, - { "delete_NotValidAttFormatException", _wrap_delete_NotValidAttFormatException, METH_O, NULL}, - { "NotValidAttFormatException_what", _wrap_NotValidAttFormatException_what, METH_O, NULL}, - { "NotValidAttFormatException_swigregister", NotValidAttFormatException_swigregister, METH_O, NULL}, - { "NotValidAttFormatException_swiginit", NotValidAttFormatException_swiginit, METH_VARARGS, NULL}, - { "new_NotValidPrologFormatException", _wrap_new_NotValidPrologFormatException, METH_VARARGS, NULL}, - { "delete_NotValidPrologFormatException", _wrap_delete_NotValidPrologFormatException, METH_O, NULL}, - { "NotValidPrologFormatException_what", _wrap_NotValidPrologFormatException_what, METH_O, NULL}, - { "NotValidPrologFormatException_swigregister", NotValidPrologFormatException_swigregister, METH_O, NULL}, - { "NotValidPrologFormatException_swiginit", NotValidPrologFormatException_swiginit, METH_VARARGS, NULL}, - { "new_NotValidLexcFormatException", _wrap_new_NotValidLexcFormatException, METH_VARARGS, NULL}, - { "delete_NotValidLexcFormatException", _wrap_delete_NotValidLexcFormatException, METH_O, NULL}, - { "NotValidLexcFormatException_what", _wrap_NotValidLexcFormatException_what, METH_O, NULL}, - { "NotValidLexcFormatException_swigregister", NotValidLexcFormatException_swigregister, METH_O, NULL}, - { "NotValidLexcFormatException_swiginit", NotValidLexcFormatException_swiginit, METH_VARARGS, NULL}, - { "new_StateIsNotFinalException", _wrap_new_StateIsNotFinalException, METH_VARARGS, NULL}, - { "delete_StateIsNotFinalException", _wrap_delete_StateIsNotFinalException, METH_O, NULL}, - { "StateIsNotFinalException_what", _wrap_StateIsNotFinalException_what, METH_O, NULL}, - { "StateIsNotFinalException_swigregister", StateIsNotFinalException_swigregister, METH_O, NULL}, - { "StateIsNotFinalException_swiginit", StateIsNotFinalException_swiginit, METH_VARARGS, NULL}, - { "new_ContextTransducersAreNotAutomataException", _wrap_new_ContextTransducersAreNotAutomataException, METH_VARARGS, NULL}, - { "delete_ContextTransducersAreNotAutomataException", _wrap_delete_ContextTransducersAreNotAutomataException, METH_O, NULL}, - { "ContextTransducersAreNotAutomataException_what", _wrap_ContextTransducersAreNotAutomataException_what, METH_O, NULL}, - { "ContextTransducersAreNotAutomataException_swigregister", ContextTransducersAreNotAutomataException_swigregister, METH_O, NULL}, - { "ContextTransducersAreNotAutomataException_swiginit", ContextTransducersAreNotAutomataException_swiginit, METH_VARARGS, NULL}, - { "new_TransducersAreNotAutomataException", _wrap_new_TransducersAreNotAutomataException, METH_VARARGS, NULL}, - { "delete_TransducersAreNotAutomataException", _wrap_delete_TransducersAreNotAutomataException, METH_O, NULL}, - { "TransducersAreNotAutomataException_what", _wrap_TransducersAreNotAutomataException_what, METH_O, NULL}, - { "TransducersAreNotAutomataException_swigregister", TransducersAreNotAutomataException_swigregister, METH_O, NULL}, - { "TransducersAreNotAutomataException_swiginit", TransducersAreNotAutomataException_swiginit, METH_VARARGS, NULL}, - { "new_StateIndexOutOfBoundsException", _wrap_new_StateIndexOutOfBoundsException, METH_VARARGS, NULL}, - { "delete_StateIndexOutOfBoundsException", _wrap_delete_StateIndexOutOfBoundsException, METH_O, NULL}, - { "StateIndexOutOfBoundsException_what", _wrap_StateIndexOutOfBoundsException_what, METH_O, NULL}, - { "StateIndexOutOfBoundsException_swigregister", StateIndexOutOfBoundsException_swigregister, METH_O, NULL}, - { "StateIndexOutOfBoundsException_swiginit", StateIndexOutOfBoundsException_swiginit, METH_VARARGS, NULL}, - { "new_TransducerHeaderException", _wrap_new_TransducerHeaderException, METH_VARARGS, NULL}, - { "delete_TransducerHeaderException", _wrap_delete_TransducerHeaderException, METH_O, NULL}, - { "TransducerHeaderException_what", _wrap_TransducerHeaderException_what, METH_O, NULL}, - { "TransducerHeaderException_swigregister", TransducerHeaderException_swigregister, METH_O, NULL}, - { "TransducerHeaderException_swiginit", TransducerHeaderException_swiginit, METH_VARARGS, NULL}, - { "new_MissingOpenFstInputSymbolTableException", _wrap_new_MissingOpenFstInputSymbolTableException, METH_VARARGS, NULL}, - { "delete_MissingOpenFstInputSymbolTableException", _wrap_delete_MissingOpenFstInputSymbolTableException, METH_O, NULL}, - { "MissingOpenFstInputSymbolTableException_what", _wrap_MissingOpenFstInputSymbolTableException_what, METH_O, NULL}, - { "MissingOpenFstInputSymbolTableException_swigregister", MissingOpenFstInputSymbolTableException_swigregister, METH_O, NULL}, - { "MissingOpenFstInputSymbolTableException_swiginit", MissingOpenFstInputSymbolTableException_swiginit, METH_VARARGS, NULL}, - { "new_TransducerTypeMismatchException", _wrap_new_TransducerTypeMismatchException, METH_VARARGS, NULL}, - { "delete_TransducerTypeMismatchException", _wrap_delete_TransducerTypeMismatchException, METH_O, NULL}, - { "TransducerTypeMismatchException_what", _wrap_TransducerTypeMismatchException_what, METH_O, NULL}, - { "TransducerTypeMismatchException_swigregister", TransducerTypeMismatchException_swigregister, METH_O, NULL}, - { "TransducerTypeMismatchException_swiginit", TransducerTypeMismatchException_swiginit, METH_VARARGS, NULL}, - { "new_EmptySetOfContextsException", _wrap_new_EmptySetOfContextsException, METH_VARARGS, NULL}, - { "delete_EmptySetOfContextsException", _wrap_delete_EmptySetOfContextsException, METH_O, NULL}, - { "EmptySetOfContextsException_what", _wrap_EmptySetOfContextsException_what, METH_O, NULL}, - { "EmptySetOfContextsException_swigregister", EmptySetOfContextsException_swigregister, METH_O, NULL}, - { "EmptySetOfContextsException_swiginit", EmptySetOfContextsException_swiginit, METH_VARARGS, NULL}, - { "new_SpecifiedTypeRequiredException", _wrap_new_SpecifiedTypeRequiredException, METH_VARARGS, NULL}, - { "delete_SpecifiedTypeRequiredException", _wrap_delete_SpecifiedTypeRequiredException, METH_O, NULL}, - { "SpecifiedTypeRequiredException_what", _wrap_SpecifiedTypeRequiredException_what, METH_O, NULL}, - { "SpecifiedTypeRequiredException_swigregister", SpecifiedTypeRequiredException_swigregister, METH_O, NULL}, - { "SpecifiedTypeRequiredException_swiginit", SpecifiedTypeRequiredException_swiginit, METH_VARARGS, NULL}, - { "new_HfstFatalException", _wrap_new_HfstFatalException, METH_VARARGS, NULL}, - { "delete_HfstFatalException", _wrap_delete_HfstFatalException, METH_O, NULL}, - { "HfstFatalException_what", _wrap_HfstFatalException_what, METH_O, NULL}, - { "HfstFatalException_swigregister", HfstFatalException_swigregister, METH_O, NULL}, - { "HfstFatalException_swiginit", HfstFatalException_swiginit, METH_VARARGS, NULL}, - { "new_TransducerHasWrongTypeException", _wrap_new_TransducerHasWrongTypeException, METH_VARARGS, NULL}, - { "delete_TransducerHasWrongTypeException", _wrap_delete_TransducerHasWrongTypeException, METH_O, NULL}, - { "TransducerHasWrongTypeException_what", _wrap_TransducerHasWrongTypeException_what, METH_O, NULL}, - { "TransducerHasWrongTypeException_swigregister", TransducerHasWrongTypeException_swigregister, METH_O, NULL}, - { "TransducerHasWrongTypeException_swiginit", TransducerHasWrongTypeException_swiginit, METH_VARARGS, NULL}, - { "new_IncorrectUtf8CodingException", _wrap_new_IncorrectUtf8CodingException, METH_VARARGS, NULL}, - { "delete_IncorrectUtf8CodingException", _wrap_delete_IncorrectUtf8CodingException, METH_O, NULL}, - { "IncorrectUtf8CodingException_what", _wrap_IncorrectUtf8CodingException_what, METH_O, NULL}, - { "IncorrectUtf8CodingException_swigregister", IncorrectUtf8CodingException_swigregister, METH_O, NULL}, - { "IncorrectUtf8CodingException_swiginit", IncorrectUtf8CodingException_swiginit, METH_VARARGS, NULL}, - { "new_EmptyStringException", _wrap_new_EmptyStringException, METH_VARARGS, NULL}, - { "delete_EmptyStringException", _wrap_delete_EmptyStringException, METH_O, NULL}, - { "EmptyStringException_what", _wrap_EmptyStringException_what, METH_O, NULL}, - { "EmptyStringException_swigregister", EmptyStringException_swigregister, METH_O, NULL}, - { "EmptyStringException_swiginit", EmptyStringException_swiginit, METH_VARARGS, NULL}, - { "new_SymbolNotFoundException", _wrap_new_SymbolNotFoundException, METH_VARARGS, NULL}, - { "delete_SymbolNotFoundException", _wrap_delete_SymbolNotFoundException, METH_O, NULL}, - { "SymbolNotFoundException_what", _wrap_SymbolNotFoundException_what, METH_O, NULL}, - { "SymbolNotFoundException_swigregister", SymbolNotFoundException_swigregister, METH_O, NULL}, - { "SymbolNotFoundException_swiginit", SymbolNotFoundException_swiginit, METH_VARARGS, NULL}, - { "new_MetadataException", _wrap_new_MetadataException, METH_VARARGS, NULL}, - { "delete_MetadataException", _wrap_delete_MetadataException, METH_O, NULL}, - { "MetadataException_what", _wrap_MetadataException_what, METH_O, NULL}, - { "MetadataException_swigregister", MetadataException_swigregister, METH_O, NULL}, - { "MetadataException_swiginit", MetadataException_swiginit, METH_VARARGS, NULL}, - { "new_FlagDiacriticsAreNotIdentitiesException", _wrap_new_FlagDiacriticsAreNotIdentitiesException, METH_VARARGS, NULL}, - { "delete_FlagDiacriticsAreNotIdentitiesException", _wrap_delete_FlagDiacriticsAreNotIdentitiesException, METH_O, NULL}, - { "FlagDiacriticsAreNotIdentitiesException_what", _wrap_FlagDiacriticsAreNotIdentitiesException_what, METH_O, NULL}, - { "FlagDiacriticsAreNotIdentitiesException_swigregister", FlagDiacriticsAreNotIdentitiesException_swigregister, METH_O, NULL}, - { "FlagDiacriticsAreNotIdentitiesException_swiginit", FlagDiacriticsAreNotIdentitiesException_swiginit, METH_VARARGS, NULL}, - { "Location_start_set", _wrap_Location_start_set, METH_VARARGS, NULL}, - { "Location_start_get", _wrap_Location_start_get, METH_O, NULL}, - { "Location_length_set", _wrap_Location_length_set, METH_VARARGS, NULL}, - { "Location_length_get", _wrap_Location_length_get, METH_O, NULL}, - { "Location_input_set", _wrap_Location_input_set, METH_VARARGS, NULL}, - { "Location_input_get", _wrap_Location_input_get, METH_O, NULL}, - { "Location_output_set", _wrap_Location_output_set, METH_VARARGS, NULL}, - { "Location_output_get", _wrap_Location_output_get, METH_O, NULL}, - { "Location_tag_set", _wrap_Location_tag_set, METH_VARARGS, NULL}, - { "Location_tag_get", _wrap_Location_tag_get, METH_O, NULL}, - { "Location_weight_set", _wrap_Location_weight_set, METH_VARARGS, NULL}, - { "Location_weight_get", _wrap_Location_weight_get, METH_O, NULL}, - { "Location_input_parts_set", _wrap_Location_input_parts_set, METH_VARARGS, NULL}, - { "Location_input_parts_get", _wrap_Location_input_parts_get, METH_O, NULL}, - { "Location_output_parts_set", _wrap_Location_output_parts_set, METH_VARARGS, NULL}, - { "Location_output_parts_get", _wrap_Location_output_parts_get, METH_O, NULL}, - { "Location_input_symbol_strings_set", _wrap_Location_input_symbol_strings_set, METH_VARARGS, NULL}, - { "Location_input_symbol_strings_get", _wrap_Location_input_symbol_strings_get, METH_O, NULL}, - { "Location_output_symbol_strings_set", _wrap_Location_output_symbol_strings_set, METH_VARARGS, NULL}, - { "Location_output_symbol_strings_get", _wrap_Location_output_symbol_strings_get, METH_O, NULL}, - { "new_Location", _wrap_new_Location, METH_NOARGS, NULL}, - { "delete_Location", _wrap_delete_Location, METH_O, NULL}, - { "Location_swigregister", Location_swigregister, METH_O, NULL}, - { "Location_swiginit", Location_swiginit, METH_VARARGS, NULL}, - { "new_Rule", _wrap_new_Rule, METH_VARARGS, NULL}, - { "Rule_get_mapping", _wrap_Rule_get_mapping, METH_O, NULL}, - { "Rule_get_context", _wrap_Rule_get_context, METH_O, NULL}, - { "Rule_get_replType", _wrap_Rule_get_replType, METH_O, NULL}, - { "Rule_encodeFlags", _wrap_Rule_encodeFlags, METH_O, NULL}, - { "delete_Rule", _wrap_delete_Rule, METH_O, NULL}, - { "Rule_swigregister", Rule_swigregister, METH_O, NULL}, - { "Rule_swiginit", Rule_swiginit, METH_VARARGS, NULL}, - { "replace", _wrap_replace, METH_VARARGS, "\n" - "\n" - "todo\n" - "\n" - ""}, - { "xerox_replace_left", _wrap_xerox_replace_left, METH_VARARGS, NULL}, - { "replace_leftmost_longest_match", _wrap_replace_leftmost_longest_match, METH_VARARGS, "\n" - "\n" - "todo\n" - "\n" - ""}, - { "replace_rightmost_longest_match", _wrap_replace_rightmost_longest_match, METH_VARARGS, "\n" - "\n" - "todo\n" - "\n" - ""}, - { "replace_leftmost_shortest_match", _wrap_replace_leftmost_shortest_match, METH_VARARGS, "\n" - "\n" - "todo\n" - "\n" - ""}, - { "replace_rightmost_shortest_match", _wrap_replace_rightmost_shortest_match, METH_VARARGS, "\n" - "\n" - "todo\n" - "\n" - ""}, - { "replace_epenthesis", _wrap_replace_epenthesis, METH_VARARGS, "\n" - "\n" - "todo\n" - "\n" - ""}, - { "xerox_restriction", _wrap_xerox_restriction, METH_VARARGS, NULL}, - { "before", _wrap_before, METH_VARARGS, "\n" - "\n" - "todo\n" - "\n" - ""}, - { "after", _wrap_after, METH_VARARGS, "\n" - "\n" - "todo\n" - "\n" - ""}, - { "is_diacritic", _wrap_is_diacritic, METH_O, "\n" - "\n" - "\n" - "Whether symbol *symbol* is a flag diacritic.\n" - "\n" - "Flag diacritics are of the form\n" - "\n" - " @[PNDRCU][.][A-Z]+([.][A-Z]+)?@\n" - "\n" - ""}, - { "compile_pmatch_expression", _wrap_compile_pmatch_expression, METH_O, "\n" - "\n" - "\n" - "Compile a pmatch expression into a tuple of transducers.\n" - "\n" - "Parameters\n" - "----------\n" - "* `expr` :\n" - " A string defining how pmatch is done.\n" - "\n" - "See also: hfst.compile_pmatch_file\n" - "\n" - ""}, - { "HfstTransducer_set_name", _wrap_HfstTransducer_set_name, METH_VARARGS, "\n" - "\n" - "\n" - "Rename the transducer *name*.\n" - "\n" - "Parameters\n" - "----------\n" - "* `name` :\n" - " The name of the transducer.\n" - "\n" - "See also: get_name\n" - "\n" - ""}, - { "HfstTransducer_get_name", _wrap_HfstTransducer_get_name, METH_O, "\n" - "\n" - "\n" - "Get the name of the transducer.\n" - "\n" - "See also: set_name\n" - "\n" - ""}, - { "HfstTransducer_get_type", _wrap_HfstTransducer_get_type, METH_O, "\n" - "\n" - "\n" - "The implementation type of the transducer.\n" - "\n" - "Returns\n" - "-------\n" - "hfst.ImplementationType\n" - "\n" - ""}, - { "HfstTransducer_set_property", _wrap_HfstTransducer_set_property, METH_VARARGS, "\n" - "\n" - "\n" - "Set arbitrary string property *property* to *value*.\n" - "\n" - "Parameters\n" - "----------\n" - "* `property` :\n" - " A string naming the property.\n" - "* `value` :\n" - " A string expressing the value of *property*.\n" - "\n" - "set_property('name', 'name of the transducer') equals set_name('name of the\n" - "transducer').\n" - "\n" - "note: While this function is capable of creating endless amounts of arbitrary\n" - " metadata, it is suggested that property names are drawn from central\n" - " repository, or prefixed with \"x-\". A property that does not follow this\n" - " convention may affect the behavior of transducer in future releases.\n" - "\n" - ""}, - { "HfstTransducer_get_property", _wrap_HfstTransducer_get_property, METH_VARARGS, "\n" - "\n" - "\n" - "Get arbitrary string propert *property*.\n" - "\n" - "Parameters\n" - "----------\n" - "* `property` :\n" - " The name of the property whose value is returned. get_property('name') works\n" - " like get_name().\n" - "\n" - ""}, - { "HfstTransducer_get_properties", _wrap_HfstTransducer_get_properties, METH_O, "\n" - "\n" - "\n" - "Get all properties from the transducer.\n" - "\n" - "Returns\n" - "-------\n" - "A dictionary whose keys are properties and whose values are the values of those\n" - "properties.\n" - "\n" - ""}, - { "HfstTransducer_compare", _wrap_HfstTransducer_compare, METH_VARARGS, "\n" - "\n" - "\n" - "Whether this transducer and *another* are equivalent.\n" - "\n" - "Parameters\n" - "----------\n" - "* `another` :\n" - " The compared transducer.\n" - "\n" - "pre: *self* and *another* must have the same implementation type.\n" - "\n" - "Two transducers are equivalent iff they accept the same input/output string\n" - "pairs with the same weights and the same alignments.\n" - "\n" - "note: For weighted transducers, the function often returns false negatives due\n" - " to weight precision issues.\n" - "\n" - ""}, - { "HfstTransducer_number_of_states", _wrap_HfstTransducer_number_of_states, METH_O, "\n" - "\n" - "\n" - "The number of states in the transducer.\n" - "\n" - ""}, - { "HfstTransducer_number_of_arcs", _wrap_HfstTransducer_number_of_arcs, METH_O, "\n" - "\n" - "\n" - "The number of transitions in the transducer.\n" - "\n" - ""}, - { "HfstTransducer_get_alphabet", _wrap_HfstTransducer_get_alphabet, METH_O, "\n" - "\n" - "\n" - "Get the alphabet of the transducer.\n" - "\n" - "The alphabet is defined as the set of symbols known to the transducer.\n" - "\n" - "Returns\n" - "-------\n" - "A tuple of strings.\n" - "\n" - ""}, - { "HfstTransducer_is_cyclic", _wrap_HfstTransducer_is_cyclic, METH_O, "\n" - "\n" - "\n" - "Whether the transducer is cyclic.\n" - "\n" - ""}, - { "HfstTransducer_is_automaton", _wrap_HfstTransducer_is_automaton, METH_O, "\n" - "\n" - "\n" - "Whether each transition in the transducer has equivalent input and output\n" - "symbols.\n" - "\n" - "note: Transition with hfst.UNKNOWN on both sides IS NOT a transition with\n" - " equivalent input and output symbols.\n" - "\n" - "note: Transition with hfst.IDENTITY on both sides IS a transition with\n" - " equivalent input and output symbols.\n" - "\n" - ""}, - { "HfstTransducer_is_infinitely_ambiguous", _wrap_HfstTransducer_is_infinitely_ambiguous, METH_O, "\n" - "\n" - "\n" - "Whether the transducer is infinitely ambiguous.\n" - "\n" - "A transducer is infinitely ambiguous if there exists an input that will yield\n" - "infinitely many results, i.e. there are input epsilon loops that are traversed\n" - "with that input.\n" - "\n" - ""}, - { "HfstTransducer_is_lookup_infinitely_ambiguous", _wrap_HfstTransducer_is_lookup_infinitely_ambiguous, METH_VARARGS, "\n" - "\n" - "\n" - "Whether lookup of path *input* will have infinite results.\n" - "\n" - "Currently, this function will return whether the transducer is infinitely\n" - "ambiguous on any lookup path found in the transducer, i.e. the argument *input*\n" - "is ignored.\n" - "\n" - "Todo\n" - "Do not ignore the argument *input*\n" - "\n" - ""}, - { "HfstTransducer_has_flag_diacritics", _wrap_HfstTransducer_has_flag_diacritics, METH_O, "\n" - "\n" - "\n" - "Whether the transducer has flag diacritics in its transitions.\n" - "\n" - ""}, - { "HfstTransducer_insert_to_alphabet", _wrap_HfstTransducer_insert_to_alphabet, METH_VARARGS, "\n" - "\n" - "\n" - "Explicitly insert *symbol* to the alphabet of the transducer.\n" - "\n" - "Parameters\n" - "----------\n" - "* `symbol` :\n" - " The symbol (string) to be inserted.\n" - "\n" - "note: Usually this function is not needed since new symbols are added to the\n" - " alphabet by default.\n" - "\n" - ""}, - { "HfstTransducer_remove_from_alphabet", _wrap_HfstTransducer_remove_from_alphabet, METH_VARARGS, "\n" - "\n" - "\n" - "Remove *symbol* from the alphabet of the transducer.\n" - "\n" - "Parameters\n" - "----------\n" - "* `symbol` :\n" - " The symbol (string) to be removed.\n" - "\n" - "pre: *symbol* does not occur in any transition of the transducer.\n" - "\n" - "note: Use with care, removing a symbol that occurs in a transition of the\n" - " transducer can have unexpected results.\n" - "\n" - ""}, - { "HfstTransducer_is_implementation_type_available", _wrap_HfstTransducer_is_implementation_type_available, METH_O, "\n" - "\n" - "\n" - "Whether HFST is linked to the transducer library needed by implementation type\n" - "*type*.\n" - "\n" - ""}, - { "HfstTransducer_longest_path_size", _wrap_HfstTransducer_longest_path_size, METH_VARARGS, "\n" - "\n" - "\n" - "Get length of longest path of the transducer.\n" - "\n" - ""}, - { "HfstTransducer_concatenate", _wrap_HfstTransducer_concatenate, METH_VARARGS, "\n" - "\n" - "\n" - "Concatenate this transducer with *another*.\n" - "\n" - ""}, - { "HfstTransducer_disjunct", _wrap_HfstTransducer_disjunct, METH_VARARGS, "\n" - "\n" - "\n" - "Disjunct this transducer with *another*.\n" - "\n" - ""}, - { "HfstTransducer_subtract", _wrap_HfstTransducer_subtract, METH_VARARGS, "\n" - "\n" - "\n" - "Subtract transducer *another* from this transducer.\n" - "\n" - ""}, - { "HfstTransducer_intersect", _wrap_HfstTransducer_intersect, METH_VARARGS, "\n" - "\n" - "\n" - "Intersect this transducer with *another*.\n" - "\n" - ""}, - { "HfstTransducer_compose", _wrap_HfstTransducer_compose, METH_VARARGS, "\n" - "\n" - "\n" - "Compose this transducer with *another*.\n" - "\n" - "Parameters\n" - "----------\n" - "* `another` :\n" - " The second argument in the composition. Not modified.\n" - "\n" - ""}, - { "HfstTransducer_compose_intersect", _wrap_HfstTransducer_compose_intersect, METH_VARARGS, "\n" - "\n" - "\n" - "Compose this transducer with the intersection of transducers in *v*.\n" - "\n" - "If *invert* is true, then compose the intersection of the transducers in *v*\n" - "with this transducer.\n" - "\n" - "The algorithm used by this function is faster than intersecting all transducers\n" - "one by one and then composing this transducer with the intersection.\n" - "\n" - "pre: The transducers in *v* are deterministic and epsilon-free.\n" - "\n" - "Parameters\n" - "----------\n" - "* `v` :\n" - " A tuple of transducers.\n" - "* `invert` :\n" - " Whether the intersection of the transducers in *v* is composed with this\n" - " transducer.\n" - "\n" - ""}, - { "HfstTransducer_priority_union", _wrap_HfstTransducer_priority_union, METH_VARARGS, "\n" - "\n" - "\n" - "Make priority union of this transducer with *another*.\n" - "\n" - "For the operation t1.priority_union(t2), the result is a union of t1 and t2,\n" - "except that whenever t1 and t2 have the same string on left side, the path in t2\n" - "overrides the path in t1.\n" - "\n" - "Example\n" - "\n" - " Transducer 1 (t1):\n" - " a : a\n" - " b : b\n" - "\n" - " Transducer 2 (t2):\n" - " b : B\n" - " c : C\n" - "\n" - " Result ( t1.priority_union(t2) ):\n" - " a : a\n" - " b : B\n" - " c : C For more information, read fsmbook.\n" - "\n" - ""}, - { "HfstTransducer_lenient_composition", _wrap_HfstTransducer_lenient_composition, METH_VARARGS, "\n" - "\n" - "\n" - "Perform a lenient composition on this transducer and *another*.\n" - "\n" - "TODO: explain more.\n" - "\n" - ""}, - { "HfstTransducer_cross_product", _wrap_HfstTransducer_cross_product, METH_VARARGS, "\n" - "\n" - "\n" - "Make cross product of this transducer with *another*.\n" - "\n" - "It pairs every string of this with every string of *another*. If strings are not\n" - "the same length, epsilon padding will be added in the end of the shorter string.\n" - "\n" - "pre: Both transducers must be automata, i.e. map strings onto themselves.\n" - "\n" - ""}, - { "HfstTransducer_shuffle", _wrap_HfstTransducer_shuffle, METH_VARARGS, "\n" - "\n" - "\n" - "Shuffle this transducer with transducer *another*.\n" - "\n" - "If transducer A accepts string 'foo' and transducer B string 'bar', the\n" - "transducer that results from shuffling A and B accepts all strings\n" - "[(f|b)(o|a)(o|r)].\n" - "\n" - "pre: Both transducers must be automata, i.e. map strings onto themselves.\n" - "\n" - ""}, - { "HfstTransducer_remove_epsilons", _wrap_HfstTransducer_remove_epsilons, METH_O, "\n" - "\n" - "\n" - "Remove all *epsilon:epsilon* transitions from the transducer so that the\n" - "resulting transducer is equivalent to the original one.\n" - "\n" - ""}, - { "HfstTransducer_determinize", _wrap_HfstTransducer_determinize, METH_O, "\n" - "\n" - "\n" - "Determinize the transducer.\n" - "\n" - "Determinizing a transducer yields an equivalent transducer that has no state\n" - "with two or more transitions whose input:output symbol pairs are the same.\n" - "\n" - ""}, - { "HfstTransducer_minimize", _wrap_HfstTransducer_minimize, METH_O, "\n" - "\n" - "\n" - "Minimize the transducer.\n" - "\n" - "Minimizing a transducer yields an equivalent transducer with the smallest number\n" - "of states.\n" - "\n" - "Bug\n" - "OpenFst's minimization algorithm seems to add epsilon transitions to weighted\n" - "transducers?\n" - "\n" - ""}, - { "HfstTransducer_prune", _wrap_HfstTransducer_prune, METH_O, "\n" - "\n" - "\n" - "Make transducer coaccessible.\n" - "\n" - "A transducer is coaccessible iff there is a path from every state to a final\n" - "state.\n" - "\n" - ""}, - { "HfstTransducer_eliminate_flags", _wrap_HfstTransducer_eliminate_flags, METH_O, "\n" - "\n" - "\n" - "Eliminate flag diacritics listed in *symbols* from the transducer.\n" - "\n" - "Parameters\n" - "----------\n" - "* `symbols` :\n" - " The flags to be eliminated. TODO: explain more.\n" - "\n" - "An equivalent transducer with no flags listed in *symbols*.\n" - "\n" - ""}, - { "HfstTransducer_eliminate_flag", _wrap_HfstTransducer_eliminate_flag, METH_VARARGS, "\n" - "\n" - "\n" - "Eliminate flag diacritic *symbol* from the transducer.\n" - "\n" - "Parameters\n" - "----------\n" - "* `symbol` :\n" - " The flag to be eliminated. TODO: explain more.\n" - "\n" - "An equivalent transducer with no flags *symbol*.\n" - "\n" - ""}, - { "HfstTransducer_n_best", _wrap_HfstTransducer_n_best, METH_VARARGS, "\n" - "\n" - "\n" - "Extract *n* best paths of the transducer.\n" - "\n" - "In the case of a weighted transducer (hfst.ImplementationType.TROPICAL_OPENFST_TYPE or\n" - "hfst.ImplementationType.LOG_OPENFST_TYPE), best paths are defined as paths with the lowest\n" - "weight. In the case of an unweighted transducer (hfst.ImplementationType.SFST_TYPE or\n" - "hfst.ImplementationType.FOMA_TYPE), the function returns random paths.\n" - "\n" - "This function is not implemented for hfst.ImplementationType.FOMA_TYPE or\n" - "hfst.ImplementationType.SFST_TYPE. If this function is called by an HfstTransducer of type\n" - "hfst.ImplementationType.FOMA_TYPE or hfst.ImplementationType.SFST_TYPE, it is converted to\n" - "hfst.ImplementationType.TROPICAL_OPENFST_TYPE, paths are extracted and it is converted back\n" - "to hfst.ImplementationType.FOMA_TYPE or hfst.ImplementationType.SFST_TYPE. If HFST is not linked to\n" - "OpenFst library, an hfst.exceptions.ImplementationTypeNotAvailableException is\n" - "thrown.\n" - "\n" - ""}, - { "HfstTransducer_convert", _wrap_HfstTransducer_convert, METH_VARARGS, "\n" - "\n" - "\n" - "Convert the transducer into an equivalent transducer in format *type*.\n" - "\n" - "If a weighted transducer is converted into an unweighted one, all weights are\n" - "lost. In the reverse case, all weights are initialized to the semiring's one.\n" - "\n" - "A transducer of type hfst.ImplementationType.SFST_TYPE, hfst.ImplementationType.TROPICAL_OPENFST_TYPE,\n" - "hfst.ImplementationType.LOG_OPENFST_TYPE or hfst.ImplementationType.FOMA_TYPE can be converted into an\n" - "hfst.ImplementationType.HFST_OL_TYPE or hfst.ImplementationType.HFST_OLW_TYPE transducer, but an\n" - "hfst.ImplementationType.HFST_OL_TYPE or hfst.ImplementationType.HFST_OLW_TYPE transducer cannot be\n" - "converted to any other type.\n" - "\n" - "note: For conversion between HfstBasicTransducer and HfstTransducer, see\n" - " hfst.HfstTransducer.__init__ and hfst.HfstBasicTransducer.__init__\n" - "\n" - ""}, - { "HfstTransducer_repeat_star", _wrap_HfstTransducer_repeat_star, METH_O, "\n" - "\n" - "\n" - "A concatenation of N transducers where N is any number from zero to infinity.\n" - "\n" - ""}, - { "HfstTransducer_repeat_plus", _wrap_HfstTransducer_repeat_plus, METH_O, "\n" - "\n" - "\n" - "A concatenation of N transducers where N is any number from one to infinity.\n" - "\n" - ""}, - { "HfstTransducer_repeat_n", _wrap_HfstTransducer_repeat_n, METH_VARARGS, "\n" - "\n" - "\n" - "A concatenation of *n* transducers.\n" - "\n" - ""}, - { "HfstTransducer_repeat_n_to_k", _wrap_HfstTransducer_repeat_n_to_k, METH_VARARGS, "\n" - "\n" - "\n" - "A concatenation of N transducers where N is any number from *n* to *k*,\n" - "inclusive.\n" - "\n" - ""}, - { "HfstTransducer_repeat_n_minus", _wrap_HfstTransducer_repeat_n_minus, METH_VARARGS, "\n" - "\n" - "\n" - "A concatenation of N transducers where N is any number from zero to *n*,\n" - "inclusive.\n" - "\n" - ""}, - { "HfstTransducer_repeat_n_plus", _wrap_HfstTransducer_repeat_n_plus, METH_VARARGS, "\n" - "\n" - "\n" - "A concatenation of N transducers where N is any number from *n* to infinity,\n" - "inclusive.\n" - "\n" - ""}, - { "HfstTransducer_invert", _wrap_HfstTransducer_invert, METH_O, "\n" - "\n" - "\n" - "Swap the input and output symbols of each transition in the transducer.\n" - "\n" - ""}, - { "HfstTransducer_reverse", _wrap_HfstTransducer_reverse, METH_O, "\n" - "\n" - "\n" - "Reverse the transducer.\n" - "\n" - "A reverted transducer accepts the string 'n(0) n(1) ... n(N)' iff the original\n" - "transducer accepts the string 'n(N) n(N-1) ... n(0)'\n" - "\n" - ""}, - { "HfstTransducer_input_project", _wrap_HfstTransducer_input_project, METH_O, "\n" - "\n" - "\n" - "Extract the input language of the transducer.\n" - "\n" - "All transition symbol pairs *isymbol:osymbol* are changed to *isymbol:isymbol*.\n" - "\n" - ""}, - { "HfstTransducer_output_project", _wrap_HfstTransducer_output_project, METH_O, "\n" - "\n" - "\n" - "Extract the output language of the transducer.\n" - "\n" - "All transition symbol pairs *isymbol:osymbol* are changed to *osymbol:osymbol*.\n" - "\n" - ""}, - { "HfstTransducer_optionalize", _wrap_HfstTransducer_optionalize, METH_O, "\n" - "\n" - "\n" - "Disjunct the transducer with an epsilon transducer.\n" - "\n" - ""}, - { "HfstTransducer_insert_freely", _wrap_HfstTransducer_insert_freely, METH_VARARGS, "\n" - "\n" - "\n" - "Freely insert a transition or a transducer into the transducer.\n" - "\n" - "Parameters\n" - "----------\n" - "* `ins` :\n" - " The transition or transducer to be inserted.\n" - "\n" - "If *ins* is a transition, i.e. a 2-tuple of strings: A transition is added to\n" - "each state in this transducer. The transition leads from that state to itself\n" - "with input and output symbols defined by *ins*. The weight of the transition is\n" - "zero.\n" - "\n" - "If *ins* is an hfst.HfstTransducer: A copy of *ins* is attached with epsilon\n" - "transitions to each state of this transducer. After the operation, for each\n" - "state S in this transducer, there is an epsilon transition that leads from state\n" - "S to the initial state of *ins*, and for each final state of *ins*, there is an\n" - "epsilon transition that leads from that final state to state S in this\n" - "transducer. The weights of the final states in *ins* are copied to the epsilon\n" - "transitions leading to state S.\n" - "\n" - ""}, - { "HfstTransducer__substitute_symbol", _wrap_HfstTransducer__substitute_symbol, METH_VARARGS, NULL}, - { "HfstTransducer__substitute_symbol_pair", _wrap_HfstTransducer__substitute_symbol_pair, METH_VARARGS, NULL}, - { "HfstTransducer__substitute_symbol_pair_with_set", _wrap_HfstTransducer__substitute_symbol_pair_with_set, METH_VARARGS, NULL}, - { "HfstTransducer__substitute_symbol_pair_with_transducer", _wrap_HfstTransducer__substitute_symbol_pair_with_transducer, METH_VARARGS, NULL}, - { "HfstTransducer__substitute_symbols", _wrap_HfstTransducer__substitute_symbols, METH_VARARGS, NULL}, - { "HfstTransducer__substitute_symbol_pairs", _wrap_HfstTransducer__substitute_symbol_pairs, METH_VARARGS, NULL}, - { "HfstTransducer_set_final_weights", _wrap_HfstTransducer_set_final_weights, METH_VARARGS, "\n" - "\n" - "\n" - "Set the weights of all final states to *weight*.\n" - "\n" - "If the HfstTransducer is of unweighted type (hfst.ImplementationType.SFST_TYPE or\n" - "hfst.ImplementationType.FOMA_TYPE), nothing is done.\n" - "\n" - ""}, - { "HfstTransducer_push_weights_to_start", _wrap_HfstTransducer_push_weights_to_start, METH_O, "\n" - "\n" - "\n" - "Push weights towards initial state.\n" - "\n" - "If the HfstTransducer is of unweighted type (hfst.ImplementationType.SFST_TYPE or\n" - "hfst.ImplementationType.FOMA_TYPE), nothing is done.\n" - "\n" - "An example:\n" - "\n" - " >>> import hfst\n" - " >>> tr = hfst.regex('[a::1 a:b::0.3 (b::0)]::0.7;')\n" - " >>> tr.push_weights_to_start()\n" - " >>> print(tr)\n" - " 0 1 a a 2.000000\n" - " 1 2 a b 0.000000\n" - " 2 3 b b 0.000000\n" - " 2 0.000000\n" - " 3 0.000000\n" - "\n" - "See also: hfst.HfstTransducer.push_weights_to_end\n" - "\n" - ""}, - { "HfstTransducer_push_weights_to_end", _wrap_HfstTransducer_push_weights_to_end, METH_O, "\n" - "\n" - "\n" - "Push weights towards final state(s).\n" - "\n" - "If the HfstTransducer is of unweighted type (hfst.ImplementationType.SFST_TYPE or\n" - "hfst.ImplementationType.FOMA_TYPE), nothing is done.\n" - "\n" - "An example:\n" - "\n" - " >>> import hfst\n" - " >>> tr = hfst.regex('[a::1 a:b::0.3 (b::0)]::0.7;')\n" - " >>> tr.push_weights_to_end()\n" - " >>> print(tr)\n" - " 0 1 a a 0.000000\n" - " 1 2 a b 0.000000\n" - " 2 3 b b 0.000000\n" - " 2 2.000000\n" - " 3 2.000000\n" - "\n" - "See also: hfst.HfstTransducer.push_weights_to_start\n" - "\n" - ""}, - { "HfstTransducer_minus", _wrap_HfstTransducer_minus, METH_VARARGS, "\n" - "\n" - "\n" - "Alias for subtract.\n" - "\n" - "See also: hfst.HfstTransducer.subtract\n" - "\n" - ""}, - { "HfstTransducer_conjunct", _wrap_HfstTransducer_conjunct, METH_VARARGS, "\n" - "\n" - "\n" - "Alias for intersect.\n" - "\n" - "See also: hfst.HfstTransducer.intersect\n" - "\n" - ""}, - { "HfstTransducer_lookup_optimize", _wrap_HfstTransducer_lookup_optimize, METH_O, "\n" - "\n" - "\n" - "Optimize the transducer for lookup.\n" - "\n" - "This effectively converts the transducer into hfst.ImplementationType.HFST_OL_TYPE.\n" - "\n" - ""}, - { "HfstTransducer_remove_optimization", _wrap_HfstTransducer_remove_optimization, METH_O, "\n" - "\n" - "\n" - "Remove lookup optimization.\n" - "\n" - "This effectively converts transducer (back) into default fst type.\n" - "\n" - ""}, - { "new_HfstTransducer", _wrap_new_HfstTransducer, METH_VARARGS, NULL}, - { "delete_HfstTransducer", _wrap_delete_HfstTransducer, METH_O, NULL}, - { "HfstTransducer___str__", _wrap_HfstTransducer___str__, METH_O, "\n" - "\n" - "\n" - "An AT&T representation of the transducer.\n" - "\n" - "Defined for print command. An example:\n" - "\n" - " >>> print(hfst.regex('[foo:bar::2]+'))\n" - " 0 1 foo bar 2.000000\n" - " 1 1 foo bar 2.000000\n" - " 1 0.000000 Todo\n" - "Works only for small transducers.\n" - "\n" - ""}, - { "HfstTransducer_write", _wrap_HfstTransducer_write, METH_VARARGS, "\n" - "\n" - "\n" - "Write the transducer in binary format to *ostr*.\n" - "\n" - "Parameters\n" - "----------\n" - "* `ostr` :\n" - " A hfst.HfstOutputStream where the transducer is written.\n" - "\n" - ""}, - { "HfstTransducer__extract_shortest_paths", _wrap_HfstTransducer__extract_shortest_paths, METH_O, NULL}, - { "HfstTransducer__extract_longest_paths", _wrap_HfstTransducer__extract_longest_paths, METH_VARARGS, NULL}, - { "HfstTransducer__extract_paths", _wrap_HfstTransducer__extract_paths, METH_VARARGS, NULL}, - { "HfstTransducer__extract_paths_fd", _wrap_HfstTransducer__extract_paths_fd, METH_VARARGS, NULL}, - { "HfstTransducer__extract_random_paths", _wrap_HfstTransducer__extract_random_paths, METH_VARARGS, NULL}, - { "HfstTransducer__extract_random_paths_fd", _wrap_HfstTransducer__extract_random_paths_fd, METH_VARARGS, NULL}, - { "HfstTransducer__lookup_vector", _wrap_HfstTransducer__lookup_vector, METH_VARARGS, NULL}, - { "HfstTransducer__lookup_fd_vector", _wrap_HfstTransducer__lookup_fd_vector, METH_VARARGS, NULL}, - { "HfstTransducer__lookup_fd_string", _wrap_HfstTransducer__lookup_fd_string, METH_VARARGS, NULL}, - { "HfstTransducer__lookup_string", _wrap_HfstTransducer__lookup_string, METH_VARARGS, NULL}, - { "HfstTransducer_swigregister", HfstTransducer_swigregister, METH_O, NULL}, - { "HfstTransducer_swiginit", HfstTransducer_swiginit, METH_VARARGS, NULL}, - { "create_hfst_output_stream", _wrap_create_hfst_output_stream, METH_VARARGS, NULL}, - { "delete_HfstOutputStream", _wrap_delete_HfstOutputStream, METH_O, NULL}, - { "HfstOutputStream_flush", _wrap_HfstOutputStream_flush, METH_O, "\n" - "\n" - "\n" - "Flush the stream.\n" - "\n" - ""}, - { "HfstOutputStream_close", _wrap_HfstOutputStream_close, METH_O, "\n" - "\n" - "\n" - "Close the stream.\n" - "\n" - "If the stream points to standard output, nothing is done.\n" - "\n" - ""}, - { "HfstOutputStream_redirect", _wrap_HfstOutputStream_redirect, METH_VARARGS, NULL}, - { "new_HfstOutputStream", _wrap_new_HfstOutputStream, METH_NOARGS, NULL}, - { "HfstOutputStream_swigregister", HfstOutputStream_swigregister, METH_O, NULL}, - { "HfstOutputStream_swiginit", HfstOutputStream_swiginit, METH_VARARGS, NULL}, - { "new_HfstInputStream", _wrap_new_HfstInputStream, METH_VARARGS, NULL}, - { "delete_HfstInputStream", _wrap_delete_HfstInputStream, METH_O, NULL}, - { "HfstInputStream_close", _wrap_HfstInputStream_close, METH_O, "\n" - "\n" - "\n" - "Close the stream.\n" - "\n" - "If the stream points to standard input, nothing is done.\n" - "\n" - ""}, - { "HfstInputStream_is_eof", _wrap_HfstInputStream_is_eof, METH_O, "\n" - "\n" - "\n" - "Whether the stream is at end.\n" - "\n" - ""}, - { "HfstInputStream_is_bad", _wrap_HfstInputStream_is_bad, METH_O, "\n" - "\n" - "\n" - "Whether badbit is set.\n" - "\n" - ""}, - { "HfstInputStream_is_good", _wrap_HfstInputStream_is_good, METH_O, "\n" - "\n" - "\n" - "Whether the state of the stream is good for input operations.\n" - "\n" - ""}, - { "HfstInputStream_get_type", _wrap_HfstInputStream_get_type, METH_O, "\n" - "\n" - "\n" - "The type of the first transducer in the stream.\n" - "\n" - "By default, all transducers in a stream have the same type, else a\n" - "TransducerTypeMismatchException is thrown when reading the first transducer that\n" - "has a different type than the previous ones.\n" - "\n" - ""}, - { "HfstInputStream_read", _wrap_HfstInputStream_read, METH_O, "\n" - "\n" - "\n" - "Return next transducer.\n" - "\n" - "Exceptions\n" - "----------\n" - "* `EndOfStreamException` :\n" - "\n" - ""}, - { "HfstInputStream_swigregister", HfstInputStream_swigregister, METH_O, NULL}, - { "HfstInputStream_swiginit", HfstInputStream_swiginit, METH_VARARGS, NULL}, - { "new_HfstTokenizer", _wrap_new_HfstTokenizer, METH_NOARGS, NULL}, - { "HfstTokenizer_add_skip_symbol", _wrap_HfstTokenizer_add_skip_symbol, METH_VARARGS, NULL}, - { "HfstTokenizer_add_multichar_symbol", _wrap_HfstTokenizer_add_multichar_symbol, METH_VARARGS, NULL}, - { "HfstTokenizer_tokenize_one_level", _wrap_HfstTokenizer_tokenize_one_level, METH_VARARGS, NULL}, - { "HfstTokenizer_tokenize_space_separated", _wrap_HfstTokenizer_tokenize_space_separated, METH_O, NULL}, - { "HfstTokenizer_tokenize", _wrap_HfstTokenizer_tokenize, METH_VARARGS, NULL}, - { "HfstTokenizer_check_utf8_correctness", _wrap_HfstTokenizer_check_utf8_correctness, METH_O, NULL}, - { "delete_HfstTokenizer", _wrap_delete_HfstTokenizer, METH_O, NULL}, - { "HfstTokenizer_swigregister", HfstTokenizer_swigregister, METH_O, NULL}, - { "HfstTokenizer_swiginit", HfstTokenizer_swiginit, METH_VARARGS, NULL}, - { "new_HfstBasicTransducer", _wrap_new_HfstBasicTransducer, METH_VARARGS, NULL}, - { "HfstBasicTransducer_name_set", _wrap_HfstBasicTransducer_name_set, METH_VARARGS, NULL}, - { "HfstBasicTransducer_name_get", _wrap_HfstBasicTransducer_name_get, METH_O, NULL}, - { "HfstBasicTransducer_add_symbol_to_alphabet", _wrap_HfstBasicTransducer_add_symbol_to_alphabet, METH_VARARGS, NULL}, - { "HfstBasicTransducer_remove_symbol_from_alphabet", _wrap_HfstBasicTransducer_remove_symbol_from_alphabet, METH_VARARGS, NULL}, - { "HfstBasicTransducer_remove_symbols_from_alphabet", _wrap_HfstBasicTransducer_remove_symbols_from_alphabet, METH_VARARGS, NULL}, - { "HfstBasicTransducer_add_symbols_to_alphabet", _wrap_HfstBasicTransducer_add_symbols_to_alphabet, METH_VARARGS, NULL}, - { "HfstBasicTransducer_symbols_used", _wrap_HfstBasicTransducer_symbols_used, METH_O, NULL}, - { "HfstBasicTransducer_prune_alphabet", _wrap_HfstBasicTransducer_prune_alphabet, METH_VARARGS, NULL}, - { "HfstBasicTransducer_get_alphabet", _wrap_HfstBasicTransducer_get_alphabet, METH_O, NULL}, - { "HfstBasicTransducer_get_input_symbols", _wrap_HfstBasicTransducer_get_input_symbols, METH_O, NULL}, - { "HfstBasicTransducer_get_output_symbols", _wrap_HfstBasicTransducer_get_output_symbols, METH_O, NULL}, - { "HfstBasicTransducer_get_transition_pairs", _wrap_HfstBasicTransducer_get_transition_pairs, METH_O, NULL}, - { "HfstBasicTransducer_add_state", _wrap_HfstBasicTransducer_add_state, METH_VARARGS, NULL}, - { "HfstBasicTransducer_get_max_state", _wrap_HfstBasicTransducer_get_max_state, METH_O, NULL}, - { "HfstBasicTransducer_states", _wrap_HfstBasicTransducer_states, METH_O, NULL}, - { "HfstBasicTransducer_remove_transition", _wrap_HfstBasicTransducer_remove_transition, METH_VARARGS, NULL}, - { "HfstBasicTransducer_is_final_state", _wrap_HfstBasicTransducer_is_final_state, METH_VARARGS, NULL}, - { "HfstBasicTransducer_get_final_weight", _wrap_HfstBasicTransducer_get_final_weight, METH_VARARGS, NULL}, - { "HfstBasicTransducer_set_final_weight", _wrap_HfstBasicTransducer_set_final_weight, METH_VARARGS, NULL}, - { "HfstBasicTransducer_remove_final_weight", _wrap_HfstBasicTransducer_remove_final_weight, METH_VARARGS, NULL}, - { "HfstBasicTransducer__transitions", _wrap_HfstBasicTransducer__transitions, METH_VARARGS, NULL}, - { "HfstBasicTransducer_is_infinitely_ambiguous", _wrap_HfstBasicTransducer_is_infinitely_ambiguous, METH_O, NULL}, - { "HfstBasicTransducer_is_lookup_infinitely_ambiguous", _wrap_HfstBasicTransducer_is_lookup_infinitely_ambiguous, METH_VARARGS, NULL}, - { "HfstBasicTransducer_longest_path_size", _wrap_HfstBasicTransducer_longest_path_size, METH_O, NULL}, - { "HfstBasicTransducer__substitute_symbol", _wrap_HfstBasicTransducer__substitute_symbol, METH_VARARGS, NULL}, - { "HfstBasicTransducer__substitute_symbol_pair", _wrap_HfstBasicTransducer__substitute_symbol_pair, METH_VARARGS, NULL}, - { "HfstBasicTransducer__substitute_symbol_pair_with_set", _wrap_HfstBasicTransducer__substitute_symbol_pair_with_set, METH_VARARGS, NULL}, - { "HfstBasicTransducer__substitute_symbol_pair_with_transducer", _wrap_HfstBasicTransducer__substitute_symbol_pair_with_transducer, METH_VARARGS, NULL}, - { "HfstBasicTransducer__substitute_symbols", _wrap_HfstBasicTransducer__substitute_symbols, METH_VARARGS, NULL}, - { "HfstBasicTransducer__substitute_symbol_pairs", _wrap_HfstBasicTransducer__substitute_symbol_pairs, METH_VARARGS, NULL}, - { "HfstBasicTransducer_insert_freely", _wrap_HfstBasicTransducer_insert_freely, METH_VARARGS, NULL}, - { "HfstBasicTransducer_sort_arcs", _wrap_HfstBasicTransducer_sort_arcs, METH_O, NULL}, - { "HfstBasicTransducer_disjunct", _wrap_HfstBasicTransducer_disjunct, METH_VARARGS, NULL}, - { "HfstBasicTransducer_harmonize", _wrap_HfstBasicTransducer_harmonize, METH_VARARGS, NULL}, - { "HfstBasicTransducer__lookup", _wrap_HfstBasicTransducer__lookup, METH_VARARGS, NULL}, - { "HfstBasicTransducer_get_prolog_string", _wrap_HfstBasicTransducer_get_prolog_string, METH_VARARGS, NULL}, - { "HfstBasicTransducer_get_xfst_string", _wrap_HfstBasicTransducer_get_xfst_string, METH_VARARGS, NULL}, - { "HfstBasicTransducer_get_att_string", _wrap_HfstBasicTransducer_get_att_string, METH_VARARGS, NULL}, - { "HfstBasicTransducer___str__", _wrap_HfstBasicTransducer___str__, METH_O, NULL}, - { "HfstBasicTransducer_add_transition", _wrap_HfstBasicTransducer_add_transition, METH_VARARGS, NULL}, - { "delete_HfstBasicTransducer", _wrap_delete_HfstBasicTransducer, METH_O, NULL}, - { "HfstBasicTransducer_swigregister", HfstBasicTransducer_swigregister, METH_O, NULL}, - { "HfstBasicTransducer_swiginit", HfstBasicTransducer_swiginit, METH_VARARGS, NULL}, - { "new_HfstBasicTransition", _wrap_new_HfstBasicTransition, METH_VARARGS, NULL}, - { "delete_HfstBasicTransition", _wrap_delete_HfstBasicTransition, METH_O, NULL}, - { "HfstBasicTransition_get_target_state", _wrap_HfstBasicTransition_get_target_state, METH_O, NULL}, - { "HfstBasicTransition_get_input_symbol", _wrap_HfstBasicTransition_get_input_symbol, METH_O, NULL}, - { "HfstBasicTransition_set_input_symbol", _wrap_HfstBasicTransition_set_input_symbol, METH_VARARGS, NULL}, - { "HfstBasicTransition_get_output_symbol", _wrap_HfstBasicTransition_get_output_symbol, METH_O, NULL}, - { "HfstBasicTransition_set_output_symbol", _wrap_HfstBasicTransition_set_output_symbol, METH_VARARGS, NULL}, - { "HfstBasicTransition_get_weight", _wrap_HfstBasicTransition_get_weight, METH_O, NULL}, - { "HfstBasicTransition_set_weight", _wrap_HfstBasicTransition_set_weight, METH_VARARGS, NULL}, - { "HfstBasicTransition___str__", _wrap_HfstBasicTransition___str__, METH_O, NULL}, - { "HfstBasicTransition_swigregister", HfstBasicTransition_swigregister, METH_O, NULL}, - { "HfstBasicTransition_swiginit", HfstBasicTransition_swiginit, METH_VARARGS, NULL}, - { "new_XreCompiler", _wrap_new_XreCompiler, METH_VARARGS, NULL}, - { "XreCompiler_define_list", _wrap_XreCompiler_define_list, METH_VARARGS, NULL}, - { "XreCompiler_define_function", _wrap_XreCompiler_define_function, METH_VARARGS, NULL}, - { "XreCompiler_is_definition", _wrap_XreCompiler_is_definition, METH_VARARGS, NULL}, - { "XreCompiler_is_function_definition", _wrap_XreCompiler_is_function_definition, METH_VARARGS, NULL}, - { "XreCompiler_undefine", _wrap_XreCompiler_undefine, METH_VARARGS, NULL}, - { "XreCompiler_compile", _wrap_XreCompiler_compile, METH_VARARGS, NULL}, - { "XreCompiler_set_verbosity", _wrap_XreCompiler_set_verbosity, METH_VARARGS, NULL}, - { "XreCompiler_getOutputToConsole", _wrap_XreCompiler_getOutputToConsole, METH_O, NULL}, - { "XreCompiler_set_expand_definitions", _wrap_XreCompiler_set_expand_definitions, METH_VARARGS, NULL}, - { "XreCompiler_set_harmonization", _wrap_XreCompiler_set_harmonization, METH_VARARGS, NULL}, - { "XreCompiler_contained_only_comments", _wrap_XreCompiler_contained_only_comments, METH_O, NULL}, - { "XreCompiler_define_xre", _wrap_XreCompiler_define_xre, METH_VARARGS, NULL}, - { "XreCompiler_define_transducer", _wrap_XreCompiler_define_transducer, METH_VARARGS, NULL}, - { "XreCompiler_setOutputToConsole", _wrap_XreCompiler_setOutputToConsole, METH_VARARGS, NULL}, - { "XreCompiler_compile_first", _wrap_XreCompiler_compile_first, METH_VARARGS, NULL}, - { "delete_XreCompiler", _wrap_delete_XreCompiler, METH_O, NULL}, - { "XreCompiler_swigregister", XreCompiler_swigregister, METH_O, NULL}, - { "XreCompiler_swiginit", XreCompiler_swiginit, METH_VARARGS, NULL}, - { "new_LexcCompiler", _wrap_new_LexcCompiler, METH_VARARGS, NULL}, - { "LexcCompiler_setVerbosity", _wrap_LexcCompiler_setVerbosity, METH_VARARGS, NULL}, - { "LexcCompiler_setOutputToConsole", _wrap_LexcCompiler_setOutputToConsole, METH_VARARGS, NULL}, - { "delete_LexcCompiler", _wrap_delete_LexcCompiler, METH_O, NULL}, - { "LexcCompiler_swigregister", LexcCompiler_swigregister, METH_O, NULL}, - { "LexcCompiler_swiginit", LexcCompiler_swiginit, METH_VARARGS, NULL}, - { "new_XfstCompiler", _wrap_new_XfstCompiler, METH_VARARGS, NULL}, - { "XfstCompiler_setOutputToConsole", _wrap_XfstCompiler_setOutputToConsole, METH_VARARGS, NULL}, - { "XfstCompiler_setReadInteractiveTextFromStdin", _wrap_XfstCompiler_setReadInteractiveTextFromStdin, METH_VARARGS, NULL}, - { "XfstCompiler_setReadline", _wrap_XfstCompiler_setReadline, METH_VARARGS, NULL}, - { "XfstCompiler_setVerbosity", _wrap_XfstCompiler_setVerbosity, METH_VARARGS, NULL}, - { "XfstCompiler_set", _wrap_XfstCompiler_set, METH_VARARGS, NULL}, - { "XfstCompiler_get_prompt", _wrap_XfstCompiler_get_prompt, METH_O, NULL}, - { "XfstCompiler_apply_up", _wrap_XfstCompiler_apply_up, METH_VARARGS, NULL}, - { "XfstCompiler_apply_down", _wrap_XfstCompiler_apply_down, METH_VARARGS, NULL}, - { "XfstCompiler_parse_line", _wrap_XfstCompiler_parse_line, METH_VARARGS, NULL}, - { "XfstCompiler_quit_requested", _wrap_XfstCompiler_quit_requested, METH_O, NULL}, - { "delete_XfstCompiler", _wrap_delete_XfstCompiler, METH_O, NULL}, - { "XfstCompiler_swigregister", XfstCompiler_swigregister, METH_O, NULL}, - { "XfstCompiler_swiginit", XfstCompiler_swiginit, METH_VARARGS, NULL}, - { "get_hfst_regex_error_message", _wrap_get_hfst_regex_error_message, METH_NOARGS, NULL}, - { "hfst_regex", _wrap_hfst_regex, METH_VARARGS, NULL}, - { "get_hfst_xfst_string_one", _wrap_get_hfst_xfst_string_one, METH_NOARGS, NULL}, - { "get_hfst_xfst_string_two", _wrap_get_hfst_xfst_string_two, METH_NOARGS, NULL}, - { "hfst_compile_xfst_to_string_one", _wrap_hfst_compile_xfst_to_string_one, METH_VARARGS, NULL}, - { "hfst_compile_xfst", _wrap_hfst_compile_xfst, METH_VARARGS, NULL}, - { "get_hfst_lexc_output", _wrap_get_hfst_lexc_output, METH_NOARGS, NULL}, - { "hfst_compile_lexc", _wrap_hfst_compile_lexc, METH_VARARGS, NULL}, - { "get_hfst_sfst_output", _wrap_get_hfst_sfst_output, METH_NOARGS, NULL}, - { "hfst_compile_sfst", _wrap_hfst_compile_sfst, METH_VARARGS, NULL}, - { "one_level_paths_to_string", _wrap_one_level_paths_to_string, METH_O, NULL}, - { "two_level_paths_to_string", _wrap_two_level_paths_to_string, METH_O, NULL}, - { "parse_prolog_network_line", _wrap_parse_prolog_network_line, METH_VARARGS, NULL}, - { "parse_prolog_arc_line", _wrap_parse_prolog_arc_line, METH_VARARGS, NULL}, - { "parse_prolog_symbol_line", _wrap_parse_prolog_symbol_line, METH_VARARGS, NULL}, - { "parse_prolog_final_line", _wrap_parse_prolog_final_line, METH_VARARGS, NULL}, - { "set_default_fst_type", _wrap_set_default_fst_type, METH_O, "\n" - "\n" - "\n" - "Set the default implementation type.\n" - "\n" - "Parameters\n" - "----------\n" - "* `impl` :\n" - " An hfst.ImplementationType.\n" - "\n" - "Set the implementation type (SFST_TYPE, TROPICAL_OPENFST_TYPE, FOMA_TYPE) that\n" - "is used by default by all operations that create transducers. The default value\n" - "is TROPICAL_OPENFST_TYPE\n" - "\n" - ""}, - { "get_default_fst_type", _wrap_get_default_fst_type, METH_NOARGS, "\n" - "\n" - "\n" - "Get default transducer implementation type.\n" - "\n" - "If the default type is not set, it defaults to hfst.ImplementationType.TROPICAL_OPENFST_TYPE\n" - "\n" - ""}, - { "fst_type_to_string", _wrap_fst_type_to_string, METH_O, "\n" - "\n" - "\n" - "Get a string representation of transducer implementation type *type*.\n" - "\n" - "Parameters\n" - "----------\n" - "* `type` :\n" - " An hfst.ImplementationType.\n" - "\n" - ""}, - { "two_level_if", _wrap_two_level_if, METH_VARARGS, NULL}, - { "two_level_only_if", _wrap_two_level_only_if, METH_VARARGS, NULL}, - { "two_level_if_and_only_if", _wrap_two_level_if_and_only_if, METH_VARARGS, NULL}, - { "replace_down_karttunen", _wrap_replace_down_karttunen, METH_VARARGS, NULL}, - { "replace_right", _wrap_replace_right, METH_VARARGS, NULL}, - { "replace_left", _wrap_replace_left, METH_VARARGS, NULL}, - { "replace_up", _wrap_replace_up, METH_VARARGS, NULL}, - { "replace_down", _wrap_replace_down, METH_VARARGS, NULL}, - { "left_replace_up", _wrap_left_replace_up, METH_VARARGS, NULL}, - { "left_replace_down", _wrap_left_replace_down, METH_VARARGS, NULL}, - { "left_replace_down_karttunen", _wrap_left_replace_down_karttunen, METH_VARARGS, NULL}, - { "left_replace_left", _wrap_left_replace_left, METH_VARARGS, NULL}, - { "left_replace_right", _wrap_left_replace_right, METH_VARARGS, NULL}, - { "restriction", _wrap_restriction, METH_VARARGS, NULL}, - { "coercion", _wrap_coercion, METH_VARARGS, NULL}, - { "restriction_and_coercion", _wrap_restriction_and_coercion, METH_VARARGS, NULL}, - { "surface_restriction", _wrap_surface_restriction, METH_VARARGS, NULL}, - { "surface_coercion", _wrap_surface_coercion, METH_VARARGS, NULL}, - { "surface_restriction_and_coercion", _wrap_surface_restriction_and_coercion, METH_VARARGS, NULL}, - { "deep_restriction", _wrap_deep_restriction, METH_VARARGS, NULL}, - { "deep_coercion", _wrap_deep_coercion, METH_VARARGS, NULL}, - { "deep_restriction_and_coercion", _wrap_deep_restriction_and_coercion, METH_VARARGS, NULL}, - { "TwolcCompiler_compile", _wrap_TwolcCompiler_compile, METH_VARARGS, NULL}, - { "new_TwolcCompiler", _wrap_new_TwolcCompiler, METH_NOARGS, NULL}, - { "delete_TwolcCompiler", _wrap_delete_TwolcCompiler, METH_O, NULL}, - { "TwolcCompiler_swigregister", TwolcCompiler_swigregister, METH_O, NULL}, - { "TwolcCompiler_swiginit", TwolcCompiler_swiginit, METH_VARARGS, NULL}, - { "pmatch_get_tokenized_output", _wrap_pmatch_get_tokenized_output, METH_VARARGS, NULL}, - { "pmatch_locate", _wrap_pmatch_locate, METH_VARARGS, NULL}, - { "delete_PmatchContainer", _wrap_delete_PmatchContainer, METH_O, NULL}, - { "PmatchContainer_match", _wrap_PmatchContainer_match, METH_VARARGS, "\n" - "\n" - "\n" - "Match input *input*.\n" - "\n" - ""}, - { "PmatchContainer_get_profiling_info", _wrap_PmatchContainer_get_profiling_info, METH_O, "\n" - "\n" - "\n" - "todo\n" - "\n" - ""}, - { "PmatchContainer_set_verbose", _wrap_PmatchContainer_set_verbose, METH_VARARGS, "\n" - "\n" - "\n" - "todo\n" - "\n" - ""}, - { "PmatchContainer_set_profile", _wrap_PmatchContainer_set_profile, METH_VARARGS, "\n" - "\n" - "\n" - "todo\n" - "\n" - ""}, - { "new_PmatchContainer", _wrap_new_PmatchContainer, METH_VARARGS, NULL}, - { "PmatchContainer_locate", _wrap_PmatchContainer_locate, METH_VARARGS, "\n" - "\n" - "\n" - "The locations of pmatched strings for string *input* where the results are limited\n" - "as defined by *time_cutoff* and *weight_cutoff*.\n" - "\n" - "Parameters\n" - "----------\n" - "* `input` :\n" - " The input string.\n" - "* `time_cutoff` :\n" - " Time cutoff, defaults to zero, i.e. no cutoff.\n" - "* `weight_cutoff` :\n" - " Weight cutoff, defaults to infinity, i.e. no cutoff.\n" - "\n" - "Returns\n" - "-------\n" - "A tuple of tuples of Location.\n" - "\n" - ""}, - { "PmatchContainer_swigregister", PmatchContainer_swigregister, METH_O, NULL}, - { "PmatchContainer_swiginit", PmatchContainer_swiginit, METH_VARARGS, NULL}, - { NULL, NULL, 0, NULL } -}; - -static PyMethodDef SwigMethods_proxydocs[] = { - { NULL, NULL, 0, NULL } -}; - - -/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */ - -static void *_p_ContextTransducersAreNotAutomataExceptionTo_p_HfstException(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((HfstException *) ((ContextTransducersAreNotAutomataException *) x)); -} -static void *_p_StateIsNotFinalExceptionTo_p_HfstException(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((HfstException *) ((StateIsNotFinalException *) x)); -} -static void *_p_NotValidLexcFormatExceptionTo_p_HfstException(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((HfstException *) ((NotValidLexcFormatException *) x)); -} -static void *_p_NotValidPrologFormatExceptionTo_p_HfstException(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((HfstException *) ((NotValidPrologFormatException *) x)); -} -static void *_p_NotValidAttFormatExceptionTo_p_HfstException(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((HfstException *) ((NotValidAttFormatException *) x)); -} -static void *_p_NotTransducerStreamExceptionTo_p_HfstException(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((HfstException *) ((NotTransducerStreamException *) x)); -} -static void *_p_TransducerIsCyclicExceptionTo_p_HfstException(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((HfstException *) ((TransducerIsCyclicException *) x)); -} -static void *_p_EndOfStreamExceptionTo_p_HfstException(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((HfstException *) ((EndOfStreamException *) x)); -} -static void *_p_StreamIsClosedExceptionTo_p_HfstException(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((HfstException *) ((StreamIsClosedException *) x)); -} -static void *_p_StreamCannotBeWrittenExceptionTo_p_HfstException(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((HfstException *) ((StreamCannotBeWrittenException *) x)); -} -static void *_p_StreamNotReadableExceptionTo_p_HfstException(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((HfstException *) ((StreamNotReadableException *) x)); -} -static void *_p_FunctionNotImplementedExceptionTo_p_HfstException(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((HfstException *) ((FunctionNotImplementedException *) x)); -} -static void *_p_ImplementationTypeNotAvailableExceptionTo_p_HfstException(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((HfstException *) ((ImplementationTypeNotAvailableException *) x)); -} -static void *_p_HfstTransducerTypeMismatchExceptionTo_p_HfstException(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((HfstException *) ((HfstTransducerTypeMismatchException *) x)); -} -static void *_p_TransducersAreNotAutomataExceptionTo_p_HfstException(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((HfstException *) ((TransducersAreNotAutomataException *) x)); -} -static void *_p_StateIndexOutOfBoundsExceptionTo_p_HfstException(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((HfstException *) ((StateIndexOutOfBoundsException *) x)); -} -static void *_p_TransducerHeaderExceptionTo_p_HfstException(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((HfstException *) ((TransducerHeaderException *) x)); -} -static void *_p_MissingOpenFstInputSymbolTableExceptionTo_p_HfstException(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((HfstException *) ((MissingOpenFstInputSymbolTableException *) x)); -} -static void *_p_TransducerTypeMismatchExceptionTo_p_HfstException(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((HfstException *) ((TransducerTypeMismatchException *) x)); -} -static void *_p_EmptySetOfContextsExceptionTo_p_HfstException(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((HfstException *) ((EmptySetOfContextsException *) x)); -} -static void *_p_SpecifiedTypeRequiredExceptionTo_p_HfstException(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((HfstException *) ((SpecifiedTypeRequiredException *) x)); -} -static void *_p_HfstFatalExceptionTo_p_HfstException(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((HfstException *) ((HfstFatalException *) x)); -} -static void *_p_TransducerHasWrongTypeExceptionTo_p_HfstException(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((HfstException *) ((TransducerHasWrongTypeException *) x)); -} -static void *_p_IncorrectUtf8CodingExceptionTo_p_HfstException(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((HfstException *) ((IncorrectUtf8CodingException *) x)); -} -static void *_p_EmptyStringExceptionTo_p_HfstException(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((HfstException *) ((EmptyStringException *) x)); -} -static void *_p_SymbolNotFoundExceptionTo_p_HfstException(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((HfstException *) ((SymbolNotFoundException *) x)); -} -static void *_p_MetadataExceptionTo_p_HfstException(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((HfstException *) ((MetadataException *) x)); -} -static void *_p_FlagDiacriticsAreNotIdentitiesExceptionTo_p_HfstException(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((HfstException *) ((FlagDiacriticsAreNotIdentitiesException *) x)); -} -static swig_type_info _swigt__p_ContextTransducersAreNotAutomataException = {"_p_ContextTransducersAreNotAutomataException", "ContextTransducersAreNotAutomataException *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_EmptySetOfContextsException = {"_p_EmptySetOfContextsException", "EmptySetOfContextsException *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_EmptyStringException = {"_p_EmptyStringException", "EmptyStringException *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_EndOfStreamException = {"_p_EndOfStreamException", "EndOfStreamException *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_FlagDiacriticsAreNotIdentitiesException = {"_p_FlagDiacriticsAreNotIdentitiesException", "FlagDiacriticsAreNotIdentitiesException *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_FunctionNotImplementedException = {"_p_FunctionNotImplementedException", "FunctionNotImplementedException *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_HfstException = {"_p_HfstException", "HfstException *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_HfstFatalException = {"_p_HfstFatalException", "HfstFatalException *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_HfstTransducerTypeMismatchException = {"_p_HfstTransducerTypeMismatchException", "HfstTransducerTypeMismatchException *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_ImplementationTypeNotAvailableException = {"_p_ImplementationTypeNotAvailableException", "ImplementationTypeNotAvailableException *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_IncorrectUtf8CodingException = {"_p_IncorrectUtf8CodingException", "IncorrectUtf8CodingException *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_MetadataException = {"_p_MetadataException", "MetadataException *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_MissingOpenFstInputSymbolTableException = {"_p_MissingOpenFstInputSymbolTableException", "MissingOpenFstInputSymbolTableException *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_NotTransducerStreamException = {"_p_NotTransducerStreamException", "NotTransducerStreamException *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_NotValidAttFormatException = {"_p_NotValidAttFormatException", "NotValidAttFormatException *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_NotValidLexcFormatException = {"_p_NotValidLexcFormatException", "NotValidLexcFormatException *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_NotValidPrologFormatException = {"_p_NotValidPrologFormatException", "NotValidPrologFormatException *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_SpecifiedTypeRequiredException = {"_p_SpecifiedTypeRequiredException", "SpecifiedTypeRequiredException *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_StateIndexOutOfBoundsException = {"_p_StateIndexOutOfBoundsException", "StateIndexOutOfBoundsException *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_StateIsNotFinalException = {"_p_StateIsNotFinalException", "StateIsNotFinalException *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_StreamCannotBeWrittenException = {"_p_StreamCannotBeWrittenException", "StreamCannotBeWrittenException *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_StreamIsClosedException = {"_p_StreamIsClosedException", "StreamIsClosedException *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_StreamNotReadableException = {"_p_StreamNotReadableException", "StreamNotReadableException *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_SymbolNotFoundException = {"_p_SymbolNotFoundException", "SymbolNotFoundException *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_TransducerHasWrongTypeException = {"_p_TransducerHasWrongTypeException", "TransducerHasWrongTypeException *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_TransducerHeaderException = {"_p_TransducerHeaderException", "TransducerHeaderException *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_TransducerIsCyclicException = {"_p_TransducerIsCyclicException", "TransducerIsCyclicException *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_TransducerTypeMismatchException = {"_p_TransducerTypeMismatchException", "TransducerTypeMismatchException *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_TransducersAreNotAutomataException = {"_p_TransducersAreNotAutomataException", "TransducersAreNotAutomataException *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_allocator_type = {"_p_allocator_type", "allocator_type *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_difference_type = {"_p_difference_type", "difference_type *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_first_type = {"_p_first_type", "first_type *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_float = {"_p_float", "float *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_hfst__HfstInputStream = {"_p_hfst__HfstInputStream", "hfst::HfstInputStream *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_hfst__HfstOutputStream = {"_p_hfst__HfstOutputStream", "hfst::HfstOutputStream *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_hfst__HfstTokenizer = {"_p_hfst__HfstTokenizer", "hfst::HfstTokenizer *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_hfst__HfstTransducer = {"_p_hfst__HfstTransducer", "hfst::HfstTransducer *|std::vector< hfst::HfstTransducer >::value_type *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_hfst__implementations__HfstBasicTransducer = {"_p_hfst__implementations__HfstBasicTransducer", "hfst::implementations::HfstBasicTransducer *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_hfst__implementations__HfstBasicTransition = {"_p_hfst__implementations__HfstBasicTransition", "std::vector< hfst::implementations::HfstBasicTransition >::value_type *|hfst::implementations::HfstBasicTransition *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_hfst__lexc__LexcCompiler = {"_p_hfst__lexc__LexcCompiler", "hfst::lexc::LexcCompiler *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_hfst__twolc__TwolcCompiler = {"_p_hfst__twolc__TwolcCompiler", "hfst::twolc::TwolcCompiler *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_hfst__xeroxRules__Rule = {"_p_hfst__xeroxRules__Rule", "hfst::xeroxRules::Rule *|std::vector< hfst::xeroxRules::Rule >::value_type *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_hfst__xfst__XfstCompiler = {"_p_hfst__xfst__XfstCompiler", "hfst::xfst::XfstCompiler *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_hfst__xre__XreCompiler = {"_p_hfst__xre__XreCompiler", "hfst::xre::XreCompiler *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_hfst_ol__Location = {"_p_hfst_ol__Location", "std::vector< hfst_ol::Location >::value_type *|hfst_ol::Location *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_hfst_ol__PmatchContainer = {"_p_hfst_ol__PmatchContainer", "hfst_ol::PmatchContainer *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_int = {"_p_int", "int *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_key_type = {"_p_key_type", "key_type *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_mapped_type = {"_p_mapped_type", "mapped_type *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_p_PyObject = {"_p_p_PyObject", "PyObject **", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_second_type = {"_p_second_type", "second_type *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_size_t = {"_p_size_t", "size_t *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_size_type = {"_p_size_type", "size_type *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__allocatorT_float_t = {"_p_std__allocatorT_float_t", "std::vector< float >::allocator_type *|std::allocator< float > *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__allocatorT_hfst__HfstTransducer_t = {"_p_std__allocatorT_hfst__HfstTransducer_t", "std::allocator< hfst::HfstTransducer > *|std::vector< hfst::HfstTransducer >::allocator_type *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__allocatorT_hfst__implementations__HfstBasicTransition_t = {"_p_std__allocatorT_hfst__implementations__HfstBasicTransition_t", "std::vector< hfst::implementations::HfstBasicTransition >::allocator_type *|std::allocator< hfst::implementations::HfstBasicTransition > *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__allocatorT_hfst__xeroxRules__Rule_t = {"_p_std__allocatorT_hfst__xeroxRules__Rule_t", "std::allocator< hfst::xeroxRules::Rule > *|std::vector< hfst::xeroxRules::Rule >::allocator_type *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__allocatorT_hfst_ol__Location_t = {"_p_std__allocatorT_hfst_ol__Location_t", "std::vector< hfst_ol::Location >::allocator_type *|std::allocator< hfst_ol::Location > *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__allocatorT_std__pairT_hfst__HfstTransducer_hfst__HfstTransducer_t_t = {"_p_std__allocatorT_std__pairT_hfst__HfstTransducer_hfst__HfstTransducer_t_t", "std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > >::allocator_type *|std::allocator< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__allocatorT_std__pairT_std__pairT_std__string_std__string_t_const_std__pairT_std__string_std__string_t_t_t = {"_p_std__allocatorT_std__pairT_std__pairT_std__string_std__string_t_const_std__pairT_std__string_std__string_t_t_t", "std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > >::allocator_type *|std::allocator< std::pair< std::pair< std::string,std::string > const,std::pair< std::string,std::string > > > *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__allocatorT_std__pairT_std__string_const_std__string_t_t = {"_p_std__allocatorT_std__pairT_std__string_const_std__string_t_t", "std::map< std::string,std::string >::allocator_type *|std::allocator< std::pair< std::string const,std::string > > *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__allocatorT_std__pairT_std__string_std__string_t_t = {"_p_std__allocatorT_std__pairT_std__string_std__string_t_t", "std::vector< std::pair< std::string,std::string > >::allocator_type *|std::allocator< std::pair< std::string,std::string > > *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__allocatorT_std__string_t = {"_p_std__allocatorT_std__string_t", "std::vector< std::string >::allocator_type *|std::allocator< std::string > *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__allocatorT_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t_t = {"_p_std__allocatorT_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t_t", "std::vector< std::vector< hfst_ol::Location > >::allocator_type *|std::allocator< std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > > > *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__allocatorT_unsigned_int_t = {"_p_std__allocatorT_unsigned_int_t", "std::vector< unsigned int >::allocator_type *|std::allocator< unsigned int > *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__invalid_argument = {"_p_std__invalid_argument", "std::invalid_argument *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__lessT_std__pairT_float_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t_t_t = {"_p_std__lessT_std__pairT_float_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t_t_t", "std::less< std::pair< float,std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > > > > *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__lessT_std__pairT_float_std__vectorT_std__string_std__allocatorT_std__string_t_t_t_t = {"_p_std__lessT_std__pairT_float_std__vectorT_std__string_std__allocatorT_std__string_t_t_t_t", "std::less< std::pair< float,std::vector< std::string,std::allocator< std::string > > > > *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__lessT_std__pairT_std__string_std__string_t_t = {"_p_std__lessT_std__pairT_std__string_std__string_t_t", "std::less< std::pair< std::string,std::string > > *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__lessT_std__string_t = {"_p_std__lessT_std__string_t", "std::less< std::string > *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__mapT_std__pairT_std__string_std__string_t_std__pairT_std__string_std__string_t_std__lessT_std__pairT_std__string_std__string_t_t_std__allocatorT_std__pairT_std__pairT_std__string_std__string_t_const_std__pairT_std__string_std__string_t_t_t_t = {"_p_std__mapT_std__pairT_std__string_std__string_t_std__pairT_std__string_std__string_t_std__lessT_std__pairT_std__string_std__string_t_t_std__allocatorT_std__pairT_std__pairT_std__string_std__string_t_const_std__pairT_std__string_std__string_t_t_t_t", "hfst::HfstSymbolPairSubstitutions *|std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string > > *|std::map< std::pair< std::string,std::string >,std::pair< std::string,std::string >,std::less< std::pair< std::string,std::string > >,std::allocator< std::pair< std::pair< std::string,std::string > const,std::pair< std::string,std::string > > > > *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__mapT_std__string_std__string_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_std__string_t_t_t = {"_p_std__mapT_std__string_std__string_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_std__string_t_t_t", "hfst::HfstSymbolSubstitutions *|std::map< std::string,std::string,std::less< std::string >,std::allocator< std::pair< std::string const,std::string > > > *|std::map< std::string,std::string > *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__pairT_float_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t_t = {"_p_std__pairT_float_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t_t", "std::pair< float,std::vector< std::pair< std::string,std::string > > > *|std::pair< float,std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > > > *|hfst::HfstTwoLevelPath *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__pairT_float_std__vectorT_std__string_std__allocatorT_std__string_t_t_t = {"_p_std__pairT_float_std__vectorT_std__string_std__allocatorT_std__string_t_t_t", "std::pair< float,std::vector< std::string > > *|std::pair< float,std::vector< std::string,std::allocator< std::string > > > *|hfst::HfstOneLevelPath *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__pairT_hfst__HfstTransducer_hfst__HfstTransducer_t = {"_p_std__pairT_hfst__HfstTransducer_hfst__HfstTransducer_t", "std::pair< hfst::HfstTransducer,hfst::HfstTransducer > *|hfst::HfstTransducerPair *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__pairT_hfst__HfstTransducer_p_unsigned_int_t = {"_p_std__pairT_hfst__HfstTransducer_p_unsigned_int_t", "std::pair< hfst::HfstTransducer *,unsigned int > *|hfst::HfstTransducerUIntPair *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__pairT_std__string_std__string_t = {"_p_std__pairT_std__string_std__string_t", "hfst::StringPair *|std::pair< std::string,std::string > *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__setT_std__pairT_float_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t_t_std__lessT_std__pairT_float_std__vectorT_std__pairT_std__string_std__string_t_t_t_t_std__allocatorT_std__pairT_float_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t_t_t_t = {"_p_std__setT_std__pairT_float_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t_t_std__lessT_std__pairT_float_std__vectorT_std__pairT_std__string_std__string_t_t_t_t_std__allocatorT_std__pairT_float_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t_t_t_t", "std::set< std::pair< float,std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > > >,std::less< std::pair< float,std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > > > >,std::allocator< std::pair< float,std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > > > > > *|std::set< std::pair< float,std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > > >,std::less< std::pair< float,std::vector< std::pair< std::string,std::string > > > >,std::allocator< std::pair< float,std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > > > > > *|std::set< std::pair< float,std::vector< std::pair< std::string,std::string > > > > *|std::set< std::pair< float,std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > > > > *|hfst::HfstTwoLevelPaths *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__setT_std__pairT_float_std__vectorT_std__string_std__allocatorT_std__string_t_t_t_std__lessT_std__pairT_float_std__vectorT_std__string_t_t_t_std__allocatorT_std__pairT_float_std__vectorT_std__string_std__allocatorT_std__string_t_t_t_t_t = {"_p_std__setT_std__pairT_float_std__vectorT_std__string_std__allocatorT_std__string_t_t_t_std__lessT_std__pairT_float_std__vectorT_std__string_t_t_t_std__allocatorT_std__pairT_float_std__vectorT_std__string_std__allocatorT_std__string_t_t_t_t_t", "std::set< std::pair< float,std::vector< std::string,std::allocator< std::string > > >,std::less< std::pair< float,std::vector< std::string,std::allocator< std::string > > > >,std::allocator< std::pair< float,std::vector< std::string,std::allocator< std::string > > > > > *|std::set< std::pair< float,std::vector< std::string,std::allocator< std::string > > >,std::less< std::pair< float,std::vector< std::string > > >,std::allocator< std::pair< float,std::vector< std::string,std::allocator< std::string > > > > > *|std::set< std::pair< float,std::vector< std::string > > > *|std::set< std::pair< float,std::vector< std::string,std::allocator< std::string > > > > *|hfst::HfstOneLevelPaths *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__setT_std__pairT_std__string_std__string_t_std__lessT_std__pairT_std__string_std__string_t_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t = {"_p_std__setT_std__pairT_std__string_std__string_t_std__lessT_std__pairT_std__string_std__string_t_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t", "std::set< std::pair< std::string,std::string > > *|std::set< std::pair< std::string,std::string >,std::less< std::pair< std::string,std::string > >,std::allocator< std::pair< std::string,std::string > > > *|hfst::StringPairSet *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__setT_std__string_std__lessT_std__string_t_std__allocatorT_std__string_t_t = {"_p_std__setT_std__string_std__lessT_std__string_t_std__allocatorT_std__string_t_t", "std::set< std::string,std::less< std::string >,std::allocator< std::string > > *|hfst::StringSet *|std::set< std::string > *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__vectorT_float_std__allocatorT_float_t_t = {"_p_std__vectorT_float_std__allocatorT_float_t_t", "std::vector< float,std::allocator< float > > *|std::vector< float > *|hfst::FloatVector *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__vectorT_hfst__HfstTransducer_std__allocatorT_hfst__HfstTransducer_t_t = {"_p_std__vectorT_hfst__HfstTransducer_std__allocatorT_hfst__HfstTransducer_t_t", "std::vector< hfst::HfstTransducer > *|std::vector< hfst::HfstTransducer,std::allocator< hfst::HfstTransducer > > *|hfst::HfstTransducerVector *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__vectorT_hfst__implementations__HfstBasicTransition_std__allocatorT_hfst__implementations__HfstBasicTransition_t_t = {"_p_std__vectorT_hfst__implementations__HfstBasicTransition_std__allocatorT_hfst__implementations__HfstBasicTransition_t_t", "hfst::implementations::HfstBasicTransitions *|std::vector< hfst::implementations::HfstBasicTransition > *|std::vector< hfst::implementations::HfstBasicTransition,std::allocator< hfst::implementations::HfstBasicTransition > > *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__vectorT_hfst__xeroxRules__Rule_std__allocatorT_hfst__xeroxRules__Rule_t_t = {"_p_std__vectorT_hfst__xeroxRules__Rule_std__allocatorT_hfst__xeroxRules__Rule_t_t", "std::vector< hfst::xeroxRules::Rule,std::allocator< hfst::xeroxRules::Rule > > *|std::vector< hfst::xeroxRules::Rule > *|hfst::HfstRuleVector *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t = {"_p_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t", "std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > > *|std::vector< hfst_ol::Location > *|hfst_ol::LocationVector *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__vectorT_size_t_std__allocatorT_size_t_t_t = {"_p_std__vectorT_size_t_std__allocatorT_size_t_t_t", "std::vector< size_t,std::allocator< size_t > > *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__vectorT_std__pairT_hfst__HfstTransducer_hfst__HfstTransducer_t_std__allocatorT_std__pairT_hfst__HfstTransducer_hfst__HfstTransducer_t_t_t = {"_p_std__vectorT_std__pairT_hfst__HfstTransducer_hfst__HfstTransducer_t_std__allocatorT_std__pairT_hfst__HfstTransducer_hfst__HfstTransducer_t_t_t", "std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer >,std::allocator< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > > *|std::vector< std::pair< hfst::HfstTransducer,hfst::HfstTransducer > > *|hfst::HfstTransducerPairVector *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t = {"_p_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t", "std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > > *|std::vector< std::pair< std::string,std::string > > *|hfst::StringPairVector *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__vectorT_std__string_std__allocatorT_std__string_t_t = {"_p_std__vectorT_std__string_std__allocatorT_std__string_t_t", "std::vector< std::string,std::allocator< std::string > > *|std::vector< std::string > *|hfst::StringVector *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__vectorT_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t_std__allocatorT_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t_t_t = {"_p_std__vectorT_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t_std__allocatorT_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t_t_t", "std::vector< std::vector< hfst_ol::Location > > *|std::vector< std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > >,std::allocator< std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > > > > *|std::vector< std::vector< hfst_ol::Location,std::allocator< hfst_ol::Location > > > *|hfst_ol::LocationVectorVector *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__vectorT_unsigned_int_std__allocatorT_unsigned_int_t_t = {"_p_std__vectorT_unsigned_int_std__allocatorT_unsigned_int_t_t", "std::vector< unsigned int,std::allocator< unsigned int > > *|std::vector< unsigned int > *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_swig__SwigPyIterator = {"_p_swig__SwigPyIterator", "swig::SwigPyIterator *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_unsigned_int = {"_p_unsigned_int", "unsigned int *|hfst::implementations::HfstState *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_value_type = {"_p_value_type", "value_type *", 0, 0, (void*)0, 0}; - -static swig_type_info *swig_type_initial[] = { - &_swigt__p_ContextTransducersAreNotAutomataException, - &_swigt__p_EmptySetOfContextsException, - &_swigt__p_EmptyStringException, - &_swigt__p_EndOfStreamException, - &_swigt__p_FlagDiacriticsAreNotIdentitiesException, - &_swigt__p_FunctionNotImplementedException, - &_swigt__p_HfstException, - &_swigt__p_HfstFatalException, - &_swigt__p_HfstTransducerTypeMismatchException, - &_swigt__p_ImplementationTypeNotAvailableException, - &_swigt__p_IncorrectUtf8CodingException, - &_swigt__p_MetadataException, - &_swigt__p_MissingOpenFstInputSymbolTableException, - &_swigt__p_NotTransducerStreamException, - &_swigt__p_NotValidAttFormatException, - &_swigt__p_NotValidLexcFormatException, - &_swigt__p_NotValidPrologFormatException, - &_swigt__p_SpecifiedTypeRequiredException, - &_swigt__p_StateIndexOutOfBoundsException, - &_swigt__p_StateIsNotFinalException, - &_swigt__p_StreamCannotBeWrittenException, - &_swigt__p_StreamIsClosedException, - &_swigt__p_StreamNotReadableException, - &_swigt__p_SymbolNotFoundException, - &_swigt__p_TransducerHasWrongTypeException, - &_swigt__p_TransducerHeaderException, - &_swigt__p_TransducerIsCyclicException, - &_swigt__p_TransducerTypeMismatchException, - &_swigt__p_TransducersAreNotAutomataException, - &_swigt__p_allocator_type, - &_swigt__p_char, - &_swigt__p_difference_type, - &_swigt__p_first_type, - &_swigt__p_float, - &_swigt__p_hfst__HfstInputStream, - &_swigt__p_hfst__HfstOutputStream, - &_swigt__p_hfst__HfstTokenizer, - &_swigt__p_hfst__HfstTransducer, - &_swigt__p_hfst__implementations__HfstBasicTransducer, - &_swigt__p_hfst__implementations__HfstBasicTransition, - &_swigt__p_hfst__lexc__LexcCompiler, - &_swigt__p_hfst__twolc__TwolcCompiler, - &_swigt__p_hfst__xeroxRules__Rule, - &_swigt__p_hfst__xfst__XfstCompiler, - &_swigt__p_hfst__xre__XreCompiler, - &_swigt__p_hfst_ol__Location, - &_swigt__p_hfst_ol__PmatchContainer, - &_swigt__p_int, - &_swigt__p_key_type, - &_swigt__p_mapped_type, - &_swigt__p_p_PyObject, - &_swigt__p_second_type, - &_swigt__p_size_t, - &_swigt__p_size_type, - &_swigt__p_std__allocatorT_float_t, - &_swigt__p_std__allocatorT_hfst__HfstTransducer_t, - &_swigt__p_std__allocatorT_hfst__implementations__HfstBasicTransition_t, - &_swigt__p_std__allocatorT_hfst__xeroxRules__Rule_t, - &_swigt__p_std__allocatorT_hfst_ol__Location_t, - &_swigt__p_std__allocatorT_std__pairT_hfst__HfstTransducer_hfst__HfstTransducer_t_t, - &_swigt__p_std__allocatorT_std__pairT_std__pairT_std__string_std__string_t_const_std__pairT_std__string_std__string_t_t_t, - &_swigt__p_std__allocatorT_std__pairT_std__string_const_std__string_t_t, - &_swigt__p_std__allocatorT_std__pairT_std__string_std__string_t_t, - &_swigt__p_std__allocatorT_std__string_t, - &_swigt__p_std__allocatorT_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t_t, - &_swigt__p_std__allocatorT_unsigned_int_t, - &_swigt__p_std__invalid_argument, - &_swigt__p_std__lessT_std__pairT_float_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t_t_t, - &_swigt__p_std__lessT_std__pairT_float_std__vectorT_std__string_std__allocatorT_std__string_t_t_t_t, - &_swigt__p_std__lessT_std__pairT_std__string_std__string_t_t, - &_swigt__p_std__lessT_std__string_t, - &_swigt__p_std__mapT_std__pairT_std__string_std__string_t_std__pairT_std__string_std__string_t_std__lessT_std__pairT_std__string_std__string_t_t_std__allocatorT_std__pairT_std__pairT_std__string_std__string_t_const_std__pairT_std__string_std__string_t_t_t_t, - &_swigt__p_std__mapT_std__string_std__string_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_std__string_t_t_t, - &_swigt__p_std__pairT_float_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t_t, - &_swigt__p_std__pairT_float_std__vectorT_std__string_std__allocatorT_std__string_t_t_t, - &_swigt__p_std__pairT_hfst__HfstTransducer_hfst__HfstTransducer_t, - &_swigt__p_std__pairT_hfst__HfstTransducer_p_unsigned_int_t, - &_swigt__p_std__pairT_std__string_std__string_t, - &_swigt__p_std__setT_std__pairT_float_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t_t_std__lessT_std__pairT_float_std__vectorT_std__pairT_std__string_std__string_t_t_t_t_std__allocatorT_std__pairT_float_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t_t_t_t, - &_swigt__p_std__setT_std__pairT_float_std__vectorT_std__string_std__allocatorT_std__string_t_t_t_std__lessT_std__pairT_float_std__vectorT_std__string_t_t_t_std__allocatorT_std__pairT_float_std__vectorT_std__string_std__allocatorT_std__string_t_t_t_t_t, - &_swigt__p_std__setT_std__pairT_std__string_std__string_t_std__lessT_std__pairT_std__string_std__string_t_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t, - &_swigt__p_std__setT_std__string_std__lessT_std__string_t_std__allocatorT_std__string_t_t, - &_swigt__p_std__vectorT_float_std__allocatorT_float_t_t, - &_swigt__p_std__vectorT_hfst__HfstTransducer_std__allocatorT_hfst__HfstTransducer_t_t, - &_swigt__p_std__vectorT_hfst__implementations__HfstBasicTransition_std__allocatorT_hfst__implementations__HfstBasicTransition_t_t, - &_swigt__p_std__vectorT_hfst__xeroxRules__Rule_std__allocatorT_hfst__xeroxRules__Rule_t_t, - &_swigt__p_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t, - &_swigt__p_std__vectorT_size_t_std__allocatorT_size_t_t_t, - &_swigt__p_std__vectorT_std__pairT_hfst__HfstTransducer_hfst__HfstTransducer_t_std__allocatorT_std__pairT_hfst__HfstTransducer_hfst__HfstTransducer_t_t_t, - &_swigt__p_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t, - &_swigt__p_std__vectorT_std__string_std__allocatorT_std__string_t_t, - &_swigt__p_std__vectorT_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t_std__allocatorT_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t_t_t, - &_swigt__p_std__vectorT_unsigned_int_std__allocatorT_unsigned_int_t_t, - &_swigt__p_swig__SwigPyIterator, - &_swigt__p_unsigned_int, - &_swigt__p_value_type, -}; - -static swig_cast_info _swigc__p_ContextTransducersAreNotAutomataException[] = { {&_swigt__p_ContextTransducersAreNotAutomataException, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_EmptySetOfContextsException[] = { {&_swigt__p_EmptySetOfContextsException, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_EmptyStringException[] = { {&_swigt__p_EmptyStringException, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_EndOfStreamException[] = { {&_swigt__p_EndOfStreamException, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_FlagDiacriticsAreNotIdentitiesException[] = { {&_swigt__p_FlagDiacriticsAreNotIdentitiesException, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_FunctionNotImplementedException[] = { {&_swigt__p_FunctionNotImplementedException, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_HfstException[] = { {&_swigt__p_ContextTransducersAreNotAutomataException, _p_ContextTransducersAreNotAutomataExceptionTo_p_HfstException, 0, 0}, {&_swigt__p_StateIsNotFinalException, _p_StateIsNotFinalExceptionTo_p_HfstException, 0, 0}, {&_swigt__p_NotValidLexcFormatException, _p_NotValidLexcFormatExceptionTo_p_HfstException, 0, 0}, {&_swigt__p_NotValidPrologFormatException, _p_NotValidPrologFormatExceptionTo_p_HfstException, 0, 0}, {&_swigt__p_NotValidAttFormatException, _p_NotValidAttFormatExceptionTo_p_HfstException, 0, 0}, {&_swigt__p_NotTransducerStreamException, _p_NotTransducerStreamExceptionTo_p_HfstException, 0, 0}, {&_swigt__p_TransducerIsCyclicException, _p_TransducerIsCyclicExceptionTo_p_HfstException, 0, 0}, {&_swigt__p_EndOfStreamException, _p_EndOfStreamExceptionTo_p_HfstException, 0, 0}, {&_swigt__p_StreamIsClosedException, _p_StreamIsClosedExceptionTo_p_HfstException, 0, 0}, {&_swigt__p_StreamCannotBeWrittenException, _p_StreamCannotBeWrittenExceptionTo_p_HfstException, 0, 0}, {&_swigt__p_StreamNotReadableException, _p_StreamNotReadableExceptionTo_p_HfstException, 0, 0}, {&_swigt__p_FunctionNotImplementedException, _p_FunctionNotImplementedExceptionTo_p_HfstException, 0, 0}, {&_swigt__p_ImplementationTypeNotAvailableException, _p_ImplementationTypeNotAvailableExceptionTo_p_HfstException, 0, 0}, {&_swigt__p_HfstException, 0, 0, 0}, {&_swigt__p_HfstTransducerTypeMismatchException, _p_HfstTransducerTypeMismatchExceptionTo_p_HfstException, 0, 0}, {&_swigt__p_TransducersAreNotAutomataException, _p_TransducersAreNotAutomataExceptionTo_p_HfstException, 0, 0}, {&_swigt__p_StateIndexOutOfBoundsException, _p_StateIndexOutOfBoundsExceptionTo_p_HfstException, 0, 0}, {&_swigt__p_TransducerHeaderException, _p_TransducerHeaderExceptionTo_p_HfstException, 0, 0}, {&_swigt__p_MissingOpenFstInputSymbolTableException, _p_MissingOpenFstInputSymbolTableExceptionTo_p_HfstException, 0, 0}, {&_swigt__p_TransducerTypeMismatchException, _p_TransducerTypeMismatchExceptionTo_p_HfstException, 0, 0}, {&_swigt__p_EmptySetOfContextsException, _p_EmptySetOfContextsExceptionTo_p_HfstException, 0, 0}, {&_swigt__p_SpecifiedTypeRequiredException, _p_SpecifiedTypeRequiredExceptionTo_p_HfstException, 0, 0}, {&_swigt__p_HfstFatalException, _p_HfstFatalExceptionTo_p_HfstException, 0, 0}, {&_swigt__p_TransducerHasWrongTypeException, _p_TransducerHasWrongTypeExceptionTo_p_HfstException, 0, 0}, {&_swigt__p_IncorrectUtf8CodingException, _p_IncorrectUtf8CodingExceptionTo_p_HfstException, 0, 0}, {&_swigt__p_EmptyStringException, _p_EmptyStringExceptionTo_p_HfstException, 0, 0}, {&_swigt__p_SymbolNotFoundException, _p_SymbolNotFoundExceptionTo_p_HfstException, 0, 0}, {&_swigt__p_MetadataException, _p_MetadataExceptionTo_p_HfstException, 0, 0}, {&_swigt__p_FlagDiacriticsAreNotIdentitiesException, _p_FlagDiacriticsAreNotIdentitiesExceptionTo_p_HfstException, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_HfstFatalException[] = { {&_swigt__p_HfstFatalException, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_HfstTransducerTypeMismatchException[] = { {&_swigt__p_HfstTransducerTypeMismatchException, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_ImplementationTypeNotAvailableException[] = { {&_swigt__p_ImplementationTypeNotAvailableException, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_IncorrectUtf8CodingException[] = { {&_swigt__p_IncorrectUtf8CodingException, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_MetadataException[] = { {&_swigt__p_MetadataException, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_MissingOpenFstInputSymbolTableException[] = { {&_swigt__p_MissingOpenFstInputSymbolTableException, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_NotTransducerStreamException[] = { {&_swigt__p_NotTransducerStreamException, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_NotValidAttFormatException[] = { {&_swigt__p_NotValidAttFormatException, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_NotValidLexcFormatException[] = { {&_swigt__p_NotValidLexcFormatException, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_NotValidPrologFormatException[] = { {&_swigt__p_NotValidPrologFormatException, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_SpecifiedTypeRequiredException[] = { {&_swigt__p_SpecifiedTypeRequiredException, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_StateIndexOutOfBoundsException[] = { {&_swigt__p_StateIndexOutOfBoundsException, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_StateIsNotFinalException[] = { {&_swigt__p_StateIsNotFinalException, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_StreamCannotBeWrittenException[] = { {&_swigt__p_StreamCannotBeWrittenException, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_StreamIsClosedException[] = { {&_swigt__p_StreamIsClosedException, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_StreamNotReadableException[] = { {&_swigt__p_StreamNotReadableException, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_SymbolNotFoundException[] = { {&_swigt__p_SymbolNotFoundException, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_TransducerHasWrongTypeException[] = { {&_swigt__p_TransducerHasWrongTypeException, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_TransducerHeaderException[] = { {&_swigt__p_TransducerHeaderException, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_TransducerIsCyclicException[] = { {&_swigt__p_TransducerIsCyclicException, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_TransducerTypeMismatchException[] = { {&_swigt__p_TransducerTypeMismatchException, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_TransducersAreNotAutomataException[] = { {&_swigt__p_TransducersAreNotAutomataException, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_allocator_type[] = { {&_swigt__p_allocator_type, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_difference_type[] = { {&_swigt__p_difference_type, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_first_type[] = { {&_swigt__p_first_type, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_float[] = { {&_swigt__p_float, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_hfst__HfstInputStream[] = { {&_swigt__p_hfst__HfstInputStream, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_hfst__HfstOutputStream[] = { {&_swigt__p_hfst__HfstOutputStream, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_hfst__HfstTokenizer[] = { {&_swigt__p_hfst__HfstTokenizer, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_hfst__HfstTransducer[] = { {&_swigt__p_hfst__HfstTransducer, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_hfst__implementations__HfstBasicTransducer[] = { {&_swigt__p_hfst__implementations__HfstBasicTransducer, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_hfst__implementations__HfstBasicTransition[] = { {&_swigt__p_hfst__implementations__HfstBasicTransition, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_hfst__lexc__LexcCompiler[] = { {&_swigt__p_hfst__lexc__LexcCompiler, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_hfst__twolc__TwolcCompiler[] = { {&_swigt__p_hfst__twolc__TwolcCompiler, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_hfst__xeroxRules__Rule[] = { {&_swigt__p_hfst__xeroxRules__Rule, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_hfst__xfst__XfstCompiler[] = { {&_swigt__p_hfst__xfst__XfstCompiler, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_hfst__xre__XreCompiler[] = { {&_swigt__p_hfst__xre__XreCompiler, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_hfst_ol__Location[] = { {&_swigt__p_hfst_ol__Location, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_hfst_ol__PmatchContainer[] = { {&_swigt__p_hfst_ol__PmatchContainer, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_int[] = { {&_swigt__p_int, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_key_type[] = { {&_swigt__p_key_type, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_mapped_type[] = { {&_swigt__p_mapped_type, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_p_PyObject[] = { {&_swigt__p_p_PyObject, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_second_type[] = { {&_swigt__p_second_type, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_size_t[] = { {&_swigt__p_size_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_size_type[] = { {&_swigt__p_size_type, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__allocatorT_float_t[] = { {&_swigt__p_std__allocatorT_float_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__allocatorT_hfst__HfstTransducer_t[] = { {&_swigt__p_std__allocatorT_hfst__HfstTransducer_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__allocatorT_hfst__implementations__HfstBasicTransition_t[] = { {&_swigt__p_std__allocatorT_hfst__implementations__HfstBasicTransition_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__allocatorT_hfst__xeroxRules__Rule_t[] = { {&_swigt__p_std__allocatorT_hfst__xeroxRules__Rule_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__allocatorT_hfst_ol__Location_t[] = { {&_swigt__p_std__allocatorT_hfst_ol__Location_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__allocatorT_std__pairT_hfst__HfstTransducer_hfst__HfstTransducer_t_t[] = { {&_swigt__p_std__allocatorT_std__pairT_hfst__HfstTransducer_hfst__HfstTransducer_t_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__allocatorT_std__pairT_std__pairT_std__string_std__string_t_const_std__pairT_std__string_std__string_t_t_t[] = { {&_swigt__p_std__allocatorT_std__pairT_std__pairT_std__string_std__string_t_const_std__pairT_std__string_std__string_t_t_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__allocatorT_std__pairT_std__string_const_std__string_t_t[] = { {&_swigt__p_std__allocatorT_std__pairT_std__string_const_std__string_t_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__allocatorT_std__pairT_std__string_std__string_t_t[] = { {&_swigt__p_std__allocatorT_std__pairT_std__string_std__string_t_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__allocatorT_std__string_t[] = { {&_swigt__p_std__allocatorT_std__string_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__allocatorT_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t_t[] = { {&_swigt__p_std__allocatorT_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__allocatorT_unsigned_int_t[] = { {&_swigt__p_std__allocatorT_unsigned_int_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__invalid_argument[] = { {&_swigt__p_std__invalid_argument, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__lessT_std__pairT_float_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t_t_t[] = { {&_swigt__p_std__lessT_std__pairT_float_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t_t_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__lessT_std__pairT_float_std__vectorT_std__string_std__allocatorT_std__string_t_t_t_t[] = { {&_swigt__p_std__lessT_std__pairT_float_std__vectorT_std__string_std__allocatorT_std__string_t_t_t_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__lessT_std__pairT_std__string_std__string_t_t[] = { {&_swigt__p_std__lessT_std__pairT_std__string_std__string_t_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__lessT_std__string_t[] = { {&_swigt__p_std__lessT_std__string_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__mapT_std__pairT_std__string_std__string_t_std__pairT_std__string_std__string_t_std__lessT_std__pairT_std__string_std__string_t_t_std__allocatorT_std__pairT_std__pairT_std__string_std__string_t_const_std__pairT_std__string_std__string_t_t_t_t[] = { {&_swigt__p_std__mapT_std__pairT_std__string_std__string_t_std__pairT_std__string_std__string_t_std__lessT_std__pairT_std__string_std__string_t_t_std__allocatorT_std__pairT_std__pairT_std__string_std__string_t_const_std__pairT_std__string_std__string_t_t_t_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__mapT_std__string_std__string_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_std__string_t_t_t[] = { {&_swigt__p_std__mapT_std__string_std__string_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_std__string_t_t_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__pairT_float_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t_t[] = { {&_swigt__p_std__pairT_float_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__pairT_float_std__vectorT_std__string_std__allocatorT_std__string_t_t_t[] = { {&_swigt__p_std__pairT_float_std__vectorT_std__string_std__allocatorT_std__string_t_t_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__pairT_hfst__HfstTransducer_hfst__HfstTransducer_t[] = { {&_swigt__p_std__pairT_hfst__HfstTransducer_hfst__HfstTransducer_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__pairT_hfst__HfstTransducer_p_unsigned_int_t[] = { {&_swigt__p_std__pairT_hfst__HfstTransducer_p_unsigned_int_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__pairT_std__string_std__string_t[] = { {&_swigt__p_std__pairT_std__string_std__string_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__setT_std__pairT_float_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t_t_std__lessT_std__pairT_float_std__vectorT_std__pairT_std__string_std__string_t_t_t_t_std__allocatorT_std__pairT_float_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t_t_t_t[] = { {&_swigt__p_std__setT_std__pairT_float_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t_t_std__lessT_std__pairT_float_std__vectorT_std__pairT_std__string_std__string_t_t_t_t_std__allocatorT_std__pairT_float_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t_t_t_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__setT_std__pairT_float_std__vectorT_std__string_std__allocatorT_std__string_t_t_t_std__lessT_std__pairT_float_std__vectorT_std__string_t_t_t_std__allocatorT_std__pairT_float_std__vectorT_std__string_std__allocatorT_std__string_t_t_t_t_t[] = { {&_swigt__p_std__setT_std__pairT_float_std__vectorT_std__string_std__allocatorT_std__string_t_t_t_std__lessT_std__pairT_float_std__vectorT_std__string_t_t_t_std__allocatorT_std__pairT_float_std__vectorT_std__string_std__allocatorT_std__string_t_t_t_t_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__setT_std__pairT_std__string_std__string_t_std__lessT_std__pairT_std__string_std__string_t_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t[] = { {&_swigt__p_std__setT_std__pairT_std__string_std__string_t_std__lessT_std__pairT_std__string_std__string_t_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__setT_std__string_std__lessT_std__string_t_std__allocatorT_std__string_t_t[] = { {&_swigt__p_std__setT_std__string_std__lessT_std__string_t_std__allocatorT_std__string_t_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__vectorT_float_std__allocatorT_float_t_t[] = { {&_swigt__p_std__vectorT_float_std__allocatorT_float_t_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__vectorT_hfst__HfstTransducer_std__allocatorT_hfst__HfstTransducer_t_t[] = { {&_swigt__p_std__vectorT_hfst__HfstTransducer_std__allocatorT_hfst__HfstTransducer_t_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__vectorT_hfst__implementations__HfstBasicTransition_std__allocatorT_hfst__implementations__HfstBasicTransition_t_t[] = { {&_swigt__p_std__vectorT_hfst__implementations__HfstBasicTransition_std__allocatorT_hfst__implementations__HfstBasicTransition_t_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__vectorT_hfst__xeroxRules__Rule_std__allocatorT_hfst__xeroxRules__Rule_t_t[] = { {&_swigt__p_std__vectorT_hfst__xeroxRules__Rule_std__allocatorT_hfst__xeroxRules__Rule_t_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t[] = { {&_swigt__p_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__vectorT_size_t_std__allocatorT_size_t_t_t[] = { {&_swigt__p_std__vectorT_size_t_std__allocatorT_size_t_t_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__vectorT_std__pairT_hfst__HfstTransducer_hfst__HfstTransducer_t_std__allocatorT_std__pairT_hfst__HfstTransducer_hfst__HfstTransducer_t_t_t[] = { {&_swigt__p_std__vectorT_std__pairT_hfst__HfstTransducer_hfst__HfstTransducer_t_std__allocatorT_std__pairT_hfst__HfstTransducer_hfst__HfstTransducer_t_t_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t[] = { {&_swigt__p_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__vectorT_std__string_std__allocatorT_std__string_t_t[] = { {&_swigt__p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__vectorT_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t_std__allocatorT_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t_t_t[] = { {&_swigt__p_std__vectorT_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t_std__allocatorT_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t_t_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__vectorT_unsigned_int_std__allocatorT_unsigned_int_t_t[] = { {&_swigt__p_std__vectorT_unsigned_int_std__allocatorT_unsigned_int_t_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_swig__SwigPyIterator[] = { {&_swigt__p_swig__SwigPyIterator, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_unsigned_int[] = { {&_swigt__p_unsigned_int, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_value_type[] = { {&_swigt__p_value_type, 0, 0, 0},{0, 0, 0, 0}}; - -static swig_cast_info *swig_cast_initial[] = { - _swigc__p_ContextTransducersAreNotAutomataException, - _swigc__p_EmptySetOfContextsException, - _swigc__p_EmptyStringException, - _swigc__p_EndOfStreamException, - _swigc__p_FlagDiacriticsAreNotIdentitiesException, - _swigc__p_FunctionNotImplementedException, - _swigc__p_HfstException, - _swigc__p_HfstFatalException, - _swigc__p_HfstTransducerTypeMismatchException, - _swigc__p_ImplementationTypeNotAvailableException, - _swigc__p_IncorrectUtf8CodingException, - _swigc__p_MetadataException, - _swigc__p_MissingOpenFstInputSymbolTableException, - _swigc__p_NotTransducerStreamException, - _swigc__p_NotValidAttFormatException, - _swigc__p_NotValidLexcFormatException, - _swigc__p_NotValidPrologFormatException, - _swigc__p_SpecifiedTypeRequiredException, - _swigc__p_StateIndexOutOfBoundsException, - _swigc__p_StateIsNotFinalException, - _swigc__p_StreamCannotBeWrittenException, - _swigc__p_StreamIsClosedException, - _swigc__p_StreamNotReadableException, - _swigc__p_SymbolNotFoundException, - _swigc__p_TransducerHasWrongTypeException, - _swigc__p_TransducerHeaderException, - _swigc__p_TransducerIsCyclicException, - _swigc__p_TransducerTypeMismatchException, - _swigc__p_TransducersAreNotAutomataException, - _swigc__p_allocator_type, - _swigc__p_char, - _swigc__p_difference_type, - _swigc__p_first_type, - _swigc__p_float, - _swigc__p_hfst__HfstInputStream, - _swigc__p_hfst__HfstOutputStream, - _swigc__p_hfst__HfstTokenizer, - _swigc__p_hfst__HfstTransducer, - _swigc__p_hfst__implementations__HfstBasicTransducer, - _swigc__p_hfst__implementations__HfstBasicTransition, - _swigc__p_hfst__lexc__LexcCompiler, - _swigc__p_hfst__twolc__TwolcCompiler, - _swigc__p_hfst__xeroxRules__Rule, - _swigc__p_hfst__xfst__XfstCompiler, - _swigc__p_hfst__xre__XreCompiler, - _swigc__p_hfst_ol__Location, - _swigc__p_hfst_ol__PmatchContainer, - _swigc__p_int, - _swigc__p_key_type, - _swigc__p_mapped_type, - _swigc__p_p_PyObject, - _swigc__p_second_type, - _swigc__p_size_t, - _swigc__p_size_type, - _swigc__p_std__allocatorT_float_t, - _swigc__p_std__allocatorT_hfst__HfstTransducer_t, - _swigc__p_std__allocatorT_hfst__implementations__HfstBasicTransition_t, - _swigc__p_std__allocatorT_hfst__xeroxRules__Rule_t, - _swigc__p_std__allocatorT_hfst_ol__Location_t, - _swigc__p_std__allocatorT_std__pairT_hfst__HfstTransducer_hfst__HfstTransducer_t_t, - _swigc__p_std__allocatorT_std__pairT_std__pairT_std__string_std__string_t_const_std__pairT_std__string_std__string_t_t_t, - _swigc__p_std__allocatorT_std__pairT_std__string_const_std__string_t_t, - _swigc__p_std__allocatorT_std__pairT_std__string_std__string_t_t, - _swigc__p_std__allocatorT_std__string_t, - _swigc__p_std__allocatorT_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t_t, - _swigc__p_std__allocatorT_unsigned_int_t, - _swigc__p_std__invalid_argument, - _swigc__p_std__lessT_std__pairT_float_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t_t_t, - _swigc__p_std__lessT_std__pairT_float_std__vectorT_std__string_std__allocatorT_std__string_t_t_t_t, - _swigc__p_std__lessT_std__pairT_std__string_std__string_t_t, - _swigc__p_std__lessT_std__string_t, - _swigc__p_std__mapT_std__pairT_std__string_std__string_t_std__pairT_std__string_std__string_t_std__lessT_std__pairT_std__string_std__string_t_t_std__allocatorT_std__pairT_std__pairT_std__string_std__string_t_const_std__pairT_std__string_std__string_t_t_t_t, - _swigc__p_std__mapT_std__string_std__string_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_std__string_t_t_t, - _swigc__p_std__pairT_float_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t_t, - _swigc__p_std__pairT_float_std__vectorT_std__string_std__allocatorT_std__string_t_t_t, - _swigc__p_std__pairT_hfst__HfstTransducer_hfst__HfstTransducer_t, - _swigc__p_std__pairT_hfst__HfstTransducer_p_unsigned_int_t, - _swigc__p_std__pairT_std__string_std__string_t, - _swigc__p_std__setT_std__pairT_float_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t_t_std__lessT_std__pairT_float_std__vectorT_std__pairT_std__string_std__string_t_t_t_t_std__allocatorT_std__pairT_float_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t_t_t_t, - _swigc__p_std__setT_std__pairT_float_std__vectorT_std__string_std__allocatorT_std__string_t_t_t_std__lessT_std__pairT_float_std__vectorT_std__string_t_t_t_std__allocatorT_std__pairT_float_std__vectorT_std__string_std__allocatorT_std__string_t_t_t_t_t, - _swigc__p_std__setT_std__pairT_std__string_std__string_t_std__lessT_std__pairT_std__string_std__string_t_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t, - _swigc__p_std__setT_std__string_std__lessT_std__string_t_std__allocatorT_std__string_t_t, - _swigc__p_std__vectorT_float_std__allocatorT_float_t_t, - _swigc__p_std__vectorT_hfst__HfstTransducer_std__allocatorT_hfst__HfstTransducer_t_t, - _swigc__p_std__vectorT_hfst__implementations__HfstBasicTransition_std__allocatorT_hfst__implementations__HfstBasicTransition_t_t, - _swigc__p_std__vectorT_hfst__xeroxRules__Rule_std__allocatorT_hfst__xeroxRules__Rule_t_t, - _swigc__p_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t, - _swigc__p_std__vectorT_size_t_std__allocatorT_size_t_t_t, - _swigc__p_std__vectorT_std__pairT_hfst__HfstTransducer_hfst__HfstTransducer_t_std__allocatorT_std__pairT_hfst__HfstTransducer_hfst__HfstTransducer_t_t_t, - _swigc__p_std__vectorT_std__pairT_std__string_std__string_t_std__allocatorT_std__pairT_std__string_std__string_t_t_t, - _swigc__p_std__vectorT_std__string_std__allocatorT_std__string_t_t, - _swigc__p_std__vectorT_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t_std__allocatorT_std__vectorT_hfst_ol__Location_std__allocatorT_hfst_ol__Location_t_t_t_t, - _swigc__p_std__vectorT_unsigned_int_std__allocatorT_unsigned_int_t_t, - _swigc__p_swig__SwigPyIterator, - _swigc__p_unsigned_int, - _swigc__p_value_type, -}; - - -/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */ - -static swig_const_info swig_const_table[] = { -{0, 0, 0, 0.0, 0, 0}}; - -#ifdef __cplusplus -} -#endif -/* ----------------------------------------------------------------------------- - * Type initialization: - * This problem is tough by the requirement that no dynamic - * memory is used. Also, since swig_type_info structures store pointers to - * swig_cast_info structures and swig_cast_info structures store pointers back - * to swig_type_info structures, we need some lookup code at initialization. - * The idea is that swig generates all the structures that are needed. - * The runtime then collects these partially filled structures. - * The SWIG_InitializeModule function takes these initial arrays out of - * swig_module, and does all the lookup, filling in the swig_module.types - * array with the correct data and linking the correct swig_cast_info - * structures together. - * - * The generated swig_type_info structures are assigned statically to an initial - * array. We just loop through that array, and handle each type individually. - * First we lookup if this type has been already loaded, and if so, use the - * loaded structure instead of the generated one. Then we have to fill in the - * cast linked list. The cast data is initially stored in something like a - * two-dimensional array. Each row corresponds to a type (there are the same - * number of rows as there are in the swig_type_initial array). Each entry in - * a column is one of the swig_cast_info structures for that type. - * The cast_initial array is actually an array of arrays, because each row has - * a variable number of columns. So to actually build the cast linked list, - * we find the array of casts associated with the type, and loop through it - * adding the casts to the list. The one last trick we need to do is making - * sure the type pointer in the swig_cast_info struct is correct. - * - * First off, we lookup the cast->type name to see if it is already loaded. - * There are three cases to handle: - * 1) If the cast->type has already been loaded AND the type we are adding - * casting info to has not been loaded (it is in this module), THEN we - * replace the cast->type pointer with the type pointer that has already - * been loaded. - * 2) If BOTH types (the one we are adding casting info to, and the - * cast->type) are loaded, THEN the cast info has already been loaded by - * the previous module so we just ignore it. - * 3) Finally, if cast->type has not already been loaded, then we add that - * swig_cast_info to the linked list (because the cast->type) pointer will - * be correct. - * ----------------------------------------------------------------------------- */ - -#ifdef __cplusplus -extern "C" { -#if 0 -} /* c-mode */ -#endif -#endif - -#if 0 -#define SWIGRUNTIME_DEBUG -#endif - - -SWIGRUNTIME void -SWIG_InitializeModule(void *clientdata) { - size_t i; - swig_module_info *module_head, *iter; - int init; - - /* check to see if the circular list has been setup, if not, set it up */ - if (swig_module.next==0) { - /* Initialize the swig_module */ - swig_module.type_initial = swig_type_initial; - swig_module.cast_initial = swig_cast_initial; - swig_module.next = &swig_module; - init = 1; - } else { - init = 0; - } - - /* Try and load any already created modules */ - module_head = SWIG_GetModule(clientdata); - if (!module_head) { - /* This is the first module loaded for this interpreter */ - /* so set the swig module into the interpreter */ - SWIG_SetModule(clientdata, &swig_module); - } else { - /* the interpreter has loaded a SWIG module, but has it loaded this one? */ - iter=module_head; - do { - if (iter==&swig_module) { - /* Our module is already in the list, so there's nothing more to do. */ - return; - } - iter=iter->next; - } while (iter!= module_head); - - /* otherwise we must add our module into the list */ - swig_module.next = module_head->next; - module_head->next = &swig_module; - } - - /* When multiple interpreters are used, a module could have already been initialized in - a different interpreter, but not yet have a pointer in this interpreter. - In this case, we do not want to continue adding types... everything should be - set up already */ - if (init == 0) return; - - /* Now work on filling in swig_module.types */ -#ifdef SWIGRUNTIME_DEBUG - printf("SWIG_InitializeModule: size %lu\n", (unsigned long)swig_module.size); -#endif - for (i = 0; i < swig_module.size; ++i) { - swig_type_info *type = 0; - swig_type_info *ret; - swig_cast_info *cast; - -#ifdef SWIGRUNTIME_DEBUG - printf("SWIG_InitializeModule: type %lu %s\n", (unsigned long)i, swig_module.type_initial[i]->name); -#endif - - /* if there is another module already loaded */ - if (swig_module.next != &swig_module) { - type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name); - } - if (type) { - /* Overwrite clientdata field */ -#ifdef SWIGRUNTIME_DEBUG - printf("SWIG_InitializeModule: found type %s\n", type->name); -#endif - if (swig_module.type_initial[i]->clientdata) { - type->clientdata = swig_module.type_initial[i]->clientdata; -#ifdef SWIGRUNTIME_DEBUG - printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name); -#endif - } - } else { - type = swig_module.type_initial[i]; - } - - /* Insert casting types */ - cast = swig_module.cast_initial[i]; - while (cast->type) { - /* Don't need to add information already in the list */ - ret = 0; -#ifdef SWIGRUNTIME_DEBUG - printf("SWIG_InitializeModule: look cast %s\n", cast->type->name); -#endif - if (swig_module.next != &swig_module) { - ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name); -#ifdef SWIGRUNTIME_DEBUG - if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name); -#endif - } - if (ret) { - if (type == swig_module.type_initial[i]) { -#ifdef SWIGRUNTIME_DEBUG - printf("SWIG_InitializeModule: skip old type %s\n", ret->name); -#endif - cast->type = ret; - ret = 0; - } else { - /* Check for casting already in the list */ - swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type); -#ifdef SWIGRUNTIME_DEBUG - if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name); -#endif - if (!ocast) ret = 0; - } - } - - if (!ret) { -#ifdef SWIGRUNTIME_DEBUG - printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name); -#endif - if (type->cast) { - type->cast->prev = cast; - cast->next = type->cast; - } - type->cast = cast; - } - cast++; - } - /* Set entry in modules->types array equal to the type */ - swig_module.types[i] = type; - } - swig_module.types[i] = 0; - -#ifdef SWIGRUNTIME_DEBUG - printf("**** SWIG_InitializeModule: Cast List ******\n"); - for (i = 0; i < swig_module.size; ++i) { - int j = 0; - swig_cast_info *cast = swig_module.cast_initial[i]; - printf("SWIG_InitializeModule: type %lu %s\n", (unsigned long)i, swig_module.type_initial[i]->name); - while (cast->type) { - printf("SWIG_InitializeModule: cast type %s\n", cast->type->name); - cast++; - ++j; - } - printf("---- Total casts: %d\n",j); - } - printf("**** SWIG_InitializeModule: Cast List ******\n"); -#endif -} - -/* This function will propagate the clientdata field of type to -* any new swig_type_info structures that have been added into the list -* of equivalent types. It is like calling -* SWIG_TypeClientData(type, clientdata) a second time. -*/ -SWIGRUNTIME void -SWIG_PropagateClientData(void) { - size_t i; - swig_cast_info *equiv; - static int init_run = 0; - - if (init_run) return; - init_run = 1; - - for (i = 0; i < swig_module.size; i++) { - if (swig_module.types[i]->clientdata) { - equiv = swig_module.types[i]->cast; - while (equiv) { - if (!equiv->converter) { - if (equiv->type && !equiv->type->clientdata) - SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata); - } - equiv = equiv->next; - } - } - } -} - -#ifdef __cplusplus -#if 0 -{ - /* c-mode */ -#endif -} -#endif - - - -#ifdef __cplusplus -extern "C" { -#endif - - /* Python-specific SWIG API */ -#define SWIG_newvarlink() SWIG_Python_newvarlink() -#define SWIG_addvarlink(p, name, get_attr, set_attr) SWIG_Python_addvarlink(p, name, get_attr, set_attr) -#define SWIG_InstallConstants(d, constants) SWIG_Python_InstallConstants(d, constants) - - /* ----------------------------------------------------------------------------- - * global variable support code. - * ----------------------------------------------------------------------------- */ - - typedef struct swig_globalvar { - char *name; /* Name of global variable */ - PyObject *(*get_attr)(void); /* Return the current value */ - int (*set_attr)(PyObject *); /* Set the value */ - struct swig_globalvar *next; - } swig_globalvar; - - typedef struct swig_varlinkobject { - PyObject_HEAD - swig_globalvar *vars; - } swig_varlinkobject; - - SWIGINTERN PyObject * - swig_varlink_repr(swig_varlinkobject *SWIGUNUSEDPARM(v)) { -#if PY_VERSION_HEX >= 0x03000000 - return PyUnicode_InternFromString(""); -#else - return PyString_FromString(""); -#endif - } - - SWIGINTERN PyObject * - swig_varlink_str(swig_varlinkobject *v) { -#if PY_VERSION_HEX >= 0x03000000 - PyObject *str = PyUnicode_InternFromString("("); - PyObject *tail; - PyObject *joined; - swig_globalvar *var; - for (var = v->vars; var; var=var->next) { - tail = PyUnicode_FromString(var->name); - joined = PyUnicode_Concat(str, tail); - Py_DecRef(str); - Py_DecRef(tail); - str = joined; - if (var->next) { - tail = PyUnicode_InternFromString(", "); - joined = PyUnicode_Concat(str, tail); - Py_DecRef(str); - Py_DecRef(tail); - str = joined; - } - } - tail = PyUnicode_InternFromString(")"); - joined = PyUnicode_Concat(str, tail); - Py_DecRef(str); - Py_DecRef(tail); - str = joined; -#else - PyObject *str = PyString_FromString("("); - swig_globalvar *var; - for (var = v->vars; var; var=var->next) { - PyString_ConcatAndDel(&str,PyString_FromString(var->name)); - if (var->next) PyString_ConcatAndDel(&str,PyString_FromString(", ")); - } - PyString_ConcatAndDel(&str,PyString_FromString(")")); -#endif - return str; - } - - SWIGINTERN void - swig_varlink_dealloc(swig_varlinkobject *v) { - swig_globalvar *var = v->vars; - while (var) { - swig_globalvar *n = var->next; - free(var->name); - free(var); - var = n; - } - } - - SWIGINTERN PyObject * - swig_varlink_getattr(swig_varlinkobject *v, char *n) { - PyObject *res = NULL; - swig_globalvar *var = v->vars; - while (var) { - if (strcmp(var->name,n) == 0) { - res = (*var->get_attr)(); - break; - } - var = var->next; - } - if (res == NULL && !PyErr_Occurred()) { - PyErr_Format(PyExc_AttributeError, "Unknown C global variable '%s'", n); - } - return res; - } - - SWIGINTERN int - swig_varlink_setattr(swig_varlinkobject *v, char *n, PyObject *p) { - int res = 1; - swig_globalvar *var = v->vars; - while (var) { - if (strcmp(var->name,n) == 0) { - res = (*var->set_attr)(p); - break; - } - var = var->next; - } - if (res == 1 && !PyErr_Occurred()) { - PyErr_Format(PyExc_AttributeError, "Unknown C global variable '%s'", n); - } - return res; - } - - SWIGINTERN PyTypeObject* - swig_varlink_type(void) { - static char varlink__doc__[] = "Swig var link object"; - static PyTypeObject varlink_type; - static int type_init = 0; - if (!type_init) { - const PyTypeObject tmp = { -#if PY_VERSION_HEX >= 0x03000000 - PyVarObject_HEAD_INIT(NULL, 0) -#else - PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ -#endif - "swigvarlink", /* tp_name */ - sizeof(swig_varlinkobject), /* tp_basicsize */ - 0, /* tp_itemsize */ - (destructor) swig_varlink_dealloc, /* tp_dealloc */ - 0, /* tp_print */ - (getattrfunc) swig_varlink_getattr, /* tp_getattr */ - (setattrfunc) swig_varlink_setattr, /* tp_setattr */ - 0, /* tp_compare */ - (reprfunc) swig_varlink_repr, /* tp_repr */ - 0, /* tp_as_number */ - 0, /* tp_as_sequence */ - 0, /* tp_as_mapping */ - 0, /* tp_hash */ - 0, /* tp_call */ - (reprfunc) swig_varlink_str, /* tp_str */ - 0, /* tp_getattro */ - 0, /* tp_setattro */ - 0, /* tp_as_buffer */ - 0, /* tp_flags */ - varlink__doc__, /* tp_doc */ - 0, /* tp_traverse */ - 0, /* tp_clear */ - 0, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* tp_iter -> tp_weaklist */ - 0, /* tp_del */ - 0, /* tp_version_tag */ -#if PY_VERSION_HEX >= 0x03040000 - 0, /* tp_finalize */ -#endif -#if PY_VERSION_HEX >= 0x03080000 - 0, /* tp_vectorcall */ -#endif -#if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) - 0, /* tp_print */ -#endif -#ifdef COUNT_ALLOCS - 0, /* tp_allocs */ - 0, /* tp_frees */ - 0, /* tp_maxalloc */ - 0, /* tp_prev */ - 0 /* tp_next */ -#endif - }; - varlink_type = tmp; - type_init = 1; - if (PyType_Ready(&varlink_type) < 0) - return NULL; - } - return &varlink_type; - } - - /* Create a variable linking object for use later */ - SWIGINTERN PyObject * - SWIG_Python_newvarlink(void) { - swig_varlinkobject *result = PyObject_NEW(swig_varlinkobject, swig_varlink_type()); - if (result) { - result->vars = 0; - } - return ((PyObject*) result); - } - - SWIGINTERN void - SWIG_Python_addvarlink(PyObject *p, const char *name, PyObject *(*get_attr)(void), int (*set_attr)(PyObject *p)) { - swig_varlinkobject *v = (swig_varlinkobject *) p; - swig_globalvar *gv = (swig_globalvar *) malloc(sizeof(swig_globalvar)); - if (gv) { - size_t size = strlen(name)+1; - gv->name = (char *)malloc(size); - if (gv->name) { - memcpy(gv->name, name, size); - gv->get_attr = get_attr; - gv->set_attr = set_attr; - gv->next = v->vars; - } - } - v->vars = gv; - } - - SWIGINTERN PyObject * - SWIG_globals(void) { - static PyObject *globals = 0; - if (!globals) { - globals = SWIG_newvarlink(); - } - return globals; - } - - /* ----------------------------------------------------------------------------- - * constants/methods manipulation - * ----------------------------------------------------------------------------- */ - - /* Install Constants */ - SWIGINTERN void - SWIG_Python_InstallConstants(PyObject *d, swig_const_info constants[]) { - PyObject *obj = 0; - size_t i; - for (i = 0; constants[i].type; ++i) { - switch(constants[i].type) { - case SWIG_PY_POINTER: - obj = SWIG_InternalNewPointerObj(constants[i].pvalue, *(constants[i]).ptype,0); - break; - case SWIG_PY_BINARY: - obj = SWIG_NewPackedObj(constants[i].pvalue, constants[i].lvalue, *(constants[i].ptype)); - break; - default: - obj = 0; - break; - } - if (obj) { - PyDict_SetItemString(d, constants[i].name, obj); - Py_DECREF(obj); - } - } - } - - /* -----------------------------------------------------------------------------*/ - /* Fix SwigMethods to carry the callback ptrs when needed */ - /* -----------------------------------------------------------------------------*/ - - SWIGINTERN void - SWIG_Python_FixMethods(PyMethodDef *methods, - swig_const_info *const_table, - swig_type_info **types, - swig_type_info **types_initial) { - size_t i; - for (i = 0; methods[i].ml_name; ++i) { - const char *c = methods[i].ml_doc; - if (!c) continue; - c = strstr(c, "swig_ptr: "); - if (c) { - int j; - swig_const_info *ci = 0; - const char *name = c + 10; - for (j = 0; const_table[j].type; ++j) { - if (strncmp(const_table[j].name, name, - strlen(const_table[j].name)) == 0) { - ci = &(const_table[j]); - break; - } - } - if (ci) { - void *ptr = (ci->type == SWIG_PY_POINTER) ? ci->pvalue : 0; - if (ptr) { - size_t shift = (ci->ptype) - types; - swig_type_info *ty = types_initial[shift]; - size_t ldoc = (c - methods[i].ml_doc); - size_t lptr = strlen(ty->name)+2*sizeof(void*)+2; - char *ndoc = (char*)malloc(ldoc + lptr + 10); - if (ndoc) { - char *buff = ndoc; - memcpy(buff, methods[i].ml_doc, ldoc); - buff += ldoc; - memcpy(buff, "swig_ptr: ", 10); - buff += 10; - SWIG_PackVoidPtr(buff, ptr, ty->name, lptr); - methods[i].ml_doc = ndoc; - } - } - } - } - } - } - - /* ----------------------------------------------------------------------------- - * Method creation and docstring support functions - * ----------------------------------------------------------------------------- */ - - /* ----------------------------------------------------------------------------- - * Function to find the method definition with the correct docstring for the - * proxy module as opposed to the low-level API - * ----------------------------------------------------------------------------- */ - - SWIGINTERN PyMethodDef *SWIG_PythonGetProxyDoc(const char *name) { - /* Find the function in the modified method table */ - size_t offset = 0; - int found = 0; - while (SwigMethods_proxydocs[offset].ml_meth != NULL) { - if (strcmp(SwigMethods_proxydocs[offset].ml_name, name) == 0) { - found = 1; - break; - } - offset++; - } - /* Use the copy with the modified docstring if available */ - return found ? &SwigMethods_proxydocs[offset] : NULL; - } - - /* ----------------------------------------------------------------------------- - * Wrapper of PyInstanceMethod_New() used in Python 3 - * It is exported to the generated module, used for -fastproxy - * ----------------------------------------------------------------------------- */ - - SWIGINTERN PyObject *SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func) { - if (PyCFunction_Check(func)) { - PyCFunctionObject *funcobj = (PyCFunctionObject *)func; - PyMethodDef *ml = SWIG_PythonGetProxyDoc(funcobj->m_ml->ml_name); - if (ml) - func = PyCFunction_NewEx(ml, funcobj->m_self, funcobj->m_module); - } -#if PY_VERSION_HEX >= 0x03000000 - return PyInstanceMethod_New(func); -#else - return PyMethod_New(func, NULL, NULL); -#endif - } - - /* ----------------------------------------------------------------------------- - * Wrapper of PyStaticMethod_New() - * It is exported to the generated module, used for -fastproxy - * ----------------------------------------------------------------------------- */ - - SWIGINTERN PyObject *SWIG_PyStaticMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func) { - if (PyCFunction_Check(func)) { - PyCFunctionObject *funcobj = (PyCFunctionObject *)func; - PyMethodDef *ml = SWIG_PythonGetProxyDoc(funcobj->m_ml->ml_name); - if (ml) - func = PyCFunction_NewEx(ml, funcobj->m_self, funcobj->m_module); - } - return PyStaticMethod_New(func); - } - -#ifdef __cplusplus -} -#endif - -/* -----------------------------------------------------------------------------* - * Partial Init method - * -----------------------------------------------------------------------------*/ - -#ifdef __cplusplus -extern "C" -#endif - -SWIGEXPORT -#if PY_VERSION_HEX >= 0x03000000 -PyObject* -#else -void -#endif -SWIG_init(void) { - PyObject *m, *d, *md, *globals; - -#if PY_VERSION_HEX >= 0x03000000 - static struct PyModuleDef SWIG_module = { - PyModuleDef_HEAD_INIT, - SWIG_name, - NULL, - -1, - SwigMethods, - NULL, - NULL, - NULL, - NULL - }; -#endif - -#if defined(SWIGPYTHON_BUILTIN) - static SwigPyClientData SwigPyObject_clientdata = { - 0, 0, 0, 0, 0, 0, 0 - }; - static PyGetSetDef this_getset_def = { - (char *)"this", &SwigPyBuiltin_ThisClosure, NULL, NULL, NULL - }; - static SwigPyGetSet thisown_getset_closure = { - SwigPyObject_own, - SwigPyObject_own - }; - static PyGetSetDef thisown_getset_def = { - (char *)"thisown", SwigPyBuiltin_GetterClosure, SwigPyBuiltin_SetterClosure, NULL, &thisown_getset_closure - }; - PyTypeObject *builtin_pytype; - int builtin_base_count; - swig_type_info *builtin_basetype; - PyObject *tuple; - PyGetSetDescrObject *static_getset; - PyTypeObject *metatype; - PyTypeObject *swigpyobject; - SwigPyClientData *cd; - PyObject *public_interface, *public_symbol; - PyObject *this_descr; - PyObject *thisown_descr; - PyObject *self = 0; - int i; - - (void)builtin_pytype; - (void)builtin_base_count; - (void)builtin_basetype; - (void)tuple; - (void)static_getset; - (void)self; - - /* Metaclass is used to implement static member variables */ - metatype = SwigPyObjectType(); - assert(metatype); -#endif - - (void)globals; - - /* Create singletons now to avoid potential deadlocks with multi-threaded usage after module initialization */ - SWIG_This(); - SWIG_Python_TypeCache(); - SwigPyPacked_type(); -#ifndef SWIGPYTHON_BUILTIN - SwigPyObject_type(); -#endif - - /* Fix SwigMethods to carry the callback ptrs when needed */ - SWIG_Python_FixMethods(SwigMethods, swig_const_table, swig_types, swig_type_initial); - -#if PY_VERSION_HEX >= 0x03000000 - m = PyModule_Create(&SWIG_module); -#else - m = Py_InitModule(SWIG_name, SwigMethods); -#endif - - md = d = PyModule_GetDict(m); - (void)md; - - SWIG_InitializeModule(0); - -#ifdef SWIGPYTHON_BUILTIN - swigpyobject = SwigPyObject_TypeOnce(); - - SwigPyObject_stype = SWIG_MangledTypeQuery("_p_SwigPyObject"); - assert(SwigPyObject_stype); - cd = (SwigPyClientData*) SwigPyObject_stype->clientdata; - if (!cd) { - SwigPyObject_stype->clientdata = &SwigPyObject_clientdata; - SwigPyObject_clientdata.pytype = swigpyobject; - } else if (swigpyobject->tp_basicsize != cd->pytype->tp_basicsize) { - PyErr_SetString(PyExc_RuntimeError, "Import error: attempted to load two incompatible swig-generated modules."); -# if PY_VERSION_HEX >= 0x03000000 - return NULL; -# else - return; -# endif - } - - /* All objects have a 'this' attribute */ - this_descr = PyDescr_NewGetSet(SwigPyObject_type(), &this_getset_def); - (void)this_descr; - - /* All objects have a 'thisown' attribute */ - thisown_descr = PyDescr_NewGetSet(SwigPyObject_type(), &thisown_getset_def); - (void)thisown_descr; - - public_interface = PyList_New(0); - public_symbol = 0; - (void)public_symbol; - - PyDict_SetItemString(md, "__all__", public_interface); - Py_DECREF(public_interface); - for (i = 0; SwigMethods[i].ml_name != NULL; ++i) - SwigPyBuiltin_AddPublicSymbol(public_interface, SwigMethods[i].ml_name); - for (i = 0; swig_const_table[i].name != 0; ++i) - SwigPyBuiltin_AddPublicSymbol(public_interface, swig_const_table[i].name); -#endif - - SWIG_InstallConstants(d,swig_const_table); - - - hfst::set_warning_stream(&std::cerr); - - - // thread safe initialization - swig::container_owner_attribute(); - - SWIG_Python_SetConstant(d, "SFST_TYPE",SWIG_From_int(static_cast< int >(hfst::SFST_TYPE))); - SWIG_Python_SetConstant(d, "TROPICAL_OPENFST_TYPE",SWIG_From_int(static_cast< int >(hfst::TROPICAL_OPENFST_TYPE))); - SWIG_Python_SetConstant(d, "LOG_OPENFST_TYPE",SWIG_From_int(static_cast< int >(hfst::LOG_OPENFST_TYPE))); - SWIG_Python_SetConstant(d, "FOMA_TYPE",SWIG_From_int(static_cast< int >(hfst::FOMA_TYPE))); - SWIG_Python_SetConstant(d, "XFSM_TYPE",SWIG_From_int(static_cast< int >(hfst::XFSM_TYPE))); - SWIG_Python_SetConstant(d, "HFST_OL_TYPE",SWIG_From_int(static_cast< int >(hfst::HFST_OL_TYPE))); - SWIG_Python_SetConstant(d, "HFST_OLW_TYPE",SWIG_From_int(static_cast< int >(hfst::HFST_OLW_TYPE))); - SWIG_Python_SetConstant(d, "HFST2_TYPE",SWIG_From_int(static_cast< int >(hfst::HFST2_TYPE))); - SWIG_Python_SetConstant(d, "UNSPECIFIED_TYPE",SWIG_From_int(static_cast< int >(hfst::UNSPECIFIED_TYPE))); - SWIG_Python_SetConstant(d, "ERROR_TYPE",SWIG_From_int(static_cast< int >(hfst::ERROR_TYPE))); - SWIG_Python_SetConstant(d, "REPL_UP",SWIG_From_int(static_cast< int >(hfst::xeroxRules::REPL_UP))); - SWIG_Python_SetConstant(d, "REPL_DOWN",SWIG_From_int(static_cast< int >(hfst::xeroxRules::REPL_DOWN))); - SWIG_Python_SetConstant(d, "REPL_RIGHT",SWIG_From_int(static_cast< int >(hfst::xeroxRules::REPL_RIGHT))); - SWIG_Python_SetConstant(d, "REPL_LEFT",SWIG_From_int(static_cast< int >(hfst::xeroxRules::REPL_LEFT))); -#if PY_VERSION_HEX >= 0x03000000 - return m; -#else - return; -#endif -} - diff --git a/src/hfst-old-pypi/setup.py b/src/hfst-old-pypi/setup.py deleted file mode 100644 index 6630575..0000000 --- a/src/hfst-old-pypi/setup.py +++ /dev/null @@ -1,247 +0,0 @@ -#!/usr/bin/python3 - -""" -Setup for creating PIP packages for HFST Python bindings. - -Before running setup, make sure that the following C++ files -from 'libhfst_src/libhfst/src/parsers' have been generated from flex/yacc files -before copying (on linux and OS X by running 'make' and on windows -with 'compile-parsers-win.sh' located in 'libhfst_src/libhfst/src/parsers'): - - lexc-lexer.cc pmatch_lex.cc xfst-lexer.cc xre_lex.cc sfst-scanner.cc - lexc-parser.cc pmatch_parse.cc xfst-parser.cc xre_parse.cc sfst-compiler.cc - lexc-parser.hh pmatch_parse.hh xfst-parser.hh xre_parse.hh sfst-compiler.hh - -Compiling the extensions requires python, swig and a C++ compiler, -all located on a directory listed on system PATH. On linux and OS X, -readline and getline must be available. - -The setup script has been tested on linux with gcc 5.4.0, swig 3.0.12 and -python 3.5 and on windows with swig 3.0.5 and msvc 10.0 (with python 3.4) -and msvc 14.0 (with python 3.5 and 3.6). - -""" - -from distutils.unixccompiler import UnixCCompiler -from glob import glob -import os -from pprint import pprint -import re -from setuptools.command.build_ext import build_ext -from setuptools import Extension -from setuptools import setup -from sys import platform -from sys import version_info - - -# default to 10.9, unless the environment variable is set to something else -MACOSX_VERSION_MIN = os.environ.get('MACOSX_DEPLOYMENT_TARGET', '10.9') - -# Whether to use the C++ version of the foma back-end -FOMA_CPP = False - -# ----- SWIG CONFIGURATION ----- - -# HFST C++ headers needed by swig when creating the python/c++ interface -abs_libhfst_src_dir = os.path.abspath('libhfst_src/libhfst/src/') - -# Generate wrapper for C++ -swig_opts = ['-c++', '-I' + abs_libhfst_src_dir, '-Wall'] - -# ----- LINKER ARGUMENTS ----- - -# Readline is needed for hfst.start_xfst(). On windows the shell where HFST -# python bindings are run from has its own readline which will do. -extra_link_args = [] -include_readline = False -include_getline = False -if platform.startswith('linux') or platform == 'darwin': - include_readline = True - include_getline = True - extra_link_args.extend(['-lreadline', '-licudata', '-licuuc']) -if platform == 'darwin': - extra_link_args.append('-mmacosx-version-min=' + MACOSX_VERSION_MIN) - - -# ----- INCLUDE DIRECTORIES ----- - -# HFST headers needed when compiling the actual c++ extension -include_dirs = [os.path.abspath('./libhfst_src'), # config.h - os.path.abspath('./libhfst_src/back-ends'), - # os.path.abspath('./libhfst_src/back-ends/dlfcn'), # TODO include this on Windows? - # os.path.abspath('./libhfst_src/back-ends/sfst'), - os.path.abspath('./libhfst_src/libhfst/src'), - # os.path.abspath('./libhfst_src/libhfst/src/implementations'), - # os.path.abspath('./libhfst_src/libhfst/src/implementations/compose_intersect'), - # os.path.abspath('./libhfst_src/libhfst/src/implementations/optimized-lookup'), - os.path.abspath('./libhfst_src/libhfst/src/parsers'), - # os.path.abspath('./libhfst_src/libhfst/src/parsers/alphabet_src'), - # os.path.abspath('./libhfst_src/libhfst/src/parsers/io_src'), - # os.path.abspath('./libhfst_src/libhfst/src/parsers/rule_src'), - # os.path.abspath('./libhfst_src/libhfst/src/parsers/string_src'), - # os.path.abspath('./libhfst_src/libhfst/src/parsers/variable_src') - ] -if FOMA_CPP: - include_dirs.append(os.path.abspath('./libhfst_src/back-ends/foma/cpp-version')) - # some headers are only in foma/ - include_dirs.append(os.path.abspath('./libhfst_src/back-ends/foma')) -else: - include_dirs.append(os.path.abspath('./libhfst_src/back-ends/foma')) -if platform == 'win32': - include_dirs.append(os.path.abspath('./libhfst_src/back-ends/dlfcn')) - include_dirs.append(os.path.abspath('./libhfst_src/back-ends/openfstwin/src/include')) - # include_dirs.append(os.path.abspath('./libhfst_src/back-ends/openfstwin/src/include/fst')) -else: - include_dirs.append(os.path.abspath('./libhfst_src/back-ends/openfst/src/include')) - # include_dirs.append(os.path.abspath('./libhfst_src/back-ends/openfst/src/include/fst')) - - -# ----- MACROS CONFIGURATION ----- - -define_macros = [] -define_macros.append(('HAVE_FOMA', None)) -define_macros.append(('HAVE_OPENFST', None)) -define_macros.append(('HAVE_OPENFST_LOG', None)) - -if include_readline: - define_macros.append(('HAVE_READLINE', None)) -if include_getline: - define_macros.append(('HAVE_GETLINE', None)) - -# msvc-specific macros. -if platform == 'win32': - # MSC_VER_ should already be defined - for macro in ['HFSTEXPORT', 'OPENFSTEXPORT', 'WINDOWS', 'WIN32', - '_CRT_SECURE_NO_WARNINGS']: - define_macros.append((macro, None)) - -# If C++11 is not supported, what features will be disabled and where unordered -# map and set are found. -# if platform == 'win32': - # Disable c++11 features. - # define_macros.append(('NO_CPLUSPLUS_11', None)) - # Unordered containers are in namespace std::tr1. - # define_macros.append(('USE_TR1_UNORDERED_MAP_AND_SET', None)) - # On windows, the header files are not located in directory tr1 - # although the namespace is std::tr1. -# if platform != 'win32': -# define_macros.append(('INCLUDE_TR1_UNORDERED_MAP_AND_SET', None)) - - -# ----- COMPILATION OPTIONS ----- - -extra_compile_args = [] # C and C++ flags -extra_cpp_args = [] # C++ flags - -if platform == 'darwin' or platform.startswith('linux'): - extra_compile_args.extend(['-Wno-sign-compare', '-Wno-strict-prototypes']) - extra_cpp_args.extend(['-std=c++11']) - -if platform == 'darwin': - extra_cpp_args.extend(['-stdlib=libc++', - '-mmacosx-version-min=' + MACOSX_VERSION_MIN]) -elif platform == 'win32': - # define error handling mechanism on windows - extra_compile_args = ['/EHsc'] - - -# ----- C++ SOURCE FILES ----- - - -if FOMA_CPP: - foma_glob_pattern = 'libhfst_src/back-ends/foma/cpp-version/*.cc' -else: - foma_glob_pattern = 'libhfst_src/back-ends/foma/*.c' -foma_exclude = ('foma', 'iface', 'lex.cmatrix', 'lex.interface', 'stack') -foma_exclude_re = '/(?:' + '|'.join(re.escape(f) for f in foma_exclude) + r')\.cc?$' -foma_glob = [fname for fname in glob(foma_glob_pattern) - if not re.search(foma_exclude_re, fname)] - -# on windows, openfst back-end is in directory 'openfstwin' -if platform == 'win32': - openfst_glob_pattern = 'libhfst_src/back-ends/openfstwin/src/lib/*.cc' -else: - openfst_glob_pattern = 'libhfst_src/back-ends/openfst/src/lib/*.cc' -openfst_glob = glob(openfst_glob_pattern) - -base_path = 'libhfst_src/libhfst/src/' -libhfst_glob = (glob(base_path + '*.cc') - + glob(base_path + 'implementations/*.cc') - + glob(base_path + 'implementations/compose_intersect/*.cc') - + glob(base_path + 'implementations/optimized-lookup/*.cc') - + glob(base_path + 'parsers/*.cc') - + glob(base_path + 'parsers/alphabet_src/*.cc') - + glob(base_path + 'parsers/io_src/*.cc') - + glob(base_path + 'parsers/rule_src/*.cc') - + glob(base_path + 'parsers/string_src/*.cc') - + glob(base_path + 'parsers/variable_src/*.cc')) -libhfst_exclude = ('HfstXeroxRulesTest', 'ConvertSfstTransducer', - 'ConvertXfsmTransducer', 'HfstTransitionGraph', - 'MyTransducerLibraryTransducer', 'SfstTransducer', - 'XfsmTransducer') -libhfst_exclude_re = '/(?:' + '|'.join(libhfst_exclude) + r')\.cc$' -libhfst_glob = [fname for fname in libhfst_glob - if not re.search(libhfst_exclude_re, fname)] - -libhfst_src_files = (libhfst_glob + foma_glob + openfst_glob) - - -package_data = {'hfst': []} -if platform == 'win32': - if version_info >= (3, 4, 0): - package_data['hfst'].extend(['MSVCP140.DLL', 'VCRUNTIME140.DLL']) - -# ----- The HFST C++ EXTENSION ----- - - -class CCxxCompiler(UnixCCompiler): - """User different flags for C and C++. - - Adapted from https://stackoverflow.com/a/65865696/2903532 - """ - def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): - if os.path.splitext(src)[-1] in ('.cpp', '.cxx', '.cc'): - _cc_args = extra_cpp_args + cc_args - try: - _cc_args.remove('-Wno-strict-prototypes') - except ValueError: - pass - else: - _cc_args = cc_args - UnixCCompiler._compile(self, obj, src, ext, _cc_args, extra_postargs, - pp_opts) - - -class BuildCCxxExtensions(build_ext): - """Adapted from https://stackoverflow.com/a/65865696/2903532""" - def build_extensions(self, ext): - if self.compiler.compiler_type == 'unix': - # Replace the compiler - old_compiler = self.compiler - self.compiler = CCxxCompiler() - - # Copy its attributes - for attr, value in old_compiler.__dict__.items(): - setattr(self.compiler, attr, value) - build_ext.build_extensions(self, ext) - - -libhfst_extension_kwargs = {'language': 'c++', - # sources: ['src/hfst/libhfst.i'] + libhfst_src_files, - # swig_opts: swig_opts, - # swig-pre-generated source: - 'sources': ['src/hfst/libhfst_wrap.cpp'] + libhfst_src_files, - 'include_dirs': include_dirs, - # 'library_dirs': [abs_libhfst_src_dir + '/.libs'], - # 'libraries': ['hfst'], - 'define_macros': define_macros, - 'extra_compile_args': extra_compile_args, - 'extra_link_args': extra_link_args, - } -print('C++ extension arguments:') -pprint(libhfst_extension_kwargs) -_libhfst = Extension('hfst._libhfst', **libhfst_extension_kwargs) - -# NOTE: metadata taken from setup.cfg (setup.cfg overrides setup.py) -setup(ext_modules=[_libhfst], - package_data=package_data) diff --git a/src/hfst-old-pypi/sfst_rules/__init__.py b/src/hfst-old-pypi/sfst_rules/__init__.py deleted file mode 100644 index 86c287e..0000000 --- a/src/hfst-old-pypi/sfst_rules/__init__.py +++ /dev/null @@ -1,28 +0,0 @@ -""" -functions for creating transducers implementing two-level rules -""" - -from hfst.libhfst import coercion -from hfst.libhfst import deep_coercion -from hfst.libhfst import deep_restriction -from hfst.libhfst import deep_restriction_and_coercion -from hfst.libhfst import left_replace_down -from hfst.libhfst import left_replace_down_karttunen -from hfst.libhfst import left_replace_left -from hfst.libhfst import left_replace_right -from hfst.libhfst import left_replace_up -from hfst.libhfst import left_replace_up -from hfst.libhfst import replace_down -from hfst.libhfst import replace_down -from hfst.libhfst import replace_down_karttunen -from hfst.libhfst import replace_left -from hfst.libhfst import replace_right -from hfst.libhfst import replace_up -from hfst.libhfst import restriction -from hfst.libhfst import restriction_and_coercion -from hfst.libhfst import surface_coercion -from hfst.libhfst import surface_restriction -from hfst.libhfst import surface_restriction_and_coercion -from hfst.libhfst import two_level_if -from hfst.libhfst import two_level_if_and_only_if -from hfst.libhfst import two_level_only_if diff --git a/src/hfst-old-pypi/version.py b/src/hfst-old-pypi/version.py deleted file mode 100644 index f01529b..0000000 --- a/src/hfst-old-pypi/version.py +++ /dev/null @@ -1 +0,0 @@ -version = '3.16.0.0' diff --git a/src/hfst-old-pypi/xerox_rules/__init__.py b/src/hfst-old-pypi/xerox_rules/__init__.py deleted file mode 100644 index d4867f9..0000000 --- a/src/hfst-old-pypi/xerox_rules/__init__.py +++ /dev/null @@ -1,44 +0,0 @@ -""" - -Hfst Xerox-type rule functions and classes. - -""" - -import hfst.libhfst -from hfst.libhfst import after -from hfst.libhfst import before -from hfst.libhfst import replace -from hfst.libhfst import replace_epenthesis -from hfst.libhfst import replace_leftmost_longest_match -from hfst.libhfst import replace_leftmost_shortest_match -from hfst.libhfst import replace_rightmost_longest_match -from hfst.libhfst import replace_rightmost_shortest_match -from hfst.libhfst import REPL_DOWN -from hfst.libhfst import REPL_LEFT -from hfst.libhfst import REPL_RIGHT -from hfst.libhfst import REPL_UP -from hfst.libhfst import Rule - - -# these functions had to be renamed in the swig interface -# to prevent name collision -from hfst.libhfst import xerox_replace_left as replace_left -from hfst.libhfst import xerox_restriction as restriction - - -class ReplaceType: - """ - Replace type in Xerox-type rules. - - Attributes: - - REPL_UP: Match contexts on input level - REPL_DOWN: Match contexts on output level - REPL_RIGHT: Match left contexts on input level and right contexts on output level - REPL_LEFT: Match left contexts on output level and right contexts on input level - - """ - REPL_UP = hfst.libhfst.REPL_UP - REPL_DOWN = hfst.libhfst.REPL_DOWN - REPL_RIGHT = hfst.libhfst.REPL_RIGHT - REPL_LEFT = hfst.libhfst.REPL_LEFT diff --git a/src/hfst/README b/src/hfst/README deleted file mode 100644 index e0ef3df..0000000 --- a/src/hfst/README +++ /dev/null @@ -1,117 +0,0 @@ - -This folder contains source code for SWIG bindings for using HFST library with -Python. The bindings work with Python version 2.7 and from version 3.4 upwards. - -============ -REQUIREMENTS -============ - -The requirements for HFST C++ library are given in README of parent directory. -Compiling the bindings requires swig (tested with version 3.0.12) and -distutils (tested with version 36.0.1) as well as a C++ compiler (tested with -gcc 5.4.0). - -===================== -BUILDING THE BINDINGS -===================== - -Building and installation is done using the standard Python module distutils. -Once you've successfully built and installed HFST library (located in the -parent directory, if you are compiling from source), use the script setup.py -to build the Python extension eg. like so: - - python setup.py build_ext --inplace - -If you have only built HFST library but not installed it (or have an earlier -version of HFST library installed) and want to build the bindings, running - - python setup.py build_ext --inplace --local-hfst - -will link to the HFST library located in ../libhfst/src. - - -================= -RUNNING THE TESTS -================= - -The folder 'test' contains tests for the bindings. See test/README for more -information. - - -======================= -INSTALLING THE BINDINGS -======================= - -If you wish to install the extension, run - - python setup.py install - -The same that was said about linking to HFST C++ library in 'Building the -bindings' above, applies also to installing. - - -For further information, consult - - python setup.py --help - python setup.py --help-commands - -and the distutils documentation. - - -================== -USING THE BINDINGS -================== - -The bindings should be usable after installation in Python with command: - - import hfst - -NOTE: If you want to use Python bindings locally, either add the absolute path -to this folder to PYTHONPATH, e.g. by executing - - PYTHONPATH="path/to/hfst-top-dir/python:"$PYTHONPATH - -or do the following in Python before importing hfst: - - import sys - sys.path.insert(1, 'path/to/hfst-top-dir/python') - - -==================== -THE PYTHON INTERFACE -==================== - -C++ side functions and classes are wrapped with SWIG under module 'libhfst'. It -is possible to use this module directly, but there is a package named 'hfst' -which encapsulates the libhfst module in a more user-friendly manner. The -structure of the package is - - * hfst - * hfst.exceptions - * hfst.sfst_rules - * hfst.xerox_rules - -The module hfst.exceptions contains HfstException and its subclasses. The -modules hfst.sfst_rules and hfst.xerox_rules contain functions that create -transducers implementing replace and two-level rules. All other functions and -classes are in module hfst. - -For documentation and examples, see . - - -========== -KNOWN BUGS -========== - -Some version combinations of SWIG and Python make HFST exception classes -subclasses of Python's _object instead of Exception. Then you will get an -error like - - TypeError: catching classes that do not inherit from BaseException is not allowed - -If this is the case, run - - sed -i 's/class HfstException(_object):/class HfstException(Exception):/' libhfst.py - -after build/installation to be able to use HfstException and its subclasses in -Python. diff --git a/src/hfst/version.py b/src/hfst/version.py index ef7149f..1965814 100644 --- a/src/hfst/version.py +++ b/src/hfst/version.py @@ -1 +1 @@ -version = '3.16.0.1' +version = "3.16.0.2" From a132c25a9f25151b11b1166788b31b6c40c882d6 Mon Sep 17 00:00:00 2001 From: reynoldsnlp Date: Thu, 29 Jun 2023 10:31:26 -0600 Subject: [PATCH 2/3] fix post-commit; rm Makefile --- MANIFEST.in | 1 - scripts/post-commit | 12 +- src/hfst/Makefile | 687 ------------------------------------------- src/hfst/Makefile.am | 29 -- src/hfst/Makefile.in | 687 ------------------------------------------- 5 files changed, 6 insertions(+), 1410 deletions(-) delete mode 100644 src/hfst/Makefile delete mode 100644 src/hfst/Makefile.am delete mode 100644 src/hfst/Makefile.in diff --git a/MANIFEST.in b/MANIFEST.in index e4c6a29..410fc0a 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -6,4 +6,3 @@ exclude libhfst_src/libhfst/src/parsers/commandline_src/*.h include src/hfst/*.cpp include src/hfst/docstrings.i include src/hfst/libhfst.i -include VERSION diff --git a/scripts/post-commit b/scripts/post-commit index 0262f99..9ec20c4 100755 --- a/scripts/post-commit +++ b/scripts/post-commit @@ -15,8 +15,8 @@ sys.stdin = open('/dev/tty') print(f'Running {__file__}...', file=sys.stderr) -with open('VERSION') as f: - file_version = f.read().strip() +with open('src/hfst/version.py') as f: + file_version = re.search(r'version = "([^"]+)"', f.read().strip()).group(1) try: with open('tag_commit.tmp') as f: @@ -29,14 +29,14 @@ log = subprocess.run(['git', 'log', '-1', '-p'], stdout=subprocess.PIPE, universal_newlines=True).stdout -diff = '\ndiff --git a/VERSION ' in log +diff = '\ndiff --git a/src/hfst/version.py ' in log if diff: - version_diff = re.search(r'^(diff --git a/VERSION .*?)(?:\Z|^diff --git a/)', + version_diff = re.search(r'^(diff --git a/src/hfst/version.py .*?)(?:\Z|^diff --git a/)', log, re.S | re.M).group(1) - log_version = re.search(r'^\+\s*([0-9.b]+)\s*$', + log_version = re.search(r'^\+\s*version = "([0-9.b]+)"\s*$', version_diff, re.M).group(1) if log_version != file_version: - warnings.warn('VERSION has been changed since the latest commit.') + warnings.warn('src/hfst/version.py has been changed since the latest commit.') if is_release: response = input(f'This commit changed the version to {log_version}. ' 'Confirm that you want to tag this commit to ' diff --git a/src/hfst/Makefile b/src/hfst/Makefile deleted file mode 100644 index 47e3b5f..0000000 --- a/src/hfst/Makefile +++ /dev/null @@ -1,687 +0,0 @@ -# Makefile.in generated by automake 1.16.5 from Makefile.am. -# python/Makefile. Generated from Makefile.in by configure. - -# Copyright (C) 1994-2021 Free Software Foundation, Inc. - -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - - - -# Copyright (c) 2016 University of Helsinki -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 3 of the License, or (at your option) any later version. -# See the file COPYING included with this distribution for more -# information. - -am__is_gnu_make = { \ - if test -z '$(MAKELEVEL)'; then \ - false; \ - elif test -n '$(MAKE_HOST)'; then \ - true; \ - elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ - true; \ - else \ - false; \ - fi; \ -} -am__make_running_with_option = \ - case $${target_option-} in \ - ?) ;; \ - *) echo "am__make_running_with_option: internal error: invalid" \ - "target option '$${target_option-}' specified" >&2; \ - exit 1;; \ - esac; \ - has_opt=no; \ - sane_makeflags=$$MAKEFLAGS; \ - if $(am__is_gnu_make); then \ - sane_makeflags=$$MFLAGS; \ - else \ - case $$MAKEFLAGS in \ - *\\[\ \ ]*) \ - bs=\\; \ - sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ - | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ - esac; \ - fi; \ - skip_next=no; \ - strip_trailopt () \ - { \ - flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ - }; \ - for flg in $$sane_makeflags; do \ - test $$skip_next = yes && { skip_next=no; continue; }; \ - case $$flg in \ - *=*|--*) continue;; \ - -*I) strip_trailopt 'I'; skip_next=yes;; \ - -*I?*) strip_trailopt 'I';; \ - -*O) strip_trailopt 'O'; skip_next=yes;; \ - -*O?*) strip_trailopt 'O';; \ - -*l) strip_trailopt 'l'; skip_next=yes;; \ - -*l?*) strip_trailopt 'l';; \ - -[dEDm]) skip_next=yes;; \ - -[JT]) skip_next=yes;; \ - esac; \ - case $$flg in \ - *$$target_option*) has_opt=yes; break;; \ - esac; \ - done; \ - test $$has_opt = yes -am__make_dryrun = (target_option=n; $(am__make_running_with_option)) -am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) -pkgdatadir = $(datadir)/hfst -pkgincludedir = $(includedir)/hfst -pkglibdir = $(libdir)/hfst -pkglibexecdir = $(libexecdir)/hfst -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = x86_64-pc-linux-gnu -host_triplet = x86_64-pc-linux-gnu -subdir = python -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/ax_check_compile_flag.m4 \ - $(top_srcdir)/m4/ax_check_icu.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/config.h \ - $(top_builddir)/libhfst/src/hfst.hpp -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -AM_V_P = $(am__v_P_$(V)) -am__v_P_ = $(am__v_P_$(AM_DEFAULT_VERBOSITY)) -am__v_P_0 = false -am__v_P_1 = : -AM_V_GEN = $(am__v_GEN_$(V)) -am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) -am__v_GEN_0 = @echo " GEN " $@; -am__v_GEN_1 = -AM_V_at = $(am__v_at_$(V)) -am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) -am__v_at_0 = @ -am__v_at_1 = -SOURCES = -DIST_SOURCES = -RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ - ctags-recursive dvi-recursive html-recursive info-recursive \ - install-data-recursive install-dvi-recursive \ - install-exec-recursive install-html-recursive \ - install-info-recursive install-pdf-recursive \ - install-ps-recursive install-recursive installcheck-recursive \ - installdirs-recursive pdf-recursive ps-recursive \ - tags-recursive uninstall-recursive -am__can_run_installinfo = \ - case $$AM_UPDATE_INFO_DIR in \ - n|no|NO) false;; \ - *) (install-info --version) >/dev/null 2>&1;; \ - esac -RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ - distclean-recursive maintainer-clean-recursive -am__recursive_targets = \ - $(RECURSIVE_TARGETS) \ - $(RECURSIVE_CLEAN_TARGETS) \ - $(am__extra_recursive_targets) -AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ - distdir distdir-am -am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) -# Read a list of newline-separated strings from the standard input, -# and print each of them once, without duplicates. Input order is -# *not* preserved. -am__uniquify_input = $(AWK) '\ - BEGIN { nonempty = 0; } \ - { items[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in items) print i; }; } \ -' -# Make sure the list of sources is unique. This is necessary because, -# e.g., the same source file might be shared among _SOURCES variables -# for different programs/libraries. -am__define_uniq_tagged_files = \ - list='$(am__tagged_files)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | $(am__uniquify_input)` -DIST_SUBDIRS = $(SUBDIRS) -am__DIST_COMMON = $(srcdir)/Makefile.in COPYING README -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -am__relativize = \ - dir0=`pwd`; \ - sed_first='s,^\([^/]*\)/.*$$,\1,'; \ - sed_rest='s,^[^/]*/*,,'; \ - sed_last='s,^.*/\([^/]*\)$$,\1,'; \ - sed_butlast='s,/*[^/]*$$,,'; \ - while test -n "$$dir1"; do \ - first=`echo "$$dir1" | sed -e "$$sed_first"`; \ - if test "$$first" != "."; then \ - if test "$$first" = ".."; then \ - dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ - dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ - else \ - first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ - if test "$$first2" = "$$first"; then \ - dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ - else \ - dir2="../$$dir2"; \ - fi; \ - dir0="$$dir0"/"$$first"; \ - fi; \ - fi; \ - dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ - done; \ - reldir="$$dir2" -ACLOCAL = ${SHELL} '/home/rob/repos/hfst/build-aux/missing' aclocal-1.16 -AMTAR = $${TAR-tar} -AM_DEFAULT_VERBOSITY = 1 -AR = ar -AUTOCONF = ${SHELL} '/home/rob/repos/hfst/build-aux/missing' autoconf -AUTOHEADER = ${SHELL} '/home/rob/repos/hfst/build-aux/missing' autoheader -AUTOMAKE = ${SHELL} '/home/rob/repos/hfst/build-aux/missing' automake-1.16 -AWK = gawk -CC = gcc -CCDEPMODE = depmode=gcc3 -CFLAGS = -g -O2 -CPP = gcc -E -CPPFLAGS = -CSCOPE = cscope -CTAGS = ctags -CXX = g++ -CXXCPP = g++ -E -CXXDEPMODE = depmode=gcc3 -CXXFLAGS = -g -O2 -std=c++14 -msse -msse2 -mfpmath=sse -CYGPATH_W = echo -DEFS = -DHAVE_CONFIG_H -DEPDIR = .deps -DLLTOOL = false -DOXYGEN = no -DSYMUTIL = -DUMPBIN = -ECHO_C = -ECHO_N = -n -ECHO_T = -EGREP = /usr/bin/grep -E -ETAGS = etags -EXEEXT = -FGREP = /usr/bin/grep -F -GETOPT = false -GREP = /usr/bin/grep -ICU_CFLAGS = -ICU_CONFIG = no -ICU_CPPFLAGS = -ICU_CXXFLAGS = -std=c++11 -ICU_LIBS = -licui18n -licuuc -licudata -INSTALL = /usr/bin/install -c -INSTALL_DATA = ${INSTALL} -m 644 -INSTALL_PROGRAM = ${INSTALL} -INSTALL_SCRIPT = ${INSTALL} -INSTALL_STRIP_PROGRAM = $(install_sh) -c -s -LD = /usr/bin/ld -m elf_x86_64 -LDFLAGS = -LEX = : -LEXLIB = -LEX_OUTPUT_ROOT = -LIBHFST_EXTENSION = 0 -LIBHFST_MAJOR = 3 -LIBHFST_MINOR = 16 -LIBHFST_NAME = hfst -LIBHFST_VERSION = 3.16.0 -LIBOBJS = -LIBS = -lm -lpthread -ldl -LIBTOOL = $(SHELL) $(top_builddir)/libtool -LIPO = -LN_S = ln -s -LTLIBOBJS = -LT_SYS_LIBRARY_PATH = -MAKEINFO = ${SHELL} '/home/rob/repos/hfst/build-aux/missing' makeinfo -MANIFEST_TOOL = : -MKDIR_P = /usr/bin/mkdir -p -NM = /usr/bin/nm -B -NMEDIT = -OBJDUMP = objdump -OBJEXT = o -OTOOL = -OTOOL64 = -PACKAGE = hfst -PACKAGE_BUGREPORT = hfst-bugs@helsinki.fi -PACKAGE_NAME = hfst -PACKAGE_STRING = hfst 3.16.0 -PACKAGE_TARNAME = hfst -PACKAGE_URL = -PACKAGE_VERSION = 3.16.0 -PATH_SEPARATOR = : -PKG_CONFIG = /usr/bin/pkg-config -PYTHON = /usr/bin/python3 -PYTHON_EXEC_PREFIX = ${exec_prefix} -PYTHON_INSTALL_PARAMS = --prefix=$(prefix) --root=$(DESTDIR)/ -PYTHON_PLATFORM = linux -PYTHON_PREFIX = ${prefix} -PYTHON_VERSION = 3.10 -RANLIB = ranlib -SED = /usr/bin/sed -SET_MAKE = -SHELL = /bin/bash -STRIP = strip -VERSION = 3.16.0 -YACC = bison -y -YFLAGS = -abs_builddir = /home/rob/repos/hfst/python -abs_srcdir = /home/rob/repos/hfst/python -abs_top_builddir = /home/rob/repos/hfst -abs_top_srcdir = /home/rob/repos/hfst -ac_ct_AR = ar -ac_ct_CC = gcc -ac_ct_CXX = g++ -ac_ct_DUMPBIN = -am__include = include -am__leading_dot = . -am__quote = -am__tar = $${TAR-tar} chof - "$$tardir" -am__untar = $${TAR-tar} xf - -bindir = ${exec_prefix}/bin -build = x86_64-pc-linux-gnu -build_alias = -build_cpu = x86_64 -build_os = linux-gnu -build_vendor = pc -builddir = . -datadir = ${datarootdir} -datarootdir = ${prefix}/share -docdir = ${datarootdir}/doc/${PACKAGE_TARNAME} -dvidir = ${docdir} -exec_prefix = ${prefix} -host = x86_64-pc-linux-gnu -host_alias = -host_cpu = x86_64 -host_os = linux-gnu -host_vendor = pc -htmldir = ${docdir} -includedir = ${prefix}/include -infodir = ${datarootdir}/info -install_sh = ${SHELL} /home/rob/repos/hfst/build-aux/install-sh -libdir = ${exec_prefix}/lib -libexecdir = ${exec_prefix}/libexec -localedir = ${datarootdir}/locale -localstatedir = ${prefix}/var -mandir = ${datarootdir}/man -mkdir_p = $(MKDIR_P) -oldincludedir = /usr/include -pdfdir = ${docdir} -pkgpyexecdir = ${pyexecdir}/hfst -pkgpythondir = ${pythondir}/hfst -prefix = /usr/local -program_transform_name = s,x,x, -psdir = ${docdir} -pyexecdir = ${PYTHON_EXEC_PREFIX}/lib/python3.10/site-packages -pythondir = ${PYTHON_PREFIX}/lib/python3.10/site-packages -runstatedir = ${localstatedir}/run -sbindir = ${exec_prefix}/sbin -sharedstatedir = ${prefix}/com -srcdir = . -sysconfdir = ${prefix}/etc -target_alias = -top_build_prefix = ../ -top_builddir = .. -top_srcdir = .. -SWIG_INTERFACE = libhfst.i -BUILT_SOURCES = %_wrap.cpp.cpp -SUBDIRS = test -EXTRA_DIST = libhfst.i docstrings.i README setup.py \ -hfst_extensions.cpp hfst_file_extensions.cpp hfst_lexc_extensions.cpp hfst_sfst_extensions.cpp \ -hfst_lookup_extensions.cpp hfst_pmatch_extensions.cpp hfst_prolog_extensions.cpp \ -hfst_regex_extensions.cpp hfst_rules_extensions.cpp hfst_xfst_extensions.cpp \ -hfst_pmatch_tokenize_extensions.cpp \ -hfst/__init__.py hfst/exceptions/__init__.py hfst/sfst_rules/__init__.py \ -hfst/xerox_rules/__init__.py - -AUTOMAKE_OPTIONS = subdir-objects -all: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) all-recursive - -.SUFFIXES: -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign python/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign python/Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -# This directory's subdirectories are mostly independent; you can cd -# into them and run 'make' without going through this Makefile. -# To change the values of 'make' variables: instead of editing Makefiles, -# (1) if the variable is set in 'config.status', edit 'config.status' -# (which will cause the Makefiles to be regenerated when you run 'make'); -# (2) otherwise, pass the desired values on the 'make' command line. -$(am__recursive_targets): - @fail=; \ - if $(am__make_keepgoing); then \ - failcom='fail=yes'; \ - else \ - failcom='exit 1'; \ - fi; \ - dot_seen=no; \ - target=`echo $@ | sed s/-recursive//`; \ - case "$@" in \ - distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ - *) list='$(SUBDIRS)' ;; \ - esac; \ - for subdir in $$list; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - dot_seen=yes; \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done; \ - if test "$$dot_seen" = "no"; then \ - $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ - fi; test -z "$$fail" - -ID: $(am__tagged_files) - $(am__define_uniq_tagged_files); mkid -fID $$unique -tags: tags-recursive -TAGS: tags - -tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) - set x; \ - here=`pwd`; \ - if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ - include_option=--etags-include; \ - empty_fix=.; \ - else \ - include_option=--include; \ - empty_fix=; \ - fi; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test ! -f $$subdir/TAGS || \ - set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ - fi; \ - done; \ - $(am__define_uniq_tagged_files); \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: ctags-recursive - -CTAGS: ctags -ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) - $(am__define_uniq_tagged_files); \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" -cscopelist: cscopelist-recursive - -cscopelist-am: $(am__tagged_files) - list='$(am__tagged_files)'; \ - case "$(srcdir)" in \ - [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ - *) sdir=$(subdir)/$(srcdir) ;; \ - esac; \ - for i in $$list; do \ - if test -f "$$i"; then \ - echo "$(subdir)/$$i"; \ - else \ - echo "$$sdir/$$i"; \ - fi; \ - done >> $(top_builddir)/cscope.files - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -distdir: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) distdir-am - -distdir-am: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done - @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - $(am__make_dryrun) \ - || test -d "$(distdir)/$$subdir" \ - || $(MKDIR_P) "$(distdir)/$$subdir" \ - || exit 1; \ - dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ - $(am__relativize); \ - new_distdir=$$reldir; \ - dir1=$$subdir; dir2="$(top_distdir)"; \ - $(am__relativize); \ - new_top_distdir=$$reldir; \ - echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ - echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ - ($(am__cd) $$subdir && \ - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$$new_top_distdir" \ - distdir="$$new_distdir" \ - am__remove_distdir=: \ - am__skip_length_check=: \ - am__skip_mode_fix=: \ - distdir) \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) check-recursive -all-am: Makefile -installdirs: installdirs-recursive -installdirs-am: -install: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) install-recursive -install-exec: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) install-exec-recursive -install-data: install-data-recursive -uninstall: uninstall-recursive - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-recursive -install-strip: - if test -z '$(STRIP)'; then \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - install; \ - else \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ - fi -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." - -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) -clean: clean-recursive - -clean-am: clean-generic clean-libtool mostlyclean-am - -distclean: distclean-recursive - -rm -f Makefile -distclean-am: clean-am distclean-generic distclean-tags - -dvi: dvi-recursive - -dvi-am: - -html: html-recursive - -html-am: - -info: info-recursive - -info-am: - -install-data-am: - -install-dvi: install-dvi-recursive - -install-dvi-am: - -install-exec-am: install-exec-local - -install-html: install-html-recursive - -install-html-am: - -install-info: install-info-recursive - -install-info-am: - -install-man: - -install-pdf: install-pdf-recursive - -install-pdf-am: - -install-ps: install-ps-recursive - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-recursive - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-recursive - -mostlyclean-am: mostlyclean-generic mostlyclean-libtool - -pdf: pdf-recursive - -pdf-am: - -ps: ps-recursive - -ps-am: - -uninstall-am: - -.MAKE: $(am__recursive_targets) all check install install-am \ - install-exec install-strip - -.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \ - check-am clean clean-generic clean-libtool cscopelist-am ctags \ - ctags-am distclean distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-exec-local \ - install-html install-html-am install-info install-info-am \ - install-man install-pdf install-pdf-am install-ps \ - install-ps-am install-strip installcheck installcheck-am \ - installdirs installdirs-am maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \ - uninstall-am - -.PRECIOUS: Makefile - - -%_wrap.cpp.cpp: $(SWIG_INTERFACE) setup.py - $(PYTHON) setup.py build - -install-exec-local: - $(PYTHON) setup.py install $(PYTHON_INSTALL_PARAMS) - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/src/hfst/Makefile.am b/src/hfst/Makefile.am deleted file mode 100644 index 8a610a5..0000000 --- a/src/hfst/Makefile.am +++ /dev/null @@ -1,29 +0,0 @@ -# Copyright (c) 2016 University of Helsinki -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 3 of the License, or (at your option) any later version. -# See the file COPYING included with this distribution for more -# information. - -SWIG_INTERFACE = libhfst.i - -BUILT_SOURCES = %_wrap.cpp.cpp - -%_wrap.cpp.cpp: $(SWIG_INTERFACE) setup.py - $(PYTHON) setup.py build - -install-exec-local: - $(PYTHON) setup.py install $(PYTHON_INSTALL_PARAMS) - -SUBDIRS = test -EXTRA_DIST = libhfst.i docstrings.i README setup.py \ -hfst_extensions.cpp hfst_file_extensions.cpp hfst_lexc_extensions.cpp hfst_sfst_extensions.cpp \ -hfst_lookup_extensions.cpp hfst_pmatch_extensions.cpp hfst_prolog_extensions.cpp \ -hfst_regex_extensions.cpp hfst_rules_extensions.cpp hfst_xfst_extensions.cpp \ -hfst_pmatch_tokenize_extensions.cpp \ -hfst/__init__.py hfst/exceptions/__init__.py hfst/sfst_rules/__init__.py \ -hfst/xerox_rules/__init__.py - -AUTOMAKE_OPTIONS = subdir-objects diff --git a/src/hfst/Makefile.in b/src/hfst/Makefile.in deleted file mode 100644 index 737f852..0000000 --- a/src/hfst/Makefile.in +++ /dev/null @@ -1,687 +0,0 @@ -# Makefile.in generated by automake 1.16.5 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994-2021 Free Software Foundation, Inc. - -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -# Copyright (c) 2016 University of Helsinki -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 3 of the License, or (at your option) any later version. -# See the file COPYING included with this distribution for more -# information. -VPATH = @srcdir@ -am__is_gnu_make = { \ - if test -z '$(MAKELEVEL)'; then \ - false; \ - elif test -n '$(MAKE_HOST)'; then \ - true; \ - elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ - true; \ - else \ - false; \ - fi; \ -} -am__make_running_with_option = \ - case $${target_option-} in \ - ?) ;; \ - *) echo "am__make_running_with_option: internal error: invalid" \ - "target option '$${target_option-}' specified" >&2; \ - exit 1;; \ - esac; \ - has_opt=no; \ - sane_makeflags=$$MAKEFLAGS; \ - if $(am__is_gnu_make); then \ - sane_makeflags=$$MFLAGS; \ - else \ - case $$MAKEFLAGS in \ - *\\[\ \ ]*) \ - bs=\\; \ - sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ - | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ - esac; \ - fi; \ - skip_next=no; \ - strip_trailopt () \ - { \ - flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ - }; \ - for flg in $$sane_makeflags; do \ - test $$skip_next = yes && { skip_next=no; continue; }; \ - case $$flg in \ - *=*|--*) continue;; \ - -*I) strip_trailopt 'I'; skip_next=yes;; \ - -*I?*) strip_trailopt 'I';; \ - -*O) strip_trailopt 'O'; skip_next=yes;; \ - -*O?*) strip_trailopt 'O';; \ - -*l) strip_trailopt 'l'; skip_next=yes;; \ - -*l?*) strip_trailopt 'l';; \ - -[dEDm]) skip_next=yes;; \ - -[JT]) skip_next=yes;; \ - esac; \ - case $$flg in \ - *$$target_option*) has_opt=yes; break;; \ - esac; \ - done; \ - test $$has_opt = yes -am__make_dryrun = (target_option=n; $(am__make_running_with_option)) -am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = python -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/ax_check_compile_flag.m4 \ - $(top_srcdir)/m4/ax_check_icu.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/config.h \ - $(top_builddir)/libhfst/src/hfst.hpp -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -AM_V_P = $(am__v_P_@AM_V@) -am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) -am__v_P_0 = false -am__v_P_1 = : -AM_V_GEN = $(am__v_GEN_@AM_V@) -am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) -am__v_GEN_0 = @echo " GEN " $@; -am__v_GEN_1 = -AM_V_at = $(am__v_at_@AM_V@) -am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) -am__v_at_0 = @ -am__v_at_1 = -SOURCES = -DIST_SOURCES = -RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ - ctags-recursive dvi-recursive html-recursive info-recursive \ - install-data-recursive install-dvi-recursive \ - install-exec-recursive install-html-recursive \ - install-info-recursive install-pdf-recursive \ - install-ps-recursive install-recursive installcheck-recursive \ - installdirs-recursive pdf-recursive ps-recursive \ - tags-recursive uninstall-recursive -am__can_run_installinfo = \ - case $$AM_UPDATE_INFO_DIR in \ - n|no|NO) false;; \ - *) (install-info --version) >/dev/null 2>&1;; \ - esac -RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ - distclean-recursive maintainer-clean-recursive -am__recursive_targets = \ - $(RECURSIVE_TARGETS) \ - $(RECURSIVE_CLEAN_TARGETS) \ - $(am__extra_recursive_targets) -AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ - distdir distdir-am -am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) -# Read a list of newline-separated strings from the standard input, -# and print each of them once, without duplicates. Input order is -# *not* preserved. -am__uniquify_input = $(AWK) '\ - BEGIN { nonempty = 0; } \ - { items[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in items) print i; }; } \ -' -# Make sure the list of sources is unique. This is necessary because, -# e.g., the same source file might be shared among _SOURCES variables -# for different programs/libraries. -am__define_uniq_tagged_files = \ - list='$(am__tagged_files)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | $(am__uniquify_input)` -DIST_SUBDIRS = $(SUBDIRS) -am__DIST_COMMON = $(srcdir)/Makefile.in COPYING README -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -am__relativize = \ - dir0=`pwd`; \ - sed_first='s,^\([^/]*\)/.*$$,\1,'; \ - sed_rest='s,^[^/]*/*,,'; \ - sed_last='s,^.*/\([^/]*\)$$,\1,'; \ - sed_butlast='s,/*[^/]*$$,,'; \ - while test -n "$$dir1"; do \ - first=`echo "$$dir1" | sed -e "$$sed_first"`; \ - if test "$$first" != "."; then \ - if test "$$first" = ".."; then \ - dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ - dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ - else \ - first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ - if test "$$first2" = "$$first"; then \ - dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ - else \ - dir2="../$$dir2"; \ - fi; \ - dir0="$$dir0"/"$$first"; \ - fi; \ - fi; \ - dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ - done; \ - reldir="$$dir2" -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CSCOPE = @CSCOPE@ -CTAGS = @CTAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DLLTOOL = @DLLTOOL@ -DOXYGEN = @DOXYGEN@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -ETAGS = @ETAGS@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -GETOPT = @GETOPT@ -GREP = @GREP@ -ICU_CFLAGS = @ICU_CFLAGS@ -ICU_CONFIG = @ICU_CONFIG@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_CXXFLAGS = @ICU_CXXFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LEX = @LEX@ -LEXLIB = @LEXLIB@ -LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ -LIBHFST_EXTENSION = @LIBHFST_EXTENSION@ -LIBHFST_MAJOR = @LIBHFST_MAJOR@ -LIBHFST_MINOR = @LIBHFST_MINOR@ -LIBHFST_NAME = @LIBHFST_NAME@ -LIBHFST_VERSION = @LIBHFST_VERSION@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ -MAKEINFO = @MAKEINFO@ -MANIFEST_TOOL = @MANIFEST_TOOL@ -MKDIR_P = @MKDIR_P@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ -PYTHON = @PYTHON@ -PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ -PYTHON_INSTALL_PARAMS = @PYTHON_INSTALL_PARAMS@ -PYTHON_PLATFORM = @PYTHON_PLATFORM@ -PYTHON_PREFIX = @PYTHON_PREFIX@ -PYTHON_VERSION = @PYTHON_VERSION@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -VERSION = @VERSION@ -YACC = @YACC@ -YFLAGS = @YFLAGS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_AR = @ac_ct_AR@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -pkgpyexecdir = @pkgpyexecdir@ -pkgpythondir = @pkgpythondir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -pyexecdir = @pyexecdir@ -pythondir = @pythondir@ -runstatedir = @runstatedir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -SWIG_INTERFACE = libhfst.i -BUILT_SOURCES = %_wrap.cpp.cpp -SUBDIRS = test -EXTRA_DIST = libhfst.i docstrings.i README setup.py \ -hfst_extensions.cpp hfst_file_extensions.cpp hfst_lexc_extensions.cpp hfst_sfst_extensions.cpp \ -hfst_lookup_extensions.cpp hfst_pmatch_extensions.cpp hfst_prolog_extensions.cpp \ -hfst_regex_extensions.cpp hfst_rules_extensions.cpp hfst_xfst_extensions.cpp \ -hfst_pmatch_tokenize_extensions.cpp \ -hfst/__init__.py hfst/exceptions/__init__.py hfst/sfst_rules/__init__.py \ -hfst/xerox_rules/__init__.py - -AUTOMAKE_OPTIONS = subdir-objects -all: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) all-recursive - -.SUFFIXES: -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign python/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign python/Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -# This directory's subdirectories are mostly independent; you can cd -# into them and run 'make' without going through this Makefile. -# To change the values of 'make' variables: instead of editing Makefiles, -# (1) if the variable is set in 'config.status', edit 'config.status' -# (which will cause the Makefiles to be regenerated when you run 'make'); -# (2) otherwise, pass the desired values on the 'make' command line. -$(am__recursive_targets): - @fail=; \ - if $(am__make_keepgoing); then \ - failcom='fail=yes'; \ - else \ - failcom='exit 1'; \ - fi; \ - dot_seen=no; \ - target=`echo $@ | sed s/-recursive//`; \ - case "$@" in \ - distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ - *) list='$(SUBDIRS)' ;; \ - esac; \ - for subdir in $$list; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - dot_seen=yes; \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done; \ - if test "$$dot_seen" = "no"; then \ - $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ - fi; test -z "$$fail" - -ID: $(am__tagged_files) - $(am__define_uniq_tagged_files); mkid -fID $$unique -tags: tags-recursive -TAGS: tags - -tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) - set x; \ - here=`pwd`; \ - if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ - include_option=--etags-include; \ - empty_fix=.; \ - else \ - include_option=--include; \ - empty_fix=; \ - fi; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test ! -f $$subdir/TAGS || \ - set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ - fi; \ - done; \ - $(am__define_uniq_tagged_files); \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: ctags-recursive - -CTAGS: ctags -ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) - $(am__define_uniq_tagged_files); \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" -cscopelist: cscopelist-recursive - -cscopelist-am: $(am__tagged_files) - list='$(am__tagged_files)'; \ - case "$(srcdir)" in \ - [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ - *) sdir=$(subdir)/$(srcdir) ;; \ - esac; \ - for i in $$list; do \ - if test -f "$$i"; then \ - echo "$(subdir)/$$i"; \ - else \ - echo "$$sdir/$$i"; \ - fi; \ - done >> $(top_builddir)/cscope.files - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -distdir: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) distdir-am - -distdir-am: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done - @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - $(am__make_dryrun) \ - || test -d "$(distdir)/$$subdir" \ - || $(MKDIR_P) "$(distdir)/$$subdir" \ - || exit 1; \ - dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ - $(am__relativize); \ - new_distdir=$$reldir; \ - dir1=$$subdir; dir2="$(top_distdir)"; \ - $(am__relativize); \ - new_top_distdir=$$reldir; \ - echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ - echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ - ($(am__cd) $$subdir && \ - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$$new_top_distdir" \ - distdir="$$new_distdir" \ - am__remove_distdir=: \ - am__skip_length_check=: \ - am__skip_mode_fix=: \ - distdir) \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) check-recursive -all-am: Makefile -installdirs: installdirs-recursive -installdirs-am: -install: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) install-recursive -install-exec: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) install-exec-recursive -install-data: install-data-recursive -uninstall: uninstall-recursive - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-recursive -install-strip: - if test -z '$(STRIP)'; then \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - install; \ - else \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ - fi -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." - -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) -clean: clean-recursive - -clean-am: clean-generic clean-libtool mostlyclean-am - -distclean: distclean-recursive - -rm -f Makefile -distclean-am: clean-am distclean-generic distclean-tags - -dvi: dvi-recursive - -dvi-am: - -html: html-recursive - -html-am: - -info: info-recursive - -info-am: - -install-data-am: - -install-dvi: install-dvi-recursive - -install-dvi-am: - -install-exec-am: install-exec-local - -install-html: install-html-recursive - -install-html-am: - -install-info: install-info-recursive - -install-info-am: - -install-man: - -install-pdf: install-pdf-recursive - -install-pdf-am: - -install-ps: install-ps-recursive - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-recursive - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-recursive - -mostlyclean-am: mostlyclean-generic mostlyclean-libtool - -pdf: pdf-recursive - -pdf-am: - -ps: ps-recursive - -ps-am: - -uninstall-am: - -.MAKE: $(am__recursive_targets) all check install install-am \ - install-exec install-strip - -.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \ - check-am clean clean-generic clean-libtool cscopelist-am ctags \ - ctags-am distclean distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-exec-local \ - install-html install-html-am install-info install-info-am \ - install-man install-pdf install-pdf-am install-ps \ - install-ps-am install-strip installcheck installcheck-am \ - installdirs installdirs-am maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \ - uninstall-am - -.PRECIOUS: Makefile - - -%_wrap.cpp.cpp: $(SWIG_INTERFACE) setup.py - $(PYTHON) setup.py build - -install-exec-local: - $(PYTHON) setup.py install $(PYTHON_INSTALL_PARAMS) - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: From 8338b462327b6b595edaba8922d01993cd92b8b3 Mon Sep 17 00:00:00 2001 From: reynoldsnlp Date: Thu, 29 Jun 2023 11:43:11 -0600 Subject: [PATCH 3/3] repair pyproject syntax --- pyproject.toml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index a739838..eca3490 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -73,12 +73,7 @@ before-all = "bash scripts/linux_before_all.sh" [tool.cibuildwheel.macos] archs = "x86_64 arm64" # Compare these environment variables to https://github.com/apertium/packaging/blob/main/osx-pre.sh -environment = { - CXXFLAGS="-std=gnu++11 -stdlib=libc++", - LDFLAGS="-stdlib=libc++ -L/usr/local/lib", - MACOSX_DEPLOYMENT_TARGET="10.9", - SDK_VERSION="10.9" -} +environment = { CXXFLAGS="-std=gnu++11 -stdlib=libc++", LDFLAGS="-stdlib=libc++ -L/usr/local/lib", MACOSX_DEPLOYMENT_TARGET="10.9", SDK_VERSION="10.9" } before-all = "bash scripts/macos_before_all.sh" [tool.cibuildwheel.windows]